From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [patch net-next v2 0/9] net: sched: introduce chain templates support with offloading to mlxsw Date: Thu, 28 Jun 2018 09:50:08 -0600 Message-ID: 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=utf-8 Content-Transfer-Encoding: 7bit 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: Jiri Pirko Return-path: Received: from mail-pl0-f66.google.com ([209.85.160.66]:38706 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752489AbeF1PuM (ORCPT ); Thu, 28 Jun 2018 11:50:12 -0400 Received: by mail-pl0-f66.google.com with SMTP id d10-v6so2967106plo.5 for ; Thu, 28 Jun 2018 08:50:12 -0700 (PDT) In-Reply-To: <20180628153752.GF2177@nanopsycho.orion> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: 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.