netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: netdev@vger.kernel.org, Dmitry Safonov <0x7f454c46@gmail.com>,
	Florian Westphal <fw@strlen.de>,
	Arkadi Sharshevsky <arkadis@mellanox.com>,
	Jiri Pirko <jiri@resnulli.us>
Subject: Re: [Question] Should NLMSG_DONE has flag NLM_F_MULTI?
Date: Wed, 24 Aug 2022 18:39:45 -0700	[thread overview]
Message-ID: <20220824183945.6ce7251d@kernel.org> (raw)
In-Reply-To: <YwWY8ux/PyMWQBWr@Laptop-X1>

On Wed, 24 Aug 2022 11:20:18 +0800 Hangbin Liu wrote:
> When checking the NLMSG_DONE message in kernel, I saw lot of functions would
> set NLM_F_MULTI flag. e.g. netlink_dump_done(),
> devlink_dpipe_{tables, entries, headers}_fill().
> 
> But from rfc3549[1]:
> 
>    [...] For multipart
>    messages, the first and all following headers have the NLM_F_MULTI
>    Netlink header flag set, except for the last header which has the
>    Netlink header type NLMSG_DONE.
> 
> What I understand is the last nlmsghdr(NLMSG_DONE message) doesn't need to
> have NLM_F_MULTI flag. Am I missing something?
> 
> [1] https://www.rfc-editor.org/rfc/rfc3549.html#section-2.3.2

Looks like you're right, we seem to fairly consistently set it.
Yet another thing in Netlink we defined and then used differently?
In practice it likely does not matter, I'd think.

  reply	other threads:[~2022-08-25  1:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24  3:20 [Question] Should NLMSG_DONE has flag NLM_F_MULTI? Hangbin Liu
2022-08-25  1:39 ` Jakub Kicinski [this message]
2022-08-25  4:20   ` Hangbin Liu

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=20220824183945.6ce7251d@kernel.org \
    --to=kuba@kernel.org \
    --cc=0x7f454c46@gmail.com \
    --cc=arkadis@mellanox.com \
    --cc=fw@strlen.de \
    --cc=jiri@resnulli.us \
    --cc=liuhangbin@gmail.com \
    --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).