Port-amiga archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Using NetBSD's TCP/IP stack for AmigaOS
swiftgriggs%gmail.com@localhost (Swift Griggs) writes:
>I'm evaluating undertaking an effort to adapt the NetBSD TCP/IP stack to
>AmigaOS 3.x as a replacement for bsdsocket.library due to issues with all
>existing Amiga stacks (Roadshow, AmiTCP, etc..).
You know that AmiTCP is based on Net/2 code ?
>* AmigaOS doesn't support any kind of kernel threads. The fine-graining
>and MP_SAFE stuff isn't needed and I'll have to adapt the code to that.
AmigaOS actually only knows "kernel" threads, it doesn't know SMP. But
there is no problem to just use the MP_SAFE stuff.
As AmigaOS software interrupts are something very different from
NetBSD softints, you have to replace them with threads.
>* The code would run in user space not in the kernel, any specific structs
>or features that only exist in kernel-space would need to go.
AmigaOS doesn't distinguish between kernel and user, so "running in user space"
has little meaning as the kernel runs "in user space" too.
>There are a
>lot, from kmem_*lloc*() to macros that get definied in places elsehwere in
>the kernel away from the network code but are needed. That's more tearout
>to cause regressions.
AmigaOS doesn't allow to allocate memory from interrupts, that's why
all network stacks implement their own mbuf pools.
>* The Amiga SANA-II driver has a different type of ethernet struct than
>BSD, but it's still close enough, methinks.
You would create a BSD-like interface driver for the "SANA-II" device.
Instead of pushing mbufs to bus_dma you would map this to the SANA-II
facilities. You probably need an "interrupt thread" that handles input,
this would also avoid issues with memory allocation.
One problem with the "interrupt thread" is additional overhead, something
you will notice on the slower hardware.
>* IPv6 is still a unicorn, especially in home-user environments. Not sure
>I want to take that on, either. I may also rip that out. Same for DCCP and
>SCTP
IPv6 (and to some degree IPSEC) is nowadays required all over the world
and I even use an Amiga (running NetBSD) that utilizes both.
--
--
Michael van Elst
Internet: mlelstv%serpens.de@localhost
"A potential Snark may lurk in every tree."
Home |
Main Index |
Thread Index |
Old Index