On Thu, 02 Feb 2006 22:24:27 -0800 (PST)
"David S. Miller" <[EMAIL PROTECTED]> wrote:

> From: Herbert Xu <[EMAIL PROTECTED]>
> Date: Fri, 03 Feb 2006 12:26:32 +1100
> 
> > David S. Miller <[EMAIL PROTECTED]> wrote:
> > > 
> > > This patch made me notice that the length is sort of implicit
> > > or can be calculated given "start" and the current skb->data
> > > value.
> > > 
> > > Someone might want to look into making that simplification
> > > at some point.
> > 
> > Or we could simply merge skb_pull and skb_postpull_rcsum into one
> > function that does both.
> 
> True.  There aren't that many skb_postpull_rcsum() call sites
> at the moment so the changes should be quite easy.

static unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len)
{
        if (unlikely(len > skb->len))
                return NULL;
        if (skb->ip_summed == CHECKSUM_HW)
                skb->csum = csum_sub(skb->csum, csum_partial(skb->data, len, 
0));
        return __skb_pull(skb, len);
}
-- 
Stephen Hemminger <[EMAIL PROTECTED]>
OSDL http://developer.osdl.org/~shemminger
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to