From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: Re: [PATCH net-next 7/7] net: sched: call reoffload op on block callback reg Date: Mon, 25 Jun 2018 14:10:14 -0700 Message-ID: <20180625141014.61501799@cakuba.netronome.com> References: <20180625043431.13413-1-jakub.kicinski@netronome.com> <20180625043431.13413-8-jakub.kicinski@netronome.com> <20180625205832.GI2161@nanopsycho> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: davem@davemloft.net, xiyou.wangcong@gmail.com, jhs@mojatatu.com, gerlitz.or@gmail.com, netdev@vger.kernel.org, oss-drivers@netronome.com, John Hurley To: Jiri Pirko Return-path: Received: from mail-qt0-f194.google.com ([209.85.216.194]:40022 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751665AbeFYVKU (ORCPT ); Mon, 25 Jun 2018 17:10:20 -0400 Received: by mail-qt0-f194.google.com with SMTP id x23-v6so3134093qto.7 for ; Mon, 25 Jun 2018 14:10:20 -0700 (PDT) In-Reply-To: <20180625205832.GI2161@nanopsycho> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, 25 Jun 2018 22:58:32 +0200, Jiri Pirko wrote: > Mon, Jun 25, 2018 at 06:34:31AM CEST, jakub.kicinski@netronome.com wrote: > >From: John Hurley > > [...] > > >+static int > >+tcf_block_playback_offloads(struct tcf_block *block, tc_setup_cb_t *cb, > >+ void *cb_priv, bool add, bool offload_in_use, > >+ struct netlink_ext_ack *extack) > >+{ > >+ struct tcf_chain *chain; > >+ struct tcf_proto *tp; > >+ int err; > >+ > >+ list_for_each_entry(chain, &block->chain_list, list) { > >+ for (tp = rtnl_dereference(chain->filter_chain); tp; > >+ tp = rtnl_dereference(tp->next)) { > >+ if (tp->ops->reoffload) { > >+ err = tp->ops->reoffload(tp, add, cb, cb_priv, > >+ extack); > >+ if (err && add) > >+ goto err_playback_remove; > >+ } else if (add && offload_in_use) { > >+ err = -EOPNOTSUPP; > >+ NL_SET_ERR_MSG(extack, "Filter replay failed - a filters doesn't support re-offloading"); > > This msg sounds weird. Please fix it. Indeed.. How about: "Filter HW offload failed - classifier without re-offloading support" > Otherwise this looks very good to me! Thanks! Cool, thanks for the comments! I will respin shortly.