From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: Re: [PATCH net-next 7/7] net: sched: call reoffload op on block callback reg Date: Mon, 25 Jun 2018 23:22:22 +0200 Message-ID: <20180625212222.GJ2161@nanopsycho> References: <20180625043431.13413-1-jakub.kicinski@netronome.com> <20180625043431.13413-8-jakub.kicinski@netronome.com> <20180625205832.GI2161@nanopsycho> <20180625141014.61501799@cakuba.netronome.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Jakub Kicinski Return-path: Received: from mail-wm0-f67.google.com ([74.125.82.67]:52408 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752162AbeFYVXn (ORCPT ); Mon, 25 Jun 2018 17:23:43 -0400 Received: by mail-wm0-f67.google.com with SMTP id p126-v6so10847804wmb.2 for ; Mon, 25 Jun 2018 14:23:42 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20180625141014.61501799@cakuba.netronome.com> Sender: netdev-owner@vger.kernel.org List-ID: Mon, Jun 25, 2018 at 11:10:14PM CEST, jakub.kicinski@netronome.com wrote: >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" Sounds good. > >> Otherwise this looks very good to me! Thanks! > >Cool, thanks for the comments! I will respin shortly.