mlx5en: Count all transmitted and received bytes.
Add counter for all transmitted and received bytes. Currently only all transmitted and received packets were counted. Fix description of RX LRO counters while at it. Submitted by: hselasky@ Approved by: hselasky (mentor) MFC after: 1 week Sponsored by: Mellanox Technologies
This commit is contained in:
parent
3230c29d72
commit
01f02abfec
@ -379,9 +379,10 @@ struct mlx5e_port_stats_debug {
|
||||
|
||||
#define MLX5E_RQ_STATS(m) \
|
||||
m(+1, u64 packets, "packets", "Received packets") \
|
||||
m(+1, u64 bytes, "bytes", "Received bytes") \
|
||||
m(+1, u64 csum_none, "csum_none", "Received packets") \
|
||||
m(+1, u64 lro_packets, "lro_packets", "Received packets") \
|
||||
m(+1, u64 lro_bytes, "lro_bytes", "Received packets") \
|
||||
m(+1, u64 lro_packets, "lro_packets", "Received LRO packets") \
|
||||
m(+1, u64 lro_bytes, "lro_bytes", "Received LRO bytes") \
|
||||
m(+1, u64 sw_lro_queued, "sw_lro_queued", "Packets queued for SW LRO") \
|
||||
m(+1, u64 sw_lro_flushed, "sw_lro_flushed", "Packets flushed from SW LRO") \
|
||||
m(+1, u64 wqe_err, "wqe_err", "Received packets")
|
||||
@ -396,6 +397,7 @@ struct mlx5e_rq_stats {
|
||||
|
||||
#define MLX5E_SQ_STATS(m) \
|
||||
m(+1, u64 packets, "packets", "Transmitted packets") \
|
||||
m(+1, u64 bytes, "bytes", "Transmitted bytes") \
|
||||
m(+1, u64 tso_packets, "tso_packets", "Transmitted packets") \
|
||||
m(+1, u64 tso_bytes, "tso_bytes", "Transmitted bytes") \
|
||||
m(+1, u64 csum_offload_none, "csum_offload_none", "Transmitted packets") \
|
||||
|
@ -482,6 +482,7 @@ mlx5e_poll_rx_cq(struct mlx5e_rq *rq, int budget)
|
||||
}
|
||||
|
||||
mlx5e_build_rx_mbuf(cqe, rq, mb, byte_cnt);
|
||||
rq->stats.bytes += byte_cnt;
|
||||
rq->stats.packets++;
|
||||
|
||||
#if !defined(HAVE_TCP_LRO_RX)
|
||||
|
@ -472,7 +472,10 @@ mlx5e_sq_xmit(struct mlx5e_sq *sq, struct mbuf **mbp)
|
||||
sq->mbuf[pi].num_wqebbs = DIV_ROUND_UP(ds_cnt, MLX5_SEND_WQEBB_NUM_DS);
|
||||
sq->pc += sq->mbuf[pi].num_wqebbs;
|
||||
|
||||
/* Count all traffic going out */
|
||||
sq->stats.packets++;
|
||||
sq->stats.bytes += sq->mbuf[pi].num_bytes;
|
||||
|
||||
*mbp = NULL; /* safety clear */
|
||||
return (0);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user