From: Hongren Zheng <i@zenithal.me>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>, netdev@vger.kernel.org
Subject: Re: [RFC] add extack errors for iptoken
Date: Thu, 1 Apr 2021 18:21:56 +0800 [thread overview]
Message-ID: <YGWexLzHmm0YgEMR@Sun> (raw)
In-Reply-To: <20210331204902.78d87b40@hermes.local>
On Wed, Mar 31, 2021 at 08:49:02PM -0700, Stephen Hemminger wrote:
> Perhaps the following (NOT TESTED) kernel patch will show you how such error messages
> could be added.
This is an elegant solution. I found extack is extensively used in
the other parts of the kernel code for similar purposes.
I also checked the code of iproute2 and found a good support for
extack.
So I am OK with this PATCH.
Also I tested this patch against v5.12-rc5, it compiles and can boot
with `make ARCH=x86_64 x86_64_defconfig` config in qemu.
I tested it with iproute2 and found a more friendly error prompt:
$ ip token set ::2 dev enp0s3
Error: ipv6: Device does accept route adverts.
Tested-by: Hongren Zheng <i@zenithal.me>
> + NL_SET_ERR_MSG_MOD(extack, "Device does accept route adverts");
Should be "Device does not accept route adverts".
next prev parent reply other threads:[~2021-04-01 10:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-27 13:36 [PATCH iproute2] iptoken: Add doc on the conditions of iptoken Hongren Zheng
2021-03-31 22:26 ` Stephen Hemminger
2021-04-01 10:41 ` Hongren Zheng
2021-04-01 3:49 ` [RFC] add extack errors for iptoken Stephen Hemminger
2021-04-01 10:21 ` Hongren Zheng [this message]
2021-04-01 14:31 ` David Ahern
2021-04-01 15:06 ` Stephen Hemminger
2021-04-28 12:55 ` Hongren Zheng
2021-04-28 15:32 ` David Ahern
2021-05-29 6:31 ` Hongren Zheng
2021-05-31 2:42 ` Stephen Hemminger
2021-05-31 5:26 ` Hongren Zheng
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=YGWexLzHmm0YgEMR@Sun \
--to=i@zenithal.me \
--cc=daniel@iogearbox.net \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.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).