diff options
author | Breno Leitao <leitao@debian.org> | 2024-02-23 03:58:38 -0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-02-26 18:39:10 -0800 |
commit | 3a25e212306c2f9ecea5bee17ab90f5efad6e2a2 (patch) | |
tree | e3177b5a024ace628c57fc5ba4201eeaa51b81f3 | |
parent | bcd53aff4d0cce9c4bedf345e6f896e35f2fd4c5 (diff) |
net/vsockmon: Do not set zeroed statistics
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>
-rw-r--r-- | drivers/net/vsockmon.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/net/vsockmon.c b/drivers/net/vsockmon.c index a0b4dca36baf..a1ba5169ed5d 100644 --- a/drivers/net/vsockmon.c +++ b/drivers/net/vsockmon.c @@ -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) |