DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2] enic: fix 'imissed' to count drops due to no RX buffers
@ 2016-05-10 21:21 John Daley
  0 siblings, 0 replies; only message in thread
From: John Daley @ 2016-05-10 21:21 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, John Daley

The enic rx_no_bufs counter is a hardware counter of packets
dropped on the interface due to no host buffers being available.
Use this counter to update the r_stats->imissed counter.  Also,
include the rx_drop enic counter in the r_stats->ierrors count.
Rx_drop plus rx_errors are the total number of packets dropped
on by the enic on the Rx interface for reasons other than no host
buffers.

Fixes: 7182d3e7d177 ("enic: expose Rx missed packets counter")
Signed-off-by: John Daley <johndale@cisco.com>
---
v2: improved commit message

 drivers/net/enic/enic_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 60fe765..be4e9e5 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -243,10 +243,10 @@ void enic_dev_stats_get(struct enic *enic, struct rte_eth_stats *r_stats)
 	r_stats->ibytes = stats->rx.rx_bytes_ok;
 	r_stats->obytes = stats->tx.tx_bytes_ok;
 
-	r_stats->ierrors = stats->rx.rx_errors;
+	r_stats->ierrors = stats->rx.rx_errors + stats->rx.rx_drop;
 	r_stats->oerrors = stats->tx.tx_errors;
 
-	r_stats->imissed = stats->rx.rx_drop;
+	r_stats->imissed = stats->rx.rx_no_bufs;
 
 	r_stats->rx_nombuf = stats->rx.rx_no_bufs;
 }
-- 
2.7.0

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-10 21:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-10 21:21 [dpdk-dev] [PATCH v2] enic: fix 'imissed' to count drops due to no RX buffers John Daley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).