* [patch net-next] docs: netlink: add NLMSG_DONE message format for doit actions
@ 2023-11-28 15:19 Jiri Pirko
2023-11-28 15:30 ` Jakub Kicinski
0 siblings, 1 reply; 7+ messages in thread
From: Jiri Pirko @ 2023-11-28 15:19 UTC (permalink / raw)
To: netdev; +Cc: kuba, pabeni, davem, edumazet, corbet
From: Jiri Pirko <jiri@nvidia.com>
In case NLMSG_DONE message is sent as a reply to doit action, multiple
kernel implementation do not send anything else than struct nlmsghdr.
Add this note to the Netlink intro documentation.
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
---
Documentation/userspace-api/netlink/intro.rst | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Documentation/userspace-api/netlink/intro.rst b/Documentation/userspace-api/netlink/intro.rst
index 7b1d401210ef..92e19bf49e9d 100644
--- a/Documentation/userspace-api/netlink/intro.rst
+++ b/Documentation/userspace-api/netlink/intro.rst
@@ -234,6 +234,13 @@ ACK attributes may be present::
| ** optionally extended ACK |
----------------------------------------------
+If ``NLMSG_DONE`` is sent as a reply to ``do`` action request, the error
+and extended ACK may be omitted::
+
+ ----------------------------------------------
+ | struct nlmsghdr - response header |
+ ----------------------------------------------
+
.. _res_fam:
Resolving the Family ID
--
2.41.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [patch net-next] docs: netlink: add NLMSG_DONE message format for doit actions
2023-11-28 15:19 [patch net-next] docs: netlink: add NLMSG_DONE message format for doit actions Jiri Pirko
@ 2023-11-28 15:30 ` Jakub Kicinski
2023-11-29 14:46 ` Jiri Pirko
0 siblings, 1 reply; 7+ messages in thread
From: Jakub Kicinski @ 2023-11-28 15:30 UTC (permalink / raw)
To: Jiri Pirko; +Cc: netdev, pabeni, davem, edumazet, corbet
On Tue, 28 Nov 2023 16:19:16 +0100 Jiri Pirko wrote:
> From: Jiri Pirko <jiri@nvidia.com>
>
> In case NLMSG_DONE message is sent as a reply to doit action, multiple
> kernel implementation do not send anything else than struct nlmsghdr.
> Add this note to the Netlink intro documentation.
You mean when the reply has F_MULTI set, correct?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch net-next] docs: netlink: add NLMSG_DONE message format for doit actions
2023-11-28 15:30 ` Jakub Kicinski
@ 2023-11-29 14:46 ` Jiri Pirko
2023-11-29 15:16 ` Jakub Kicinski
0 siblings, 1 reply; 7+ messages in thread
From: Jiri Pirko @ 2023-11-29 14:46 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: netdev, pabeni, davem, edumazet, corbet
Tue, Nov 28, 2023 at 04:30:59PM CET, kuba@kernel.org wrote:
>On Tue, 28 Nov 2023 16:19:16 +0100 Jiri Pirko wrote:
>> From: Jiri Pirko <jiri@nvidia.com>
>>
>> In case NLMSG_DONE message is sent as a reply to doit action, multiple
>> kernel implementation do not send anything else than struct nlmsghdr.
>> Add this note to the Netlink intro documentation.
>
>You mean when the reply has F_MULTI set, correct?
Well, that would be ideal. However, that flag is parallel to NLMSG_DONE.
I see that at least drivers/connector/connector.c does not set this flag
when sending NLMSG_DONE type.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch net-next] docs: netlink: add NLMSG_DONE message format for doit actions
2023-11-29 14:46 ` Jiri Pirko
@ 2023-11-29 15:16 ` Jakub Kicinski
2023-11-30 13:30 ` Jiri Pirko
0 siblings, 1 reply; 7+ messages in thread
From: Jakub Kicinski @ 2023-11-29 15:16 UTC (permalink / raw)
To: Jiri Pirko; +Cc: netdev, pabeni, davem, edumazet, corbet
On Wed, 29 Nov 2023 15:46:15 +0100 Jiri Pirko wrote:
> >> In case NLMSG_DONE message is sent as a reply to doit action, multiple
> >> kernel implementation do not send anything else than struct nlmsghdr.
> >> Add this note to the Netlink intro documentation.
> >
> >You mean when the reply has F_MULTI set, correct?
>
> Well, that would be ideal. However, that flag is parallel to NLMSG_DONE.
> I see that at least drivers/connector/connector.c does not set this flag
> when sending NLMSG_DONE type.
connector is a really bad example, the doc would have to say "some
families use NLMSG_DONE as an actual message type which may have pretty
much anything attached to it". It's not worth it, sorry.
--
pw-bot: reject
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch net-next] docs: netlink: add NLMSG_DONE message format for doit actions
2023-11-29 15:16 ` Jakub Kicinski
@ 2023-11-30 13:30 ` Jiri Pirko
2023-11-30 17:39 ` Jakub Kicinski
0 siblings, 1 reply; 7+ messages in thread
From: Jiri Pirko @ 2023-11-30 13:30 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: netdev, pabeni, davem, edumazet, corbet
Wed, Nov 29, 2023 at 04:16:56PM CET, kuba@kernel.org wrote:
>On Wed, 29 Nov 2023 15:46:15 +0100 Jiri Pirko wrote:
>> >> In case NLMSG_DONE message is sent as a reply to doit action, multiple
>> >> kernel implementation do not send anything else than struct nlmsghdr.
>> >> Add this note to the Netlink intro documentation.
>> >
>> >You mean when the reply has F_MULTI set, correct?
>>
>> Well, that would be ideal. However, that flag is parallel to NLMSG_DONE.
>> I see that at least drivers/connector/connector.c does not set this flag
>> when sending NLMSG_DONE type.
>
>connector is a really bad example, the doc would have to say "some
>families use NLMSG_DONE as an actual message type which may have pretty
>much anything attached to it". It's not worth it, sorry.
The existing documentation confuses uapi users (I have sample).
They expect error with NLMSG_DONE.
>--
>pw-bot: reject
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch net-next] docs: netlink: add NLMSG_DONE message format for doit actions
2023-11-30 13:30 ` Jiri Pirko
@ 2023-11-30 17:39 ` Jakub Kicinski
2023-12-01 7:51 ` Jiri Pirko
0 siblings, 1 reply; 7+ messages in thread
From: Jakub Kicinski @ 2023-11-30 17:39 UTC (permalink / raw)
To: Jiri Pirko; +Cc: netdev, pabeni, davem, edumazet, corbet
On Thu, 30 Nov 2023 14:30:36 +0100 Jiri Pirko wrote:
> >connector is a really bad example, the doc would have to say "some
> >families use NLMSG_DONE as an actual message type which may have pretty
> >much anything attached to it". It's not worth it, sorry.
>
> The existing documentation confuses uapi users (I have sample).
> They expect error with NLMSG_DONE.
I hate this so much.
How about we say:
Note that some families may issue custom NLMSG_DONE messages,
in which case the payload is implementation-specific.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch net-next] docs: netlink: add NLMSG_DONE message format for doit actions
2023-11-30 17:39 ` Jakub Kicinski
@ 2023-12-01 7:51 ` Jiri Pirko
0 siblings, 0 replies; 7+ messages in thread
From: Jiri Pirko @ 2023-12-01 7:51 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: netdev, pabeni, davem, edumazet, corbet
Thu, Nov 30, 2023 at 06:39:39PM CET, kuba@kernel.org wrote:
>On Thu, 30 Nov 2023 14:30:36 +0100 Jiri Pirko wrote:
>> >connector is a really bad example, the doc would have to say "some
>> >families use NLMSG_DONE as an actual message type which may have pretty
>> >much anything attached to it". It's not worth it, sorry.
>>
>> The existing documentation confuses uapi users (I have sample).
>> They expect error with NLMSG_DONE.
>
>I hate this so much.
Unfortunatelly, Netlink has a lot of burden of misuse...
>
>How about we say:
>
> Note that some families may issue custom NLMSG_DONE messages,
> in which case the payload is implementation-specific.
I'm fine with that. Will send v2.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-12-01 7:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-28 15:19 [patch net-next] docs: netlink: add NLMSG_DONE message format for doit actions Jiri Pirko
2023-11-28 15:30 ` Jakub Kicinski
2023-11-29 14:46 ` Jiri Pirko
2023-11-29 15:16 ` Jakub Kicinski
2023-11-30 13:30 ` Jiri Pirko
2023-11-30 17:39 ` Jakub Kicinski
2023-12-01 7:51 ` Jiri Pirko
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).