netdev
[Top] [All Lists]

Re: pskb change in dst->output

To: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Subject: Re: pskb change in dst->output
From: James Morris <jmorris@xxxxxxxxxx>
Date: Wed, 7 Jul 2004 10:58:21 -0400 (EDT)
Cc: "David S. Miller" <davem@xxxxxxxxxx>, <netdev@xxxxxxxxxxx>
In-reply-to: <20040707130652.GA26822@gondor.apana.org.au>
Sender: netdev-bounce@xxxxxxxxxxx
On Wed, 7 Jul 2004, Herbert Xu wrote:

> In doing so I'm wondering why you changed dst->output to take a
> struct sk_buff ** from a struct sk_buff *.

This was because skb_checksum_help() was changed to potentially replace 
the skb in the output path.

>  All of the dst->output functions already assumed that they have
> exclusive access to the skb. This is justified because all callers to
> dst_output() makes sure that the packet is neither shared nor cloned.

Cloned skbs are regularly passed to dst_output(), thus we need to use the 
double pointer for skb_checksum_help() in case the skb is replaced.


- James
-- 
James Morris
<jmorris@xxxxxxxxxx>





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