xsk: Add xdp statistics to xsk_diag
Add xdp statistics to the information dumped through the xsk_diag interface Signed-off-by: Ciara Loftus <ciara.loftus@intel.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20200708072835.4427-4-ciara.loftus@intel.com
This commit is contained in:

committed by
Alexei Starovoitov

parent
b36c3206f9
commit
0d80cb4612
@@ -30,6 +30,7 @@ struct xdp_diag_msg {
|
||||
#define XDP_SHOW_RING_CFG (1 << 1)
|
||||
#define XDP_SHOW_UMEM (1 << 2)
|
||||
#define XDP_SHOW_MEMINFO (1 << 3)
|
||||
#define XDP_SHOW_STATS (1 << 4)
|
||||
|
||||
enum {
|
||||
XDP_DIAG_NONE,
|
||||
@@ -41,6 +42,7 @@ enum {
|
||||
XDP_DIAG_UMEM_FILL_RING,
|
||||
XDP_DIAG_UMEM_COMPLETION_RING,
|
||||
XDP_DIAG_MEMINFO,
|
||||
XDP_DIAG_STATS,
|
||||
__XDP_DIAG_MAX,
|
||||
};
|
||||
|
||||
@@ -69,4 +71,13 @@ struct xdp_diag_umem {
|
||||
__u32 refs;
|
||||
};
|
||||
|
||||
struct xdp_diag_stats {
|
||||
__u64 n_rx_dropped;
|
||||
__u64 n_rx_invalid;
|
||||
__u64 n_rx_full;
|
||||
__u64 n_fill_ring_empty;
|
||||
__u64 n_tx_invalid;
|
||||
__u64 n_tx_ring_empty;
|
||||
};
|
||||
|
||||
#endif /* _LINUX_XDP_DIAG_H */
|
||||
|
Reference in New Issue
Block a user