DPDK patches and discussions
 help / color / mirror / Atom feed
From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: dev@dpdk.org, ferruh.yigit@intel.com
Cc: Hemant Agrawal <hemant.agrawal@nxp.com>
Subject: [dpdk-dev] [PATCH 1/2] ethdev: add MPLS RSS offload type
Date: Wed, 20 Jan 2021 11:52:37 +0530	[thread overview]
Message-ID: <20210120062238.18721-1-hemant.agrawal@nxp.com> (raw)

This patch defines new RSS offload types for MPLS. The distribution
will on the basis of MPLS tag.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 app/test-pmd/cmdline.c                      | 4 +++-
 doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
 lib/librte_ethdev/rte_ethdev.h              | 4 +++-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 89034c8b72..01cc79b12c 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -2220,6 +2220,8 @@ cmd_config_rss_parsed(void *parsed_result,
 		rss_conf.rss_hf = ETH_RSS_GTPU;
 	else if (!strcmp(res->value, "ecpri"))
 		rss_conf.rss_hf = ETH_RSS_ECPRI;
+	else if (!strcmp(res->value, "mpls"))
+		rss_conf.rss_hf = ETH_RSS_MPLS;
 	else if (!strcmp(res->value, "none"))
 		rss_conf.rss_hf = 0;
 	else if (!strcmp(res->value, "level-default")) {
@@ -2290,7 +2292,7 @@ cmdline_parse_inst_t cmd_config_rss = {
 	.data = NULL,
 	.help_str = "port config all rss "
 		"all|default|eth|vlan|ip|tcp|udp|sctp|ether|port|vxlan|geneve|"
-		"nvgre|vxlan-gpe|l2tpv3|esp|ah|pfcp|ecpri|none|level-default|"
+		"nvgre|vxlan-gpe|l2tpv3|esp|ah|pfcp|ecpri|mpls|none|level-default|"
 		"level-outer|level-inner|<flowtype_id>",
 	.tokens = {
 		(void *)&cmd_config_rss_port,
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 458f25bb63..3ccc9fc300 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -2270,7 +2270,7 @@ port config - RSS
 
 Set the RSS (Receive Side Scaling) mode on or off::
 
-   testpmd> port config all rss (all|default|eth|vlan|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vxlan-gpe|l2tpv3|esp|ah|pfcp|ecpri|none)
+   testpmd> port config all rss (all|default|eth|vlan|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vxlan-gpe|l2tpv3|esp|ah|pfcp|ecpri|mpls|none)
 
 RSS is on by default.
 
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index eb299955d4..7c0b6eda8f 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -527,6 +527,7 @@ struct rte_eth_rss_conf {
 #define ETH_RSS_PFCP               (1ULL << 30)
 #define ETH_RSS_PPPOE		   (1ULL << 31)
 #define ETH_RSS_ECPRI		   (1ULL << 32)
+#define ETH_RSS_MPLS		   (1ULL << 33)
 
 /*
  * We use the following macros to combine with above ETH_RSS_* for
@@ -758,7 +759,8 @@ rte_eth_rss_hf_refine(uint64_t rss_hf)
 	ETH_RSS_PORT  | \
 	ETH_RSS_VXLAN | \
 	ETH_RSS_GENEVE | \
-	ETH_RSS_NVGRE)
+	ETH_RSS_NVGRE | \
+	ETH_RSS_MPLS)
 
 /*
  * Definitions used for redirection table entry size.
-- 
2.17.1


             reply	other threads:[~2021-01-20  6:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-20  6:22 Hemant Agrawal [this message]
2021-01-20  6:22 ` [dpdk-dev] [PATCH 2/2] net/dpaa2: support MPLS distribution Hemant Agrawal
2021-01-27 12:05   ` Ferruh Yigit
2021-01-27 11:59 ` [dpdk-dev] [PATCH 1/2] ethdev: add MPLS RSS offload type Ferruh Yigit
2021-01-27 12:26 ` Ferruh Yigit

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=20210120062238.18721-1-hemant.agrawal@nxp.com \
    --to=hemant.agrawal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.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).