Skip to content

Commit 13c7c94

Browse files
kuba-mooPaolo Abeni
authored andcommitted
netdev: add qstat for csum complete
Recent commit 0cfe71f ("netdev: add queue stats") added a lot of useful stats, but only those immediately needed by virtio. Presumably virtio does not support CHECKSUM_COMPLETE, so statistic for that form of checksumming wasn't included. Other drivers will definitely need it, in fact we expect it to be needed in net-next soon (mlx5). So let's add the definition of the counter for CHECKSUM_COMPLETE to uAPI in net already, so that the counters are in a more natural order (all subsequent counters have not been present in any released kernel, yet). Signed-off-by: Jakub Kicinski <[email protected]> Reviewed-by: Joe Damato <[email protected]> Fixes: 0cfe71f ("netdev: add queue stats") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent b3dc6e8 commit 13c7c94

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

Documentation/netlink/specs/netdev.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,10 @@ attribute-sets:
349349
Number of packets dropped due to transient lack of resources, such as
350350
buffer space, host descriptors etc.
351351
type: uint
352+
-
353+
name: rx-csum-complete
354+
doc: Number of packets that were marked as CHECKSUM_COMPLETE.
355+
type: uint
352356
-
353357
name: rx-csum-unnecessary
354358
doc: Number of packets that were marked as CHECKSUM_UNNECESSARY.

include/uapi/linux/netdev.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ enum {
148148
NETDEV_A_QSTATS_RX_ALLOC_FAIL,
149149
NETDEV_A_QSTATS_RX_HW_DROPS,
150150
NETDEV_A_QSTATS_RX_HW_DROP_OVERRUNS,
151+
NETDEV_A_QSTATS_RX_CSUM_COMPLETE,
151152
NETDEV_A_QSTATS_RX_CSUM_UNNECESSARY,
152153
NETDEV_A_QSTATS_RX_CSUM_NONE,
153154
NETDEV_A_QSTATS_RX_CSUM_BAD,

tools/include/uapi/linux/netdev.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ enum {
148148
NETDEV_A_QSTATS_RX_ALLOC_FAIL,
149149
NETDEV_A_QSTATS_RX_HW_DROPS,
150150
NETDEV_A_QSTATS_RX_HW_DROP_OVERRUNS,
151+
NETDEV_A_QSTATS_RX_CSUM_COMPLETE,
151152
NETDEV_A_QSTATS_RX_CSUM_UNNECESSARY,
152153
NETDEV_A_QSTATS_RX_CSUM_NONE,
153154
NETDEV_A_QSTATS_RX_CSUM_BAD,

0 commit comments

Comments
 (0)