DPDK patches and discussions
 help / color / mirror / Atom feed
From: Wei Zhao <wei.zhao1@intel.com>
To: dev@dpdk.org
Cc: wenzhuo.lu@intel.com, stable@dpdk.org, Wei Zhao <wei.zhao1@intel.com>
Subject: [dpdk-dev] [PATCH v2] net/ixgbe: add query rule stats support for FDIR
Date: Wed, 13 Jun 2018 16:08:50 +0800	[thread overview]
Message-ID: <1528877330-4819-1-git-send-email-wei.zhao1@intel.com> (raw)
In-Reply-To: <1528189935-34943-2-git-send-email-wei.zhao1@intel.com>

There are many registeres in x550 support stats of
flow director filters, for example the number of added
or removed rules and the number match or miss match packet
count for this for port, all these important information
can be read form registeres in x550 and display with command
xstats.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
---

v2:
-add mac type check for this register read.

---
 drivers/net/ixgbe/ixgbe_ethdev.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 87d2ad0..a3ddfe2 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -3120,9 +3120,18 @@ ixgbe_read_stats_registers(struct ixgbe_hw *hw,
 	}
 
 	/* Flow Director Stats registers */
-	hw_stats->fdirmatch += IXGBE_READ_REG(hw, IXGBE_FDIRMATCH);
-	hw_stats->fdirmiss += IXGBE_READ_REG(hw, IXGBE_FDIRMISS);
-
+	if (hw->mac.type != ixgbe_mac_82598EB) {
+		hw_stats->fdirmatch += IXGBE_READ_REG(hw, IXGBE_FDIRMATCH);
+		hw_stats->fdirmiss += IXGBE_READ_REG(hw, IXGBE_FDIRMISS);
+		hw_stats->fdirustat_add += IXGBE_READ_REG(hw,
+					IXGBE_FDIRUSTAT) & 0xFFFF;
+		hw_stats->fdirustat_remove += (IXGBE_READ_REG(hw,
+					IXGBE_FDIRUSTAT) >> 16) & 0xFFFF;
+		hw_stats->fdirfstat_fadd += IXGBE_READ_REG(hw,
+					IXGBE_FDIRFSTAT) & 0xFFFF;
+		hw_stats->fdirfstat_fremove += (IXGBE_READ_REG(hw,
+					IXGBE_FDIRFSTAT) >> 16) & 0xFFFF;
+	}
 	/* MACsec Stats registers */
 	macsec_stats->out_pkts_untagged += IXGBE_READ_REG(hw, IXGBE_LSECTXUT);
 	macsec_stats->out_pkts_encrypted +=
-- 
2.7.5

  parent reply	other threads:[~2018-06-13  8:29 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-05  9:12 [dpdk-dev] [PATCH] app/testpmd: fix VLAN tci mask set error " Wei Zhao
2018-06-05  9:12 ` [dpdk-dev] [PATCH] net/ixgbe: add query rule stats support " Wei Zhao
2018-06-13  8:07   ` [dpdk-dev] [PATCH v2] " Wei Zhao
2018-06-13  8:08   ` Wei Zhao [this message]
2018-06-14  0:36     ` Lu, Wenzhuo
2018-06-21 14:08       ` Zhang, Qi Z
2018-06-05  9:12 ` [dpdk-dev] [PATCH] net/ixgbe: add support for VLAN in IP mode FDIR Wei Zhao
2018-06-12  2:25   ` Lu, Wenzhuo
2018-06-12  2:30     ` Zhao1, Wei
2018-06-12  2:41       ` Lu, Wenzhuo
2018-06-12  2:49         ` Zhao1, Wei
2018-06-12  3:18         ` Zhao1, Wei
2018-06-13  8:09   ` [dpdk-dev] [PATCH v2] " Wei Zhao
2018-06-14  0:37     ` Lu, Wenzhuo
2018-06-21 14:09       ` Zhang, Qi Z
2018-06-05  9:12 ` [dpdk-dev] [PATCH] net/ixgbe: fix tunnel id format error for FDIR Wei Zhao
2018-06-12  5:10   ` Lu, Wenzhuo
2018-06-12  7:49     ` Zhao1, Wei
2018-06-12  8:39       ` Lu, Wenzhuo
2018-06-12  8:43         ` Zhao1, Wei
2018-06-13  8:11   ` [dpdk-dev] [PATCH v2] " Wei Zhao
2018-06-14  0:38     ` Lu, Wenzhuo
2018-06-21 14:10       ` Zhang, Qi Z
2018-06-05  9:12 ` [dpdk-dev] [PATCH] net/ixgbe: fix tunnel type set " Wei Zhao
2018-06-13  8:11   ` [dpdk-dev] [PATCH v2] " Wei Zhao
2018-06-14  0:41     ` Lu, Wenzhuo
2018-06-14  1:51       ` Zhao1, Wei
2018-06-14  8:17     ` [dpdk-dev] [PATCH v3] " Wei Zhao
2018-06-15  0:50       ` Lu, Wenzhuo
2018-06-21 14:11         ` Zhang, Qi Z
2018-06-12  1:12 ` [dpdk-dev] [PATCH] app/testpmd: fix VLAN tci mask " Lu, Wenzhuo
2018-06-21 14:27   ` Zhang, Qi Z

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=1528877330-4819-1-git-send-email-wei.zhao1@intel.com \
    --to=wei.zhao1@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=wenzhuo.lu@intel.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).