From: Florian Westphal <fw@strlen.de>
To: <netdev@vger.kernel.org>
Cc: jhs@mojatatu.com, alexei.starovoitov@gmail.com,
daniel@iogearbox.net, Florian Westphal <fw@strlen.de>
Subject: [PATCH -next 3/3] net: core: use skb_tc_state to skip ingress classifiers
Date: Fri, 15 May 2015 10:50:50 +0200 [thread overview]
Message-ID: <1431679850-31896-4-git-send-email-fw@strlen.de> (raw)
In-Reply-To: <1431679850-31896-1-git-send-email-fw@strlen.de>
We can use either the tc_verd NCLS bit or tc_skb_state for this purpose.
If skb was received from network, both are zero.
If the skb was re-injected via sch_ingress + ifb driver, then
NCLS is set, but skb->tc_skb_state retains last value set up by
mirred action that brought us to ifb in first place (TC_FROM_INGRESS).
We can thus also use tc_skb_state instead to detect ifb
reinject-to-ingress.
After this patch NCLS bit is only used by ifb to skip the classsifiers
attached to its egress device.
Signed-off-by: Florian Westphal <fw@strlen.de>
---
net/core/dev.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 802b9b9..e817fa9 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3805,9 +3805,9 @@ another_round:
}
#ifdef CONFIG_NET_CLS_ACT
- if (skb->tc_verd & TC_NCLS) {
- skb->tc_verd = CLR_TC_NCLS(skb->tc_verd);
- goto ncls;
+ if (skb->skb_tc_state) {
+ skb->skb_tc_state = 0;
+ goto skip_tc_ingress;
}
#endif
@@ -3839,7 +3839,7 @@ skip_taps:
#endif
#ifdef CONFIG_NET_CLS_ACT
skb->tc_verd = 0;
-ncls:
+skip_tc_ingress:
#endif
if (pfmemalloc && !skb_pfmemalloc_protocol(skb))
goto drop;
--
2.0.5
next prev parent reply other threads:[~2015-05-15 8:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-15 8:50 [PATCH -next 0/3] tc state machinery cleanups Florian Westphal
2015-05-15 8:50 ` [PATCH -next 1/3] net: sched: remove FROM INGRESS/EGRESS Florian Westphal
2015-05-15 8:50 ` [PATCH -next 2/3] net: sched: remove AT INGRESS/EGRESS Florian Westphal
2015-05-15 16:23 ` Alexei Starovoitov
2015-05-15 17:21 ` Florian Westphal
2015-05-15 20:09 ` Alexei Starovoitov
2015-05-15 22:22 ` Florian Westphal
2015-05-15 22:43 ` Jamal Hadi Salim
2015-05-15 8:50 ` Florian Westphal [this message]
2015-05-15 11:36 ` [PATCH -next 0/3] tc state machinery cleanups Jamal Hadi Salim
2015-05-15 11:59 ` Florian Westphal
2015-05-15 13:11 ` Daniel Borkmann
2015-05-18 3:34 ` 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=1431679850-31896-4-git-send-email-fw@strlen.de \
--to=fw@strlen.de \
--cc=alexei.starovoitov@gmail.com \
--cc=daniel@iogearbox.net \
--cc=jhs@mojatatu.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;
as well as URLs for NNTP newsgroup(s).