From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id BB2A2A0526; Thu, 9 Jul 2020 04:02:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E84AC1DC0B; Thu, 9 Jul 2020 04:02:47 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id C99BE1DBBC for ; Thu, 9 Jul 2020 04:02:46 +0200 (CEST) IronPort-SDR: uU+vX5KZ9tqkLfBWSeAKnAD5cpkV65ZR3aO0G5mREHq6wLsntM+/ekw/WcD7aWafacwv1cUoA4 3lzbzSIjslzQ== X-IronPort-AV: E=McAfee;i="6000,8403,9676"; a="127995977" X-IronPort-AV: E=Sophos;i="5.75,330,1589266800"; d="scan'208";a="127995977" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2020 19:02:45 -0700 IronPort-SDR: 4YyyLssSd4ab7zfzRNm1CjGwjpzNmBKsntYZnRY9E2UxxtXR59vbMkh1wdc+zF26GlwlcBU/Pe t7Y5YnWPZsPw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,330,1589266800"; d="scan'208";a="314802274" Received: from dpdk51.sh.intel.com ([10.67.111.82]) by orsmga008.jf.intel.com with ESMTP; 08 Jul 2020 19:02:43 -0700 From: Qi Zhang To: thomas@monjalon.net Cc: dev@dpdk.org, ferruh.yigit@intel.com, arybchenko@solarflare.com, Junfeng Guo , Qi Zhang Date: Thu, 9 Jul 2020 10:06:41 +0800 Message-Id: <20200709020643.18415-1-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20200708133703.48945-1-qi.z.zhang@intel.com> References: <20200708133703.48945-1-qi.z.zhang@intel.com> Subject: [dpdk-dev] [PATCH v6 1/3] ethdev: add new RSS types for IPv6 prefix 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: Junfeng Guo This patch defines new RSS offload types for IPv6 prefix with 32, 40, 48, 56, 64, 96 bits of both SRC and DST IPv6 address. Ref https://tools.ietf.org/html/rfc6052. Signed-off-by: Junfeng Guo Signed-off-by: Qi Zhang --- v6: - rename to RTE_ETH_RSS_xxx v5: - add 40 56, 96 according to RFC6052 - add more description about the new macros. lib/librte_ethdev/rte_ethdev.h | 109 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index 631b146bd..03356cdb2 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -539,6 +539,19 @@ struct rte_eth_rss_conf { #define ETH_RSS_L2_SRC_ONLY (1ULL << 59) #define ETH_RSS_L2_DST_ONLY (1ULL << 58) +/* + * Only select IPV6 address prefix as RSS input set according to + * https://tools.ietf.org/html/rfc6052 + * Must be combined with ETH_RSS_IPV6, ETH_RSS_NONFRAG_IPV6_UDP, + * ETH_RSS_NONFRAG_IPV6_TCP, ETH_RSS_NONFRAG_IPV6_SCTP. + */ +#define RTE_ETH_RSS_L3_PRE32 (1ULL << 57) +#define RTE_ETH_RSS_L3_PRE40 (1ULL << 56) +#define RTE_ETH_RSS_L3_PRE48 (1ULL << 55) +#define RTE_ETH_RSS_L3_PRE56 (1ULL << 54) +#define RTE_ETH_RSS_L3_PRE64 (1ULL << 53) +#define RTE_ETH_RSS_L3_PRE96 (1ULL << 52) + /** * For input set change of hash filter, if SRC_ONLY and DST_ONLY of * the same level are used simultaneously, it is the same case as @@ -561,6 +574,102 @@ rte_eth_rss_hf_refine(uint64_t rss_hf) return rss_hf; } +#define ETH_RSS_IPV6_PRE32 ( \ + ETH_RSS_IPV6 | \ + RTE_ETH_RSS_L3_PRE32) + +#define ETH_RSS_IPV6_PRE40 ( \ + ETH_RSS_IPV6 | \ + RTE_ETH_RSS_L3_PRE40) + +#define ETH_RSS_IPV6_PRE48 ( \ + ETH_RSS_IPV6 | \ + RTE_ETH_RSS_L3_PRE48) + +#define ETH_RSS_IPV6_PRE56 ( \ + ETH_RSS_IPV6 | \ + RTE_ETH_RSS_L3_PRE56) + +#define ETH_RSS_IPV6_PRE64 ( \ + ETH_RSS_IPV6 | \ + RTE_ETH_RSS_L3_PRE64) + +#define ETH_RSS_IPV6_PRE96 ( \ + ETH_RSS_IPV6 | \ + RTE_ETH_RSS_L3_PRE96) + +#define ETH_RSS_IPV6_PRE32_UDP ( \ + ETH_RSS_NONFRAG_IPV6_UDP | \ + RTE_ETH_RSS_L3_PRE32) + +#define ETH_RSS_IPV6_PRE40_UDP ( \ + ETH_RSS_NONFRAG_IPV6_UDP | \ + RTE_ETH_RSS_L3_PRE40) + +#define ETH_RSS_IPV6_PRE48_UDP ( \ + ETH_RSS_NONFRAG_IPV6_UDP | \ + RTE_ETH_RSS_L3_PRE48) + +#define ETH_RSS_IPV6_PRE56_UDP ( \ + ETH_RSS_NONFRAG_IPV6_UDP | \ + RTE_ETH_RSS_L3_PRE56) + +#define ETH_RSS_IPV6_PRE64_UDP ( \ + ETH_RSS_NONFRAG_IPV6_UDP | \ + RTE_ETH_RSS_L3_PRE64) + +#define ETH_RSS_IPV6_PRE96_UDP ( \ + ETH_RSS_NONFRAG_IPV6_UDP | \ + RTE_ETH_RSS_L3_PRE96) + +#define ETH_RSS_IPV6_PRE32_TCP ( \ + ETH_RSS_NONFRAG_IPV6_TCP | \ + RTE_ETH_RSS_L3_PRE32) + +#define ETH_RSS_IPV6_PRE40_TCP ( \ + ETH_RSS_NONFRAG_IPV6_TCP | \ + RTE_ETH_RSS_L3_PRE40) + +#define ETH_RSS_IPV6_PRE48_TCP ( \ + ETH_RSS_NONFRAG_IPV6_TCP | \ + RTE_ETH_RSS_L3_PRE48) + +#define ETH_RSS_IPV6_PRE56_TCP ( \ + ETH_RSS_NONFRAG_IPV6_TCP | \ + RTE_ETH_RSS_L3_PRE56) + +#define ETH_RSS_IPV6_PRE64_TCP ( \ + ETH_RSS_NONFRAG_IPV6_TCP | \ + RTE_ETH_RSS_L3_PRE64) + +#define ETH_RSS_IPV6_PRE96_TCP ( \ + ETH_RSS_NONFRAG_IPV6_TCP | \ + RTE_ETH_RSS_L3_PRE96) + +#define ETH_RSS_IPV6_PRE32_SCTP ( \ + ETH_RSS_NONFRAG_IPV6_SCTP | \ + RTE_ETH_RSS_L3_PRE32) + +#define ETH_RSS_IPV6_PRE40_SCTP ( \ + ETH_RSS_NONFRAG_IPV6_SCTP | \ + RTE_ETH_RSS_L3_PRE40) + +#define ETH_RSS_IPV6_PRE48_SCTP ( \ + ETH_RSS_NONFRAG_IPV6_SCTP | \ + RTE_ETH_RSS_L3_PRE48) + +#define ETH_RSS_IPV6_PRE56_SCTP ( \ + ETH_RSS_NONFRAG_IPV6_SCTP | \ + RTE_ETH_RSS_L3_PRE56) + +#define ETH_RSS_IPV6_PRE64_SCTP ( \ + ETH_RSS_NONFRAG_IPV6_SCTP | \ + RTE_ETH_RSS_L3_PRE64) + +#define ETH_RSS_IPV6_PRE96_SCTP ( \ + ETH_RSS_NONFRAG_IPV6_SCTP | \ + RTE_ETH_RSS_L3_PRE96) + #define ETH_RSS_IP ( \ ETH_RSS_IPV4 | \ ETH_RSS_FRAG_IPV4 | \ -- 2.13.6