From patchwork Sat Oct 20 08:32:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hyong Youb Kim (hyonkim)" X-Patchwork-Id: 47094 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 358634CA5; Sat, 20 Oct 2018 10:33:15 +0200 (CEST) Received: from rcdn-iport-8.cisco.com (rcdn-iport-8.cisco.com [173.37.86.79]) by dpdk.org (Postfix) with ESMTP id CCB234C6C for ; Sat, 20 Oct 2018 10:33:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1909; q=dns/txt; s=iport; t=1540024393; x=1541233993; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=2U8EBI+ixLpHMPP/XmI7eoeq7YHA9/a5XFoMH3iio1Q=; b=AUmCAswnl9bZ1kPzlrHSofIEzRPFAzsednmrjKnNjWJ0P00uMrgviieI uAkLpt8H7Wc4R1MqWfGPGNT4fSXV27ZTsJFq1wdQUrl/KQ8ZPudq2PbuS +rYCZGbZnE45V/Rpzpj0+XhpZRW8RHJ3aC/Wccq+uCW0+Zg4nQjmLuPrD k=; X-IronPort-AV: E=Sophos;i="5.54,403,1534809600"; d="scan'208";a="467128688" Received: from rcdn-core-5.cisco.com ([173.37.93.156]) by rcdn-iport-8.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Oct 2018 08:33:11 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by rcdn-core-5.cisco.com (8.15.2/8.15.2) with ESMTP id w9K8XBBD024053; Sat, 20 Oct 2018 08:33:11 GMT Received: by cisco.com (Postfix, from userid 508933) id 98B1D20F2001; Sat, 20 Oct 2018 01:33:11 -0700 (PDT) From: Hyong Youb Kim To: Ferruh Yigit Cc: dev@dpdk.org, John Daley , Hyong Youb Kim Date: Sat, 20 Oct 2018 01:32:47 -0700 Message-Id: <20181020083249.8187-2-hyonkim@cisco.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20181020083249.8187-1-hyonkim@cisco.com> References: <20181020083249.8187-1-hyonkim@cisco.com> X-Outbound-SMTP-Client: 10.193.184.48, savbu-usnic-a.cisco.com X-Outbound-Node: rcdn-core-5.cisco.com Subject: [dpdk-dev] [PATCH 1/3] net/enic: fix supported packet types 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" The handler for dev_supported_ptypes_get currently returns null when the vectorized Rx handler is used. It is also missing tunnel packet types. Add the missing packet types to the supported list, and return the right list for the vectorized Rx handler. Fixes: 8a6ff33d6d36 ("net/enic: add AVX2 based vectorized Rx handler") Fixes: 93fb21fdbe23 ("net/enic: enable overlay offload for VXLAN and GENEVE") Signed-off-by: Hyong Youb Kim Reviewed-by: John Daley --- drivers/net/enic/enic_ethdev.c | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c index 4d450fe0c..1a129f414 100644 --- a/drivers/net/enic/enic_ethdev.c +++ b/drivers/net/enic/enic_ethdev.c @@ -522,10 +522,34 @@ static const uint32_t *enicpmd_dev_supported_ptypes_get(struct rte_eth_dev *dev) RTE_PTYPE_L4_NONFRAG, RTE_PTYPE_UNKNOWN }; + static const uint32_t ptypes_overlay[] = { + RTE_PTYPE_L2_ETHER, + RTE_PTYPE_L2_ETHER_VLAN, + RTE_PTYPE_L3_IPV4_EXT_UNKNOWN, + RTE_PTYPE_L3_IPV6_EXT_UNKNOWN, + RTE_PTYPE_L4_TCP, + RTE_PTYPE_L4_UDP, + RTE_PTYPE_L4_FRAG, + RTE_PTYPE_L4_NONFRAG, + RTE_PTYPE_TUNNEL_GRENAT, + RTE_PTYPE_INNER_L2_ETHER, + RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN, + RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN, + RTE_PTYPE_INNER_L4_TCP, + RTE_PTYPE_INNER_L4_UDP, + RTE_PTYPE_INNER_L4_FRAG, + RTE_PTYPE_INNER_L4_NONFRAG, + RTE_PTYPE_UNKNOWN + }; - if (dev->rx_pkt_burst == enic_recv_pkts || - dev->rx_pkt_burst == enic_noscatter_recv_pkts) - return ptypes; + if (dev->rx_pkt_burst != enic_dummy_recv_pkts && + dev->rx_pkt_burst != NULL) { + struct enic *enic = pmd_priv(dev); + if (enic->overlay_offload) + return ptypes_overlay; + else + return ptypes; + } return NULL; }