From patchwork Mon Jul 20 01:46:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng, ZhihongX" X-Patchwork-Id: 74456 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6F601A0540; Mon, 20 Jul 2020 03:50:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 176FD2C30; Mon, 20 Jul 2020 03:50:45 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 08A962BB1 for ; Mon, 20 Jul 2020 03:50:42 +0200 (CEST) IronPort-SDR: 9qYIxxAGuLdeovoWO+58MCYgTtotGnIpWHFRsVpkuxFkr4f1pea9JIe199sCmE5Uq7M3VxjGfn W/eAOP6mW8ng== X-IronPort-AV: E=McAfee;i="6000,8403,9687"; a="137321033" X-IronPort-AV: E=Sophos;i="5.75,373,1589266800"; d="scan'208";a="137321033" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2020 18:50:41 -0700 IronPort-SDR: Bqoi1GqTGMIZZXvmRdTrheL31MXhDk+nr8HYCh7RdeCAD6rsqM5QfzODocaUZrVQBLjcwm/v1g LaSu1LP25pSQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,373,1589266800"; d="scan'208";a="391900590" Received: from ubuntu.sh.intel.com ([10.240.183.163]) by fmsmga001.fm.intel.com with ESMTP; 19 Jul 2020 18:50:39 -0700 From: zhihongx.peng@intel.com To: wei.zhao1@intel.com, jia.guo@intel.com Cc: dev@dpdk.org, Peng Zhihong , wei.dai@intel.com Date: Sun, 19 Jul 2020 21:46:36 -0400 Message-Id: <20200720014636.13145-1-zhihongx.peng@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [DPDK] net/e1000: add the VLAN capabilities of NIC X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Peng Zhihong The rte_eth_dev_set_vlan_offload function will check whether the NIC has the set vlan feature. If it has not, it will return failure. So need to add all the vlan feature flags of the NIC. Fixes: ef990fb56e55 ("net/e1000: convert to new Rx offloads API") Cc: wei.dai@intel.com Signed-off-by: Peng Zhihong --- drivers/net/e1000/igb_rxtx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c index 5717cdb70..966df3f20 100644 --- a/drivers/net/e1000/igb_rxtx.c +++ b/drivers/net/e1000/igb_rxtx.c @@ -1647,7 +1647,8 @@ igb_get_rx_port_offloads_capa(struct rte_eth_dev *dev) DEV_RX_OFFLOAD_JUMBO_FRAME | DEV_RX_OFFLOAD_KEEP_CRC | DEV_RX_OFFLOAD_SCATTER | - DEV_RX_OFFLOAD_RSS_HASH; + DEV_RX_OFFLOAD_RSS_HASH | + DEV_RX_OFFLOAD_VLAN_EXTEND; return rx_offload_capa; }