port: add output port packet drop counters

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.dumitrescu@intel.com>
This commit is contained in:
Cristian Dumitrescu 2022-08-05 22:00:20 +00:00 committed by Thomas Monjalon
parent 72b452c5f2
commit e28e064b28

View File

@ -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;