Re: AoE driver
Re: AoE driver
- Subject: Re: AoE driver
- From: Josh Graessley <email@hidden>
- Date: Thu, 10 Feb 2005 13:13:47 -0800
Please don't cross post.
Not sure about the IOKit side of things, but I might be able to help on
the third part, getting packets from an interface.
The easiest way to get packets is to register a protocol with the
interface. When you do this, you can specify a demux descriptor that
describes the types of frames you're interested in receiving. Grab the
darwin xnu sources and look at xnu/bsd/net/ether_inet_pr_module.c. In
addition to the demux descriptor, you also specify a function that will
be called when a packet matching that type is received on the
interface. The functions you will need are defined in dlil.h. Look for
something like dlil_proto_attach or dlil_attach_protocol.
The kernel is changing drastically between Panther and Tiger. The
changes to implement improved SMP scalability necessitates a number of
changes to kernel extensions. Any work on the networking side that you
do for Panther will need to be modified significantly to work on Tiger.
IOKit already has a much better abstraction model that insulates most
IOKit drivers from these changes.
-josh
On Feb 10, 2005, at 12:33 PM, Sam Hopkins wrote:
Hello all,
I'm writing an AoE (ATA over Ethernet) driver for Darwin that will
enable Ethernet attached ATA devices like the Coraid EtherDrive blade
(coraid.com) to be used. Our current linux and freebsd drivers have
three main components:
o block device interface (per AoE device)
o network retransmit timer (per AoE device)
o network packet handler for ethernet type 0x88a2
The AoE driver is primarily responsible for translating block
read/write requests into AoE frames, retransmitting them when
responses don't come back in a certain time, and acknowledging the
requests as complete to the system when they do.
I've read a lot of documentation on the IO Kit system, but its
internals are sufficiently different from what we've previously done
that I can't see a clear way to proceed. I'm confused by the
driver/nub relationship. I think I need to write a provider for
something in the IOStorageFamily, but I can't figure out what, nor am
I clear on what my interfaces are for block reads/writes. Perhaps
someone can point to some clarifying documentation here (not
"IO Kit Fundamentals" -- I've read that).
As for the rexmit timer, I need a way for a function to be called
every X ms. So far all I've found towards this end is a way to use
IOLock instead of timeout. I don't think this helps me, but perhaps
I'm missing something.
Lastly, I need to register an Ethernet protocol handler. I read the
paper on NKEs, but am not sure whether I need a protocol handler NKE
or a data link NKE. If the former, is there an ethernet domain I use
in net_add_proto? If the latter, it seems I need to register a
separate filter per interface?
Any help would be appreciated.
Cheers,
Sam
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >AoE driver (From: Sam Hopkins <email@hidden>) |