lkml.org 
[lkml]   [1998]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: TCP bug?
Date
> Does this mean that it is safe now in 2.1 to change the skbuff's
> contents by the driver without confusing upper layers (bogus :-)
> retransmit mechanism? This would mean I could re-enable an
> optimiziation in CIPE I had to take out for 2.0 because of exactly the
> problem described above.

Short answer no,

Long answer yes but..

If you change the body of an sk_buff you are passed it may be shared
and you need to do

skb2=skb_unshare(skb, GFP_ATOMIC);
if(skb2==NULL)
{
kfree(skb);
return -1; /* or whatever */
}

/* Now scribble */

skb_unshare is a copy on write for multiple users. So 99.99% of the time it
actually just returns skb.

Alan



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.075 / U:0.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site