public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: davem@davemloft.net, dsahern@gmail.com, daniel@iogearbox.net,
	john.fastabend@gmail.com, netdev@vger.kernel.org,
	oss-drivers@netronome.com, aring@mojatatu.com
Subject: Re: [PATCH net-next v2 00/12] net: sched: propagate extack to cls offloads on destroy and only with skip_sw
Date: Wed, 24 Jan 2018 22:04:28 +0100	[thread overview]
Message-ID: <20180124210427.GB2087@nanopsycho> (raw)
In-Reply-To: <20180124205424.6976-1-jakub.kicinski@netronome.com>

Wed, Jan 24, 2018 at 09:54:12PM CET, jakub.kicinski@netronome.com wrote:
>Hi!
>
>This series some of Jiri's comments and the fact that today drivers
>may produce extack even if there is no skip_sw flag (meaning the
>driver failure is not really a problem), and warning messages will
>only confuse the users.
>
>First patch propagates extack to destroy as requested by Jiri, extack
>is then propagated to the driver callback for each classifier.  I chose
>not to provide the extack on error paths.  As a rule of thumb it seems
>best to keep the extack of the condition which caused the error.  E.g.
>
>     err = this_will_fail(arg, extack);
>     if (err) {
>        undo_things(arg, NULL /* don't pass extack */);
>	return err;
>     }
>
>Note that NL_SET_ERR_MSG() will ignore the message if extack is NULL.
>I was pondering whether we should make NL_SET_ERR_MSG() refuse to
>overwrite the msg, but there seem to be cases in the tree where extack
>is set like this:
>
>     err = this_will_fail(arg, extack);
>     if (err) {
>        undo_things(arg, NULL /* don't pass extack */);
>	NL_SET_ERR_MSG(extack, "extack is set after undo call :/");
>	return err;
>     }
>
>I think not passing extack to undo calls is reasonable.
>
>v2:
> - rename the temporary tc_cls_common_offload_init().
>
>Jakub Kicinski (12):
>  net: sched: propagate extack to cls->destroy callbacks
>  net: sched: prepare for reimplementation of
>    tc_cls_common_offload_init()
>  cls_bpf: remove gen_flags from bpf_offload
>  cls_bpf: pass offload flags to tc_cls_common_offload_init()
>  cls_bpf: propagate extack to offload delete callback
>  cls_matchall: pass offload flags to tc_cls_common_offload_init()
>  cls_matchall: propagate extack to delete callback
>  cls_flower: pass offload flags to tc_cls_common_offload_init()
>  cls_flower: propagate extack to delete callback
>  cls_u32: pass offload flags to tc_cls_common_offload_init()
>  cls_u32: propagate extack to delete callback
>  net: sched: remove tc_cls_common_offload_init_deprecated()

For the record, I still think it is odd to have 6 patches just to add
one arg to a function. I wonder where this unnecessary patch splits
would lead to in the future.

Anyway, since apparently no one really cares, and the code result looks
good to me, for whole patchset:
Acked-by: Jiri Pirko <jiri@mellanox.com>

  parent reply	other threads:[~2018-01-24 21:04 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-24 20:54 [PATCH net-next v2 00/12] net: sched: propagate extack to cls offloads on destroy and only with skip_sw Jakub Kicinski
2018-01-24 20:54 ` [PATCH net-next v2 01/12] net: sched: propagate extack to cls->destroy callbacks Jakub Kicinski
2018-01-24 20:54 ` [PATCH net-next v2 02/12] net: sched: prepare for reimplementation of tc_cls_common_offload_init() Jakub Kicinski
2018-01-24 20:54 ` [PATCH net-next v2 03/12] cls_bpf: remove gen_flags from bpf_offload Jakub Kicinski
2018-01-24 20:54 ` [PATCH net-next v2 04/12] cls_bpf: pass offload flags to tc_cls_common_offload_init() Jakub Kicinski
2018-01-24 20:54 ` [PATCH net-next v2 05/12] cls_bpf: propagate extack to offload delete callback Jakub Kicinski
2018-01-24 20:54 ` [PATCH net-next v2 06/12] cls_matchall: pass offload flags to tc_cls_common_offload_init() Jakub Kicinski
2018-01-24 20:54 ` [PATCH net-next v2 07/12] cls_matchall: propagate extack to delete callback Jakub Kicinski
2018-01-24 20:54 ` [PATCH net-next v2 08/12] cls_flower: pass offload flags to tc_cls_common_offload_init() Jakub Kicinski
2018-01-24 20:54 ` [PATCH net-next v2 09/12] cls_flower: propagate extack to delete callback Jakub Kicinski
2018-01-24 20:54 ` [PATCH net-next v2 10/12] cls_u32: pass offload flags to tc_cls_common_offload_init() Jakub Kicinski
2018-01-24 20:54 ` [PATCH net-next v2 11/12] cls_u32: propagate extack to delete callback Jakub Kicinski
2018-01-24 20:54 ` [PATCH net-next v2 12/12] net: sched: remove tc_cls_common_offload_init_deprecated() Jakub Kicinski
2018-01-24 21:03 ` [PATCH net-next v2 00/12] net: sched: propagate extack to cls offloads on destroy and only with skip_sw David Miller
2018-01-24 21:04 ` Jiri Pirko [this message]
2018-01-24 21:07   ` David Ahern
2018-01-24 21:15     ` Jiri Pirko
2018-01-24 21:49       ` Jakub Kicinski
2018-01-25 15:11 ` Marcelo Ricardo Leitner
2018-01-25 22:57   ` Jakub Kicinski
2018-01-28 22:39     ` Marcelo Ricardo Leitner
2018-01-29 23:36       ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180124210427.GB2087@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=aring@mojatatu.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=john.fastabend@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@netronome.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox