netdev
[Top] [All Lists]

Re: Q: (ab)using zerocopy for drivers with alignment contraints

To: Manfred Spraul <manfred@xxxxxxxxxxxxxxxx>
Subject: Re: Q: (ab)using zerocopy for drivers with alignment contraints
From: "David S. Miller" <davem@xxxxxxxxxx>
Date: Sun, 10 Jun 2001 17:48:34 -0700 (PDT)
Cc: netdev@xxxxxxxxxxx
In-reply-to: <3B238B31.38F6D3ED@colorfullife.com>
References: <3B238B31.38F6D3ED@colorfullife.com>
Sender: owner-netdev@xxxxxxxxxxx
Manfred Spraul writes:
 > Several cheap busmaster nics only accept tx buffers that are 32-bit
 > aligned.

I'm going to assume that it is safe to bet that such cards cannot take
multiple buffers for a TX packet too.

Because if they could, then we could do something like copy the header
forward a few bytes to get it aligned, and set up two buffer pointers
into the packet such that the 32-bit alignment requirement is met.

There'd be some difficulty with SKB sharing...

BTW, a routine exists already doing what you propose, only to user
space.  Make skb_copy_datagram{,_iovec}_kernel(), export these
routines to modules, and I'd be more than happy to accept that patch.

Later,
David S. Miller
davem@xxxxxxxxxx


<Prev in Thread] Current Thread [Next in Thread>