From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F74DC43603 for ; Tue, 17 Dec 2019 10:17:22 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 04BF62072D for ; Tue, 17 Dec 2019 10:17:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 04BF62072D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E39681BF9E; Tue, 17 Dec 2019 11:16:28 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 9C4821BF94 for ; Tue, 17 Dec 2019 11:16:27 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Dec 2019 02:16:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,325,1571727600"; d="scan'208";a="217467499" Received: from sivswdev08.ir.intel.com (HELO localhost.localdomain) ([10.237.217.47]) by orsmga006.jf.intel.com with ESMTP; 17 Dec 2019 02:16:25 -0800 From: Bernard Iremonger To: dev@dpdk.org, beilei.xing@intel.com, qi.z.zhang@intel.com, declan.doherty@intel.com Cc: konstantin.ananyev@intel.com, bernard.iremonger@intel.com Date: Tue, 17 Dec 2019 10:15:54 +0000 Message-Id: <1576577756-648-9-git-send-email-bernard.iremonger@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1575982632-23059-1-git-send-email-bernard.iremonger@intel.com> References: <1575982632-23059-1-git-send-email-bernard.iremonger@intel.com> Subject: [dpdk-dev] [PATCH v2 08/10] librte_ethdev: add ESP and AH flow types to RSS 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" Add flow types for the following PCTYPE's in the DDP ipsec profile: 14: IPV6 ESP 15: IPV4 ESP 16: IPV6 AH 17: IPV4 AH 18: IPV6 UDP ESP 19: IPV4 UDP ESP Add the following RSS macros for IPsec: ETH_RSS_ESP ETH_RSS_AH ETH_RSS_IPSEC Signed-off-by: Bernard Iremonger --- lib/librte_ethdev/rte_ethdev.h | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index 18a9def..39c89cb 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -484,7 +484,13 @@ struct rte_eth_rss_conf { #define RTE_ETH_FLOW_NVGRE 21 /**< NVGRE protocol based flow */ #define RTE_ETH_FLOW_VXLAN_GPE 22 /**< VXLAN-GPE protocol based flow */ #define RTE_ETH_FLOW_GTPU 23 /**< GTPU protocol based flow */ -#define RTE_ETH_FLOW_MAX 24 +#define RTE_ETH_FLOW_IPV4_AH 24 /**< IPv4 AH protocol based flow */ +#define RTE_ETH_FLOW_IPV4_ESP 25 /**< IPv4 ESP protocol based flow */ +#define RTE_ETH_FLOW_IPV4_UDP_ESP 26 /**< IPv4 UDP ESP proto based flow */ +#define RTE_ETH_FLOW_IPV6_AH 27 /**< IPv6 AH protocol based flow */ +#define RTE_ETH_FLOW_IPV6_ESP 28 /**< IPv6 ESP protocol based flow */ +#define RTE_ETH_FLOW_IPV6_UDP_ESP 29 /**< IPv6 UDP ESP proto based flow */ +#define RTE_ETH_FLOW_MAX 30 /* * Below macros are defined for RSS offload types, they can be used to @@ -511,6 +517,13 @@ struct rte_eth_rss_conf { #define ETH_RSS_GENEVE (1ULL << 20) #define ETH_RSS_NVGRE (1ULL << 21) #define ETH_RSS_GTPU (1ULL << 23) +#define ETH_RSS_IPV4_AH (1ULL << 24) +#define ETH_RSS_IPV4_ESP (1ULL << 25) +#define ETH_RSS_IPV4_UDP_ESP (1ULL << 26) +#define ETH_RSS_IPV6_AH (1ULL << 27) +#define ETH_RSS_IPV6_ESP (1ULL << 28) +#define ETH_RSS_IPV6_UDP_ESP (1ULL << 29) + /* * We use the following macros to combine with above ETH_RSS_* for @@ -571,6 +584,20 @@ rte_eth_rss_hf_refine(uint64_t rss_hf) ETH_RSS_NONFRAG_IPV4_SCTP | \ ETH_RSS_NONFRAG_IPV6_SCTP) +#define ETH_RSS_AH ( \ + ETH_RSS_IPV4_AH | \ + ETH_RSS_IPV6_AH) + +#define ETH_RSS_ESP ( \ + ETH_RSS_IPV4_ESP | \ + ETH_RSS_IPV6_ESP | \ + ETH_RSS_IPV4_UDP_ESP | \ + ETH_RSS_IPV6_UDP_ESP) + +#define ETH_RSS_IPSEC ( \ + ETH_RSS_AH | \ + ETH_RSS_ESP) + #define ETH_RSS_TUNNEL ( \ ETH_RSS_VXLAN | \ ETH_RSS_GENEVE | \ -- 2.7.4