[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpVHQHHfi1oaFbEXsGK2c8ryjuZ8SxxR54Kpbh-BBKcEQg@mail.gmail.com>
Date: Thu, 28 Jun 2018 15:25:53 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: Jiri Pirko <jiri@...nulli.us>
Cc: Linux Kernel Network Developers <netdev@...r.kernel.org>,
David Miller <davem@...emloft.net>,
Jamal Hadi Salim <jhs@...atatu.com>,
Jakub Kicinski <jakub.kicinski@...ronome.com>,
Simon Horman <simon.horman@...ronome.com>,
john.hurley@...ronome.com, David Ahern <dsahern@...il.com>,
mlxsw@...lanox.com, sridhar.samudrala@...el.com
Subject: Re: [patch net-next v2 0/9] net: sched: introduce chain templates
support with offloading to mlxsw
On Thu, Jun 28, 2018 at 6:10 AM Jiri Pirko <jiri@...nulli.us> 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 showed in the list:
> # tc chaintemplate show dev dummy0 ingress
> chaintemplate flower chain 0
> dst_mac 00:00:00:00:00:00/00:00:00:00:ff:ff
> eth_type ipv4
>
> Add another template, this time for chain number 22:
> # tc chaintemplate add dev dummy0 ingress proto ip chain 22 flower dst_ip 0.0.0.0/16
> # tc chaintemplate show dev dummy0 ingress
> chaintemplate flower chain 0
> dst_mac 00:00:00:00:00:00/00:00:00:00:ff:ff
> eth_type ipv4
> chaintemplate flower chain 22
> eth_type ipv4
> dst_ip 0.0.0.0/16
So, if I want to check the template of a chain, I have to use
'tc chaintemplate... chain X'.
If I want to check the filters in a chain, I have to use
'tc filter show .... chain X'.
If you introduce 'tc chain', it would just need one command:
`tc chain show ... X` which could list its template first and
followed by filters in this chain, something like:
# tc chain show dev eth0 chain X
template: # could be none
....
filter1
...
filter2
...
Isn't it more elegant?
Powered by blists - more mailing lists