netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* pskb change in dst->output
@ 2004-07-07 13:06 Herbert Xu
  2004-07-07 14:58 ` James Morris
  0 siblings, 1 reply; 21+ messages in thread
From: Herbert Xu @ 2004-07-07 13:06 UTC (permalink / raw)
  To: James Morris, David S. Miller, netdev

Hi James:

I'm working on merging the IPsec tunnel encapsulation code so that
we have only one copy of it instead of four.

In doing so I'm wondering why you changed dst->output to take a
struct sk_buff ** from a struct sk_buff *.  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.

So in practice the calls to skb_checksum_help() from AH/ESP/IPCOMP
are never going to unshare the skb.  In that case, couldn't we just
have a version of skb_checksum_help() that was for the case where
the skb is never shared?

This would allow us to go back to the single pointer in dst->output.
The double pointer is also an eye sore because in most of these
dst->output functions, the first access to the skb after
skb_checksum_help() usually assumes that the skb is neither
shared nor cloned.

This is bad because someone in future could assume that dst->output
can take a shared/cloned skb based on the fact that it takes a
struct sk_buff **.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2004-07-09 21:43 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-07 13:06 pskb change in dst->output Herbert Xu
2004-07-07 14:58 ` James Morris
2004-07-07 21:28   ` Herbert Xu
2004-07-07 22:01     ` David S. Miller
2004-07-07 23:12       ` Herbert Xu
2004-07-07 23:33         ` James Morris
2004-07-08  0:04           ` Herbert Xu
2004-07-08  0:17             ` David S. Miller
2004-07-08  0:35               ` Herbert Xu
2004-07-08  1:05               ` James Morris
2004-07-08  1:11                 ` Herbert Xu
2004-07-08  1:19                   ` James Morris
2004-07-08  3:34                   ` James Morris
2004-07-08  4:02                     ` Herbert Xu
2004-07-09  8:14                       ` Herbert Xu
2004-07-09 14:02                         ` James Morris
2004-07-09 19:36                           ` David S. Miller
2004-07-09 20:42                             ` Herbert Xu
2004-07-09 21:07                               ` Herbert Xu
2004-07-09 21:21                               ` David S. Miller
2004-07-09 21:43                                 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).