aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Dumazet <[email protected]>2024-05-02 11:37:47 +0000
committerJakub Kicinski <[email protected]>2024-05-03 15:03:42 -0700
commit136c2a9a2a8760d8dae83ae7c882c50be02bdb63 (patch)
tree3bfba9f27772724438053fc75bef07c765152f70
parent5829614a7b3b2cc9820efb2d29a205c00d748fcf (diff)
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 <[email protected]> Reviewed-by: David Ahern <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
-rw-r--r--net/core/rtnetlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 283e42f48af6..88980c8bcf33 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -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)