From: Eric Dumazet <eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: jhs-jkUAjuhPggJWk0Htik3J/w@public.gmane.org
Cc: dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org,
chrisw-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Florian Westphal <fw-HFFVJYpyMKqzQB+pC5nmwQ@public.gmane.org>,
john.r.fastabend-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
herbert-F6s6mLieUQo7FNHlEwC/lvQIK84fMopw@public.gmane.org,
shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org,
Dan Siemon <dan-BZ4SNL/Vixll57MIdRCFDg@public.gmane.org>,
David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Subject: [PATCH net-next 0/4] net: factorize flow dissector
Date: Mon, 28 Nov 2011 16:20:16 +0100 [thread overview]
Message-ID: <1322493616.2292.68.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> (raw)
In-Reply-To: <1322226171.2403.14.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>
Le vendredi 25 novembre 2011 à 14:02 +0100, Eric Dumazet a écrit :
> cls_flow is not complete, since it doesnt handle tunnels for example.
>
> It calls a 'partial flow classifier' to find each needed element, one by
> one.
> (adding tunnel decap would need to perform this several time for each
> packet)
>
> __skb_get_rxhash() is more tunnel aware, yet some protocols are still
> missing, for example IPPROTO_IPV6.
>
> Instead of adding logic to both dissectors, we could have a central flow
> dissector, filling a temporary pivot structure with found elements (src
> addr, dst addr, ports, ...), going through tunnels encap if found.
>
> Then net/sched/cls_flow.c could pick needed elems from this structure to
> compute the hash as specified in tc command :
> (for example : tc filter ... flow hash keys proto-dst,dst ...)
>
> (One dissector call per packet for any number of keys in the filter)
>
> Same for net/sched/sch_sfb.c : Use the pivot structure and compute the
> two hashes (using two hashrnd values)
>
> And __skb_get_rxhash() could use the same flow dissector, and pick (src
> addr, dst addr, ports) to compute skb->rxhash, and set skb->l4_rxhash if
> "ports" is not null.
>
Here is a patch serie doing this factorization / cleanup.
[PATCH net-next 1/4] net: introduce skb_flow_dissect()
[PATCH net-next 2/4] net: use skb_flow_dissect() in __skb_get_rxhash()
[PATCH net-next 3/4] cls_flow: use skb_flow_dissect()
[PATCH net-next 4/4] sch_sfb: use skb_flow_dissect()
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
cumulative diffstat :
include/net/flow_keys.h | 15 +++
net/core/Makefile | 2
net/core/dev.c | 124 ++----------------------
net/core/flow_dissector.c | 130 ++++++++++++++++++++++++++
net/ipv4/tcp.c | 8 -
net/sched/cls_flow.c | 180 +++++++++---------------------------
net/sched/sch_sfb.c | 17 ++-
7 files changed, 225 insertions(+), 251 deletions(-)
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev
next prev parent reply other threads:[~2011-11-28 15:20 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-24 20:10 Open vSwitch Design Jesse Gross
[not found] ` <CAEP_g=_2L1xFWtDXh_6YyXz1Mt9TR3zvjLzix+SpO6yzeOLsSQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-11-24 22:30 ` jamal
2011-11-25 5:20 ` Stephen Hemminger
[not found] ` <20111124212021.2ae2fb7f-QE31Isp8l5DVJhW05BI4jyWSNWFUUkiGXqFh9Ls21Oc@public.gmane.org>
2011-11-25 6:18 ` Eric Dumazet
2011-11-25 6:25 ` David Miller
[not found] ` <20111125.012517.2221372383643417980.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2011-11-25 6:36 ` Eric Dumazet
2011-11-25 11:34 ` jamal
2011-11-25 13:02 ` Eric Dumazet
2011-11-28 15:20 ` Eric Dumazet [this message]
2011-11-25 20:20 ` Jesse Gross
[not found] ` <CAEP_g=9tcH9kJrVsHc26kXWZEUS8G-U=U7y6k8xaZG5MD0OTyg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-11-26 1:23 ` Jamal Hadi Salim
2011-11-25 20:14 ` Jesse Gross
2011-11-25 11:24 ` jamal
2011-11-25 17:28 ` Stephen Hemminger
2011-11-25 17:55 ` Jesse Gross
2011-11-25 19:52 ` Justin Pettit
[not found] ` <2DB44B16-598F-4414-8B35-8E322D705A9A-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
2011-11-26 1:11 ` Jamal Hadi Salim
2011-11-26 4:38 ` Stephen Hemminger
[not found] ` <ec23d63d-27c9-4761-bdd3-e3f54bdb5e77-bX68f012229Xuxj3zoTs5AC/G2K4zDHf@public.gmane.org>
2011-11-26 8:05 ` Martin Casado
2011-11-28 18:34 ` Justin Pettit
2011-11-28 22:42 ` Jamal Hadi Salim
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=1322493616.2292.68.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC \
--to=eric.dumazet-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=chrisw-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=dan-BZ4SNL/Vixll57MIdRCFDg@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org \
--cc=fw-HFFVJYpyMKqzQB+pC5nmwQ@public.gmane.org \
--cc=herbert-F6s6mLieUQo7FNHlEwC/lvQIK84fMopw@public.gmane.org \
--cc=jhs-jkUAjuhPggJWk0Htik3J/w@public.gmane.org \
--cc=john.r.fastabend-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.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