Skip to content

Commit

Permalink
net/vsockmon: Do not set zeroed statistics
Browse files Browse the repository at this point in the history
Do not set rtnl_link_stats64 fields to zero, since they are zeroed
before ops->ndo_get_stats64 is called in core dev_get_stats() function.

Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
Link: https://lore.kernel.org/r/20240223115839.3572852-2-leitao@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Breno Leitao authored and Jakub Kicinski committed Feb 27, 2024
1 parent bcd53af commit 3a25e21
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/net/vsockmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ static void
vsockmon_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats)
{
dev_lstats_read(dev, &stats->rx_packets, &stats->rx_bytes);

stats->tx_packets = 0;
stats->tx_bytes = 0;
}

static int vsockmon_is_valid_mtu(int new_mtu)
Expand Down

0 comments on commit 3a25e21

Please sign in to comment.