net/i40e: fix fail to set TPID with AQ command

Message ID 1530774188-2369-1-git-send-email-beilei.xing@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers
Series net/i40e: fix fail to set TPID with AQ command |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Xing, Beilei July 5, 2018, 7:03 a.m. UTC
  TPID can be set by set_switch_config AdminQ command on
new FW release. But find fail to set 0x88A8 on some NICs.
According to the datasheet, Switch Tag value should not
be identical to either the First Tag or Second Tag values.
So set something other than common Ethertype for internal
switching.

Fixes: 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of register setting")
Cc: stable@dpdk.org

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 7 +++++++
 1 file changed, 7 insertions(+)
  

Comments

Qi Zhang July 9, 2018, 12:58 p.m. UTC | #1
> -----Original Message-----
> From: Xing, Beilei
> Sent: Thursday, July 5, 2018 3:03 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Wu, Jingjing <jingjing.wu@intel.com>; Zheng, James
> <james.zheng@intel.com>; stable@dpdk.org
> Subject: [PATCH] net/i40e: fix fail to set TPID with AQ command
> 
> TPID can be set by set_switch_config AdminQ command on new FW release.
> But find fail to set 0x88A8 on some NICs.
> According to the datasheet, Switch Tag value should not be identical to either
> the First Tag or Second Tag values.
> So set something other than common Ethertype for internal switching.
> 
> Fixes: 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of register setting")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Beilei Xing <beilei.xing@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks!
Qi
  

Patch

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index c47b9f5..93b8d6e 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1242,6 +1242,13 @@  eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
 	hw->bus.func = pci_dev->addr.function;
 	hw->adapter_stopped = 0;
 
+	/*
+	 * Switch Tag value should not be identical to either the First Tag
+	 * or Second Tag values. So set something other than common Ethertype
+	 * for internal switching.
+	 */
+	hw->switch_tag = 0xffff;
+
 	/* Check if need to support multi-driver */
 	i40e_support_multi_driver(dev);