Re: [patch net-next v4 03/12] net: sched: introduce chain object to uapi

2018-07-26 Thread Jiri Pirko
Thu, Jul 26, 2018 at 12:06:14PM CEST, j...@resnulli.us wrote: >Thu, Jul 26, 2018 at 09:38:39AM CEST, j...@resnulli.us wrote: >>Wed, Jul 25, 2018 at 06:40:44PM CEST, xiyou.wangc...@gmail.com wrote: >>>On Tue, Jul 24, 2018 at 11:49 PM Jiri Pirko wrote: Wed, Jul 25, 2018 at 01:20:08AM CEST,

Re: [patch net-next v4 03/12] net: sched: introduce chain object to uapi

2018-07-26 Thread Jiri Pirko
Thu, Jul 26, 2018 at 09:38:39AM CEST, j...@resnulli.us wrote: >Wed, Jul 25, 2018 at 06:40:44PM CEST, xiyou.wangc...@gmail.com wrote: >>On Tue, Jul 24, 2018 at 11:49 PM Jiri Pirko wrote: >>> >>> Wed, Jul 25, 2018 at 01:20:08AM CEST, xiyou.wangc...@gmail.com wrote: >>> >So, you only send out notific

Re: [patch net-next v4 03/12] net: sched: introduce chain object to uapi

2018-07-26 Thread Jiri Pirko
Wed, Jul 25, 2018 at 06:40:44PM CEST, xiyou.wangc...@gmail.com wrote: >On Tue, Jul 24, 2018 at 11:49 PM Jiri Pirko wrote: >> >> Wed, Jul 25, 2018 at 01:20:08AM CEST, xiyou.wangc...@gmail.com wrote: >> >So, you only send out notification when the last refcnt is gone. >> > >> >If the chain that is b

Re: [patch net-next v4 03/12] net: sched: introduce chain object to uapi

2018-07-25 Thread Cong Wang
On Tue, Jul 24, 2018 at 11:49 PM Jiri Pirko wrote: > > Wed, Jul 25, 2018 at 01:20:08AM CEST, xiyou.wangc...@gmail.com wrote: > >So, you only send out notification when the last refcnt is gone. > > > >If the chain that is being deleted by a user is still used by an action, > >you return 0 or -EPERM

Re: [patch net-next v4 03/12] net: sched: introduce chain object to uapi

2018-07-24 Thread Jiri Pirko
Wed, Jul 25, 2018 at 01:20:08AM CEST, xiyou.wangc...@gmail.com wrote: >On Tue, Jul 24, 2018 at 3:30 PM Cong Wang wrote: >> >> On Mon, Jul 23, 2018 at 12:25 AM Jiri Pirko wrote: >> > + switch (n->nlmsg_type) { >> > + case RTM_NEWCHAIN: >> > + /* In case the chain was succ

Re: [patch net-next v4 03/12] net: sched: introduce chain object to uapi

2018-07-24 Thread Cong Wang
On Tue, Jul 24, 2018 at 3:30 PM Cong Wang wrote: > > On Mon, Jul 23, 2018 at 12:25 AM Jiri Pirko wrote: > > + switch (n->nlmsg_type) { > > + case RTM_NEWCHAIN: > > + /* In case the chain was successfully added, take a > > reference > > +* to the chain. T

Re: [patch net-next v4 03/12] net: sched: introduce chain object to uapi

2018-07-24 Thread Cong Wang
On Mon, Jul 23, 2018 at 12:25 AM Jiri Pirko wrote: > + switch (n->nlmsg_type) { > + case RTM_NEWCHAIN: > + /* In case the chain was successfully added, take a reference > +* to the chain. This ensures that an empty chain > +* does not disap

[patch net-next v4 03/12] net: sched: introduce chain object to uapi

2018-07-23 Thread Jiri Pirko
From: Jiri Pirko Allow user to create, destroy, get and dump chain objects. Do that by extending rtnl commands by the chain-specific ones. User will now be able to explicitly create or destroy chains (so far this was done only automatically according the filter/act needs and refcounting). Also, t