summaryrefslogtreecommitdiff
path: root/drivers/net/fm10k
diff options
context:
space:
mode:
authorJulien Meunier <julien.meunier@nokia.com>2018-09-10 18:50:35 +0300
committerFerruh Yigit <ferruh.yigit@intel.com>2018-09-28 01:41:02 +0200
commit2750b60fd68d9b333043bc070d63a811e9e48d7c (patch)
tree3bff934055c0272128a347de3ea6e94b4695493d /drivers/net/fm10k
parente8c220aa9757c1549057bf508416e859aecb31b9 (diff)
downloaddpdk-next-eventdev-2750b60fd68d9b333043bc070d63a811e9e48d7c.zip
dpdk-next-eventdev-2750b60fd68d9b333043bc070d63a811e9e48d7c.tar.gz
dpdk-next-eventdev-2750b60fd68d9b333043bc070d63a811e9e48d7c.tar.xz
net/fm10k: add imissed stats
Add support of imissed and q_errors statistics, reported by PCIE_QPRDC register (see datasheet, section 11.27.2.60), which exposes the number of receive packets dropped for a queue. Signed-off-by: Julien Meunier <julien.meunier@nokia.com> Acked-by: Xiao Wang <xiao.w.wang@intel.com>
Diffstat (limited to 'drivers/net/fm10k')
-rw-r--r--drivers/net/fm10k/fm10k_ethdev.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 7cf5b03..46983e5 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -1319,7 +1319,7 @@ fm10k_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
static int
fm10k_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
{
- uint64_t ipackets, opackets, ibytes, obytes;
+ uint64_t ipackets, opackets, ibytes, obytes, imissed;
struct fm10k_hw *hw =
FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct fm10k_hw_stats *hw_stats =
@@ -1330,22 +1330,25 @@ fm10k_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
fm10k_update_hw_stats(hw, hw_stats);
- ipackets = opackets = ibytes = obytes = 0;
+ ipackets = opackets = ibytes = obytes = imissed = 0;
for (i = 0; (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) &&
(i < hw->mac.max_queues); ++i) {
stats->q_ipackets[i] = hw_stats->q[i].rx_packets.count;
stats->q_opackets[i] = hw_stats->q[i].tx_packets.count;
stats->q_ibytes[i] = hw_stats->q[i].rx_bytes.count;
stats->q_obytes[i] = hw_stats->q[i].tx_bytes.count;
+ stats->q_errors[i] = hw_stats->q[i].rx_drops.count;
ipackets += stats->q_ipackets[i];
opackets += stats->q_opackets[i];
ibytes += stats->q_ibytes[i];
obytes += stats->q_obytes[i];
+ imissed += stats->q_errors[i];
}
stats->ipackets = ipackets;
stats->opackets = opackets;
stats->ibytes = ibytes;
stats->obytes = obytes;
+ stats->imissed = imissed;
return 0;
}