From: Johannes Berg <johannes@sipsolutions.net>
To: David Miller <davem@davemloft.net>
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
pablo@netfilter.org, jiri@resnulli.us
Subject: Re: [RFC 0/3] netlink: extended error reporting
Date: Fri, 07 Apr 2017 21:26:35 +0200 [thread overview]
Message-ID: <1491593195.5800.11.camel@sipsolutions.net> (raw)
In-Reply-To: <20170407.122053.201153373954521345.davem@davemloft.net>
On Fri, 2017-04-07 at 12:20 -0700, David Miller wrote:
> But what it lacks fundamentally is context. Therefore it can't be
> used to provide the offset or the bad attribute number. So it can't
> meet our requirements.
Yes, it doesn't address the requirements here, and in a sense I suspect
this will be true anywhere else too - perhaps that's the reason why it
was never applied even over in perf. I've not gotten a good answer for
that question yet :)
> We've passed down new arguments into core method call chains for much
> less useful facilitites than this. So that doesn't bother me. And
> as that is a kernel internal matter, we can refine it later.
Yes, both are true.
> Wrt. nla_parse(), we can solve that problem as follow-on patches too.
Yes. I just want to be sure we can solve it, but OTOH we're not locking
down anything but the UAPI so whatever way we find to solve it, even if
it requires a complete rearchitecture internally, it still doesn't
matter.
> So I consider this change ready as far as the implementation is
> concerned.
Fair enough. I still do need to test it though :)
> Ok, Jiri, start reading. I will try to make you happy here.
>
> Let's just discuss the UAPI, since people complain we don't talk
> about that enough :-) For those playing at home it is three new
> attributes returned in a netlink ACK when the application asks
> for the extended response:
>
> NLMSGERR_ATTR_MSG string Extended error string
> NLMSGERR_ATTR_OFFS u32 Byte offset to netlink
> element causing error
> NLMSGERR_ATTR_CODE u32 Subsystem specific error code
> NLMSGERR_ATTR_ATTR u16 Netlink attribute triggering
> error or missing
That's four ;-)
Since you're carefully listing it here, you should also say that
* the new behaviour is entirely optional, enabled by a new netlink
socket option
* the ACK message format ends up being
[nlmsg header]
[ack header including errno]
[request message nlmsg hdr]
[request message payload - optional, controlled by socket option,
aligned to 4 byte length if present]
[new TLVs - optional, controlled by socket option]
johannes
next prev parent reply other threads:[~2017-04-07 19:26 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-07 18:26 [RFC 0/3] netlink: extended error reporting Johannes Berg
2017-04-07 18:26 ` [RFC 1/3] " Johannes Berg
2017-04-07 19:41 ` Johannes Berg
2017-04-07 18:26 ` [RFC 2/3] genetlink: pass extended error report down Johannes Berg
2017-04-07 18:37 ` Ben Greear
[not found] ` <25e1fb8c-22e0-d7a2-13a7-d0def5432c9e-my8/4N5VtI7c+919tysfdA@public.gmane.org>
2017-04-07 19:12 ` Johannes Berg
2017-04-07 19:27 ` Ben Greear
[not found] ` <20170407182620.6438-1-johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2017-04-07 18:26 ` [RFC 3/3] nl80211: add a few extended error strings Johannes Berg
2017-04-07 18:53 ` [RFC 0/3] netlink: extended error reporting David Miller
[not found] ` <20170407.115315.23470877439489670.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2017-04-07 18:59 ` Johannes Berg
[not found] ` <1491591552.5800.1.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2017-04-07 19:06 ` Pablo Neira Ayuso
2017-04-07 19:09 ` Johannes Berg
2017-04-07 19:21 ` Pablo Neira Ayuso
2017-04-07 19:29 ` Johannes Berg
[not found] ` <1491593357.5800.13.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2017-04-07 19:45 ` Pablo Neira Ayuso
2017-04-07 19:47 ` Johannes Berg
2017-04-07 19:34 ` David Miller
2017-04-07 19:22 ` David Miller
[not found] ` <20170407.122223.385211483743191711.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2017-04-07 19:27 ` Pablo Neira Ayuso
2017-04-07 19:29 ` Johannes Berg
2017-04-07 19:34 ` David Miller
2017-04-07 19:20 ` David Miller
2017-04-07 19:26 ` Johannes Berg [this message]
2017-04-07 19:35 ` Pablo Neira Ayuso
2017-04-07 19:43 ` David Miller
[not found] ` <20170407.124327.626442219286333933.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2017-04-07 19:46 ` Johannes Berg
[not found] ` <1491594406.5800.18.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2017-04-07 19:55 ` David Miller
[not found] ` <20170407.125511.1233528940652477012.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2017-04-07 20:27 ` Johannes Berg
2017-04-07 19:02 ` Pablo Neira Ayuso
2017-04-07 19:06 ` Johannes Berg
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=1491593195.5800.11.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=davem@davemloft.net \
--cc=jiri@resnulli.us \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pablo@netfilter.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).