From patchwork Fri Nov 4 11:08:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuanhan Liu X-Patchwork-Id: 16936 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id E64B3152A; Fri, 4 Nov 2016 12:07:19 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 600B636E for ; Fri, 4 Nov 2016 12:07:18 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 04 Nov 2016 04:07:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.31,442,1473145200"; d="scan'208"; a="1063881550" Received: from yliu-dev.sh.intel.com ([10.239.67.162]) by fmsmga001.fm.intel.com with ESMTP; 04 Nov 2016 04:07:16 -0700 From: Yuanhan Liu To: dev@dpdk.org Cc: Jingjing Wu , Yu Liu , Beilei Xing Date: Fri, 4 Nov 2016 19:08:08 +0800 Message-Id: <1478257688-25209-1-git-send-email-yuanhan.liu@linux.intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <20161104110129.GZ16751@yliu-dev.sh.intel.com> References: <20161104110129.GZ16751@yliu-dev.sh.intel.com> Subject: [dpdk-dev] [PATCH RESEND v2] net/i40e: fix floating VEB issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Beilei Xing 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 --- v2 changes: * Modify the limitation description in i40e.rst :: Seems that Beilei failed to send this patches out. While I have sent out few :: patches out successfully, I'm sending it for her. doc/guides/nics/i40e.rst | 6 ++++++ drivers/net/i40e/i40e_ethdev.c | 12 +++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst index c0163fc..5780268 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 bb81b15..631a93f 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)