From: Eric Dumazet <eric.dumazet@gmail.com>
To: Daniel Borkmann <dborkman@redhat.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: [PATCH v3 net-next 1/4] flow_keys: include thoff into flow_keys for later usage
Date: Tue, 19 Mar 2013 09:41:55 -0700 [thread overview]
Message-ID: <1363711315.2558.17.camel@edumazet-glaptop> (raw)
In-Reply-To: <1363711172-9728-2-git-send-email-dborkman@redhat.com>
On Tue, 2013-03-19 at 17:39 +0100, Daniel Borkmann wrote:
> In skb_flow_dissect(), we perform a dissection of a skbuff. Since we're
> doing the work here anyway, also store thoff for a later usage, e.g. in
> the BPF filter.
>
> Suggested-by: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
> ---
> This patch also needs to go into the net tree, since Eric or Jason will
> post a bug fix on top of this one.
>
> include/net/flow_keys.h | 1 +
> net/core/flow_dissector.c | 2 ++
> 2 files changed, 3 insertions(+)
>
> diff --git a/include/net/flow_keys.h b/include/net/flow_keys.h
> index 80461c1..bb8271d 100644
> --- a/include/net/flow_keys.h
> +++ b/include/net/flow_keys.h
> @@ -9,6 +9,7 @@ struct flow_keys {
> __be32 ports;
> __be16 port16[2];
> };
> + u16 thoff;
> u8 ip_proto;
> };
>
> diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
> index f8d9e03..f4be293 100644
> --- a/net/core/flow_dissector.c
> +++ b/net/core/flow_dissector.c
> @@ -151,6 +151,8 @@ ipv6:
> flow->ports = *ports;
> }
>
> + flow->thoff = (u16) nhoff;
> +
> return true;
> }
> EXPORT_SYMBOL(skb_flow_dissect);
Signed-off-by: Eric Dumazet <edumazet@google.com>
next prev parent reply other threads:[~2013-03-19 16:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-19 16:39 [PATCH v3 net-next 0/4] net: filter: BPF updates Daniel Borkmann
2013-03-19 16:39 ` [PATCH v3 net-next 1/4] flow_keys: include thoff into flow_keys for later usage Daniel Borkmann
2013-03-19 16:41 ` Eric Dumazet [this message]
2013-03-20 16:15 ` David Miller
2013-03-19 16:39 ` [PATCH v3 net-next 2/4] net: flow_dissector: add __skb_get_poff to get a start offset to payload Daniel Borkmann
2013-03-19 16:42 ` Eric Dumazet
2013-03-20 17:16 ` David Miller
2013-03-19 16:39 ` [PATCH v3 net-next 3/4] filter: add ANC_PAY_OFFSET instruction for loading payload start offset Daniel Borkmann
2013-03-19 16:42 ` Eric Dumazet
2013-03-20 17:16 ` David Miller
2013-03-19 16:39 ` [PATCH v3 net-next 4/4] filter: add minimal BPF JIT emitted image disassembler Daniel Borkmann
2013-03-19 16:43 ` Eric Dumazet
2013-03-20 17:17 ` David Miller
2013-03-20 18:57 ` Daniel Borkmann
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=1363711315.2558.17.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=dborkman@redhat.com \
--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