rtnetlink: change rtnl_stats_dump() return value

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.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20240502113748.1622637-2-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Eric Dumazet 2024-05-02 11:37:47 +00:00 committed by Jakub Kicinski
parent 5829614a7b
commit 136c2a9a2a

View File

@ -6024,7 +6024,7 @@ out:
cb->args[1] = idx;
cb->args[0] = h;
return skb->len;
return err;
}
void rtnl_offload_xstats_notify(struct net_device *dev)