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.
--
Manfred
|