All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/i40e: fix ethertype filter func fail on X722
@ 2017-02-07  3:52 Jeff Guo
  2017-02-08  9:31 ` Wu, Jingjing
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Guo @ 2017-02-07  3:52 UTC (permalink / raw)
  To: helin.zhang, jingjing.wu; +Cc: dev, Jeff Guo

The GL_SWR_PRI_JOIN_MAP registers are affecting filters hit, modify
the register default value will result the ethertype filter function
fail. The GL_SWR_PRI_JOIN_MAP value is difference between different
NICs, should keep up the register value with default NVM value in X722.

Fixes: 973273c7a4b7 ("i40e: workaround for X710 performance")

Signed-off-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 27 ++++++++++++++++++++++++---
 1 file changed, 24 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 4492bcc..49ab0de 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -8732,6 +8732,10 @@ i40e_pctype_to_flowtype(enum i40e_filter_pctype pctype)
 #define I40E_GL_SWR_PRI_JOIN_MAP_2_VALUE 0x011f0200
 #define I40E_GL_SWR_PRI_JOIN_MAP_2       0x26CE08
 
+/* For X722 */
+#define I40E_X722_GL_SWR_PRI_JOIN_MAP_0_VALUE 0x20000200
+#define I40E_X722_GL_SWR_PRI_JOIN_MAP_2_VALUE 0x013F0200
+
 /* For X710 */
 #define I40E_GL_SWR_PM_UP_THR_EF_VALUE   0x03030303
 /* For XL710 */
@@ -8754,7 +8758,6 @@ i40e_dev_sync_phy_type(struct i40e_hw *hw)
 	return 0;
 }
 
-
 static void
 i40e_configure_registers(struct i40e_hw *hw)
 {
@@ -8762,8 +8765,8 @@ i40e_configure_registers(struct i40e_hw *hw)
 		uint32_t addr;
 		uint64_t val;
 	} reg_table[] = {
-		{I40E_GL_SWR_PRI_JOIN_MAP_0, I40E_GL_SWR_PRI_JOIN_MAP_0_VALUE},
-		{I40E_GL_SWR_PRI_JOIN_MAP_2, I40E_GL_SWR_PRI_JOIN_MAP_2_VALUE},
+		{I40E_GL_SWR_PRI_JOIN_MAP_0, 0},
+		{I40E_GL_SWR_PRI_JOIN_MAP_2, 0},
 		{I40E_GL_SWR_PM_UP_THR, 0}, /* Compute value dynamically */
 	};
 	uint64_t reg;
@@ -8771,6 +8774,24 @@ i40e_configure_registers(struct i40e_hw *hw)
 	int ret;
 
 	for (i = 0; i < RTE_DIM(reg_table); i++) {
+		if (reg_table[i].addr == I40E_GL_SWR_PRI_JOIN_MAP_0) {
+			if (hw->mac.type == I40E_MAC_X722) /* For X722 */
+				reg_table[i].val =
+					I40E_X722_GL_SWR_PRI_JOIN_MAP_0_VALUE;
+			else /* For X710/XL710/XXV710 */
+				reg_table[i].val =
+					I40E_GL_SWR_PRI_JOIN_MAP_0_VALUE;
+		}
+
+		if (reg_table[i].addr == I40E_GL_SWR_PRI_JOIN_MAP_2) {
+			if (hw->mac.type == I40E_MAC_X722) /* For X722 */
+				reg_table[i].val =
+					I40E_X722_GL_SWR_PRI_JOIN_MAP_2_VALUE;
+			else /* For X710/XL710/XXV710 */
+				reg_table[i].val =
+					I40E_GL_SWR_PRI_JOIN_MAP_2_VALUE;
+		}
+
 		if (reg_table[i].addr == I40E_GL_SWR_PM_UP_THR) {
 			if (I40E_PHY_TYPE_SUPPORT_40G(hw->phy.phy_types) || /* For XL710 */
 			    I40E_PHY_TYPE_SUPPORT_25G(hw->phy.phy_types)) /* For XXV710 */
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net/i40e: fix ethertype filter func fail on X722
  2017-02-07  3:52 [PATCH] net/i40e: fix ethertype filter func fail on X722 Jeff Guo
@ 2017-02-08  9:31 ` Wu, Jingjing
  2017-02-08 13:59   ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Wu, Jingjing @ 2017-02-08  9:31 UTC (permalink / raw)
  To: Guo, Jia, Zhang, Helin; +Cc: dev



> -----Original Message-----
> From: Guo, Jia
> Sent: Tuesday, February 7, 2017 11:52 AM
> To: Zhang, Helin <helin.zhang@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>
> Cc: dev@dpdk.org; Guo, Jia <jia.guo@intel.com>
> Subject: [PATCH] net/i40e: fix ethertype filter func fail on X722
> 
> The GL_SWR_PRI_JOIN_MAP registers are affecting filters hit, modify the
> register default value will result the ethertype filter function fail. The
> GL_SWR_PRI_JOIN_MAP value is difference between different NICs, should
> keep up the register value with default NVM value in X722.
> 
> Fixes: 973273c7a4b7 ("i40e: workaround for X710 performance")
> 
> Signed-off-by: Jeff Guo <jia.guo@intel.com>

Acked-by: Jingjing Wu <jingjing.wu@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net/i40e: fix ethertype filter func fail on X722
  2017-02-08  9:31 ` Wu, Jingjing
@ 2017-02-08 13:59   ` Ferruh Yigit
  0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2017-02-08 13:59 UTC (permalink / raw)
  To: Wu, Jingjing, Guo, Jia, Zhang, Helin; +Cc: dev, dpdk stable

On 2/8/2017 9:31 AM, Wu, Jingjing wrote:
> 
> 
>> -----Original Message-----
>> From: Guo, Jia
>> Sent: Tuesday, February 7, 2017 11:52 AM
>> To: Zhang, Helin <helin.zhang@intel.com>; Wu, Jingjing
>> <jingjing.wu@intel.com>
>> Cc: dev@dpdk.org; Guo, Jia <jia.guo@intel.com>
>> Subject: [PATCH] net/i40e: fix ethertype filter func fail on X722
>>
>> The GL_SWR_PRI_JOIN_MAP registers are affecting filters hit, modify the
>> register default value will result the ethertype filter function fail. The
>> GL_SWR_PRI_JOIN_MAP value is difference between different NICs, should
>> keep up the register value with default NVM value in X722.
>>
>> Fixes: 973273c7a4b7 ("i40e: workaround for X710 performance")
>>
>> Signed-off-by: Jeff Guo <jia.guo@intel.com>
> 
> Acked-by: Jingjing Wu <jingjing.wu@intel.com>

    net/i40e: fix ethertype filter on X722

    Fixes: 92fbf2cbdff4 ("i40e: support X722 and its A0 hardware")
    Cc: stable@dpdk.org

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-08 13:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-07  3:52 [PATCH] net/i40e: fix ethertype filter func fail on X722 Jeff Guo
2017-02-08  9:31 ` Wu, Jingjing
2017-02-08 13:59   ` Ferruh Yigit

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.