From: David Ahern <dsahern@kernel.org>
To: Eric Dumazet <edumazet@google.com>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com,
Ido Schimmel <idosch@nvidia.com>, Jiri Pirko <jiri@nvidia.com>
Subject: Re: [PATCH net-next 1/2] rtnetlink: change rtnl_stats_dump() return value
Date: Thu, 2 May 2024 09:59:04 -0600 [thread overview]
Message-ID: <d09f8831-293e-45ec-93fb-6feab25d47f2@kernel.org> (raw)
In-Reply-To: <20240502113748.1622637-2-edumazet@google.com>
On 5/2/24 5:37 AM, Eric Dumazet wrote:
> By returning 0 (or an error) instead of skb->len,
> we allow NLMSG_DONE to be appended to the current
> skb at the end of a dump, saving a couple of recvmsg()
> system calls.
any concern that a patch similar to:
https://lore.kernel.org/netdev/20240411180202.399246-1-kuba@kernel.org/
will be needed again here?
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
> net/core/rtnetlink.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
> index 283e42f48af68504af193ed5763d4e0fcd667d99..88980c8bcf334079e2d19cbcfb3f10fc05e3c19b 100644
> --- a/net/core/rtnetlink.c
> +++ b/net/core/rtnetlink.c
> @@ -6024,7 +6024,7 @@ static int rtnl_stats_dump(struct sk_buff *skb, struct netlink_callback *cb)
> cb->args[1] = idx;
> cb->args[0] = h;
>
> - return skb->len;
> + return err;
> }
>
> void rtnl_offload_xstats_notify(struct net_device *dev)
Reviewed-by: David Ahern <dsahern@kernel.org>
next prev parent reply other threads:[~2024-05-02 15:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-02 11:37 [PATCH net-next 0/2] rtnetlink: rtnl_stats_dump() changes Eric Dumazet
2024-05-02 11:37 ` [PATCH net-next 1/2] rtnetlink: change rtnl_stats_dump() return value Eric Dumazet
2024-05-02 15:59 ` David Ahern [this message]
2024-05-02 16:03 ` Eric Dumazet
2024-05-06 16:23 ` David Ahern
2024-05-06 16:28 ` Eric Dumazet
2024-05-02 11:37 ` [PATCH net-next 2/2] rtnetlink: use for_each_netdev_dump() in rtnl_stats_dump() Eric Dumazet
2024-05-02 16:02 ` David Ahern
2024-05-03 22:20 ` [PATCH net-next 0/2] rtnetlink: rtnl_stats_dump() changes patchwork-bot+netdevbpf
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=d09f8831-293e-45ec-93fb-6feab25d47f2@kernel.org \
--to=dsahern@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=idosch@nvidia.com \
--cc=jiri@nvidia.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.