Re: Speed of memcpy, csum_partial and csum_partial_copy

Alan Cox (alan@lxorguk.ukuu.org.uk)
Sun, 9 Jun 1996 10:32:55 +0100 (BST)


> On the TCP i've been seting up for 2.1 there is no need for copy
> number 2 since the skb is cloned (the copy is restricted to the skb
> header).

Providing tcp.c doesnt scribble into the packet itself then yes this
is true. Consider however a packet that is source routed via loopback
then out. You will then need to rejig the header.

> Well, gonna try removing that copy you mention to see if it increases
> performance. Is it done on the loopback device itself ?

Yes. I think we need to clone things more and drop code in the forwarding
routines along the line of

newskb=skb_unshare(skb); /* in case its a clone */
if(!skb)
dropit(skb);
else
{
scribble_on_packet();
sendit();
}

which solves the issues with network taps as well.

Alan