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

2021-03-31 Thread Kumar Kartikeya Dwivedi
On Wed, Mar 31, 2021 at 10:10:45AM IST, 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 > > @@ -104

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

2021-03-30 Thread Cong Wang
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 @@ struct tc_action *tcf_action_init_1(struct net *net, >

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

2021-03-30 Thread Vlad Buslov
On Tue 30 Mar 2021 at 01:53, 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 re

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

2021-03-29 Thread Kumar Kartikeya Dwivedi
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 response, and then just deletes the action after notifying userspace.