[Top] [All Lists]

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

To: Andi Kleen <ak@xxxxxx>
Subject: Re: Q: (ab)using zerocopy for drivers with alignment contraints
From: Manfred Spraul <manfred@xxxxxxxxxxxxxxxx>
Date: Wed, 13 Jun 2001 08:28:45 +0200
Cc: netdev@xxxxxxxxxxx
References: <3B238B31.38F6D3ED@xxxxxxxxxxxxxxxx> <20010613031929.A5323@xxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
Andi Kleen wrote:
> On Sun, Jun 10, 2001 at 04:58:57PM +0200, Manfred Spraul wrote:
> > Several cheap busmaster nics only accept tx buffers that are 32-bit
> > aligned.
> >
> > Currently they memcpy into transfer buffers. What about replacing that
> > memcpy with csum_copy_partial_nocheck and enabling NETIF_F_{SG,HW_CSUM}?
> [...] I'll probably not give you much gain in 2.4 anymore. Both TCP and UDP
> do csum and copy to user in most fast path cases.
It's an improvement for the tx codepath:

If an application uses sendfile with an 8139too [or via-rhine,...] nic
then currently 2 copies are made:
1) copy_and_csum into skb->data
2) memcopy from skb->data to an aligned transfer buffer

with skb_copy_datagram_kernel() only one copy is needed
* networking core gives a fragmented & uncsumed packet to the driver.
* copy_and_csum into aligned transfer buffer.


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