DPDK patches and discussions
 help / color / mirror / Atom feed
From: Helin Zhang <helin.zhang@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] i40e: workaround for XL710 performance
Date: Wed, 24 Dec 2014 15:14:08 +0800	[thread overview]
Message-ID: <1419405248-14158-1-git-send-email-helin.zhang@intel.com> (raw)

on XL710, performance number is far from the expectation on recent
firmware versions, if promiscuous mode is disabled, or promiscuous
mode is enabled and port MAC address is equal to the packet
destination MAC address. The fix for this issue may not be integrated
in the following firmware version. So the workaround in software
driver is needed. It needs to modify the initial values of 2 internal
only registers which is the same 2 of 3 registers of it did for X710.
Note that the workaround can be removed when it is fixed in firmware
in the future.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
---
 lib/librte_pmd_i40e/i40e_ethdev.c | 35 ++++++++++++++++++++++-------------
 1 file changed, 22 insertions(+), 13 deletions(-)

diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c
index b47a3d2..3bb75d8 100644
--- a/lib/librte_pmd_i40e/i40e_ethdev.c
+++ b/lib/librte_pmd_i40e/i40e_ethdev.c
@@ -5327,21 +5327,30 @@ i40e_debug_read_register(struct i40e_hw *hw, uint32_t addr, uint64_t *val)
 
 /*
  * On X710, performance number is far from the expectation on recent firmware
- * versions. The fix for this issue may not be integrated in the following
+ * versions; on XL710, performance number is also far from the expectation on
+ * recent firmware versions, if promiscuous mode is disabled, or promiscuous
+ * mode is enabled and port MAC address is equal to the packet destination MAC
+ * address. The fix for this issue may not be integrated in the following
  * firmware version. So the workaround in software driver is needed. It needs
- * to modify the initial values of 3 internal only registers. Note that the
- * workaround can be removed when it is fixed in firmware in the future.
+ * to modify the initial values of 3 internal only registers for X710, and the
+ * same 2 internal registers for XL710. Note that the workaround can be removed
+ * when it is fixed in firmware in the future.
  */
-static void
-i40e_configure_registers(struct i40e_hw *hw)
-{
-#define I40E_GL_SWR_PRI_JOIN_MAP_0       0x26CE00
-#define I40E_GL_SWR_PRI_JOIN_MAP_2       0x26CE08
-#define I40E_GL_SWR_PM_UP_THR            0x269FBC
+
+/* For both X710 and XL710 */
 #define I40E_GL_SWR_PRI_JOIN_MAP_0_VALUE 0x10000200
+#define I40E_GL_SWR_PRI_JOIN_MAP_0       0x26CE00
+
 #define I40E_GL_SWR_PRI_JOIN_MAP_2_VALUE 0x011f0200
+#define I40E_GL_SWR_PRI_JOIN_MAP_2       0x26CE08
+
+/* For X710 only */
 #define I40E_GL_SWR_PM_UP_THR_VALUE      0x03030303
+#define I40E_GL_SWR_PM_UP_THR            0x269FBC
 
+static void
+i40e_configure_registers(struct i40e_hw *hw)
+{
 	static const struct {
 		uint32_t addr;
 		uint64_t val;
@@ -5354,11 +5363,11 @@ i40e_configure_registers(struct i40e_hw *hw)
 	uint32_t i;
 	int ret;
 
-	/* Below fix is for X710 only */
-	if (i40e_is_40G_device(hw->device_id))
-		return;
-
 	for (i = 0; i < RTE_DIM(reg_table); i++) {
+		if ((i40e_is_40G_device(hw->device_id)) &&
+			(reg_table[i].addr == I40E_GL_SWR_PM_UP_THR))
+			continue;
+
 		ret = i40e_debug_read_register(hw, reg_table[i].addr, &reg);
 		if (ret < 0) {
 			PMD_DRV_LOG(ERR, "Failed to read from 0x%"PRIx32,
-- 
1.9.3

             reply	other threads:[~2014-12-24  7:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-24  7:14 Helin Zhang [this message]
2014-12-24 14:55 ` Neil Horman
2014-12-25  0:20   ` Zhang, Helin
2014-12-26 14:28     ` Neil Horman
2014-12-28 13:22       ` Zhang, Helin
2014-12-29  1:41 ` [dpdk-dev] [PATCH v2] " Helin Zhang
2015-01-12  7:33   ` Wu, Jingjing
2015-01-12  7:57     ` Zhang, Helin
2015-01-16  5:54   ` Zhang, Helin
2015-02-10  9:06   ` Xu, Qian Q

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=1419405248-14158-1-git-send-email-helin.zhang@intel.com \
    --to=helin.zhang@intel.com \
    --cc=dev@dpdk.org \
    /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).