diff mbox series

[01/10] port: add output port packet drop statistics couters

Message ID 20220805220029.1096212-2-cristian.dumitrescu@intel.com (mailing list archive)
State Accepted
Delegated to: Thomas Monjalon
Headers show
Series port: implement output port non-blocking behavior | expand

Checks

Context Check Description
ci/iol-testing warning apply patch failure
ci/checkpatch success coding style OK

Commit Message

Dumitrescu, Cristian Aug. 5, 2022, 10 p.m. UTC
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>
---
 lib/port/rte_swx_port.h | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
diff mbox series

Patch

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;