From: Rasesh Mody <rasesh.mody@qlogic.com>
To: <bruce.richardson@intel.com>
Cc: <dev@dpdk.org>, <Dept-EngDPDKDev@qlogic.com>,
Rasesh Mody <rasesh.mody@qlogic.com>,
Harish Patil <harish.patil@qlogic.com>
Subject: [dpdk-dev] [PATCH v5 1/5] bnx2x: fixed stats get
Date: Wed, 11 May 2016 17:06:21 -0700 [thread overview]
Message-ID: <1463011585-15429-1-git-send-email-rasesh.mody@qlogic.com> (raw)
Fix stats_get() routine to display drop counters under imissed counter.
Fixes: 540a211084a7 ("bnx2x: driver core")
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
Signed-off-by: Harish Patil <harish.patil@qlogic.com>
---
drivers/net/bnx2x/bnx2x_ethdev.c | 16 ++++++++++++++++
drivers/net/bnx2x/bnx2x_rxtx.c | 2 ++
2 files changed, 18 insertions(+)
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 071b44f..3ff57c4 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -276,6 +276,9 @@ static void
bnx2x_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
{
struct bnx2x_softc *sc = dev->data->dev_private;
+ uint32_t brb_truncate_discard;
+ uint64_t brb_drops;
+ uint64_t brb_truncates;
PMD_INIT_FUNC_TRACE();
@@ -316,6 +319,19 @@ bnx2x_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
stats->rx_nombuf =
HILO_U64(sc->eth_stats.no_buff_discard_hi,
sc->eth_stats.no_buff_discard_lo);
+
+ brb_drops =
+ HILO_U64(sc->eth_stats.brb_drop_hi,
+ sc->eth_stats.brb_drop_lo);
+
+ brb_truncates =
+ HILO_U64(sc->eth_stats.brb_truncate_hi,
+ sc->eth_stats.brb_truncate_lo);
+
+ brb_truncate_discard = sc->eth_stats.brb_truncate_discard;
+
+ stats->imissed = brb_drops + brb_truncates +
+ brb_truncate_discard + stats->rx_nombuf;
}
static void
diff --git a/drivers/net/bnx2x/bnx2x_rxtx.c b/drivers/net/bnx2x/bnx2x_rxtx.c
index 752a5e8..e825bce 100644
--- a/drivers/net/bnx2x/bnx2x_rxtx.c
+++ b/drivers/net/bnx2x/bnx2x_rxtx.c
@@ -408,6 +408,8 @@ bnx2x_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
new_mb = bnx2x_rxmbuf_alloc(rxq->mb_pool);
if (unlikely(!new_mb)) {
PMD_RX_LOG(ERR, "mbuf alloc fail fp[%02d]", fp->index);
+ rte_eth_devices[rxq->port_id].data->
+ rx_mbuf_alloc_failed++;
goto next_rx;
}
--
1.7.10.3
next reply other threads:[~2016-05-12 0:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-12 0:06 Rasesh Mody [this message]
2016-05-12 0:06 ` [dpdk-dev] [PATCH v5 2/5] bnx2x: add xstats support Rasesh Mody
2016-06-28 14:34 ` Thomas Monjalon
2016-06-29 0:09 ` Rasesh Mody
2016-05-12 0:06 ` [dpdk-dev] [PATCH v5 3/5] bnx2x: restructure Tx routine Rasesh Mody
2016-05-12 0:06 ` [dpdk-dev] [PATCH v5 4/5] bnx2x: use single doorbell for TX Rasesh Mody
2016-05-12 0:06 ` [dpdk-dev] [PATCH v5 5/5] bnx2x: update driver version to 1.0.1.1 Rasesh Mody
2016-06-08 16:15 ` [dpdk-dev] [PATCH v5 1/5] bnx2x: fixed stats get Bruce Richardson
2016-06-10 10:08 ` Ferruh Yigit
2016-06-13 10:32 ` Ferruh Yigit
2016-06-13 10:47 ` [dpdk-dev] [PATCH] bnx2x: fix ICC compilation error Ferruh Yigit
2016-06-27 16:02 ` [dpdk-dev] [PATCH v2] bnx2x: fix icc " Ferruh Yigit
2016-06-27 23:21 ` Rasesh Mody
2016-06-29 9:53 ` Bruce Richardson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1463011585-15429-1-git-send-email-rasesh.mody@qlogic.com \
--to=rasesh.mody@qlogic.com \
--cc=Dept-EngDPDKDev@qlogic.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=harish.patil@qlogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).