tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Fwd: Making MPSAFE/Converting Wi-Fi driver (GSoC)



Sorry, neglected to CC mailing list...

On Sat, Apr 16, 2022 at 11:39 PM Jeandre Kruger
<jeandreckruger%gmail.com@localhost> wrote:
>
> On Thu, Apr 14, 2022 at 9:33 PM Martin Husemann <martin%duskware.de@localhost> wrote:
> > The work to be done is very different for ethernet and wifi drivers,
> > so I would not mix both in one proposal. You could offer two proposals,
> > one for bge(4) and [if time permits] alc(4), the other for athn(4) and
> > [if time permits] ath(4).
>
> Taking that suggestion, here are my draft proposals.  I'll appreciate
> any feedback.  (I put the Ethernet drivers the other way around,
> because alc(4) will be easier hardware-wise, but either way should be
> possible.)
>
> Update Atheros Wi-Fi driver(s) for new Wi-Fi stack
>
> SUMMARY
>
> The NetBSD Project has been working to adapt the FreeBSD Wi-Fi stack.
> When this is complete, things will be more up-to-date, and NetBSD will
> let one use multiple Virtual Access Points with the same Wi-Fi
> adapter.  As of yet, most of the Wi-Fi drivers need to be converted to
> the new stack.  The athn(4) driver will be reworked as necessary, and
> if time permits the ath(4) driver also.
>
> DELIVERABLES
>
> When complete, these devices will be usable on the "wifi" Mercurial
> topic with the new stack.
>
> IMPLEMENTATION
>
> This should be straightforward.  Among other things the driver will
> need to be changed to use fine-grained locking instead of the big
> kernel lock.  The existing converted drivers can serve for reference.
>
> My netbook has an Atheros 9285 Wi-Fi adapter.  The default (preferred)
> driver is athn(4), but it also works with the ath(4) driver, which
> supports a somewhat different set of Wi-Fi adapters.
>
> Previous discussion:
> http://mail-index.netbsd.org/tech-net/2022/04/13/msg008184.html
>
> SCHEDULE
>
> May 20-June 12 (UTC)
>
> Familiarize self with driver, necessary interfaces, & differences in
> new Wi-Fi stack.  Study in detail:
>
> https://wiki.netbsd.org/Testing_new_wifi/
> https://wiki.netbsd.org/Converting_drivers_to_the_new_wifi_stack/
>
> Begin coding a bit – dev/pci/if_athn_pci.c and dev/ic/athn.c
>
> Ascertain any possible problems, or necessary tasks not here
> mentioned, with help of mentor.
>
> June 13-June 27
>
> Official start of coding.  At least the most trivial changes of those
> outlined in wiki article should be made in athn(4).
>
> June 27-September 12
>
> Finish reworking and testing athn(4) as necessary.
>
> If athn(4) is completed soon enough, update the ath(4) driver analogously.
>
> September 12 End of coding
>
> Make Ethernet drivers MPSAFE: alc(4), possibly bge(4)
>
> SUMMARY
>
> The NetBSD network stack presently requires the big kernel lock to be
> held, limiting performance with multiple processor cores.  The alc(4)
> driver, for a range of Atheros Ethernet interfaces, will be reworked
> so as not to need the protection of the big kernel lock; and if
> possible and time permits, the bge(4) driver also, for Broadcom
> Gigabit interfaces.
>
> DELIVERABLES
>
> When completed the drivers will allow for greater performance with
> networking on SMP systems (provided the NET_MPSAFE kernel option is
> enabled).  Such Atheros Ethernet interfaces appear to be common, so
> hopefully this will be of some benefit to many NetBSD users.
>
> (Implementation as detailed in schedule.  I have access to more than
> one device with an Atheros Ethernet adapter, and a computer which
> shouldn't be hard to fix with a Broadcom Gigabit integrated
> controller.)
>
> SCHEDULE
>
> May 20-June 12 (UTC)
>
> Familiarize self with structure of alc(4) driver, Ethernet, and
> relevant NetBSD interfaces, as necessary.  Study doc/TODO.smpnet and
> dev/pci/if_alc.c.
>
> Use existing MPSAFE drivers for reference.  Determine what needs to be
> protected by mutexes.
>
> June 13-September 12
>
> Rework and test alc(4) as much as necessary.  If alc(4) is completed
> soon enough, begin work on bge(4) and convert it analogously.
>
> BIOGRAPHY
>
> Since beginning programming with Scratch at age 7 in 2011, I've gained
> some practice with various programming languages, including C and x86
> assembly.  I've written some small personal projects – if I don't just
> abandon them, they aren't usually very practical, but I learn
> something nevertheless.
>
> Trying out ancient UNIX and VAX BSDs on SimH was fun, although now it
> has been shown that ancient UNIX probably can't be redistributed
> outside the US.  I've found operating systems fascinating for most of
> my life – since before I began programming – and would be enthusiastic
> to help improve one.
>
> This is a simple game I wrote with C and SDL2:
> https://ldjam.com/events/ludum-dare/40/pet-overload
>
> The most recent thing I've programmed is a basic RISC-V M-mode
> emulator in Scratch – not capable of running NetBSD or any operating
> system, but it runs several small C and assembly programs, including a
> game and a simple Scheme interpreter:
> https://github.com/Jonathan50/scratch-risc-v-programs
>
> Contact: Email or on #netbsd-code


Home | Main Index | Thread Index | Old Index