From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: Jakub Kicinski <kubakici@wp.pl>
Cc: netdev@vger.kernel.org, Alexander Aring <aring@mojatatu.com>,
Jiri Pirko <jiri@resnulli.us>, David Ahern <dsahern@gmail.com>
Subject: Re: [PATCH RFC 0/2] Add support for warnings to extack
Date: Sun, 18 Mar 2018 14:38:44 -0300 [thread overview]
Message-ID: <20180318173844.GF9345@localhost.localdomain> (raw)
In-Reply-To: <20180316150518.0641d03a@cakuba.netronome.com>
On Fri, Mar 16, 2018 at 03:05:18PM -0700, Jakub Kicinski wrote:
> CC: David Ahern <dsahern@gmail.com>
>
> On Fri, 16 Mar 2018 16:23:08 -0300, Marcelo Ricardo Leitner wrote:
> > Currently we have the limitation that warnings cannot be reported though
> > extack. For example, when tc flower failed to get offloaded but got
> > installed on software datapath. The hardware failure is not fatal and
> > thus extack is not even shared with the driver, so the error is simply
> > omitted from any logging.
> >
> > The idea here is to allow such kind of warnings to get through and be
> > available for the sysadmin or the tool managing such commands (like Open
> > vSwitch), so that if this happens, we will have such log message in a
> > file later.
> >
> > The first patch extends extack to support more than one message and with
> > different log level (currently only error and warning). The second
> > shares extack with the drivers regardless of skip_sw.
> >
> > The iproute patch also follows.
> >
> > This kernel change is backward compatible with older iproute because
> > iproute will only process the last message, which should be the error
> > one in case of failure, or a warning if it suceeded.
> >
> > The iproute change is compatible with older kernels because it will find
> > only one message to be processed and will handle it properly.
> >
> > With this patches, this is now possible:
> > # tc qdisc add dev p7p1 ingress
> > # tc filter add dev p7p1 parent ffff: protocol ip prio 1 flower \
> > src_mac ec:13:db:00:00:00 dst_mac ec:14:c2:00:00:00 \
> > src_ip 56.0.0.0 dst_ip 55.0.0.0 action drop
> > Warning: TC offload is disabled on net device.
> > # echo $?
> > 0
>
> IMHO this set does more and less than is required to solve the
> problem.
>
> The way I understand it is we don't want HW offload errors/warnings to
> be printed to unsuspecting users who didn't specify any skip_* flags.
> What carries the message and whether it's explicitly marked as warning
> or error does not change the fact that user of the SW fwd path may not
> want to not be bothered by offload warnings.
Fair enough. We can then have a 'tc -v' option to enable this more
verbose logging.
>
> There maybe well be value in ability to report multiple messages. But
> for opt-in warning messages I would be leaning towards:
>
> diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
> index e828d31be5dae0ae8c69016dfde50379296484aa..7cec393bb47974b48a6d510b8aa84534a7a98594 100644
> --- a/include/net/pkt_cls.h
> +++ b/include/net/pkt_cls.h
> @@ -705,8 +705,7 @@ tc_cls_common_offload_init(struct tc_cls_common_offload *cls_common,
> cls_common->chain_index = tp->chain->index;
> cls_common->protocol = tp->protocol;
> cls_common->prio = tp->prio;
> - if (tc_skip_sw(flags))
> + if (tc_skip_sw(flags) || flags & TCA_CLS_FLAGS_OFFLOAD_VERBOSE)
> cls_common->extack = extack;
> }
>
> enum tc_fl_command {
>
> That is admittedly quite conservative. Esp. in case of flower, cls_bpf
> is used in SW far more than HW, not to mention qdisc offload (although
> flag would be different there)!
Yeah, or something more generic, as a general -v / --verbose option.
M.
next prev parent reply other threads:[~2018-03-18 17:38 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-16 19:23 [PATCH RFC 0/2] Add support for warnings to extack Marcelo Ricardo Leitner
2018-03-16 19:23 ` [PATCH RFC iproute2] libnetlink: allow reading more than one message from extack Marcelo Ricardo Leitner
2018-03-19 16:09 ` Stephen Hemminger
2018-03-19 17:14 ` Marcelo Ricardo Leitner
2018-03-16 19:23 ` [PATCH RFC 1/2] netlink: extend extack so it can carry more than one message Marcelo Ricardo Leitner
2018-03-18 16:11 ` David Ahern
2018-03-18 18:19 ` Marcelo Ricardo Leitner
2018-03-19 4:27 ` David Ahern
2018-03-19 15:34 ` Marcelo Ricardo Leitner
2018-03-16 19:23 ` [PATCH RFC 2/2] sched: pass extack through even if skip_sw is not set Marcelo Ricardo Leitner
2018-03-16 19:27 ` [PATCH RFC 0/2] Add support for warnings to extack Marcelo Ricardo Leitner
2018-03-16 22:05 ` Jakub Kicinski
2018-03-18 17:38 ` Marcelo Ricardo Leitner [this message]
2018-03-18 16:11 ` David Ahern
2018-03-18 18:20 ` Marcelo Ricardo Leitner
2018-03-18 18:36 ` Marcelo Ricardo Leitner
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=20180318173844.GF9345@localhost.localdomain \
--to=marcelo.leitner@gmail.com \
--cc=aring@mojatatu.com \
--cc=dsahern@gmail.com \
--cc=jiri@resnulli.us \
--cc=kubakici@wp.pl \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).