History

xsk: Add xdp statistics to xsk_diag

Add xdp statistics to the information dumped through the xsk_diag interface

Ciara Loftus committed 6 years ago

Commit 0d80cb41 parent b36c3202 files · +28 −0Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/xdp_diag.h+11−0
@@ -30,6 +30,7 @@ struct xdp_diag_msg { · 29 unmodified lines
3030 #define XDP_SHOW_RING_CFG (1 << 1)
3131 #define XDP_SHOW_UMEM (1 << 2)
3232 #define XDP_SHOW_MEMINFO (1 << 3)
33+#define XDP_SHOW_STATS (1 << 4)
3334
3435 enum {
3536 XDP_DIAG_NONE,
@@ -41,6 +42,7 @@ enum { · 5 unmodified lines
4142 XDP_DIAG_UMEM_FILL_RING,
4243 XDP_DIAG_UMEM_COMPLETION_RING,
4344 XDP_DIAG_MEMINFO,
45+ XDP_DIAG_STATS,
4446 __XDP_DIAG_MAX,
4547 };
4648
@@ -69,4 +71,13 @@ struct xdp_diag_umem { · 22 unmodified lines
6971 __u32 refs;
7072 };
7173
74+struct xdp_diag_stats {
75+ __u64 n_rx_dropped;
76+ __u64 n_rx_invalid;
77+ __u64 n_rx_full;
78+ __u64 n_fill_ring_empty;
79+ __u64 n_tx_invalid;
80+ __u64 n_tx_ring_empty;
81+};
82+
7283 #endif /* _LINUX_XDP_DIAG_H */