From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next v2 0/7] net: sched: support replay of filter offload when binding to block Date: Tue, 26 Jun 2018 23:21:56 +0900 (KST) Message-ID: <20180626.232156.1747067075368462571.davem@davemloft.net> References: <20180625213010.13266-1-jakub.kicinski@netronome.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: jiri@resnulli.us, xiyou.wangcong@gmail.com, jhs@mojatatu.com, gerlitz.or@gmail.com, netdev@vger.kernel.org, oss-drivers@netronome.com To: jakub.kicinski@netronome.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:36702 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934556AbeFZOWA (ORCPT ); Tue, 26 Jun 2018 10:22:00 -0400 In-Reply-To: <20180625213010.13266-1-jakub.kicinski@netronome.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Jakub Kicinski Date: Mon, 25 Jun 2018 14:30:03 -0700 > This series from John adds the ability to replay filter offload requests > when new offload callback is being registered on a TC block. This is most > likely to take place for shared blocks today, when a block which already > has rules is bound to another interface. Prior to this patch set if any > of the rules were offloaded the block bind would fail. > > A new tcf_proto_op is added to generate a filter-specific offload request. > The new 'offload' op is supporting extack from day 0, hence we need to > propagate extack to .ndo_setup_tc TC_BLOCK_BIND/TC_BLOCK_UNBIND and > through tcf_block_cb_register() to tcf_block_playback_offloads(). > > The immediate use of this patch set is to simplify life of drivers which > require duplicating rules when sharing blocks. Switch drivers (mlxsw) > can bind ports to rule lists dynamically, NIC drivers generally don't > have that ability and need the rules to be duplicated for each ingress > they match on. In code terms this means that switch drivers don't > register multiple callbacks for each port. NIC drivers do, and get a > separate request and hance rule per-port, as if the block was not shared. > The registration fails today, however, if some rules were already present. > > As John notes in description of patch 7, drivers which register multiple > callbacks to shared blocks will likely need to flush the rules on block > unbind. This set makes the core not only replay the the offload add > requests but also offload remove requests when callback is unregistered. > > v2: > - name parameters in patch 2; > - use unsigned int instead of u32 for in_hw_coun; > - improve extack message in patch 7. Series applied, thank you.