From patchwork Wed Sep 26 02:54:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "John Daley (johndale)" X-Patchwork-Id: 45346 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0DFF81B156; Wed, 26 Sep 2018 04:55:16 +0200 (CEST) Received: from alln-iport-3.cisco.com (alln-iport-3.cisco.com [173.37.142.90]) by dpdk.org (Postfix) with ESMTP id 86E7C7CD2; Wed, 26 Sep 2018 04:55:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1154; q=dns/txt; s=iport; t=1537930514; x=1539140114; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=l4CwjRm1antfpYIwyFDbYeX3J3Gb7AraLI5ezRMS3fU=; b=REIZotFkzhSEaXLv2694Sl/Cy4EcWe2yApVyEOzpplekSFG9dXiXikll t/MiwMrD8zWbAKtbhm6L4OF+uX5XeHtiJC1ck7Q0OBRsiEl6jEeCZFGKr JO8KtiJnGK3ae9NtI25G8/Jzp6eJuRzlNU0EtwdcdChh7NN02Abm8G6tj o=; X-IronPort-AV: E=Sophos;i="5.54,304,1534809600"; d="scan'208";a="177008716" Received: from alln-core-8.cisco.com ([173.36.13.141]) by alln-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Sep 2018 02:55:13 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by alln-core-8.cisco.com (8.15.2/8.15.2) with ESMTP id w8Q2tDhr004046; Wed, 26 Sep 2018 02:55:13 GMT Received: by cisco.com (Postfix, from userid 392789) id 9165E20F2001; Tue, 25 Sep 2018 19:55:13 -0700 (PDT) From: John Daley To: ferruh.yigit@intel.com Cc: dev@dpdk.org, Hyong Youb Kim , stable@dpdk.org Date: Tue, 25 Sep 2018 19:54:19 -0700 Message-Id: <20180926025422.21912-3-johndale@cisco.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180926025422.21912-1-johndale@cisco.com> References: <20180926025422.21912-1-johndale@cisco.com> X-Outbound-SMTP-Client: 10.193.184.48, savbu-usnic-a.cisco.com X-Outbound-Node: alln-core-8.cisco.com Subject: [dpdk-dev] [PATCH 3/6] net/enic: set Rx VLAN offload flag for non-stripped packets 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: Hyong Youb Kim The NIC indicates VLAN TCI to the driver even when VLAN stripping is disabled. The driver sets mbuf's vlan_tci but not PKT_RX_VLAN. Set PKT_RX_VLAN to indicate that vlan_tci is valid. Fixes: c6f455507411 ("net/enic: add ethernet VLAN packet type") Cc: stable@dpdk.org Signed-off-by: Hyong Youb Kim Reviewed-by: John Daley --- drivers/net/enic/enic_rxtx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c index 7129e1217..0eb113d75 100644 --- a/drivers/net/enic/enic_rxtx.c +++ b/drivers/net/enic/enic_rxtx.c @@ -233,10 +233,12 @@ enic_cq_rx_to_pkt_flags(struct cq_desc *cqd, struct rte_mbuf *mbuf) pkt_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED; mbuf->packet_type |= RTE_PTYPE_L2_ETHER; } else { - if (vlan_tci != 0) + if (vlan_tci != 0) { + pkt_flags |= PKT_RX_VLAN; mbuf->packet_type |= RTE_PTYPE_L2_ETHER_VLAN; - else + } else { mbuf->packet_type |= RTE_PTYPE_L2_ETHER; + } } mbuf->vlan_tci = vlan_tci;