From: David Miller <davem@davemloft.net>
To: acme@ghostprotocols.net
Cc: joakim.koskela@hiit.fi, netdev@vger.kernel.org
Subject: Re: [PATCH net-2.6.22-rc7] xfrm beet interfamily support
Date: Wed, 18 Jul 2007 02:18:14 -0700 (PDT) [thread overview]
Message-ID: <20070718.021814.99458359.davem@davemloft.net> (raw)
In-Reply-To: <39e6f6c70707160556m37137161odec6d01cc200524c@mail.gmail.com>
From: "Arnaldo Carvalho de Melo" <acme@ghostprotocols.net>
Date: Mon, 16 Jul 2007 09:56:59 -0300
> Sorry for not commented that the code you were using (and David said
> it was invalid) is in fact valid:
>
> skb->transport_header = skb->network_header;
>
> This works for both offsets and pointers, i.e. both transport_header
> and network_header are in the same "address space".
>
>
> skb_set_transport_header(skb, skb_network_offset(skb));
>
> Also works, but its too convoluted IMHO, for pointers it would reduce to:
>
> skb->transport_header = skb->data + skb->network_header
> - skb->data;
>
> for offsets:
>
> skb->transport_header = skb->data - skb->head;
> skb->transport_header += skb->head + skb->network_header
> - skb->data;
>
> I.e. both reduce to:
>
> skb->transport_header = skb->network_header;
>
> Some more comments below, but I think this time, sans the above
> possible cleanup, your patch is OK wrt offsets/pointers.
Thanks for the correction, indeed you are correct :)
next prev parent reply other threads:[~2007-07-18 9:18 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-16 12:06 [PATCH net-2.6.22-rc7] xfrm beet interfamily support Joakim Koskela
2007-07-16 12:56 ` Arnaldo Carvalho de Melo
2007-07-18 9:18 ` David Miller [this message]
2007-07-16 18:47 ` Patrick McHardy
2007-07-17 14:30 ` Joakim Koskela
2007-07-17 16:00 ` Patrick McHardy
2007-07-19 14:08 ` Joakim Koskela
2007-07-19 14:46 ` Patrick McHardy
2007-07-19 17:54 ` Joakim Koskela
2007-07-19 19:43 ` Patrick McHardy
2007-07-23 16:19 ` [PATCH net-2.6.22-rc7] xfrm state selection update to use inner addresses Joakim Koskela
2007-07-24 14:31 ` Patrick McHardy
2007-07-26 7:08 ` David Miller
2007-07-31 10:39 ` [PATCH net-2.6.22-rc7] xfrm beet interfamily support Joakim Koskela
2007-07-31 10:51 ` Patrick McHardy
2007-07-31 11:08 ` Joakim Koskela
2007-07-31 11:14 ` Patrick McHardy
2007-07-31 12:13 ` Joakim Koskela
2007-08-06 6:49 ` Joakim Koskela
2007-08-06 12:08 ` Patrick McHardy
2007-08-06 13:07 ` Joakim Koskela
2007-08-06 13:21 ` Patrick McHardy
-- strict thread matches above, loose matches on Subject: below --
2007-07-12 9:25 Joakim Koskela
2007-07-15 1:48 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070718.021814.99458359.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=acme@ghostprotocols.net \
--cc=joakim.koskela@hiit.fi \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).