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

2018-07-02 Thread Cong Wang
On Sat, Jun 30, 2018 at 3:13 AM Jiri Pirko wrote: > Okay. So that would allow either create a chain or "chain with > template". Once that is done, there would be no means to manipulate the > template. One can only remove the chain. > > What about refounting? I think it would make sense that this

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

2018-06-30 Thread Jiri Pirko
Sat, Jun 30, 2018 at 12:18:02AM CEST, xiyou.wangc...@gmail.com wrote: >On Fri, Jun 29, 2018 at 10:06 AM Samudrala, Sridhar > wrote: >> >> So instead of introducing 'chaintemplate' object in the kernel, can't we add >> 'chain' >> object in the kernel that takes the 'template' as an attribute? >

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

2018-06-29 Thread Cong Wang
On Fri, Jun 29, 2018 at 10:06 AM Samudrala, Sridhar wrote: > > So instead of introducing 'chaintemplate' object in the kernel, can't we add > 'chain' > object in the kernel that takes the 'template' as an attribute? This is exactly what I mean above. Making the chain a standalone object in

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

2018-06-29 Thread Samudrala, Sridhar
On 6/29/2018 6:05 AM, Jiri Pirko wrote: Fri, Jun 29, 2018 at 02:54:36PM CEST, dsah...@gmail.com wrote: On 6/29/18 6:48 AM, Jiri Pirko wrote: Fri, Jun 29, 2018 at 02:12:21PM CEST, j...@mojatatu.com wrote: On 29/06/18 04:39 AM, Jiri Pirko wrote: Fri, Jun 29, 2018 at 12:25:53AM CEST,

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

2018-06-29 Thread David Miller
From: David Ahern Date: Fri, 29 Jun 2018 06:54:36 -0600 > The resolution of the syntax affect the uapi changes proposed. You are > wanting to add new RTM commands which suggests new objects. If a > template is an attribute of an existing object then the netlink API > should indicate that. +1

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

2018-06-29 Thread Jiri Pirko
Fri, Jun 29, 2018 at 02:54:36PM CEST, dsah...@gmail.com wrote: >On 6/29/18 6:48 AM, Jiri Pirko wrote: >> Fri, Jun 29, 2018 at 02:12:21PM CEST, j...@mojatatu.com wrote: >>> On 29/06/18 04:39 AM, Jiri Pirko wrote: Fri, Jun 29, 2018 at 12:25:53AM CEST, xiyou.wangc...@gmail.com wrote: > On

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

2018-06-29 Thread David Ahern
On 6/29/18 6:48 AM, Jiri Pirko wrote: > Fri, Jun 29, 2018 at 02:12:21PM CEST, j...@mojatatu.com wrote: >> On 29/06/18 04:39 AM, Jiri Pirko wrote: >>> Fri, Jun 29, 2018 at 12:25:53AM CEST, xiyou.wangc...@gmail.com wrote: On Thu, Jun 28, 2018 at 6:10 AM Jiri Pirko wrote: > Add a template

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

2018-06-29 Thread Jiri Pirko
Fri, Jun 29, 2018 at 02:12:21PM CEST, j...@mojatatu.com wrote: >On 29/06/18 04:39 AM, Jiri Pirko wrote: >> Fri, Jun 29, 2018 at 12:25:53AM CEST, xiyou.wangc...@gmail.com wrote: >> > On Thu, Jun 28, 2018 at 6:10 AM Jiri Pirko wrote: >> > > Add a template of type flower allowing to insert rules

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

2018-06-29 Thread Jamal Hadi Salim
On 29/06/18 04:39 AM, Jiri Pirko wrote: Fri, Jun 29, 2018 at 12:25:53AM CEST, xiyou.wangc...@gmail.com wrote: On Thu, Jun 28, 2018 at 6:10 AM Jiri Pirko wrote: Add a template of type flower allowing to insert rules matching on last 2 bytes of destination mac address: # tc chaintemplate add

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

2018-06-29 Thread Jiri Pirko
Fri, Jun 29, 2018 at 12:25:53AM CEST, xiyou.wangc...@gmail.com wrote: >On Thu, Jun 28, 2018 at 6:10 AM Jiri Pirko wrote: >> Add a template of type flower allowing to insert rules matching on last >> 2 bytes of destination mac address: >> # tc chaintemplate add dev dummy0 ingress proto ip flower

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

2018-06-28 Thread Cong Wang
On Thu, Jun 28, 2018 at 6:10 AM Jiri Pirko wrote: > Add a template of type flower allowing to insert rules matching on last > 2 bytes of destination mac address: > # tc chaintemplate add dev dummy0 ingress proto ip flower dst_mac > 00:00:00:00:00:00/00:00:00:00:FF:FF > > The template is now

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

2018-06-28 Thread Cong Wang
On Wed, Jun 27, 2018 at 9:48 PM David Miller wrote: > > This series doesn't apply cleanly to net-next, and also there seems to still > be some discussion about how the iproute2 command line should look. > I am sure you know this, so just to be clear: A redesign of "how iproute2 command line

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

2018-06-28 Thread Jiri Pirko
Thu, Jun 28, 2018 at 05:50:08PM CEST, dsah...@gmail.com wrote: >On 6/28/18 9:37 AM, Jiri Pirko wrote: > > Why this restriction? It's a template, so why can't it be removed > regardless of whether there are filters? That means you could start to insert filters that does not

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

2018-06-28 Thread David Ahern
On 6/28/18 9:37 AM, Jiri Pirko wrote: Why this restriction? It's a template, so why can't it be removed regardless of whether there are filters? >>> >>> That means you could start to insert filters that does not match the >>> original template. I wanted to avoid it. The chain is

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

2018-06-28 Thread Jiri Pirko
Thu, Jun 28, 2018 at 05:10:45PM CEST, dsah...@gmail.com wrote: >On 6/28/18 8:29 AM, Jiri Pirko wrote: >> Thu, Jun 28, 2018 at 04:18:47PM CEST, dsah...@gmail.com wrote: >>> On 6/28/18 7:08 AM, Jiri Pirko wrote: Create dummy device with clsact first: # ip link add type dummy # tc

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

2018-06-28 Thread David Ahern
On 6/28/18 8:29 AM, Jiri Pirko wrote: > Thu, Jun 28, 2018 at 04:18:47PM CEST, dsah...@gmail.com wrote: >> On 6/28/18 7:08 AM, Jiri Pirko wrote: >>> Create dummy device with clsact first: >>> # ip link add type dummy >>> # tc qdisc add dev dummy0 clsact >>> >>> There is no template assigned by

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

2018-06-28 Thread Jiri Pirko
Thu, Jun 28, 2018 at 04:18:47PM CEST, dsah...@gmail.com wrote: >On 6/28/18 7:08 AM, Jiri Pirko wrote: >> Create dummy device with clsact first: >> # ip link add type dummy >> # tc qdisc add dev dummy0 clsact >> >> There is no template assigned by default: >> # tc chaintemplate show dev dummy0

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

2018-06-28 Thread David Ahern
On 6/28/18 7:08 AM, Jiri Pirko wrote: > Create dummy device with clsact first: > # ip link add type dummy > # tc qdisc add dev dummy0 clsact > > There is no template assigned by default: > # tc chaintemplate show dev dummy0 ingress > > Add a template of type flower allowing to insert rules

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

2018-06-28 Thread Jiri Pirko
Thu, Jun 28, 2018 at 03:54:17PM CEST, j...@mojatatu.com wrote: >On 28/06/18 09:22 AM, Jiri Pirko wrote: >> Thu, Jun 28, 2018 at 03:13:30PM CEST, j...@mojatatu.com wrote: >> > >> > On 26/06/18 03:59 AM, Jiri Pirko wrote: >> > > From: Jiri Pirko >> > > >> > > For the TC clsact offload these days,

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

2018-06-28 Thread Jamal Hadi Salim
On 28/06/18 09:22 AM, Jiri Pirko wrote: Thu, Jun 28, 2018 at 03:13:30PM CEST, j...@mojatatu.com wrote: On 26/06/18 03:59 AM, Jiri Pirko wrote: From: Jiri Pirko For the TC clsact offload these days, some of HW drivers need to hold a magic ball. The reason is, with the first inserted rule

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

2018-06-28 Thread Jiri Pirko
Oh, this is v3 already. The changelog should be: --- v2->v3: - patch 5: - rebase on top of the reoffload pathset - patch 6: - rebase on top of the reoffload pathset - patch 9: - adjust to the userspace cmdline changes v1->v2: - patch 6: - remove leftover extack arg in fl_hw_create_tmplt()

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

2018-06-28 Thread Jiri Pirko
Thu, Jun 28, 2018 at 03:13:30PM CEST, j...@mojatatu.com wrote: > >On 26/06/18 03:59 AM, Jiri Pirko wrote: >> From: Jiri Pirko >> >> For the TC clsact offload these days, some of HW drivers need >> to hold a magic ball. The reason is, with the first inserted rule inside >> HW they need to guess

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

2018-06-28 Thread Jamal Hadi Salim
On 26/06/18 03:59 AM, Jiri Pirko wrote: From: Jiri Pirko For the TC clsact offload these days, some of HW drivers need to hold a magic ball. The reason is, with the first inserted rule inside HW they need to guess what fields will be used for the matching. If later on this guess proves to be

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

2018-06-28 Thread Jiri Pirko
From: Jiri Pirko For the TC clsact offload these days, some of HW drivers need to hold a magic ball. The reason is, with the first inserted rule inside HW they need to guess what fields will be used for the matching. If later on this guess proves to be wrong and user adds a filter with a

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

2018-06-28 Thread Jiri Pirko
Thu, Jun 28, 2018 at 06:48:26AM CEST, da...@davemloft.net wrote: >From: Jiri Pirko >Date: Tue, 26 Jun 2018 09:59:51 +0200 > >> For the TC clsact offload these days, some of HW drivers need >> to hold a magic ball. The reason is, with the first inserted rule inside >> HW they need to guess what

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

2018-06-27 Thread David Miller
From: Jiri Pirko Date: Tue, 26 Jun 2018 09:59:51 +0200 > For the TC clsact offload these days, some of HW drivers need > to hold a magic ball. The reason is, with the first inserted rule inside > HW they need to guess what fields will be used for the matching. If > later on this guess proves to

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

2018-06-27 Thread Jiri Pirko
Wed, Jun 27, 2018 at 08:34:46AM CEST, sridhar.samudr...@intel.com wrote: > >On 6/26/2018 11:05 PM, Jiri Pirko wrote: >> Wed, Jun 27, 2018 at 02:04:31AM CEST, xiyou.wangc...@gmail.com wrote: >> > On Tue, Jun 26, 2018 at 1:01 AM Jiri Pirko wrote: >> > > Create dummy device with clsact first: >> > >

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

2018-06-27 Thread Samudrala, Sridhar
On 6/26/2018 11:05 PM, Jiri Pirko wrote: Wed, Jun 27, 2018 at 02:04:31AM CEST, xiyou.wangc...@gmail.com wrote: On Tue, Jun 26, 2018 at 1:01 AM Jiri Pirko wrote: Create dummy device with clsact first: # ip link add type dummy # tc qdisc add dev dummy0 clsact There is no template assigned by

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

2018-06-27 Thread Jiri Pirko
Wed, Jun 27, 2018 at 02:04:31AM CEST, xiyou.wangc...@gmail.com wrote: >On Tue, Jun 26, 2018 at 1:01 AM Jiri Pirko wrote: >> Create dummy device with clsact first: >> # ip link add type dummy >> # tc qdisc add dev dummy0 clsact >> >> There is no template assigned by default: >> # tc filter

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

2018-06-26 Thread Cong Wang
On Tue, Jun 26, 2018 at 1:01 AM Jiri Pirko wrote: > Create dummy device with clsact first: > # ip link add type dummy > # tc qdisc add dev dummy0 clsact > > There is no template assigned by default: > # tc filter template show dev dummy0 ingress > > Add a template of type flower allowing to

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

2018-06-26 Thread Jiri Pirko
From: Jiri Pirko For the TC clsact offload these days, some of HW drivers need to hold a magic ball. The reason is, with the first inserted rule inside HW they need to guess what fields will be used for the matching. If later on this guess proves to be wrong and user adds a filter with a