police and gact, to let
them return an error when users try to set 'goto chain x' in the fallback
action. Patch 3/4 and 4/4 add TDC selftest coverage to this new behavior.
For the series,
Acked-by: Jamal Hadi Salim
cheers,
jamal
On 2018-10-18 8:05 a.m., Davide Caratti wrote:
the following script:
# tc f a dev v0 egress chain 4 matchall action simple sdata "A triumph!"
# tc f a dev v0 egress matchall action pass random determ goto chain 4 5
produces the following crash:
BUG: unable to handle kernel NULL pointer
On 2018-10-13 11:23 a.m., Davide Caratti wrote:
On Fri, 2018-10-12 at 13:57 -0700, Cong Wang wrote:
Why not just validate the fallback action in each action init()?
For example, checking tcfg_paction in tcf_gact_init().
I don't see the need of making it generic.
hello Cong, once again thanks
On 2018-10-11 2:44 p.m., David Ahern wrote:
On 10/11/18 12:05 PM, Jamal Hadi Salim wrote:
On 2018-10-11 1:04 p.m., David Ahern wrote:
I meant the general API of users passing filter arguments as attributes
to the dump (or values in the header) -- KIND, MASTER, device index,
etc
On 2018-10-11 1:04 p.m., David Ahern wrote:
You can already filter link dumps by kind. How? By passing in the KIND
attribute on a dump request. This type of filtering exists for link
dumps, neighbor dumps, fdb dumps. Why is there a push to make route
dumps different? Why can't they be
On 2018-10-11 12:16 p.m., David Ahern wrote:
IMO, bpf at the fill_info stage is not appropriate.
Somewhere before the skb is formed (and nlmsg is built).
If you go as far as constructing it, then cBPF per what
Sowmini should work; but there will be constructs which
are trickier.
On 2018-10-11 11:46 a.m., Sowmini Varadhan wrote:
On (10/11/18 08:26), Stephen Hemminger wrote:
You can do the something like this already with BPF socket filters.
But writing BPF for multi-part messages is hard.
Indeed. And I was just experimenting with this for ARP just last week.
So to
From: Al Viro
Both hnode ->tp_c and tp_c argument of u32_set_parms()
the latter is redundant, the former - never read...
Signed-off-by: Al Viro
Signed-off-by: Jamal Hadi Salim
---
net/sched/cls_u32.c | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/net/sc
From: Al Viro
* calculate key *once*, not for each hash chain element
* let tc_u_hash() return the pointer to chain head rather than index -
callers are cleaner that way.
Signed-off-by: Al Viro
Signed-off-by: Jamal Hadi Salim
---
net/sched/cls_u32.c | 24 +---
1 file
From: Al Viro
not used anymore
Signed-off-by: Al Viro
Signed-off-by: Jamal Hadi Salim
---
net/sched/cls_u32.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index ef0f2e6ec422..810c49ac1bbe 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched
Signed-off-by: Jamal Hadi Salim
---
net/sched/cls_u32.c | 4
1 file changed, 4 insertions(+)
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index 622f4657da94..3357331a80a2 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched/cls_u32.c
@@ -797,6 +797,10 @@ static int u32_set_parms(struct
From: Al Viro
unused
Signed-off-by: Al Viro
Signed-off-by: Jamal Hadi Salim
---
net/sched/cls_u32.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index 810c49ac1bbe..c378168f4562 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched/cls_u32.c
ring an hnode to be deleted with tp->root won't
catch the case when one tp is used to try deleting the root of another.
Solution is trivial - mark the root hnodes explicitly upon allocation and
check for that.
Signed-off-by: Al Viro
Signed-off-by: Jamal Hadi Salim
---
net/sched/cls_u32.c | 4 +++-
1
From: Al Viro
Now that we have the knode count, we can instantly check if
any hnodes are non-empty. And that kills the check for extra
references to root hnode - those could happen only if there was
a knode to carry such a link.
Signed-off-by: Al Viro
Signed-off-by: Jamal Hadi Salim
---
net
From: Al Viro
Signed-off-by: Al Viro
Signed-off-by: Jamal Hadi Salim
---
net/sched/cls_u32.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index ce55eea448a0..ef0f2e6ec422 100644
--- a/net/sched/cls_u32.c
+++ b/net
From: Al Viro
the only thing we used ht for was ht->tp_c and callers can get that
without going through ->tp_c at all; start with lifting that into
the callers, next commits will massage those, eventually removing
->tp_c altogether.
Signed-off-by: Al Viro
Signed-off-by: Jamal H
From: Al Viro
Tested by modifying iproute2 to allow sending a divisor > 255
Tested-by: Jamal Hadi Salim
Signed-off-by: Al Viro
Signed-off-by: Jamal Hadi Salim
---
net/sched/cls_u32.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/net/sched/cls_u32.c b/net/sc
From: Al Viro
allows to simplify u32_delete() considerably
Signed-off-by: Al Viro
Signed-off-by: Jamal Hadi Salim
---
net/sched/cls_u32.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index 3d4c360f9b0c..61593bee08db 100644
--- a/net
From: Jamal Hadi Salim
Various improvements from Al.
Changes from version 1: Add missing commit
Al Viro (11):
net: sched: cls_u32: mark root hnode explicitly
net: sched: cls_u32: disallow linking to root hnode
net: sched: cls_u32: make sure that divisor is a power of 2
net: sched
so anything returned by u32_lookup_key(ht, ...)
will have ->ht_up equal to ht.
* any knode returned by u32_get(tp, ...) will have ->ht_up->tp_c
point to tp->data
Signed-off-by: Al Viro
Signed-off-by: Jamal Hadi Salim
---
net/sched/cls_u32.c | 5 ++---
1 file changed, 2 in
On 2018-10-08 4:46 a.m., Sergei Shtylyov wrote:
Hello!
On 07.10.2018 19:38, Jamal Hadi Salim wrote:
From: Al Viro
Tested by modifying iproute2 to to allow
One "to" is enough, no? :-)
Will fix in updated version.
cheers,
jamal
On 2018-10-08 2:11 a.m., Al Viro wrote:
On Sun, Oct 07, 2018 at 10:55:52PM -0700, David Miller wrote:
From: Al Viro
Date: Mon, 8 Oct 2018 06:45:15 +0100
Er... Both are due to missing in the very beginning of the series (well, on
top of "net: sched: cls_u32: fix hnode refcounting") commit
so anything returned by u32_lookup_key(ht, ...)
will have ->ht_up equal to ht.
* any knode returned by u32_get(tp, ...) will have ->ht_up->tp_c
point to tp->data
Signed-off-by: Al Viro
Signed-off-by: Jamal Hadi Salim
---
net/sched/cls_u32.c | 5 ++---
1 file changed, 2 in
From: Jamal Hadi Salim
Various improvements from Al.
Al Viro (11):
net: sched: cls_u32: disallow linking to root hnode
net: sched: cls_u32: make sure that divisor is a power of 2
net: sched: cls_u32: get rid of unused argument of u32_destroy_key()
net: sched: cls_u32: get rid
From: Al Viro
unused
Signed-off-by: Al Viro
Signed-off-by: Jamal Hadi Salim
---
net/sched/cls_u32.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index 810c49ac1bbe..c378168f4562 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched/cls_u32.c
From: Al Viro
not used anymore
Signed-off-by: Al Viro
Signed-off-by: Jamal Hadi Salim
---
net/sched/cls_u32.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index ef0f2e6ec422..810c49ac1bbe 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched
From: Al Viro
Both hnode ->tp_c and tp_c argument of u32_set_parms()
the latter is redundant, the former - never read...
Signed-off-by: Al Viro
Signed-off-by: Jamal Hadi Salim
---
net/sched/cls_u32.c | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/net/sc
Signed-off-by: Jamal Hadi Salim
---
net/sched/cls_u32.c | 4
1 file changed, 4 insertions(+)
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index 622f4657da94..3357331a80a2 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched/cls_u32.c
@@ -797,6 +797,10 @@ static int u32_set_parms(struct
From: Al Viro
* calculate key *once*, not for each hash chain element
* let tc_u_hash() return the pointer to chain head rather than index -
callers are cleaner that way.
Signed-off-by: Al Viro
Signed-off-by: Jamal Hadi Salim
---
net/sched/cls_u32.c | 24 +---
1 file
From: Al Viro
the only thing we used ht for was ht->tp_c and callers can get that
without going through ->tp_c at all; start with lifting that into
the callers, next commits will massage those, eventually removing
->tp_c altogether.
Signed-off-by: Al Viro
Signed-off-by: Jamal H
From: Al Viro
allows to simplify u32_delete() considerably
Signed-off-by: Al Viro
Signed-off-by: Jamal Hadi Salim
---
net/sched/cls_u32.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index 3d4c360f9b0c..61593bee08db 100644
--- a/net
From: Al Viro
Tested by modifying iproute2 to to allow
sending a divisor > 255
Tested-by: Jamal Hadi Salim
Signed-off-by: Al Viro
Signed-off-by: Jamal Hadi Salim
---
net/sched/cls_u32.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/net/sched/cls_u32.c b/net/sc
From: Al Viro
Now that we have the knode count, we can instantly check if
any hnodes are non-empty. And that kills the check for extra
references to root hnode - those could happen only if there was
a knode to carry such a link.
Signed-off-by: Al Viro
Signed-off-by: Jamal Hadi Salim
---
net
From: Al Viro
Signed-off-by: Al Viro
Signed-off-by: Jamal Hadi Salim
---
net/sched/cls_u32.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index ce55eea448a0..ef0f2e6ec422 100644
--- a/net/sched/cls_u32.c
+++ b/net
handle 1:0:11 u32 ht 1: link 0: offset at 0 mask 0f00 shift 6 plus 0 \
eat match ip protocol 6 ff
tc filter delete dev eth0 parent : protocol ip prio 100
Signed-off-by: Al Viro
Signed-off-by: Jamal Hadi Salim
---
net/sched/cls_u32.c | 10 +-
1 file changed, 5 insertions(+), 5 deleti
On 2018-09-10 8:25 a.m., Jamal Hadi Salim wrote:
On 2018-09-09 11:48 a.m., Al Viro wrote:
BTW, shouldn't we issue u32_clear_hw_hnode() every time
we destroy an hnode? It's done on u32_delete(), it's
done (for root ht) on u32_destroy(), but it's not done
for any other hnodes when you remove
On 2018-09-09 11:48 a.m., Al Viro wrote:
BTW, shouldn't we issue u32_clear_hw_hnode() every time
we destroy an hnode? It's done on u32_delete(), it's
done (for root ht) on u32_destroy(), but it's not done
for any other hnodes when you remove the entire (not shared)
filter. Looks fishy...
On 2018-09-09 10:15 a.m., Al Viro wrote:
[..]
Umm... Interesting - TCA_U32_SEL is not the only thing that
gets ignored there; TCA_U32_MARK gets the same treatment.
And then there's a lovely question what to do with n->pf -
it's an array of n->sel.nkeys counters, and apparently we
want (at
Since you have the momentum here: i noticed something
unusual while i was trying to craft a test that would
vet some of your changes. This has nothing to do with
your changes, same happens on my stock debian laptop
with kernel:
4.17.0-0.bpo.3-amd64 #1 SMP Debian 4.17.17-1~bpo9+1 (2018-08-27)
Acked-by: Jamal Hadi Salim
cheers,
jamal
On 2018-09-08 9:31 p.m., Al Viro wrote:
From: Al Viro
allows to simplify u32_delete() considerably
Signed-off-by: Al Viro
Acked-by: Jamal Hadi Salim
cheers,
jamal
On 2018-09-08 9:31 p.m., Al Viro wrote:
From: Al Viro
Acked-by: Jamal Hadi Salim
cheers,
jamal
On 2018-09-08 9:31 p.m., Al Viro wrote:
From: Al Viro
Acked-by: Jamal Hadi Salim
cheers,
jamal
ff-by: Al Viro
Acked-by: Jamal Hadi Salim
cheers,
jamal
On 2018-09-08 9:31 p.m., Al Viro wrote:
From: Al Viro
* calculate key *once*, not for each hash chain element
* let tc_u_hash() return the pointer to chain head rather than index -
callers are cleaner that way.
Signed-off-by: Al Viro
Acked-by: Jamal Hadi Salim
cheers,
jamal
On 2018-09-08 9:31 p.m., Al Viro wrote:
From: Al Viro
unused
Signed-off-by: Al Viro
Acked-by: Jamal Hadi Salim
cheers,
jamal
On 2018-09-08 9:31 p.m., Al Viro wrote:
From: Al Viro
not used anymore
Signed-off-by: Al Viro
Acked-by: Jamal Hadi Salim
cheers,
jamal
On 2018-09-08 9:31 p.m., Al Viro wrote:
From: Al Viro
Signed-off-by: Al Viro
Acked-by: Jamal Hadi Salim
cheers,
jamal
On 2018-09-08 9:31 p.m., Al Viro wrote:
From: Al Viro
> Signed-off-by: Al Viro
Test is by hacking user space iproute2 to allow
sending a divisor > 255
Tested-by: Jamal Hadi Salim
Acked-by: Jamal Hadi Salim
cheers,
jamal
On 2018-09-08 9:31 p.m., Al Viro wrote:
From: Al Viro
Acked-by: Jamal Hadi Salim
cheers,
jamal
: Not linking to root node
Signed-off-by: Al Viro
Tested-by: Jamal Hadi Salim
Acked-by: Jamal Hadi Salim
cheers,
jamal
i.e this you posted earlier, otherwise:
Tested-by: Jamal Hadi Salim
Acked-by: Jamal Hadi Salim
Reminder:
--
tc qdisc add dev eth0 ingress
tc filter add dev eth0 parent : protocol ip prio 100 handle 1: u32
divisor 1
tc filter add dev eth0 parent : protocol ip prio 200 handle 2: u32
diviso
To clarify with an example i used to test
your patches:
#0 add ingress filter
$TC qdisc add dev $P ingress
#1 add filter
$TC filter add dev $P parent : protocol ip prio 10 \
u32 match ip protocol 1 0xff
#2 display
$TC filter ls dev $P parent :
#3 try to delete root
$TC filter delete dev
On 2018-09-06 10:35 p.m., Al Viro wrote:
On Thu, Sep 06, 2018 at 06:21:09AM -0400, Jamal Hadi Salim wrote:
[..]
Argh... Unfortunately, there's this: in u32_delete() we have
if (root_ht) {
if (root_ht->refcnt > 1) {
*last =
On 2018-09-06 6:59 a.m., Al Viro wrote:
On Thu, Sep 06, 2018 at 06:34:00AM -0400, Jamal Hadi Salim wrote:
On 2018-09-06 6:28 a.m., Jamal Hadi Salim wrote:
[..]
Point, and that one is IMO enough to give up on using ->flags for
that. How about simply
diff --git a/net/sched/cls_u32.c b/
And a bunch of indentations...
cheers,
jamal
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index 6d45ec4c218c..cb3bee12af78 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched/cls_u32.c
@@ -485,7 +485,8 @@ static void u32_clear_hw_hnode(struct tcf_proto *tp, struct tc_u_hnode *h,
struct
On 2018-09-05 3:04 p.m., Al Viro wrote:
From: Al Viro
* calculate key *once*, not for each hash chain element
* let tc_u_hash() return the pointer to chain head rather than index -
callers are cleaner that way.
Signed-off-by: Al Viro
Acked-by: Jamal Hadi Salim
cheers,
jamal
On 2018-09-05 3:04 p.m., Al Viro wrote:
From: Al Viro
unused
Signed-off-by: Al Viro
Acked-by: Jamal Hadi Salim
cheers,
jamal
On 2018-09-05 3:04 p.m., Al Viro wrote:
From: Al Viro
not used anymore
Signed-off-by: Al Viro
Acked-by: Jamal Hadi Salim
cheers,
jamal
On 2018-09-05 3:04 p.m., Al Viro wrote:
From: Al Viro
Signed-off-by: Al Viro
Acked-by: Jamal Hadi Salim
cheers,
jamal
On 2018-09-06 6:28 a.m., Jamal Hadi Salim wrote:
On 2018-09-05 3:04 p.m., Al Viro wrote:
From: Al Viro
... and disallow deleting or linking to such
Signed-off-by: Al Viro
Same comment as other one in regards to subject
Since the flag space is coming from htnode which is
exposed via uapi
On 2018-09-05 3:04 p.m., Al Viro wrote:
From: Al Viro
Signed-off-by: Al Viro
Acked-by: Jamal Hadi Salim
cheers,
jamal
it is for private use; but a comment in
include/uapi/linux/pkt_cls.h that this flag or
maybe a set of bits is reserved for internal use.
Otherwise:
Acked-by: Jamal Hadi Salim
cheers,
jamal
this one:
"[PATCH net 1/7]:net: sched: cls_u32: fix hnode refcounting"
Also useful to have a cover letter summarizing the patchset
in 0/7. Otherwise
Acked-by: Jamal Hadi Salim
cheers,
jamal
On 2018-08-25 9:02 a.m., Jiri Pirko wrote:
Fri, Aug 24, 2018 at 08:11:07PM CEST, xiyou.wangc...@gmail.com wrote:
ENOENT seems to be more logical to return when there's no more filter to delete.
Yeah, at least we should keep ENOENT for compatibility.
The bug here is chain 0 is gone after the
case tasks deadlock because they take same two locks in
different order. To prevent potential deadlock reported by lockdep, always
disable bh when obtaining ife_mod_lock.
Looks like your recent changes on net-next exposed this.
Acked-by: Jamal Hadi Salim
cheers,
jamal
From: Jamal Hadi Salim
Signed-off-by: Jamal Hadi Salim
---
net/sched/act_gact.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/sched/act_gact.c b/net/sched/act_gact.c
index bfccd34a3968..52a3e474d822 100644
--- a/net/sched/act_gact.c
+++ b/net/sched/act_gact.c
From: Jamal Hadi Salim
Signed-off-by: Jamal Hadi Salim
---
net/sched/act_skbmod.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/sched/act_skbmod.c b/net/sched/act_skbmod.c
index e9c86ade3b40..d6a1af0c4171 100644
--- a/net/sched/act_skbmod.c
+++ b/net/sched
From: Jamal Hadi Salim
Signed-off-by: Jamal Hadi Salim
---
net/sched/act_pedit.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c
index 3f62da72ab6a..8a7a7cb94e83 100644
--- a/net/sched/act_pedit.c
+++ b/net/sched
From: Jamal Hadi Salim
Signed-off-by: Jamal Hadi Salim
---
net/sched/act_skbedit.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/sched/act_skbedit.c b/net/sched/act_skbedit.c
index a6db47ebec11..926d7bc4a89d 100644
--- a/net/sched/act_skbedit.c
+++ b/net/sched
From: Jamal Hadi Salim
Having a structure (example tcf_mirred) and a function with the same name is
not good for readability or grepability.
This long overdue patchset improves it and make sure there is consistency
across all actions
Jamal Hadi Salim (13):
net: sched: act_connmark method
From: Jamal Hadi Salim
Signed-off-by: Jamal Hadi Salim
---
net/sched/act_csum.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/sched/act_csum.c b/net/sched/act_csum.c
index f01c59ba6d12..5596fae4e478 100644
--- a/net/sched/act_csum.c
+++ b/net/sched/act_csum.c
From: Jamal Hadi Salim
Signed-off-by: Jamal Hadi Salim
---
net/sched/act_connmark.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/sched/act_connmark.c b/net/sched/act_connmark.c
index 2f9bc833d046..54c0bf54f2ac 100644
--- a/net/sched/act_connmark.c
+++ b/net
From: Jamal Hadi Salim
Signed-off-by: Jamal Hadi Salim
---
net/sched/act_mirred.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c
index 327be257033d..8ec216001077 100644
--- a/net/sched/act_mirred.c
+++ b/net/sched
From: Jamal Hadi Salim
Signed-off-by: Jamal Hadi Salim
---
net/sched/act_nat.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/sched/act_nat.c b/net/sched/act_nat.c
index 4dd9188a72fd..822e903bfc25 100644
--- a/net/sched/act_nat.c
+++ b/net/sched/act_nat.c
From: Jamal Hadi Salim
Signed-off-by: Jamal Hadi Salim
---
net/sched/act_vlan.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/sched/act_vlan.c b/net/sched/act_vlan.c
index 5bde17fe3608..d1f5028384c9 100644
--- a/net/sched/act_vlan.c
+++ b/net/sched/act_vlan.c
From: Jamal Hadi Salim
Signed-off-by: Jamal Hadi Salim
---
net/sched/act_simple.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c
index 18e4452574cd..e616523ba3c1 100644
--- a/net/sched/act_simple.c
+++ b/net/sched
From: Jamal Hadi Salim
Signed-off-by: Jamal Hadi Salim
---
net/sched/act_bpf.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/sched/act_bpf.c b/net/sched/act_bpf.c
index 9e8a33f9fee3..9b30e62805c7 100644
--- a/net/sched/act_bpf.c
+++ b/net/sched/act_bpf.c
From: Jamal Hadi Salim
Signed-off-by: Jamal Hadi Salim
---
net/sched/act_police.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/net/sched/act_police.c b/net/sched/act_police.c
index 88c16d80c1cf..06f0742db593 100644
--- a/net/sched/act_police.c
+++ b/net
From: Jamal Hadi Salim
Signed-off-by: Jamal Hadi Salim
---
net/sched/act_ipt.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c
index e149f0e66cb6..51f235bbeb5b 100644
--- a/net/sched/act_ipt.c
+++ b/net/sched/act_ipt.c
On 31/07/18 10:40 AM, Paolo Abeni wrote:
If we choose to reject unknown opcodes, such user-space configuration
will fail.
I think that is a good thing. The kernel should not be accepting things
it doesnt understand. This is a good opportunity to enforce that.
What would happen before this
On 31/07/18 05:41 AM, Paolo Abeni wrote:
Before this patch, the kernel exposed the same behaviour for negative
value of 'bar', while, for positive 'bar' values, the overall behaviour
was more complex (some classifier always stops with unknown positive
action value, others go to lower prio).
>
On 30/07/18 12:41 PM, Paolo Abeni wrote:
On Mon, 2018-07-30 at 10:03 -0400, Jamal Hadi Salim wrote:
On 30/07/18 08:30 AM, Paolo Abeni wrote:
}
+ if (!tcf_action_valid(a->tcfa_action)) {
+ NL_SET_ERR_MSG(extack, "invalid action value, using TC_ACT_UNSPEC
On 30/07/18 08:30 AM, Paolo Abeni wrote:
}
+ if (!tcf_action_valid(a->tcfa_action)) {
+ NL_SET_ERR_MSG(extack, "invalid action value, using TC_ACT_UNSPEC
instead");
+ a->tcfa_action = TC_ACT_UNSPEC;
+ }
+
return a;
I think it would
On 25/07/18 01:09 PM, Marcelo Ricardo Leitner wrote:
On Wed, Jul 25, 2018 at 09:48:16AM -0700, Cong Wang wrote:
On Wed, Jul 25, 2018 at 5:27 AM Jamal Hadi Salim wrote:
Those changes were there from the beginning (above patch did
not introduce them).
IIRC, the reason was to distinguish
On 25/07/18 10:24 AM, Paolo Abeni wrote:
On Wed, 2018-07-25 at 08:27 -0400, Jamal Hadi Salim wrote:
Those changes were there from the beginning (above patch did
not introduce them).
IIRC, the reason was to distinguish between policy intended
drops and drops because of errors.
Double
think it makes sense.
Yep, I chose to increment 'overlimits' to preserve the current mirred
semantic.
AFAICS, that was first introduced with:
commit 8919bc13e8d92c5b082c5c0321567383a071f5bc
Author: Jamal Hadi Salim
Date: Mon Aug 15 05:25:40 2011 +
net_sched: fix port mirror
+Cc Shmulik
Paolo - please also run the tdc tests (and add anymore if you
feel they dont do coverage to your changes)
On 24/07/18 04:06 PM, Paolo Abeni wrote:
This is similar TC_ACT_REDIRECT, but with a slightly different
semantic:
- on ingress the mirred skbs are passed to the target device
On 24/07/18 04:06 PM, Paolo Abeni wrote:
Each lockless action currently does its own RCU locking in ->act().
This is allows using plain RCU accessor, even if the context
is really RCU BH.
This change drops the per action RCU lock, replace the accessors
with _bh variant, cleans up a bit the
On 24/07/18 04:06 PM, Paolo Abeni wrote:
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -895,6 +895,11 @@ struct tc_action *tcf_action_init_1(struct net *net,
struct tcf_proto *tp,
}
}
+ if (a->tcfa_action == TC_ACT_REDIRECT) {
+
On 24/07/18 05:15 PM, Cong Wang wrote:
On Tue, Jul 24, 2018 at 1:07 PM Paolo Abeni wrote:
+
+ /* let's the caller reinject the packet, if possible */
+ if (skb_at_tc_ingress(skb)) {
+ res->ingress = want_ingress;
+
On 29/06/18 04:39 AM, Jiri Pirko wrote:
Fri, Jun 29, 2018 at 12:25:53AM CEST, xiyou.wangc...@gmail.com wrote:
On Thu, Jun 28, 2018 at 6:10 AM Jiri Pirko wrote:
Add a template of type flower allowing to insert rules matching on last
2 bytes of destination mac address:
# tc chaintemplate add
On 28/06/18 09:22 AM, Jiri Pirko wrote:
Thu, Jun 28, 2018 at 03:13:30PM CEST, j...@mojatatu.com wrote:
On 26/06/18 03:59 AM, Jiri Pirko wrote:
From: Jiri Pirko
For the TC clsact offload these days, some of HW drivers need
to hold a magic ball. The reason is, with the first inserted rule
On 26/06/18 03:59 AM, Jiri Pirko wrote:
From: Jiri Pirko
For the TC clsact offload these days, some of HW drivers need
to hold a magic ball. The reason is, with the first inserted rule inside
HW they need to guess what fields will be used for the matching. If
later on this guess proves to be
On 23/06/18 04:47 PM, Nishanth Devarajan wrote:
[..]
+ /* Drop the packet at the tail of the lowest priority qdisc. */
+ lp_qdisc = >qdiscs[lp];
+ to_drop = __skb_dequeue_tail(lp_qdisc);
+ BUG_ON(!to_drop);
+ qdisc_qstats_backlog_dec(sch, to_drop);
+
ould have been fine to match the size of
the kernel flags), but other than that LGTM.
Acked-by: Jamal Hadi Salim
cheers,
jamal
nables
later classification of packets based on the DS field.
v4:
*Not allow setting flags other than the expected ones.
*Allow dumping the pure flags.
Original idea by Jamal Hadi Salim
Signed-off-by: Qiaobin Fu
Reviewed-by: Michel Machado
---
Note that the motivation for this patch is found in t
On 31/05/18 08:38 AM, Vlad Buslov wrote:
Hi Jamal,
On current net-next I still have action with single reference after last
step:
~$ sudo $TC -s actions ls action skbedit
total acts 1
action order 0: skbedit mark 1 pipe
Hi Vlad,
Can you try one simple test below with these patches?
#create an action
sudo $TC actions add action skbedit mark 1 pipe
#
sudo $TC qdisc del dev lo parent :
sudo $TC qdisc add dev lo ingress
# bind action to filter
sudo $TC filter add dev lo parent : protocol ip prio 1 \
On 28/05/18 12:02 PM, Jamal Hadi Salim wrote:
On 27/05/18 03:55 PM, Vlad Buslov wrote:
tc_ctl_tfilter handles three netlink message types: RTM_NEWTFILTER,
RTM_DELTFILTER, RTM_GETTFILTER. However, implementation of this function
involves a lot of branching on specific message type because most
1 - 100 of 1060 matches
Mail list logo