Re: [PATCH net 0/4] net/sched: forbid 'goto_chain' on fallback actions

2018-10-22 Thread Jamal Hadi Salim
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

Re: [PATCH net v2] net/sched: act_gact: properly init 'goto chain'

2018-10-18 Thread Jamal Hadi Salim
k to something like "only one goto chain is supported currently" I didnt follow why you needed to introduce tcfg_caction... cheers, jamal [1]actions should allow multitude return opcodes, not just two. The proper solution seems to be to just let the caller (cls_api - who is aware

Re: [PATCH net] net/sched: properly init chain in case of multiple control actions

2018-10-14 Thread Jamal Hadi Salim
ore thought. So the issue here is the goto chain failed the configured chain doesnt exist? cheers, jamal

Re: [PATCH net-next 0/9] net: Kernel side filtering for route dumps

2018-10-11 Thread Jamal Hadi Salim
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

Re: [PATCH net-next 0/9] net: Kernel side filtering for route dumps

2018-10-11 Thread Jamal Hadi Salim
r some use case which requires a kernel change ("send me an event only if you get link down" or "dump all ports with link down"). cheers, jamal

Re: [PATCH net-next 0/9] net: Kernel side filtering for route dumps

2018-10-11 Thread Jamal Hadi Salim
h classical but would be reasonably comfortable to do with ebpf. Note: That filter will work fine for dumps as well since the semantics are the same. the win is: in the future when you just wanna add that one new filter attribute you dont need a kernel patch in and roll in a new production kernel. cheers, jamal

Re: [PATCH net-next 0/9] net: Kernel side filtering for route dumps

2018-10-11 Thread Jamal Hadi Salim
(as the name fib_dump_filter suggests) cheers, jamal

[PATCH net-next v2 10/12] net: sched: cls_u32: get rid of tp_c

2018-10-08 Thread Jamal Hadi Salim
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

[PATCH net-next v2 07/12] net: sched: cls_u32: clean tc_u_common hashtable

2018-10-08 Thread Jamal Hadi Salim
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

[PATCH net-next v2 05/12] net: sched: cls_u32: get rid of tc_u_knode ->tp

2018-10-08 Thread Jamal Hadi Salim
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

[PATCH net-next v2 02/12] net: sched: cls_u32: disallow linking to root hnode

2018-10-08 Thread Jamal Hadi Salim
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

[PATCH net-next v2 06/12] net: sched: cls_u32: get rid of tc_u_common ->rcu

2018-10-08 Thread Jamal Hadi Salim
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

[PATCH net-next v2 01/12] net: sched: cls_u32: mark root hnode explicitly

2018-10-08 Thread Jamal Hadi Salim
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

[PATCH net-next v2 12/12] net: sched: cls_u32: simplify the hell out u32_delete() emptiness check

2018-10-08 Thread Jamal Hadi Salim
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

[PATCH net-next v2 04/12] net: sched: cls_u32: get rid of unused argument of u32_destroy_key()

2018-10-08 Thread Jamal Hadi Salim
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

[PATCH net-next v2 08/12] net: sched: cls_u32: pass tc_u_common to u32_set_parms() instead of tc_u_hnode

2018-10-08 Thread Jamal Hadi Salim
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

[PATCH net-next v2 03/12] net: sched: cls_u32: make sure that divisor is a power of 2

2018-10-08 Thread Jamal Hadi Salim
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

[PATCH net-next v2 11/12] net: sched: cls_u32: keep track of knodes count in tc_u_common

2018-10-08 Thread Jamal Hadi Salim
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

[PATCH net-next v2 00/12] net: sched: cls_u32 Various improvements

2018-10-08 Thread Jamal Hadi Salim
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

[PATCH net-next v2 09/12] net: sched: cls_u32: the tp_c argument of u32_set_parms() is always tp->data

2018-10-08 Thread Jamal Hadi Salim
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

Re: [PATCH net-next 02/11] net: sched: cls_u32: make sure that divisor is a power of 2

2018-10-08 Thread Jamal Hadi Salim
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

Re: [PATCH net-next 00/11] net: sched: cls_u32 Various improvements

2018-10-08 Thread Jamal Hadi Salim
o net. I will submit an updated version. cheers, jamal

[PATCH net-next 08/11] net: sched: cls_u32: the tp_c argument of u32_set_parms() is always tp->data

2018-10-07 Thread Jamal Hadi Salim
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

[PATCH net-next 00/11] net: sched: cls_u32 Various improvements

2018-10-07 Thread Jamal Hadi Salim
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

[PATCH net-next 05/11] net: sched: cls_u32: get rid of tc_u_common ->rcu

2018-10-07 Thread Jamal Hadi Salim
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

[PATCH net-next 04/11] net: sched: cls_u32: get rid of tc_u_knode ->tp

2018-10-07 Thread Jamal Hadi Salim
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

[PATCH net-next 09/11] net: sched: cls_u32: get rid of tp_c

2018-10-07 Thread Jamal Hadi Salim
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

[PATCH net-next 01/11] net: sched: cls_u32: disallow linking to root hnode

2018-10-07 Thread Jamal Hadi Salim
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

[PATCH net-next 06/11] net: sched: cls_u32: clean tc_u_common hashtable

2018-10-07 Thread Jamal Hadi Salim
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

[PATCH net-next 07/11] net: sched: cls_u32: pass tc_u_common to u32_set_parms() instead of tc_u_hnode

2018-10-07 Thread Jamal Hadi Salim
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

[PATCH net-next 10/11] net: sched: cls_u32: keep track of knodes count in tc_u_common

2018-10-07 Thread Jamal Hadi Salim
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

[PATCH net-next 02/11] net: sched: cls_u32: make sure that divisor is a power of 2

2018-10-07 Thread Jamal Hadi Salim
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

[PATCH net-next 11/11] net: sched: cls_u32: simplify the hell out u32_delete() emptiness check

2018-10-07 Thread Jamal Hadi Salim
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

[PATCH net-next 03/11] net: sched: cls_u32: get rid of unused argument of u32_destroy_key()

2018-10-07 Thread Jamal Hadi Salim
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

[PATCH net 1/1] net: sched: cls_u32: fix hnode refcounting

2018-10-07 Thread Jamal Hadi Salim
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

Re: Offloaded u32 classifier tables WAS (Re: [PATCH net 00/13] cls_u32 cleanups and fixes.

2018-09-10 Thread Jamal Hadi Salim
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

Offloaded u32 classifier tables WAS (Re: [PATCH net 00/13] cls_u32 cleanups and fixes.

2018-09-10 Thread Jamal Hadi Salim
assumption that root is always 0x800 but oresence of +Cc some of the NIC vendor folks.. cheers, jamal [1] Here's a script posted by someone at Intel(Sridhar?) a while back that adds 2 filters, one with skip-sw and the other with skip-hw flag. --- # add ingress qdisc tc qdisc add dev p4p1

Re: [PATCH net 00/13] cls_u32 cleanups and fixes.

2018-09-10 Thread Jamal Hadi Salim
is "set classid x:y" without changing what is being matched. i.e changing the classid in that example would work. cheers, jamal

Re: [PATCH net 00/13] cls_u32 cleanups and fixes.

2018-09-09 Thread Jamal Hadi Salim
match ip src 192.168.8.0/8 $tc filter replace dev eth0 parent : protocol ip prio 102 \ handle 800:0:800 u32 classid 1:2 match ip src 1.1.0.0/24 u32_change() code path should have allowed changing of the keynode. cheers, jamal

Re: [PATCH net 13/13] net: sched: cls_u32: simplify the hell out u32_delete() emptiness check

2018-09-09 Thread Jamal Hadi Salim
Acked-by: Jamal Hadi Salim cheers, jamal

Re: [PATCH net 12/13] net: sched: cls_u32: keep track of knodes count in tc_u_common

2018-09-09 Thread Jamal Hadi Salim
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

Re: [PATCH net 11/13] net: sched: cls_u32: get rid of hnode ->tp_c and tp_c argument of u32_set_parms()

2018-09-09 Thread Jamal Hadi Salim
On 2018-09-08 9:31 p.m., Al Viro wrote: From: Al Viro Acked-by: Jamal Hadi Salim cheers, jamal

Re: [PATCH net 10/13] net: sched: cls_u32: the tp_c argument of u32_set_parms() is always tp->data

2018-09-09 Thread Jamal Hadi Salim
On 2018-09-08 9:31 p.m., Al Viro wrote: From: Al Viro Acked-by: Jamal Hadi Salim cheers, jamal

Re: [PATCH net 09/13] net: sched: cls_u32: pass tc_u_common to u32_set_parms() instead of tc_u_hnode

2018-09-09 Thread Jamal Hadi Salim
ff-by: Al Viro Acked-by: Jamal Hadi Salim cheers, jamal

Re: [PATCH net 08/13] net: sched: cls_u32: clean tc_u_common hashtable

2018-09-09 Thread Jamal Hadi Salim
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

Re: [PATCH net 07/13] net: sched: cls_u32: get rid of tc_u_common ->rcu

2018-09-09 Thread Jamal Hadi Salim
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

Re: [PATCH net 06/13] net: sched: cls_u32: get rid of tc_u_knode ->tp

2018-09-09 Thread Jamal Hadi Salim
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

Re: [PATCH net 05/13] net: sched: cls_u32: get rid of unused argument of u32_destroy_key()

2018-09-09 Thread Jamal Hadi Salim
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

Re: [PATCH net 04/13] net: sched: cls_u32: make sure that divisor is a power of 2

2018-09-09 Thread Jamal Hadi Salim
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

Re: [PATCH net 02/13] net: sched: cls_u32: mark root hnode explicitly

2018-09-09 Thread Jamal Hadi Salim
On 2018-09-08 9:31 p.m., Al Viro wrote: From: Al Viro Acked-by: Jamal Hadi Salim cheers, jamal

Re: [PATCH net 03/13] net: sched: cls_u32: disallow linking to root hnode

2018-09-09 Thread Jamal Hadi Salim
: Not linking to root node Signed-off-by: Al Viro Tested-by: Jamal Hadi Salim Acked-by: Jamal Hadi Salim cheers, jamal

Re: [PATCH net 01/13] net: sched: cls_u32: fix hnode refcounting

2018-09-09 Thread Jamal Hadi Salim
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

Re: [PATCH 1/7] fix hnode refcounting

2018-09-07 Thread Jamal Hadi Salim
$TC filter delete dev $P parent : protocol ip prio 10 \ u32 #8 now it is gone.. $TC filter ls dev $P parent : your patches show #6 filter as still active. We want it to look like #8 Hope this helps. cheers, jamal

Re: [PATCH 1/7] fix hnode refcounting

2018-09-07 Thread Jamal Hadi Salim
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 =

Re: [PATCH 2/7] mark root hnode explicitly

2018-09-06 Thread Jamal Hadi Salim
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/

Re: [PATCH 2/7] mark root hnode explicitly

2018-09-06 Thread Jamal Hadi Salim
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

Re: [PATCH 7/7] clean tc_u_common hashtable

2018-09-06 Thread Jamal Hadi Salim
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

Re: [PATCH 6/7] get rid of tc_u_common ->rcu

2018-09-06 Thread Jamal Hadi Salim
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

Re: [PATCH 5/7] get rid of tc_u_knode ->tp

2018-09-06 Thread Jamal Hadi Salim
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

Re: [PATCH 4/7] get rid of unused argument of u32_destroy_key()

2018-09-06 Thread Jamal Hadi Salim
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

Re: [PATCH 2/7] mark root hnode explicitly

2018-09-06 Thread Jamal Hadi Salim
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

Re: [PATCH 3/7] make sure that divisor is a power of 2

2018-09-06 Thread Jamal Hadi Salim
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

Re: [PATCH 2/7] mark root hnode explicitly

2018-09-06 Thread Jamal Hadi Salim
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

Re: [PATCH 1/7] fix hnode refcounting

2018-09-06 Thread Jamal Hadi Salim
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

Re: broken behaviour of TC filter delete

2018-08-26 Thread Jamal Hadi Salim
? ENOENT with extack describing whether chain or filter not found. cheers, jamal

Re: [PATCH net-next] net: sched: act_ife: disable bh when taking ife_mod_lock

2018-08-13 Thread Jamal Hadi Salim
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

[PATCH net-next 04/13] net: sched: act_gact method rename for grep-ability and consistency

2018-08-12 Thread Jamal Hadi Salim
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

[PATCH net-next 11/13] net: sched: act_skbmod method rename for grep-ability and consistency

2018-08-12 Thread Jamal Hadi Salim
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

[PATCH net-next 07/13] net: sched: act_pedit method rename for grep-ability and consistency

2018-08-12 Thread Jamal Hadi Salim
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

[PATCH net-next 10/13] net: sched: act_skbedit method rename for grep-ability and consistency

2018-08-12 Thread Jamal Hadi Salim
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

[PATCH net-next 00/13] net: sched: actions rename for grep-ability and consistency

2018-08-12 Thread Jamal Hadi Salim
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

[PATCH net-next 03/13] net: sched: act_sum method rename for grep-ability and consistency

2018-08-12 Thread Jamal Hadi Salim
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

[PATCH net-next 01/13] net: sched: act_connmark method rename for grep-ability and consistency

2018-08-12 Thread Jamal Hadi Salim
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

[PATCH net-next 13/13] net: sched: act_mirred method rename for grep-ability and consistency

2018-08-12 Thread Jamal Hadi Salim
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

[PATCH net-next 06/13] net: sched: act_nat method rename for grep-ability and consistency

2018-08-12 Thread Jamal Hadi Salim
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

[PATCH net-next 12/13] net: sched: act_vlan method rename for grep-ability and consistency

2018-08-12 Thread Jamal Hadi Salim
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

[PATCH net-next 09/13] net: sched: act_simple method rename for grep-ability and consistency

2018-08-12 Thread Jamal Hadi Salim
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

[PATCH net-next 02/13] net: sched: act_bpf method rename for grep-ability and consistency

2018-08-12 Thread Jamal Hadi Salim
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

[PATCH net-next 08/13] net: sched: act_police method rename for grep-ability and consistency

2018-08-12 Thread Jamal Hadi Salim
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

[PATCH net-next 05/13] net: sched: act_ipt method rename for grep-ability and consistency

2018-08-12 Thread Jamal Hadi Salim
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

Re: [PATCH net-next v5 1/4] net/sched: user-space can't set unknown tcfa_action values

2018-08-01 Thread Jamal Hadi Salim
ir scripts if they dont see expected behavior). cheers, jamal

Re: [PATCH net-next v5 1/4] net/sched: user-space can't set unknown tcfa_action values

2018-07-31 Thread Jamal Hadi Salim
o uapi - so user space tc is updated. You then use the new tc specifying TC_ACT_XXX policy on kernel with your changes. If i read correctly because TC_ACT_XXX is out of bounds for current kernel(which has your changes) you will fix it to be UNSPEC, no? cheers, jamal

Re: [PATCH net-next v5 1/4] net/sched: user-space can't set unknown tcfa_action values

2018-07-30 Thread Jamal Hadi Salim
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

Re: [PATCH net-next v5 1/4] net/sched: user-space can't set unknown tcfa_action values

2018-07-30 Thread Jamal Hadi Salim
I think it would make a lot more sense to just reject the entry than changing it underneath the user to a default value. Least element of suprise. cheers, jamal

Re: [PATCH net-next v3 4/5] net/tc: introduce TC_ACT_REINJECT.

2018-07-26 Thread Jamal Hadi Salim
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

Re: [PATCH net-next v3 4/5] net/tc: introduce TC_ACT_REINJECT.

2018-07-25 Thread Jamal Hadi Salim
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

Re: [PATCH net-next v3 4/5] net/tc: introduce TC_ACT_REINJECT.

2018-07-25 Thread Jamal Hadi Salim
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

Re: [PATCH net-next v3 4/5] net/tc: introduce TC_ACT_REINJECT.

2018-07-25 Thread Jamal Hadi Salim
about introducing this new code. Could you not use the result code to carry sufficient info to indicate the intent? cheers, jamal + /* Basic packet classifier frontend definitions. */ struct tcf_walker { diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 056dc1

Re: [PATCH net-next v3 3/5] tc/act: remove unneeded RCU lock in action callback

2018-07-25 Thread Jamal Hadi Salim
rit. cheers, jamal

Re: [PATCH net-next v3 1/5] tc/act: user space can't use TC_ACT_REDIRECT directly

2018-07-25 Thread Jamal Hadi Salim
ECT) { + net_warn_ratelimited("TC_ACT_REDIRECT can't be used directly"); + a->tcfa_action = TC_ACT_UNSPEC; + } + Why not just reject the rule instead of changing the code underneath the user? cheers, jamal

Re: [PATCH net-next v3 5/5] act_mirred: use TC_ACT_REINJECT when possible

2018-07-25 Thread Jamal Hadi Salim
ues, like TC_ACT_RECLASSIFY. Jamal, is there any use case of returning !TC_ACT_STOLEN for ingress redirections? I cant think of one off top of my head. There maybe a future use case where it is not so - maybe just allow to return the user programmed action? that value will always be TC_ACT_STOLEN if

Re: [patch net-next v2 0/9] net: sched: introduce chain templates support with offloading to mlxsw

2018-06-29 Thread Jamal Hadi Salim
appealing. cheers, jamal

Re: [patch net-next v2 0/9] net: sched: introduce chain templates support with offloading to mlxsw

2018-06-28 Thread Jamal Hadi Salim
wer(in s/w) if you only added a template with say dst ip/mask? I can see it will make sense for u32 which is more flexible and protocol independent. cheers, jamal

Re: [patch net-next v2 0/9] net: sched: introduce chain templates support with offloading to mlxsw

2018-06-28 Thread Jamal Hadi Salim
Chain are already either explicitly or are implicitly (case of chain 0) specified. Assuming that one cant add a new template to a chain if it already has at least one filter (even if no template has been added). I like it - it may help making u32 more friendly to humans in some cases. cheers, jamal

Re: [PATCH v2 net-next] net/sched: add skbprio scheduler

2018-06-24 Thread Jamal Hadi Salim
ackets with different priorities as a means to overcome DoS attacks as described in paper ... cheers, jamal

Re: [PATCH v4 net-next] net:sched: add action inheritdsfield to skbedit

2018-06-20 Thread Jamal Hadi Salim
ould have been fine to match the size of the kernel flags), but other than that LGTM. Acked-by: Jamal Hadi Salim cheers, jamal

Re: [PATCH v4 net-next] net:sched: add action inheritdsfield to skbedit

2018-06-19 Thread Jamal Hadi Salim
etting in the init function seems to be a redundant given all the TLVs have d->flags also set by user space. But thats a different patch. cheers, jamal On 12/06/18 11:42 AM, Fu, Qiaobin wrote: The new action inheritdsfield copies the field DS of IPv4 and IPv6 packets into skb->priority. This e

Re: [PATCH net-next v4 00/11] Modify action API for implementing lockless actions

2018-06-01 Thread Jamal Hadi Salim
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

Re: [PATCH net-next v4 00/11] Modify action API for implementing lockless actions

2018-05-31 Thread Jamal Hadi Salim
is gone in this last step. Your patches may change behavior so that the action action is still around. I dont think this is a big deal, but just wanted to be sure it is not something more unexpected. cheers, jamal

Re: [PATCH] net: sched: split tc_ctl_tfilter into three handlers

2018-05-28 Thread Jamal Hadi Salim
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   2   3   4   5   6   7   8   9   10   >