From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: Re: [patch net-next v2 0/9] net: sched: introduce chain templates support with offloading to mlxsw Date: Thu, 28 Jun 2018 18:08:22 +0200 Message-ID: <20180628160822.GG2177@nanopsycho.orion> References: <20180628130907.951-1-jiri@resnulli.us> <3660d513-1f0c-fa7a-0ac2-9f89aec89389@gmail.com> <20180628142909.GE2177@nanopsycho.orion> <1dbc630d-2da3-afbe-18ba-e9dfc893bf04@gmail.com> <20180628153752.GF2177@nanopsycho.orion> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, davem@davemloft.net, jhs@mojatatu.com, xiyou.wangcong@gmail.com, jakub.kicinski@netronome.com, simon.horman@netronome.com, john.hurley@netronome.com, mlxsw@mellanox.com, sridhar.samudrala@intel.com To: David Ahern Return-path: Received: from mail-wr0-f196.google.com ([209.85.128.196]:46896 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933693AbeF1QJw (ORCPT ); Thu, 28 Jun 2018 12:09:52 -0400 Received: by mail-wr0-f196.google.com with SMTP id t6-v6so6064958wrq.13 for ; Thu, 28 Jun 2018 09:09:51 -0700 (PDT) Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: Thu, Jun 28, 2018 at 05:50:08PM CEST, dsahern@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 match the >>>> original template. I wanted to avoid it. The chain is utilized in hw for >>>> the original template, the filter insertion would have to be sanitized >>>> in driver. With this restriction, drivers can depend on filters always >>>> be fitting. >>>> >>> >>> Then the hardware driver should have that restriction not the core tc code. >> >> But why? The same restriction would be in all drivers. I believe it is >> better to have in in tc in single place. Drivers can then depend on it. >> Do you have a usecase where you need to remove template for non-empty >> chain? >> > >If the hardware has the limitation then the driver should be rejecting a >change. The behaviour I defend is symmetrical with "template add". There is also possible to add the template only if the chain is empty.