From: Beilei Xing Date: Fri, 4 Nov 2016 11:08:08 +0000 (+0800) Subject: net/i40e: fix floating VEB X-Git-Tag: spdx-start~5372 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=0284624f14a4ab55a6163179dfb53d891dc85650;p=dpdk.git net/i40e: fix floating VEB Turning off S-TAG identification will impact floating VEB, VFs can't communicate with each other. This patch fixes this issue by judging whether floating VEB is enabled, S-TAG identification will be turned off only when floating VEB is disabled. Fixes: 4d61120d5ce7 ("net/i40e: fix dropping packets with ethertype 0x88A8") Signed-off-by: Beilei Xing Acked-by: Jingjing Wu --- diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst index c0163fc14c..5780268f6a 100644 --- a/doc/guides/nics/i40e.rst +++ b/doc/guides/nics/i40e.rst @@ -453,3 +453,9 @@ To work around this issue, ``ethtool -s autoneg on`` should be set first and then the link can be brought up through ``ifconfig up``. NOTE: requires Linux kernel i40e driver version >= 1.4.X + +Receive packets with Ethertype 0x88A8 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Due to the FW limitation, PF can receive packets with Ethertype 0x88A8 +only when floating VEB is disabled. diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 5afca1ef69..5dd162ee3d 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -1121,11 +1121,13 @@ eth_i40e_dev_init(struct rte_eth_dev *dev) /* Disable double vlan by default */ i40e_vsi_config_double_vlan(vsi, FALSE); - /* Disable S-TAG identification by default */ - ret = I40E_READ_REG(hw, I40E_PRT_L2TAGSEN); - if (ret & I40E_L2_TAGS_S_TAG_MASK) { - ret &= ~I40E_L2_TAGS_S_TAG_MASK; - I40E_WRITE_REG(hw, I40E_PRT_L2TAGSEN, ret); + /* Disable S-TAG identification when floating_veb is disabled */ + if (!pf->floating_veb) { + ret = I40E_READ_REG(hw, I40E_PRT_L2TAGSEN); + if (ret & I40E_L2_TAGS_S_TAG_MASK) { + ret &= ~I40E_L2_TAGS_S_TAG_MASK; + I40E_WRITE_REG(hw, I40E_PRT_L2TAGSEN, ret); + } } if (!vsi->max_macaddrs)