Re: [RFC PATCH v2 net-next 0/3] flow_offload: Re-add per-action statistics

2019-05-22 Thread Vlad Buslov
On Tue 21 May 2019 at 16:23, Vlad Buslov wrote: > On Tue 21 May 2019 at 15:46, Jamal Hadi Salim wrote: >> On 2019-05-20 5:12 p.m., Jamal Hadi Salim wrote: >>> On 2019-05-20 2:36 p.m., Edward Cree wrote: >>>> On 20/05/2019 17:29, Jamal Hadi Salim wrote: >> &g

[RFC PATCH net-next] net: sched: don't use tc_action->order during action dump

2019-05-22 Thread Vlad Buslov
n resulting array of actions instead. Signed-off-by: Vlad Buslov --- net/sched/act_api.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 683fcc00da49..c42ecf4b3c10 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c

Re: [RFC PATCH v2 net-next 0/3] flow_offload: Re-add per-action statistics

2019-05-22 Thread Vlad Buslov
On Wed 22 May 2019 at 20:24, Jamal Hadi Salim wrote: > On 2019-05-22 11:08 a.m., Vlad Buslov wrote: >> >> On Tue 21 May 2019 at 16:23, Vlad Buslov wrote: > >> >> It seems that culprit in this case is tc_action->order field. It is used >> as nla attrtype wh

[PATCH net] net: sched: don't use tc_action->order during action dump

2019-05-22 Thread Vlad Buslov
n resulting array of actions instead. Signed-off-by: Vlad Buslov Acked-by: Jamal Hadi Salim --- net/sched/act_api.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 683fcc00da49..c42ecf4b3c10 100644 --- a/net/sched/act_api.

[PATCH net-next] net: sched: verify that q!=NULL before setting q->flags

2019-07-21 Thread Vlad Buslov
ting the 'flags' field. Fixes: 3f05e6886a59 ("net_sched: unset TCQ_F_CAN_BYPASS when adding filters") Signed-off-by: Vlad Buslov --- net/sched/cls_api.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index d144

Re: [PATCH net-next v2 1/3] flow_offload: move tc indirect block to flow offload

2019-07-26 Thread Vlad Buslov
On Fri 26 Jul 2019 at 09:17, we...@ucloud.cn wrote: > From: wenxu > > move tc indirect block to flow_offload and rename > it to flow indirect block.The nf_tables can use the > indr block architecture. > > Signed-off-by: wenxu > --- > v2: make use of flow_block from Pablo > flow_indr_rhashta

[PATCH net 0/2] action fixes for flow_offload infra compatibility

2019-08-03 Thread Vlad Buslov
Fix rcu warnings due to usage of action helpers that expect rcu read lock protection from rtnl-protected context of flow_offload infra. Vlad Buslov (2): net: sched: police: allow accessing police->params with rtnl net: sched: sample: allow accessing psample_group with rtnl include/

[PATCH net 1/2] net: sched: police: allow accessing police->params with rtnl

2019-08-03 Thread Vlad Buslov
ers to allow using them from both rtnl and rcu protected contexts. Fixes: 8c8cfc6ed274 ("net/sched: add police action to the hardware intermediate representation") Signed-off-by: Vlad Buslov --- include/net/tc_act/tc_police.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(

[PATCH net 2/2] net: sched: sample: allow accessing psample_group with rtnl

2019-08-03 Thread Vlad Buslov
tected contexts. Fixes: a7a7be6087b0 ("net/sched: add sample action to the hardware intermediate representation") Signed-off-by: Vlad Buslov --- include/net/tc_act/tc_sample.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net/tc_act/tc_sample.h b/in

Re: [PATCH net-next v7 5/6] flow_offload: support get multi-subsystem block

2019-08-12 Thread Vlad Buslov
On Wed 07 Aug 2019 at 04:13, we...@ucloud.cn wrote: > From: wenxu > > It provide a callback list to find the blocks of tc > and nft subsystems > > Signed-off-by: wenxu > Acked-by: Jakub Kicinski > --- > v7: add a mutex lock for add/del flow_indr_block_ing_cb > > include/net/flow_offload.h | 10

[PATCH net-next] net: devlink: remove redundant rtnl lock assert

2019-08-12 Thread Vlad Buslov
accommodate future implementation of rtnl-unlocked TC offloads driver callbacks. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko --- net/core/devlink.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/core/devlink.c b/net/core/devlink.c index e8f0b891f000..e98e7bd9740b 100644

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

2021-01-18 Thread Vlad Buslov
On Sun 17 Jan 2021 at 17:15, Jamal Hadi Salim wrote: > On 2021-01-16 7:56 p.m., Cong Wang wrote: >> From: Cong Wang >> tcf_action_init_1() loads tc action modules automatically with >> request_module() after parsing the tc action names, and it drops RTNL >> lock and re-holds it before and after r

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

[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

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

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-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: ❌ FAIL: Test report for kernel 5.10.0-rc6 (mainline.kernel.org)

2020-12-09 Thread Vlad Buslov
On Wed 09 Dec 2020 at 20:50, Eric Dumazet wrote: > On Wed, Dec 9, 2020 at 7:34 PM Saeed Mahameed wrote: >> >> On Wed, 2020-12-09 at 19:05 +0100, Eric Dumazet wrote: >> > On Wed, Dec 9, 2020 at 6:35 PM Eric Dumazet >> > wrote: >> > > Hmm... maybe the ECN stuff has always been buggy then, and nobo

[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 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 >

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.

[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:

[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

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

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 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 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 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-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-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-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

[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 net] net: use proper block lock instead of RTNL lock

2020-10-26 Thread Vlad Buslov
On Mon 26 Oct 2020 at 08:04, Leon Romanovsky wrote: > From: Leon Romanovsky > > The tcf_block_unbind() expects that the caller will take block->cb_lock > before calling it, however the code took RTNL lock instead. This causes > to the following kernel panic. > > WARNING: CPU: 1 PID: 13524 at net

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 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 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 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 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

[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

[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

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. > > So please remov

[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 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

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-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 &

[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: KASAN: null-ptr-deref Read in tcf_idrinfo_destroy

2021-02-16 Thread Vlad Buslov
On Tue 16 Feb 2021 at 01:22, Cong Wang wrote: > On Wed, Feb 10, 2021 at 9:53 PM syzbot > wrote: >> >> syzbot has found a reproducer for the following issue on: >> >> HEAD commit:291009f6 Merge tag 'pm-5.11-rc8' of git://git.kernel.org/p.. >> git tree: upstream >> console output: https:/

[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: [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

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 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 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 v2 1/1] net: sched: bump refcount for new action in ACT replace mode

2021-03-30 Thread Vlad Buslov
--git a/net/sched/act_api.c b/net/sched/act_api.c > index b919826939e0..43cceb924976 100644 > --- a/net/sched/act_api.c > +++ b/net/sched/act_api.c > @@ -1042,6 +1042,9 @@ struct tc_action *tcf_action_init_1(struct net *net, > struct tcf_proto *tp, > if (err != ACT_P_CREATED) > module_put(a_o->owner); > > + if (!bind && ovr && err == ACT_P_CREATED) > + refcount_set(&a->tcfa_refcnt, 2); > + > return a; > > err_out: Reviewed-and-tested-by: Vlad Buslov

[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-31 Thread Vlad Buslov
On Wed 31 Mar 2021 at 07:40, Cong Wang wrote: > On Mon, Mar 29, 2021 at 3:55 PM Kumar Kartikeya Dwivedi > wrote: >> diff --git a/net/sched/act_api.c b/net/sched/act_api.c >> index b919826939e0..43cceb924976 100644 >> --- a/net/sched/act_api.c >> +++ b/net/sched/act_api.c >> @@ -1042,6 +1042,9 @

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

2021-03-31 Thread Vlad Buslov
On Wed 31 Mar 2021 at 11:37, Kumar Kartikeya Dwivedi wrote: > Currently, action creation using ACT API in replace mode is buggy. When > invoking for non-existent action index 42, > > tc action replace action bpf obj foo.o sec index 42 > > kernel creates the action, fills up the netlink r

[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

[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

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

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 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

[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

[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 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 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-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-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 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

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

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

2021-02-08 Thread Vlad Buslov
On Sat 06 Feb 2021 at 20:13, Marcelo Ricardo Leitner wrote: > Hi, > > I didn't receive the cover letter, so I'm replying on this one. :-) > > This is nice. One thing is not clear to me yet. From the samples on > the cover letter: > > $ tc -s filter show dev enp8s0f0_1 ingress > filter protocol

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-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-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-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: [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 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: [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

[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

[PATCH net-next] net: sched: ingress: set 'unlocked' flag for Qdisc ops

2019-06-12 Thread Vlad Buslov
r update path by unlocked cls API patch set. Signed-off-by: Vlad Buslov --- net/sched/sch_ingress.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/sched/sch_ingress.c b/net/sched/sch_ingress.c index 0f65f617756b..d5382554e281 100644 --- a/net/sched/sch_ingress.c +++ b/net/sched/sch_i

Re: tc tp creation performance degratation since kernel 5.1

2019-06-12 Thread Vlad Buslov
On Wed 12 Jun 2019 at 15:03, Jiri Pirko wrote: > Hi. > > I came across serious performance degradation when adding many tps. I'm > using following script: > > > #!/bin/bash > > dev=testdummy > ip link add name $dev type dumm

[PATCH net] net: sched: flower: don't call synchronize_rcu() on mask creation

2019-06-13 Thread Vlad Buslov
ronize_rcu() calls from mask creation code. Instead, refactor fl_change() to always deallocate temporary mask with rcu grace period. Fixes: 195c234d15c9 ("net: sched: flower: handle concurrent mask insertion") Reported-by: Jiri Pirko Signed-off-by: Vlad Buslov --- net/sch

Re: tc tp creation performance degratation since kernel 5.1

2019-06-13 Thread Vlad Buslov
On Thu 13 Jun 2019 at 14:11, Jiri Pirko wrote: > Thu, Jun 13, 2019 at 12:09:32PM CEST, vla...@mellanox.com wrote: >>On Thu 13 Jun 2019 at 11:11, Jiri Pirko wrote: >>> I made a mistake during measurements, sorry about that. >>> >>> This is the correct script: >>> -

Re: tc tp creation performance degratation since kernel 5.1

2019-06-13 Thread Vlad Buslov
On Thu 13 Jun 2019 at 11:11, Jiri Pirko wrote: > I made a mistake during measurements, sorry about that. > > This is the correct script: > --- > #!/bin/bash > > dev=testdummy > ip link add name $dev type dummy > ip link set dev $d

[PATCH net-next] net: sched: ingress: set 'unlocked' flag for clsact Qdisc ops

2019-06-13 Thread Vlad Buslov
path by unlocked cls API patch set. Signed-off-by: Vlad Buslov --- net/sched/sch_ingress.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/sched/sch_ingress.c b/net/sched/sch_ingress.c index d5382554e281..599730f804d7 100644 --- a/net/sched/sch_ingress.c +++ b/net/sched/sch_ingress.c @@ -247,

Re: [PATCH net-next] net: sched: ingress: set 'unlocked' flag for Qdisc ops

2019-06-13 Thread Vlad Buslov
On Wed 12 Jun 2019 at 19:33, Daniel Borkmann wrote: > On 06/12/2019 09:14 AM, Vlad Buslov wrote: >> To remove rtnl lock dependency in tc filter update API when using ingress >> Qdisc, set QDISC_CLASS_OPS_DOIT_UNLOCKED flag in ingress Qdisc_class_ops. >> >> Ingress

[PATCH net-next] net: sched: Fix NULL-pointer dereference in tc_indr_block_ing_cmd()

2019-07-10 Thread Vlad Buslov
ies block pointer before dereferencing it to obtain index. Use the function in tc_indr_block_ing_cmd() to prevent NULL pointer dereference. Fixes: 955bcb6ea0df ("drivers: net: use flow block API") Signed-off-by: Vlad Buslov --- include/net/pkt_cls.h | 10 ++ net/sched/cls_api.c

[PATCH net-next] net/mlx5e: Provide cb_list pointer when setting up tc block on rep

2019-07-10 Thread Vlad Buslov
se flow block API") Signed-off-by: Vlad Buslov --- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c index 10ef90a7bdd

Re: [PATCH net-next] net/mlx5e: Provide cb_list pointer when setting up tc block on rep

2019-07-11 Thread Vlad Buslov
On Thu 11 Jul 2019 at 03:35, wenxu wrote: > 在 2019/7/11 2:25, Vlad Buslov 写道: >> Recent refactoring of tc block offloads infrastructure introduced new >> flow_block_cb_setup_simple() method intended to be used as unified way for >> all drivers to register offload callbacks.

Re: [PATCH net-next v7 5/6] flow_offload: support get multi-subsystem block

2019-08-16 Thread Vlad Buslov
On Wed 14 Aug 2019 at 05:50, wenxu wrote: > On 8/12/2019 10:11 PM, Vlad Buslov wrote: >> >>> +static void flow_block_ing_cmd(struct net_device *dev, >>> + flow_indr_block_bind_cb_t *cb, >>> + void *cb_priv,

[PATCH net-next] net: flow_offload: convert block_ing_cb_list to regular list type

2019-08-16 Thread Vlad Buslov
3: 7fad893a8780 R14: 0002 R15: 7fad893a3740 To fix the described incorrect RCU usage, convert block_ing_cb_list from RCU list to regular list and protect it with flow_indr_block_ing_cb_lock mutex in flow_block_ing_cmd(). Fixes: 1150ab0f1b33 ("flow_offload: support get multi-subsystem

Re: [PATCH net-next v7 5/6] flow_offload: support get multi-subsystem block

2019-08-16 Thread Vlad Buslov
On Fri 16 Aug 2019 at 20:56, Jakub Kicinski wrote: > On Fri, 16 Aug 2019 15:04:44 +0000, Vlad Buslov wrote: >> >> [ 401.511871] RSP: 002b:7ffca2a9fad8 EFLAGS: 0246 ORIG_RAX: >> >> 0001 >> >> [ 401.511875] RAX: fff

Re: [PATCH net-next v7 5/6] flow_offload: support get multi-subsystem block

2019-08-19 Thread Vlad Buslov
On Fri 16 Aug 2019 at 20:56, Jakub Kicinski wrote: > On Fri, 16 Aug 2019 15:04:44 +0000, Vlad Buslov wrote: >> >> [ 401.511871] RSP: 002b:7ffca2a9fad8 EFLAGS: 0246 ORIG_RAX: >> >> 0001 >> >> [ 401.511875] RAX: fff

[PATCH net] nfp: flower: verify that block cb is not busy before binding

2019-08-19 Thread Vlad Buslov
When processing FLOW_BLOCK_BIND command on indirect block, check that flow block cb is not busy. Fixes: 0d4fd02e7199 ("net: flow_offload: add flow_block_cb_is_busy() and use it") Reported-by: Jakub Kicinski Signed-off-by: Vlad Buslov --- drivers/net/ethernet/netronome/nfp/flower/off

  1   2   3   4   5   6   7   8   >