Re: [PATCH net v2 2/3] net: sched: fix action overwrite reference counting

2021-04-08 Thread Vlad Buslov
On Thu 08 Apr 2021 at 02:50, Cong Wang wrote: > On Wed, Apr 7, 2021 at 8:36 AM Vlad Buslov wrote: >> >> Action init code increments reference counter when it changes an action. >> This is the desired behavior for cls API which needs to obtain action >> referenc

[PATCH net-next 2/2] tc-testing: add simple action test to verify batch change cleanup

2021-04-07 Thread Vlad Buslov
Verify cleanup of failed actions batch change where second action in batch fails after successful init of first action. Signed-off-by: Vlad Buslov --- .../tc-testing/tc-tests/actions/simple.json | 29 +++ 1 file changed, 29 insertions(+) diff --git a/tools/testing/selftests

[PATCH net-next 1/2] tc-testing: add simple action test to verify batch add cleanup

2021-04-07 Thread Vlad Buslov
Verify cleanup of failed actions batch add where second action in batch fails after successful init of first action. Signed-off-by: Vlad Buslov --- .../tc-testing/tc-tests/actions/simple.json | 30 +++ 1 file changed, 30 insertions(+) diff --git a/tools/testing/selftests/tc

[PATCH net-next 0/2] Additional tests for action API

2021-04-07 Thread Vlad Buslov
Add two new tests for action create/change code. Vlad Buslov (2): tc-testing: add simple action test to verify batch add cleanup tc-testing: add simple action test to verify batch change cleanup .../tc-testing/tc-tests/actions/simple.json | 59 +++ 1 file changed, 59

[PATCH net v2 3/3] net: sched: fix err handler in tcf_action_init()

2021-04-07 Thread Vlad Buslov
t release the module reference when overwriting existing action as this is no longer necessary since both upper and lower layers obtain and manage their own module references independently. Fixes: d349f9976868 ("net_sched: fix RTNL deadlock again caused by request_module()") Suggested-by:

[PATCH net v2 2/3] net: sched: fix action overwrite reference counting

2021-04-07 Thread Vlad Buslov
o tcf_action_put_many(). Fixes: cae422f379f3 ("net: sched: use reference counting action init") Reported-by: Kumar Kartikeya Dwivedi Signed-off-by: Vlad Buslov --- Notes: Changes V1 -> V2: - Extend commit message with reproduction and fix details. - Don't e

[PATCH net v2 1/3] Revert "net: sched: bump refcount for new action in ACT replace mode"

2021-04-07 Thread Vlad Buslov
This reverts commit 6855e8213e06efcaf7c02a15e12b1ae64b9a7149. Following commit in series fixes the issue without introducing regression in error rollback of tcf_action_destroy(). Signed-off-by: Vlad Buslov --- net/sched/act_api.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/net/sched

[PATCH net v2 0/3] Action initalization fixes

2021-04-07 Thread Vlad Buslov
patch. Vlad Buslov (3): Revert "net: sched: bump refcount for new action in ACT replace mode" net: sched: fix action overwrite reference counting net: sched: fix err handler in tcf_action_init() include/net/act_api.h | 12 -- net/sched/a

Re: [PATCH RFC 2/4] net: sched: fix err handler in tcf_action_init()

2021-04-06 Thread Vlad Buslov
On Tue 06 Apr 2021 at 01:56, Cong Wang wrote: > On Sat, Apr 3, 2021 at 3:01 AM Vlad Buslov wrote: >> So, the following happens in reproduction provided in commit message >> when executing "tc actions add action simple sdata \"1\" index 1 >> action simple s

Re: [PATCH RFC 2/4] net: sched: fix err handler in tcf_action_init()

2021-04-03 Thread Vlad Buslov
On Sat 03 Apr 2021 at 02:14, Cong Wang wrote: > On Wed, Mar 31, 2021 at 9:41 AM Vlad Buslov wrote: >> >> With recent changes that separated action module load from action >> initialization tcf_action_init() function error handling code was modified >> to manually re

Re: [PATCH RFC 1/4] net: sched: fix action overwrite reference counting

2021-04-03 Thread Vlad Buslov
On Sat 03 Apr 2021 at 01:13, Cong Wang wrote: > On Wed, Mar 31, 2021 at 9:41 AM Vlad Buslov wrote: >> >> Action init code increments reference counter when it changes an action. >> This is the desired behavior for cls API which needs to obtain action >> referenc

[PATCH RFC 2/4] net: sched: fix err handler in tcf_action_init()

2021-03-31 Thread Vlad Buslov
x27;t been initialized. Fixes: d349f9976868 ("net_sched: fix RTNL deadlock again caused by request_module()") Signed-off-by: Vlad Buslov --- net/sched/act_api.c | 30 -- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/net/sched/act_api.c b/net/

[PATCH RFC 3/4] tc-testing: add simple action test to verify batch add cleanup

2021-03-31 Thread Vlad Buslov
Verify cleanup of failed actions batch add where second action in batch fails after successful init of first action. Signed-off-by: Vlad Buslov --- .../tc-testing/tc-tests/actions/simple.json | 30 +++ 1 file changed, 30 insertions(+) diff --git a/tools/testing/selftests/tc

[PATCH RFC 1/4] net: sched: fix action overwrite reference counting

2021-03-31 Thread Vlad Buslov
e counting action init") Reported-by: Kumar Kartikeya Dwivedi Signed-off-by: Vlad Buslov --- include/net/act_api.h | 5 +++-- net/sched/act_api.c | 27 +-- net/sched/cls_api.c | 9 + 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/includ

[PATCH RFC 4/4] tc-testing: add simple action test to verify batch change cleanup

2021-03-31 Thread Vlad Buslov
Verify cleanup of failed actions batch change where second action in batch fails after successful init of first action. Signed-off-by: Vlad Buslov --- .../tc-testing/tc-tests/actions/simple.json | 29 +++ 1 file changed, 29 insertions(+) diff --git a/tools/testing/selftests

[PATCH RFC 0/4] Action initalization fixes

2021-03-31 Thread Vlad Buslov
o net-next. Vlad Buslov (4): net: sched: fix action overwrite reference counting net: sched: fix err handler in tcf_action_init() tc-testing: add simple action test to verify batch add cleanup tc-testing: add simple action test to verify batch change cleanup include/net

Re: [PATCH net-next v3] net: sched: bump refcount for new action in ACT replace mode

2021-03-31 Thread Vlad Buslov
s: cae422f379f3 ("net: sched: use reference counting action init") > Signed-off-by: Kumar Kartikeya Dwivedi > --- > Changelog: > > v2 -> v3 > Cleanup new action on rollback after raising refcount (Cong) > > v1 -> v2 > Remove erroneous tcf_action_put_many

Re: [PATCH v2 1/1] net: sched: bump refcount for new action in ACT replace mode

2021-03-31 Thread Vlad Buslov
n err; It looks like here the modules for all actions that successfully completed their init has already been release by either tcf_action_init_1() on action overwrite or by tcf_action_destroy() on action create. I'll try to come up with tests that validate these corner cases. Regards, Vlad

[PATCH net-next] tc-testing: add simple action change test

2021-03-30 Thread Vlad Buslov
xist is handled correctly. Signed-off-by: Vlad Buslov --- .../tc-testing/tc-tests/actions/simple.json | 24 +++ 1 file changed, 24 insertions(+) diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions/simple.json b/tools/testing/selftests/tc-testing/tc-tests/actions/si

Re: [PATCH v2 1/1] net: sched: bump refcount for new action in ACT replace mode

2021-03-30 Thread Vlad Buslov
gt; owner module for the same action. In case of action creation, there > is no existing action, so no tcf_exts_destroy callback happens. > > This means no code changes for CLS API. > > Fixes: cae422f379f3 ("net: sched: use reference counting action init") > Signed

Re: [PATCH bpf-next 3/5] libbpf: add low level TC-BPF API

2021-03-29 Thread Vlad Buslov
On Mon 29 Mar 2021 at 15:32, Toke Høiland-Jørgensen wrote: > Vlad Buslov writes: > >> On Thu 25 Mar 2021 at 14:00, Kumar Kartikeya Dwivedi >> wrote: >>> This adds functions that wrap the netlink API used for adding, >>> manipulating, and removing filters

Re: [PATCH bpf-next 3/5] libbpf: add low level TC-BPF API

2021-03-29 Thread Vlad Buslov
On Thu 25 Mar 2021 at 14:00, Kumar Kartikeya Dwivedi wrote: > This adds functions that wrap the netlink API used for adding, > manipulating, and removing filters and actions. These functions operate > directly on the loaded prog's fd, and return a handle to the filter and > action using an out p

Re: [PATCH 1/1] net: sched: extend lifetime of new action in replace mode

2021-03-29 Thread Vlad Buslov
Hi Kumar, Thanks for the patch! On Sun 28 Mar 2021 at 09:45, Kumar Kartikeya Dwivedi wrote: > When creating an action in replace mode, in tcf_action_add, the refcount > of existing actions is rightly raised during tcf_idr_check_alloc call, > but for new actions a dummy placeholder entry is creat

Re: [PATCH] net/mlx5e: fix mlx5e_tc_tun_update_header_ipv6 dummy definition

2021-03-01 Thread Vlad Buslov
struct mlx5e_encap_entry *e) > { return -EOPNOTSUPP; } > #endif > int mlx5e_tc_tun_route_lookup(struct mlx5e_priv *priv, Thanks Arnd! Reviewed-by: Vlad Buslov

[PATCH net] net: sched: fix police ext initialization

2021-02-16 Thread Vlad Buslov
ction insertions together") Reported-by: syzbot+151e3e714d34ae4ce...@syzkaller.appspotmail.com Signed-off-by: Vlad Buslov --- include/net/act_api.h | 1 + net/sched/act_api.c | 2 +- net/sched/cls_api.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/net/act_api.h b/i

Re: KASAN: null-ptr-deref Read in tcf_idrinfo_destroy

2021-02-16 Thread Vlad Buslov
t; tc_action_net_exit include/net/act_api.h:151 [inline] >> police_exit_net+0x168/0x360 net/sched/act_police.c:390 > > This is really strange. It seems we still left some -EBUSY placeholders > in the idr, however, we actually call tcf_action_destroy() to clean up > everything in

[PATCH net-next] net: fib_notifier: don't return positive values on fib registration

2021-02-11 Thread Vlad Buslov
checking for positive error values and converting them to -EINVAL in fib6_tables_dump(). Reported-by: Dan Carpenter Suggested-by: Ido Schimmel Signed-off-by: Vlad Buslov --- net/ipv6/ip6_fib.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/ipv6/ip6_fib.c b/net/ipv6

Re: [pull request][net-next V2 00/17] mlx5 updates 2021-02-04

2021-02-10 Thread Vlad Buslov
On Tue 09 Feb 2021 at 10:42, Or Gerlitz wrote: > On Sat, Feb 6, 2021 at 7:10 AM Saeed Mahameed wrote: > >> Vlad Buslov says: > >> Implement support for VF tunneling > >> Currently, mlx5 only supports configuration with tunnel endpoint IP address >> on &g

Re: [net-next V2 01/17] net/mlx5: E-Switch, Refactor setting source port

2021-02-10 Thread Vlad Buslov
On Wed 10 Feb 2021 at 15:56, Marcelo Ricardo Leitner wrote: > On Tue, Feb 09, 2021 at 06:10:59PM +0200, Or Gerlitz wrote: >> On Tue, Feb 9, 2021 at 4:26 PM Vlad Buslov wrote: >> > On Mon 08 Feb 2021 at 22:22, Jakub Kicinski wrote: >> > > On Mon, 8 Feb 2021 10

Re: [PATCH net-next] net/mlx5: Fix a NULL vs IS_ERR() check

2021-02-10 Thread Vlad Buslov
y: Dan Carpenter Thanks, Dan! Reviewed-by: Vlad Buslov

Re: [net-next V2 01/17] net/mlx5: E-Switch, Refactor setting source port

2021-02-10 Thread Vlad Buslov
On Tue 09 Feb 2021 at 21:50, Jakub Kicinski wrote: > On Tue, 9 Feb 2021 21:17:11 +0200 Vlad Buslov wrote: >> 4. Decapsulated payload appears on namespaced VF with IP address >> 5.5.5.5: >> >> $ sudo ip netns exec ns0 tcpdump -ni enp8s0f0v1 -vvv -c 3 > > So

Re: [net-next V2 01/17] net/mlx5: E-Switch, Refactor setting source port

2021-02-09 Thread Vlad Buslov
On Tue 09 Feb 2021 at 20:05, Jakub Kicinski wrote: > On Tue, 9 Feb 2021 16:22:26 +0200 Vlad Buslov wrote: >> No, tunnel IP is configured on VF. That particular VF is in host >> namespace. When mlx5 resolves tunneling the code checks if tunnel >> endpoint IP address is on su

Re: [net-next V2 01/17] net/mlx5: E-Switch, Refactor setting source port

2021-02-09 Thread Vlad Buslov
On Mon 08 Feb 2021 at 22:22, Jakub Kicinski wrote: > On Mon, 8 Feb 2021 10:21:21 +0200 Vlad Buslov wrote: >> > These operations imply that 7.7.7.5 is configured on some interface on >> > the host. Most likely the VF representor itself, as that aids with ARP >> > res

Re: [net-next V2 01/17] net/mlx5: E-Switch, Refactor setting source port

2021-02-08 Thread Vlad Buslov
On Mon 08 Feb 2021 at 15:25, Marcelo Ricardo Leitner wrote: > On Mon, Feb 08, 2021 at 10:21:21AM +0200, Vlad Buslov wrote: >> >> On Sat 06 Feb 2021 at 20:13, Marcelo Ricardo Leitner >> wrote: >> > Hi, >> > >> > I didn't

Re: [net-next V2 01/17] net/mlx5: E-Switch, Refactor setting source port

2021-02-08 Thread Vlad Buslov
lf, as that aids with ARP > resolution. Is that so? > > Thanks, > Marcelo Hi Marcelo, The tunnel endpoint IP address is configured on VF that is represented by enp8s0f0_0 representor in example rules. The VF is on host. Regards, Vlad

Re: [Patch net-next] net_sched: fix RTNL deadlock again caused by request_module()

2021-01-18 Thread Vlad Buslov
gt; seems hard to trigger this by humans. And given the size of this patch, >> I'd suggest to make it to net-next and not to backport to stable. >> This patch has been tested by syzbot and tested with tdc.py by me. >> > > LGTM. > Initially i was worried about performance impact but i found nothing > observable. We need to add a tdc test for batch (I can share how i did > batch testing at next meet). > > Tested-by: Jamal Hadi Salim > Acked-by: Jamal Hadi Salim > > cheers, > jamal Hi, Thanks for adding me to the thread! I ran our performance tests with the patch applied and didn't observe any regression. Regards, Vlad

Re: ❌ FAIL: Test report for kernel 5.10.0-rc6 (mainline.kernel.org)

2020-12-10 Thread Vlad Buslov
On Thu 10 Dec 2020 at 00:22, Jakub Kicinski wrote: > On Wed, 9 Dec 2020 22:54:40 +0200 Vlad Buslov wrote: >> > Yes, I think the patch I sent should fix this, ETH_P_ARP should not be >> > dropped ;) >> > >> > I am testing this before offical patch submis

Re: ❌ FAIL: Test report for kernel 5.10.0-rc6 (mainline.kernel.org)

2020-12-09 Thread Vlad Buslov
; > skb_reset_network_header(skb); >> > >> > >> > > On Wed, Dec 9, 2020 at 6:20 PM Jakub Kicinski >> > > wrote: >> > > > Eric, could this possibly be commit 4179b00c04d1 ("geneve: pull >> > > > IP >> &

Re: [PATCH net-next] net: sched: remove redundant 'rtnl_held' argument

2020-12-02 Thread Vlad Buslov
On Tue 01 Dec 2020 at 21:24, Jakub Kicinski wrote: > On Tue, 1 Dec 2020 20:39:16 +0200 Vlad Buslov wrote: >> On Tue 01 Dec 2020 at 19:03, Jakub Kicinski wrote: >> > On Tue, 1 Dec 2020 09:55:37 +0200 Vlad Buslov wrote: >> >> On Tue 01 Dec 2020 at 04:52, Jakub Kic

Re: [PATCH net-next] net: sched: remove redundant 'rtnl_held' argument

2020-12-01 Thread Vlad Buslov
On Tue 01 Dec 2020 at 19:03, Jakub Kicinski wrote: > On Tue, 1 Dec 2020 09:55:37 +0200 Vlad Buslov wrote: >> On Tue 01 Dec 2020 at 04:52, Jakub Kicinski wrote: >> > On Fri, 27 Nov 2020 17:12:05 +0200 Vlad Buslov wrote: >> >> @@ -2262,7 +2260,7 @@ static int tc_d

Re: [PATCH net-next] net: sched: remove redundant 'rtnl_held' argument

2020-11-30 Thread Vlad Buslov
On Tue 01 Dec 2020 at 04:52, Jakub Kicinski wrote: > On Fri, 27 Nov 2020 17:12:05 +0200 Vlad Buslov wrote: >> @@ -2262,7 +2260,7 @@ static int tc_del_tfilter(struct sk_buff *skb, struct >> nlmsghdr *n, >> >> if (prio == 0) { >> tfilter_notify

[PATCH iproute2-next 0/2] Implement action terse dump

2020-11-30 Thread Vlad Buslov
Refactor action flags according to recommended kernel upstream naming using TCA_ACT_ prefix. Implement support for new action terse dump flag. Vlad Buslov (2): tc: use TCA_ACT_ prefix for action flags tc: implement support for action terse dump include/uapi/linux/rtnetlink.h | 12

[PATCH iproute2-next 2/2] tc: implement support for action terse dump

2020-11-30 Thread Vlad Buslov
In terse mode dump only outputs essential data needed to identify the action (kind, index) and stats, if requested by the user. Signed-off-by: Vlad Buslov Suggested-by: Jamal Hadi Salim --- man/man8/tc.8 | 2 +- tc/m_action.c | 9 + 2 files changed, 10 insertions(+), 1 deletion(-) di

[PATCH iproute2-next 1/2] tc: use TCA_ACT_ prefix for action flags

2020-11-30 Thread Vlad Buslov
Use TCA_ACT_FLAG_LARGE_DUMP_ON alias according to new preferred naming for action flags. Signed-off-by: Vlad Buslov --- include/uapi/linux/rtnetlink.h | 12 +++- tc/m_action.c | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/include/uapi/linux

[PATCH net-next] net: sched: remove redundant 'rtnl_held' argument

2020-11-27 Thread Vlad Buslov
. Remove the 'rtnl_held' argument in order to simplify the code and make rtnl lock requirement explicit. Signed-off-by: Vlad Buslov --- include/net/pkt_cls.h | 2 +- net/sched/cls_api.c | 18 -- net/sched/sch_api.c | 4 ++-- 3 files changed, 11 insertions(+), 13

[PATCH net-next v2] net: sched: alias action flags with TCA_ACT_ prefix

2020-11-24 Thread Vlad Buslov
Currently both filter and action flags use same "TCA_" prefix which makes them hard to distinguish to code and confusing for users. Create aliases for existing action flags constants with "TCA_ACT_" prefix. Signed-off-by: Vlad Buslov --- Notes: Changes V1 -> V2:

Re: [PATCH net-next] net: sched: alias action flags with TCA_ACT_ prefix

2020-11-24 Thread Vlad Buslov
On Tue 24 Nov 2020 at 18:24, Jakub Kicinski wrote: > On Tue, 24 Nov 2020 11:28:37 +0200 Vlad Buslov wrote: >> > TCA_FLAG_TERSE_DUMP exists only in net-next, we could rename it, right? >> >> You are right. I'll send a fix. > > You mean v2, not a follow up, right? :) Yes. Sending the v2.

Re: [PATCH net-next] net: sched: alias action flags with TCA_ACT_ prefix

2020-11-24 Thread Vlad Buslov
On Mon 23 Nov 2020 at 23:22, Jakub Kicinski wrote: > On Sat, 21 Nov 2020 18:09:02 +0200 Vlad Buslov wrote: >> Currently both filter and action flags use same "TCA_" prefix which makes >> them hard to distinguish to code and confusing for users. Create aliases >

[PATCH net-next] net: sched: alias action flags with TCA_ACT_ prefix

2020-11-21 Thread Vlad Buslov
Currently both filter and action flags use same "TCA_" prefix which makes them hard to distinguish to code and confusing for users. Create aliases for existing action flags constants with "TCA_ACT_" prefix. Signed-off-by: Vlad Buslov --- include/uapi/linux/rtnetlink.h |

Re: [PATCH v6 net-next 0/3] net/sched: fix over mtu packet of defrag in

2020-11-10 Thread Vlad Buslov
act_frag.c | 164 > ++ > net/sched/act_mirred.c| 21 -- > 9 files changed, 265 insertions(+), 11 deletions(-) > create mode 100644 net/sched/act_frag.c Hi, I ran our CT tests with this series and kernel debug configs enabled without any issue. Tested-by: Vlad Buslov

Re: [PATCH v5 net-next 3/3] net/sched: act_frag: add implict packet fragment support.

2020-11-09 Thread Vlad Buslov
On Mon 09 Nov 2020 at 16:54, wenxu wrote: > 在 2020/11/9 21:24, Vlad Buslov 写道: >> On Sun 08 Nov 2020 at 01:30, we...@ucloud.cn wrote: >>> From: wenxu >>> >>> Currently kernel tc subsystem can do conntrack in act_ct. But when several >>> fra

Re: [PATCH v5 net-next 3/3] net/sched: act_frag: add implict packet fragment support.

2020-11-09 Thread Vlad Buslov
On Mon 09 Nov 2020 at 16:50, Marcelo Ricardo Leitner wrote: > On Mon, Nov 09, 2020 at 03:24:37PM +0200, Vlad Buslov wrote: >> On Sun 08 Nov 2020 at 01:30, we...@ucloud.cn wrote: > ... >> > @@ -974,9 +974,22 @@ config NET_ACT_TUNNEL_KEY >> > To compile this c

Re: [PATCH v5 net-next 3/3] net/sched: act_frag: add implict packet fragment support.

2020-11-09 Thread Vlad Buslov
On Sun 08 Nov 2020 at 01:30, we...@ucloud.cn wrote: > From: wenxu > > Currently kernel tc subsystem can do conntrack in act_ct. But when several > fragment packets go through the act_ct, function tcf_ct_handle_fragments > will defrag the packets to a big one. But the last action will redirect > mi

[PATCH net] selftest: fix flower terse dump tests

2020-11-07 Thread Vlad Buslov
Iproute2 tc classifier terse dump has been accepted with modified syntax. Update the tests accordingly. Signed-off-by: Vlad Buslov Fixes: e7534fd42a99 ("selftests: implement flower classifier terse dump tests") --- .../testing/selftests/tc-testing/tc-tests/filters/tests.json | 4 ++

Re: [PATCH iproute2-next] tc: implement support for action terse dump

2020-11-06 Thread Vlad Buslov
On Tue 03 Nov 2020 at 23:59, Jamal Hadi Salim wrote: > On 2020-11-03 10:07 a.m., Vlad Buslov wrote: >> >> On Tue 03 Nov 2020 at 03:48, David Ahern wrote: >>> On 10/31/20 2:25 PM, Vlad Buslov wrote: >>>> diff --git a/include/uapi/linux/rtnetlink.h &

Re: [PATCH v4 net-next 2/2] net/sched: act_frag: add implict packet fragment support.

2020-11-06 Thread Vlad Buslov
On Fri 06 Nov 2020 at 11:14, we...@ucloud.cn wrote: > From: wenxu > > Currently kernel tc subsystem can do conntrack in act_ct. But when several > fragment packets go through the act_ct, function tcf_ct_handle_fragments > will defrag the packets to a big one. But the last action will redirect > mi

Re: [PATCH iproute2-next] tc: implement support for action terse dump

2020-11-03 Thread Vlad Buslov
On Tue 03 Nov 2020 at 03:48, David Ahern wrote: > On 10/31/20 2:25 PM, Vlad Buslov wrote: >> diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h >> index 5ad84e663d01..b486f52900f0 100644 >> --- a/include/uapi/linux/rtnetlink.h >> +++ b/inc

[PATCH net-next v2] net: sched: implement action-specific terse dump

2020-11-02 Thread Vlad Buslov
by its own handle). Move tcf_action_dump_terse() function to the beginning of source file in order to call it from tcf_dump_walker(). Signed-off-by: Vlad Buslov Suggested-by: Jamal Hadi Salim --- Notes: Changes V1 -> V2: - Include cookie in action terse dump. include/uapi/li

Re: [PATCH net-next] net: sched: implement action-specific terse dump

2020-11-02 Thread Vlad Buslov
On Mon 02 Nov 2020 at 14:26, Jamal Hadi Salim wrote: > Thanks Vlad. Ive run the basic test and it looks good. > One thing i discovered while testing is that if the > cookie is set, we also want it in the dump. Your earlier > comment that it only costs if it was set is on point. &

[PATCH iproute2-next] tc: implement support for action terse dump

2020-10-31 Thread Vlad Buslov
terse mode dump only outputs essential data needed to identify the action (kind, index) and stats, if requested by the user. Signed-off-by: Vlad Buslov Suggested-by: Jamal Hadi Salim --- include/uapi/linux/rtnetlink.h | 4 man/man8/tc.8 | 2 +- tc/m_action.c

[PATCH net-next] net: sched: implement action-specific terse dump

2020-10-31 Thread Vlad Buslov
tcf_action_dump_terse() function to the beginning of source file in order to call it from tcf_dump_walker(). Signed-off-by: Vlad Buslov Suggested-by: Jamal Hadi Salim --- include/uapi/linux/rtnetlink.h | 4 ++ net/sched/act_api.c| 69 ++ 2 files changed

Re: [PATCH iproute2-next v3 2/2] tc: implement support for terse dump

2020-10-26 Thread Vlad Buslov
On Mon 26 Oct 2020 at 20:01, Jamal Hadi Salim wrote: > On 2020-10-26 1:46 p.m., Vlad Buslov wrote: >> >> On Mon 26 Oct 2020 at 19:12, Jamal Hadi Salim wrote: >>> On 2020-10-26 7:28 a.m., Vlad Buslov wrote: >>>> >>>> On S

Re: [PATCH iproute2-next v3 2/2] tc: implement support for terse dump

2020-10-26 Thread Vlad Buslov
On Mon 26 Oct 2020 at 19:12, Jamal Hadi Salim wrote: > On 2020-10-26 7:28 a.m., Vlad Buslov wrote: >> >> On Sat 24 Oct 2020 at 20:40, Jamal Hadi Salim wrote: > > [..] >>>> >>>> Yes, that makes sense. I guess introducing something like 'tc a

Re: [PATCH iproute2-next v3 2/2] tc: implement support for terse dump

2020-10-26 Thread Vlad Buslov
On Mon 26 Oct 2020 at 16:52, David Ahern wrote: > On 10/26/20 5:28 AM, Vlad Buslov wrote: >> Patch to make cookie in filter terse dump optional? That would break >> existing terse dump users that rely on it (OVS). > > Maybe I missed something in the discussions. terse dump

Re: [PATCH iproute2-next v3 2/2] tc: implement support for terse dump

2020-10-26 Thread Vlad Buslov
On Sat 24 Oct 2020 at 20:40, Jamal Hadi Salim wrote: > On 2020-10-23 8:48 a.m., Vlad Buslov wrote: >> On Thu 22 Oct 2020 at 17:05, Jamal Hadi Salim wrote: >>> On 2020-10-21 4:19 a.m., Vlad Buslov wrote: >>>> >>>> On Tue 20 Oct 2020 at 15:29, Jamal Ha

Re: [PATCH net] net: use proper block lock instead of RTNL lock

2020-10-26 Thread Vlad Buslov
On Mon 26 Oct 2020 at 10:28, Leon Romanovsky wrote: > On Mon, Oct 26, 2020 at 10:10:31AM +0200, Vlad Buslov wrote: >> On Mon 26 Oct 2020 at 08:04, Leon Romanovsky wrote: >> > From: Leon Romanovsky >> > >> > The tcf_block_unbind() expects that the caller

Re: [PATCH net] net: use proper block lock instead of RTNL lock

2020-10-26 Thread Vlad Buslov
ite(&block->cb_lock); > list_del(&block_cb->driver_list); > list_move(&block_cb->list, &bo.cb_list); > - up_write(&block->cb_lock); > - rtnl_lock(); > tcf_block_unbind(block, &bo); > - rtnl_unlock(); > + up_write(&block->cb_lock); Hi Leon, This fix probably breaks all other drivers besides mlx5 that require rtnl lock on TC filter update path (called from tp->ops->reoffload()). I suggest both rtnl lock and cb_lock are required here. Regards, Vlad [...]

[PATCH iproute2-next v4 1/2] tc: skip actions that don't have options attribute when printing

2020-10-23 Thread Vlad Buslov
From: Vlad Buslov Modify implementations that return error from action_until->print_aopt() callback to silently skip actions that don't have their corresponding TCA_ACT_OPTIONS attribute set (some actions already behave like this). Print action kind before returning from action_until->

[PATCH iproute2-next v4 0/2] Implement filter terse dump mode support

2020-10-23 Thread Vlad Buslov
Implement support for terse dump mode which provides only essential classifier/action info (handle, stats, cookie, etc.). Use new TCA_DUMP_FLAGS_TERSE flag to prevent copying of unnecessary data from kernel. Vlad Buslov (2): tc: skip actions that don't have options attribute when printing

[PATCH iproute2-next v4 2/2] tc: implement support for terse dump

2020-10-23 Thread Vlad Buslov
From: Vlad Buslov Implement support for classifier/action terse dump using new TCA_DUMP_FLAGS tlv with only available flag value TCA_DUMP_FLAGS_TERSE. Set the flag when user requested it with following example CLI (-br for 'brief'): $ tc -s -br filter show dev ens1f0 ingress filter p

Re: [PATCH iproute2-next v3 2/2] tc: implement support for terse dump

2020-10-23 Thread Vlad Buslov
On Thu 22 Oct 2020 at 17:05, Jamal Hadi Salim wrote: > On 2020-10-21 4:19 a.m., Vlad Buslov wrote: >> >> On Tue 20 Oct 2020 at 15:29, Jamal Hadi Salim wrote: >>> On 2020-10-19 11:18 a.m., Vlad Buslov wrote: >>> My worry is you have a very specific use case for

Re: [PATCH iproute2-next v3 2/2] tc: implement support for terse dump

2020-10-21 Thread Vlad Buslov
On Tue 20 Oct 2020 at 15:29, Jamal Hadi Salim wrote: > On 2020-10-19 11:18 a.m., Vlad Buslov wrote: >> >> On Mon 19 Oct 2020 at 16:48, Jamal Hadi Salim wrote: >>> On 2020-10-18 8:16 a.m., Vlad Buslov wrote: > > [..] > >>> That could be a good thing, n

Re: [PATCH iproute2-next v3 2/2] tc: implement support for terse dump

2020-10-19 Thread Vlad Buslov
On Mon 19 Oct 2020 at 16:48, Jamal Hadi Salim wrote: > On 2020-10-18 8:16 a.m., Vlad Buslov wrote: >> On Sat 17 Oct 2020 at 14:20, Jamal Hadi Salim wrote: >>> On 2020-10-16 12:42 p.m., Vlad Buslov wrote: >>> > >>> Either one sounds appealing - the refact

Re: [PATCH iproute2-next v3 2/2] tc: implement support for terse dump

2020-10-18 Thread Vlad Buslov
On Sat 17 Oct 2020 at 14:20, Jamal Hadi Salim wrote: > On 2020-10-16 12:42 p.m., Vlad Buslov wrote: > >> >> All action print callbacks have arg==NULL check and return at the >> beginning. To print action type we need either to have dedicated >> 'brief_dump

Re: [PATCH iproute2-next v3 2/2] tc: implement support for terse dump

2020-10-16 Thread Vlad Buslov
On Fri 16 Oct 2020 at 19:07, Jamal Hadi Salim wrote: > On 2020-10-16 10:42 a.m., Vlad Buslov wrote: >> From: Vlad Buslov >> >> Implement support for classifier/action terse dump using new TCA_DUMP_FLAGS >> tlv with only available flag value TCA_DUMP_FLAGS_TERSE

[PATCH iproute2-next v3 2/2] tc: implement support for terse dump

2020-10-16 Thread Vlad Buslov
From: Vlad Buslov Implement support for classifier/action terse dump using new TCA_DUMP_FLAGS tlv with only available flag value TCA_DUMP_FLAGS_TERSE. Set the flag when user requested it with following example CLI (-br for 'brief'): $ tc -s -brief filter show dev ens1f0 ingress filte

[PATCH iproute2-next v3 1/2] tc: skip actions that don't have options attribute when printing

2020-10-16 Thread Vlad Buslov
From: Vlad Buslov Modify implementations that return error from action_until->print_aopt() callback to silently skip actions that don't have their corresponding TCA_ACT_OPTIONS attribute set (some actions already behave like this). This is necessary to support terse dump mode in followi

[PATCH iproute2-next v3 0/2] Implement filter terse dump mode support

2020-10-16 Thread Vlad Buslov
Implement support for terse dump mode which provides only essential classifier/action info (handle, stats, cookie, etc.). Use new TCA_DUMP_FLAGS_TERSE flag to prevent copying of unnecessary data from kernel. Vlad Buslov (2): tc: skip actions that don't have options attribute when printing

Re: [PATCH iproute2-next v2 2/2] tc: implement support for terse dump

2020-10-09 Thread Vlad Buslov
On Fri 09 Oct 2020 at 15:45, Jamal Hadi Salim wrote: > On 2020-10-09 8:15 a.m., Vlad Buslov wrote: >> >> On Fri 09 Oct 2020 at 15:03, Jamal Hadi Salim wrote: > >>> Which test(s)? >>> I see for example d45e mentioning terse but i dont see corresponding

Re: [PATCH iproute2-next v2 2/2] tc: implement support for terse dump

2020-10-09 Thread Vlad Buslov
On Fri 09 Oct 2020 at 15:03, Jamal Hadi Salim wrote: > On 2020-10-08 11:34 a.m., Vlad Buslov wrote: >> >> On Thu 08 Oct 2020 at 15:58, Jamal Hadi Salim wrote: >> >> >> Hi Jamal, >> >> The existing terse dump tdc tests will have to be changed accor

Re: [PATCH iproute2-next v2 2/2] tc: implement support for terse dump

2020-10-08 Thread Vlad Buslov
On Thu 08 Oct 2020 at 15:58, Jamal Hadi Salim wrote: > On 2020-10-07 9:40 p.m., David Ahern wrote: >> On 9/30/20 9:59 AM, Vlad Buslov wrote: >>> From: Vlad Buslov >>> >>> Implement support for classifier/action terse dump using new TCA_DUMP_FLAGS &g

Re: [RESEND PATCH iproute2-next 2/2] tc: implement support for terse dump

2020-09-30 Thread Vlad Buslov
On Wed 30 Sep 2020 at 20:33, Stephen Hemminger wrote: > On Wed, 30 Sep 2020 08:57:20 -0700 > David Ahern wrote: > >> On 9/30/20 12:36 AM, Vlad Buslov wrote: >> > From: Vlad Buslov >> > >> > Implement support for classifier/action terse dump u

Re: [RESEND PATCH iproute2-next 2/2] tc: implement support for terse dump

2020-09-30 Thread Vlad Buslov
On Wed 30 Sep 2020 at 18:57, David Ahern wrote: > On 9/30/20 12:36 AM, Vlad Buslov wrote: >> From: Vlad Buslov >> >> Implement support for classifier/action terse dump using new TCA_DUMP_FLAGS >> tlv with only available flag value TCA_DUMP_FLAGS_TERSE. Set the fla

[PATCH iproute2-next v2 0/2] Implement filter terse dump mode support

2020-09-30 Thread Vlad Buslov
Implement support for terse dump mode which provides only essential classifier/action info (handle, stats, cookie, etc.). Use new TCA_DUMP_FLAGS_TERSE flag to prevent copying of unnecessary data from kernel. Vlad Buslov (2): tc: skip actions that don't have options attribute when printing

[PATCH iproute2-next v2 1/2] tc: skip actions that don't have options attribute when printing

2020-09-30 Thread Vlad Buslov
From: Vlad Buslov Modify implementations that return error from action_until->print_aopt() callback to silently skip actions that don't have their corresponding TCA_ACT_OPTIONS attribute set (some actions already behave like this). This is necessary to support terse dump mode in followi

[PATCH iproute2-next v2 2/2] tc: implement support for terse dump

2020-09-30 Thread Vlad Buslov
From: Vlad Buslov Implement support for classifier/action terse dump using new TCA_DUMP_FLAGS tlv with only available flag value TCA_DUMP_FLAGS_TERSE. Set the flag when user requested it with following example CLI (-br for 'brief'): > tc -s -br filter show dev ens1f0 ingress In te

[RESEND PATCH iproute2-next 1/2] tc: skip actions that don't have options attribute when printing

2020-09-30 Thread Vlad Buslov
From: Vlad Buslov Modify implementations that return error from action_until->print_aopt() callback to silently skip actions that don't have their corresponding TCA_ACT_OPTIONS attribute set (some actions already behave like this). This is necessary to support terse dump mode in followi

[RESEND PATCH iproute2-next 0/2] Implement filter terse dump mode support

2020-09-30 Thread Vlad Buslov
Implement support for terse dump mode which provides only essential classifier/action info (handle, stats, cookie, etc.). Use new TCA_DUMP_FLAGS_TERSE flag to prevent copying of unnecessary data from kernel. Vlad Buslov (2): tc: skip actions that don't have options attribute when printing

[RESEND PATCH iproute2-next 2/2] tc: implement support for terse dump

2020-09-30 Thread Vlad Buslov
From: Vlad Buslov Implement support for classifier/action terse dump using new TCA_DUMP_FLAGS tlv with only available flag value TCA_DUMP_FLAGS_TERSE. Set the flag when user requested it with following example CLI: > tc -s filter show terse dev ens1f0 ingress In terse mode dump only outp

Re: [Patch net 1/2] net_sched: defer tcf_idr_insert() in tcf_action_init_1()

2020-09-25 Thread Vlad Buslov
On Fri 25 Sep 2020 at 22:22, Cong Wang wrote: > On Fri, Sep 25, 2020 at 8:24 AM Vlad Buslov wrote: >> > + if (TC_ACT_EXT_CMP(a->tcfa_action, TC_ACT_GOTO_CHAIN) && >> > + !rcu_access_pointer(a->goto_chain)) { >> >

Re: [Patch net 2/2] net_sched: commit action insertions together

2020-09-25 Thread Vlad Buslov
t+2287853d392e4b423...@syzkaller.appspotmail.com > Fixes: 0190c1d452a9 ("net: sched: atomically check-allocate action") > Cc: Vlad Buslov > Cc: Jamal Hadi Salim > Cc: Jiri Pirko > Signed-off-by: Cong Wang > --- Reviewed-by: Vlad Buslov

Re: [Patch net 1/2] net_sched: defer tcf_idr_insert() in tcf_action_init_1()

2020-09-25 Thread Vlad Buslov
And this prepares for the next patch. > > Cc: Vlad Buslov > Cc: Jamal Hadi Salim > Cc: Jiri Pirko > Signed-off-by: Cong Wang > --- Hi Cong, Thanks for fixing this! > include/net/act_api.h | 2 -- > net/sched/act_api.c| 38 ---

Re: [Patch net] act_ife: load meta modules before tcf_idr_check_alloc()

2020-09-07 Thread Vlad Buslov
se we only need >> to load modules we need potentially. >> >> Reported-and-tested-by: syzbot+80e32b5d1f9923f8a...@syzkaller.appspotmail.com >> Fixes: 0190c1d452a9 ("net: sched: atomically check-allocate action") >> Cc: Jamal Hadi Salim >> Cc: Vlad Buslov > > Vla

Re: [Patch net] act_ife: load meta modules before tcf_idr_check_alloc()

2020-09-07 Thread Vlad Buslov
Fixes: 0190c1d452a9 ("net: sched: atomically check-allocate action") > Cc: Jamal Hadi Salim > Cc: Vlad Buslov > Cc: Jiri Pirko > Signed-off-by: Cong Wang > --- Thanks for fixing this, Cong! I've verified that all tdc ife tests pass with this patch. Reviewed-by: Vlad Buslov Tested-by: Vlad Buslov

Re: INFO: task hung in tcf_ife_init

2020-09-03 Thread Vlad Buslov
On Thu 03 Sep 2020 at 18:33, syzbot wrote: > syzbot has bisected this issue to: > > commit 4e8ddd7f1758ca4ddd0c1f7cf3e66fce736241d2 > Author: Vlad Buslov > Date: Thu Jul 5 14:24:30 2018 + > > net: sched: don't release reference on action overwrite

Re: Crash in indirect block infra after unloading driver module

2020-06-24 Thread Vlad Buslov
On Wed 24 Jun 2020 at 15:22, Vlad Buslov wrote: > On Wed 24 Jun 2020 at 13:30, Pablo Neira Ayuso wrote: >> On Wed, Jun 24, 2020 at 01:22:29PM +0300, Vlad Buslov wrote: >>> Hi Pablo, >>> >>> I've encountered a new issue with indirect offloads infras

Re: Crash in indirect block infra after unloading driver module

2020-06-24 Thread Vlad Buslov
On Wed 24 Jun 2020 at 13:30, Pablo Neira Ayuso wrote: > On Wed, Jun 24, 2020 at 01:22:29PM +0300, Vlad Buslov wrote: >> Hi Pablo, >> >> I've encountered a new issue with indirect offloads infrastructure. The >> issue is that on driver offload its indirect callback

Crash in indirect block infra after unloading driver module

2020-06-24 Thread Vlad Buslov
eb9e005 CR4: 001606e0 I can come up with something to fix mlx5 but it looks like all other drivers that support indirect devices are also susceptible to similar issue. Regards, Vlad

Re: [v2,net-next] net: qos offload add flow status with dropped count

2020-06-19 Thread Vlad Buslov
uce dropped frames which is necessary for user. Status > update shows how many filtered packets increasing and how many dropped > in those packets. > > v2: Changes > - Update commit comments suggest by Jiri Pirko. > > Signed-off-by: Po Liu > --- Reviewed-by: Vlad Buslov

Re: [PATCH net-next 3/3] cls_flower: Allow flow offloading though masked key exist.

2020-06-19 Thread Vlad Buslov
On Fri 19 Jun 2020 at 12:41, dsatish wrote: > A packet reaches OVS user space, only if, either there is no rule in > datapath/hardware or there is race condition that the flow is added > to hardware but before it is processed another packet arrives. > > It is possible hardware as part of its lim

  1   2   3   4   5   6   7   8   9   10   >