From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id E43965AB2 for ; Tue, 16 Aug 2016 10:29:59 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP; 16 Aug 2016 01:29:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,529,1464678000"; d="scan'208";a="156422147" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga004.fm.intel.com with ESMTP; 16 Aug 2016 01:29:57 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id u7G8TtHw026801; Tue, 16 Aug 2016 16:29:55 +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 u7G8TqiD016168; Tue, 16 Aug 2016 16:29:54 +0800 Received: (from beileixi@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id u7G8Tq2e016164; Tue, 16 Aug 2016 16:29:52 +0800 From: Beilei Xing To: jingjing.wu@intel.com Cc: dev@dpdk.org, Beilei Xing Date: Tue, 16 Aug 2016 16:29:50 +0800 Message-Id: <1471336190-16134-1-git-send-email-beilei.xing@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] 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: Tue, 16 Aug 2016 08:30:00 -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 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 --- 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