Skip to content

Commit 136c2a9

Browse files
edumazetkuba-moo
authored andcommitted
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>
1 parent 5829614 commit 136c2a9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/core/rtnetlink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6024,7 +6024,7 @@ static int rtnl_stats_dump(struct sk_buff *skb, struct netlink_callback *cb)
60246024
cb->args[1] = idx;
60256025
cb->args[0] = h;
60266026

6027-
return skb->len;
6027+
return err;
60286028
}
60296029

60306030
void rtnl_offload_xstats_notify(struct net_device *dev)

0 commit comments

Comments
 (0)