From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id BF7CE5592 for ; Wed, 17 Aug 2016 03:58:17 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP; 16 Aug 2016 18:58:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,529,1464678000"; d="scan'208";a="156893475" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga004.fm.intel.com with ESMTP; 16 Aug 2016 18:58:16 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id u7H1wEN0025704; Wed, 17 Aug 2016 09:58:14 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u7H1wCH9021505; Wed, 17 Aug 2016 09:58:14 +0800 Received: (from beileixi@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id u7H1wC81021501; Wed, 17 Aug 2016 09:58:12 +0800 From: Beilei Xing To: jingjing.wu@intel.com Cc: dev@dpdk.org, Beilei Xing Date: Wed, 17 Aug 2016 09:58:06 +0800 Message-Id: <1471399086-21470-1-git-send-email-beilei.xing@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1471336190-16134-1-git-send-email-beilei.xing@intel.com> References: <1471336190-16134-1-git-send-email-beilei.xing@intel.com> Subject: [dpdk-dev] [PATCH v2] net/i40e: fix dropping packets with Ethertype 0x88A8 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: , X-List-Received-Date: Wed, 17 Aug 2016 01:58:18 -0000 Refer to FW default setting, Ethertype 0x88A8 is treated as S-TAG, packects with S-TAG should be received in Port Virtualizer mode, but Port Virtual mode is not initialized in DPDK. So X710 will drop packets with Ethertype 0x88A8. This patch fixes this issue by turning off S-TAG identification. Fixes: 4861cde46116 ("i40e: new poll mode driver") Signed-off-by: Beilei Xing --- v2 changes: commit log modification drivers/net/i40e/i40e_ethdev.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index d0aeb70..55c4887 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -932,6 +932,9 @@ config_floating_veb(struct rte_eth_dev *dev) } } +#define I40E_L2_TAGS_S_TAG_SHIFT 1 +#define I40E_L2_TAGS_S_TAG_MASK I40E_MASK(0x1, I40E_L2_TAGS_S_TAG_SHIFT) + static int eth_i40e_dev_init(struct rte_eth_dev *dev) { @@ -1120,6 +1123,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); + } + if (!vsi->max_macaddrs) len = ETHER_ADDR_LEN; else -- 2.5.0