Add packet drop statistics counters for the output ports. Required by the non-blocking output port behavior where the packets that cannot be sent at the time of the operation are dropped as opposed to the send operation being retried potentially forever for the same packets.
Signed-off-by: Cristian Dumitrescu <cristian.dumitre...@intel.com> --- lib/port/rte_swx_port.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/port/rte_swx_port.h b/lib/port/rte_swx_port.h index 5e29100f59..1dbd95ae87 100644 --- a/lib/port/rte_swx_port.h +++ b/lib/port/rte_swx_port.h @@ -185,12 +185,18 @@ typedef void /** Output port statistics counters. */ struct rte_swx_port_out_stats { - /** Number of packets. */ + /** Number of packets successfully transmitted. */ uint64_t n_pkts; - /** Number of bytes. */ + /** Number of bytes successfully transmitted. */ uint64_t n_bytes; + /** Number of packets dropped. */ + uint64_t n_pkts_drop; + + /** Number of bytes dropped. */ + uint64_t n_bytes_drop; + /** Number of packets cloned successfully. */ uint64_t n_pkts_clone; -- 2.34.1