DPDK patches and discussions
 help / color / mirror / Atom feed
From: nipun.gupta@nxp.com
To: dev@dpdk.org
Cc: thomas@monjalon.net, ferruh.yigit@intel.com,
	hemant.agrawal@nxp.com, sachin.saxena@nxp.com,
	Vanshika Shukla <vanshika.shukla@nxp.com>
Subject: [dpdk-dev] [PATCH 07/11] net/dpaa2: update RSS to support additional distributions
Date: Mon, 27 Sep 2021 17:56:46 +0530	[thread overview]
Message-ID: <20210927122650.30881-8-nipun.gupta@nxp.com> (raw)
In-Reply-To: <20210927122650.30881-1-nipun.gupta@nxp.com>

From: Vanshika Shukla <vanshika.shukla@nxp.com>

This patch updates the RSS support to support following additional
distributions:
- VLAN
- ESP
- AH
- PPPOE

Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
 drivers/net/dpaa2/base/dpaa2_hw_dpni.c | 70 +++++++++++++++++++++++++-
 drivers/net/dpaa2/dpaa2_ethdev.h       |  7 ++-
 2 files changed, 75 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c
index 641e7027f1..08f49af768 100644
--- a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c
+++ b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c
@@ -210,6 +210,10 @@ dpaa2_distset_to_dpkg_profile_cfg(
 	int l2_configured = 0, l3_configured = 0;
 	int l4_configured = 0, sctp_configured = 0;
 	int mpls_configured = 0;
+	int vlan_configured = 0;
+	int esp_configured = 0;
+	int ah_configured = 0;
+	int pppoe_configured = 0;
 
 	memset(kg_cfg, 0, sizeof(struct dpkg_profile_cfg));
 	while (req_dist_set) {
@@ -217,6 +221,7 @@ dpaa2_distset_to_dpkg_profile_cfg(
 			dist_field = 1ULL << loop;
 			switch (dist_field) {
 			case ETH_RSS_L2_PAYLOAD:
+			case ETH_RSS_ETH:
 
 				if (l2_configured)
 					break;
@@ -231,7 +236,70 @@ dpaa2_distset_to_dpkg_profile_cfg(
 				kg_cfg->extracts[i].extract.from_hdr.type =
 					DPKG_FULL_FIELD;
 				i++;
-			break;
+				break;
+
+			case ETH_RSS_PPPOE:
+				if (pppoe_configured)
+					break;
+				kg_cfg->extracts[i].extract.from_hdr.prot =
+					NET_PROT_PPPOE;
+				kg_cfg->extracts[i].extract.from_hdr.field =
+					NH_FLD_PPPOE_SID;
+				kg_cfg->extracts[i].type =
+					DPKG_EXTRACT_FROM_HDR;
+				kg_cfg->extracts[i].extract.from_hdr.type =
+					DPKG_FULL_FIELD;
+				i++;
+				break;
+
+			case ETH_RSS_ESP:
+				if (esp_configured)
+					break;
+				esp_configured = 1;
+
+				kg_cfg->extracts[i].extract.from_hdr.prot =
+					NET_PROT_IPSEC_ESP;
+				kg_cfg->extracts[i].extract.from_hdr.field =
+					NH_FLD_IPSEC_ESP_SPI;
+				kg_cfg->extracts[i].type =
+					DPKG_EXTRACT_FROM_HDR;
+				kg_cfg->extracts[i].extract.from_hdr.type =
+					DPKG_FULL_FIELD;
+				i++;
+				break;
+
+			case ETH_RSS_AH:
+				if (ah_configured)
+					break;
+				ah_configured = 1;
+
+				kg_cfg->extracts[i].extract.from_hdr.prot =
+					NET_PROT_IPSEC_AH;
+				kg_cfg->extracts[i].extract.from_hdr.field =
+					NH_FLD_IPSEC_AH_SPI;
+				kg_cfg->extracts[i].type =
+					DPKG_EXTRACT_FROM_HDR;
+				kg_cfg->extracts[i].extract.from_hdr.type =
+					DPKG_FULL_FIELD;
+				i++;
+				break;
+
+			case ETH_RSS_C_VLAN:
+			case ETH_RSS_S_VLAN:
+				if (vlan_configured)
+					break;
+				vlan_configured = 1;
+
+				kg_cfg->extracts[i].extract.from_hdr.prot =
+					NET_PROT_VLAN;
+				kg_cfg->extracts[i].extract.from_hdr.field =
+					NH_FLD_VLAN_TCI;
+				kg_cfg->extracts[i].type =
+					DPKG_EXTRACT_FROM_HDR;
+				kg_cfg->extracts[i].extract.from_hdr.type =
+					DPKG_FULL_FIELD;
+				i++;
+				break;
 
 			case ETH_RSS_MPLS:
 
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h
index 07a6811dd2..e1fe14c8b4 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.h
+++ b/drivers/net/dpaa2/dpaa2_ethdev.h
@@ -70,7 +70,12 @@
 	ETH_RSS_UDP | \
 	ETH_RSS_TCP | \
 	ETH_RSS_SCTP | \
-	ETH_RSS_MPLS)
+	ETH_RSS_MPLS | \
+	ETH_RSS_C_VLAN | \
+	ETH_RSS_S_VLAN | \
+	ETH_RSS_ESP | \
+	ETH_RSS_AH | \
+	ETH_RSS_PPPOE)
 
 /* LX2 FRC Parsed values (Little Endian) */
 #define DPAA2_PKT_TYPE_ETHER		0x0060
-- 
2.17.1


  parent reply	other threads:[~2021-09-27 12:27 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-27 12:26 [dpdk-dev] [PATCH 00/11] NXP DPAAx Bus and PMD changes nipun.gupta
2021-09-27 12:26 ` [dpdk-dev] [PATCH 01/11] bus/fslmc: updated MC FW to 10.28 nipun.gupta
2021-10-06 13:28   ` Hemant Agrawal
2021-09-27 12:26 ` [dpdk-dev] [PATCH 02/11] net/dpaa2: support Tx flow redirection action nipun.gupta
2021-09-27 12:26 ` [dpdk-dev] [PATCH 03/11] bus/fslmc: add qbman debug APIs support nipun.gupta
2021-09-27 12:26 ` [dpdk-dev] [PATCH 04/11] net/dpaa2: support multiple Tx queues enqueue for ordered nipun.gupta
2021-09-27 12:26 ` [dpdk-dev] [PATCH 05/11] net/dpaa2: add debug print for MTU set for jumbo nipun.gupta
2021-09-27 12:26 ` [dpdk-dev] [PATCH 06/11] net/dpaa2: add function to generate HW hash key nipun.gupta
2021-09-27 12:26 ` nipun.gupta [this message]
2021-09-27 12:26 ` [dpdk-dev] [PATCH 08/11] net/dpaa: add comments to explain driver behaviour nipun.gupta
2021-09-27 12:26 ` [dpdk-dev] [PATCH 09/11] raw/dpaa2_qdma: use correct params for config and queue setup nipun.gupta
2021-09-27 12:26 ` [dpdk-dev] [PATCH 10/11] raw/dpaa2_qdma: remove checks for lcore ID nipun.gupta
2021-09-27 12:26 ` [dpdk-dev] [PATCH 11/11] common/dpaax: fix paddr to vaddr invalid conversion nipun.gupta
2021-09-27 13:25 ` [dpdk-dev] [PATCH v1 00/11] NXP DPAAx Bus and PMD changes nipun.gupta
2021-09-27 13:25   ` [dpdk-dev] [PATCH v1 01/11] bus/fslmc: updated MC FW to 10.28 nipun.gupta
2021-09-27 13:25   ` [dpdk-dev] [PATCH v1 02/11] net/dpaa2: support Tx flow redirection action nipun.gupta
2021-09-27 13:25   ` [dpdk-dev] [PATCH v1 03/11] bus/fslmc: add qbman debug APIs support nipun.gupta
2021-09-27 13:25   ` [dpdk-dev] [PATCH v1 04/11] net/dpaa2: support multiple Tx queues enqueue for ordered nipun.gupta
2021-09-27 13:25   ` [dpdk-dev] [PATCH v1 05/11] net/dpaa2: add debug print for MTU set for jumbo nipun.gupta
2021-09-27 13:25   ` [dpdk-dev] [PATCH v1 06/11] net/dpaa2: add function to generate HW hash key nipun.gupta
2021-09-27 13:25   ` [dpdk-dev] [PATCH v1 07/11] net/dpaa2: update RSS to support additional distributions nipun.gupta
2021-09-27 13:25   ` [dpdk-dev] [PATCH v1 08/11] net/dpaa: add comments to explain driver behaviour nipun.gupta
2021-09-27 13:25   ` [dpdk-dev] [PATCH v1 09/11] raw/dpaa2_qdma: use correct params for config and queue setup nipun.gupta
2021-09-27 13:25   ` [dpdk-dev] [PATCH v1 10/11] raw/dpaa2_qdma: remove checks for lcore ID nipun.gupta
2021-09-27 13:25   ` [dpdk-dev] [PATCH v1 11/11] common/dpaax: fix paddr to vaddr invalid conversion nipun.gupta
2021-10-06 12:10 ` [dpdk-dev] [PATCH v2 00/10] NXP DPAAx Bus and PMD changes nipun.gupta
2021-10-06 12:10   ` [dpdk-dev] [PATCH v2 01/10] bus/fslmc: updated MC FW to 10.28 nipun.gupta
2021-10-06 12:10   ` [dpdk-dev] [PATCH v2 02/10] net/dpaa2: support Tx flow redirection action nipun.gupta
2021-10-06 12:10   ` [dpdk-dev] [PATCH v2 03/10] bus/fslmc: add qbman debug APIs support nipun.gupta
2021-10-06 13:31     ` Thomas Monjalon
2021-10-06 17:02       ` Nipun Gupta
2021-10-06 12:10   ` [dpdk-dev] [PATCH v2 04/10] net/dpaa2: add debug print for MTU set for jumbo nipun.gupta
2021-10-06 12:10   ` [dpdk-dev] [PATCH v2 05/10] net/dpaa2: add function to generate HW hash key nipun.gupta
2021-10-06 12:10   ` [dpdk-dev] [PATCH v2 06/10] net/dpaa2: update RSS to support additional distributions nipun.gupta
2021-10-06 12:10   ` [dpdk-dev] [PATCH v2 07/10] net/dpaa: add comments to explain driver behaviour nipun.gupta
2021-10-06 12:10   ` [dpdk-dev] [PATCH v2 08/10] raw/dpaa2_qdma: use correct params for config and queue setup nipun.gupta
2021-10-06 12:10   ` [dpdk-dev] [PATCH v2 09/10] raw/dpaa2_qdma: remove checks for lcore ID nipun.gupta
2021-10-06 12:10   ` [dpdk-dev] [PATCH v2 10/10] common/dpaax: fix paddr to vaddr invalid conversion nipun.gupta
2021-10-06 17:01 ` [dpdk-dev] [PATCH v3 00/10] NXP DPAAx Bus and PMD changes nipun.gupta
2021-10-06 17:01   ` [dpdk-dev] [PATCH v3 01/10] bus/fslmc: updated MC FW to 10.28 nipun.gupta
2021-10-06 17:01   ` [dpdk-dev] [PATCH v3 02/10] net/dpaa2: support Tx flow redirection action nipun.gupta
2021-10-06 17:01   ` [dpdk-dev] [PATCH v3 03/10] bus/fslmc: add qbman debug APIs support nipun.gupta
2021-10-06 17:01   ` [dpdk-dev] [PATCH v3 04/10] net/dpaa2: add debug print for MTU set for jumbo nipun.gupta
2021-10-06 17:01   ` [dpdk-dev] [PATCH v3 05/10] net/dpaa2: add function to generate HW hash key nipun.gupta
2021-10-06 17:01   ` [dpdk-dev] [PATCH v3 06/10] net/dpaa2: update RSS to support additional distributions nipun.gupta
2021-10-06 17:01   ` [dpdk-dev] [PATCH v3 07/10] net/dpaa: add comments to explain driver behaviour nipun.gupta
2021-10-06 17:01   ` [dpdk-dev] [PATCH v3 08/10] raw/dpaa2_qdma: use correct params for config and queue setup nipun.gupta
2021-10-06 17:01   ` [dpdk-dev] [PATCH v3 09/10] raw/dpaa2_qdma: remove checks for lcore ID nipun.gupta
2021-10-06 17:01   ` [dpdk-dev] [PATCH v3 10/10] common/dpaax: fix paddr to vaddr invalid conversion nipun.gupta
2021-10-07  7:37   ` [dpdk-dev] [PATCH v3 00/10] NXP DPAAx Bus and PMD changes Thomas Monjalon
2021-10-07  9:38     ` Thomas Monjalon
2021-10-07  9:46       ` Nipun Gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210927122650.30881-8-nipun.gupta@nxp.com \
    --to=nipun.gupta@nxp.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=sachin.saxena@nxp.com \
    --cc=thomas@monjalon.net \
    --cc=vanshika.shukla@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).