From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 050D5A052A; Wed, 27 Jan 2021 12:59:18 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8E1C4140CEF; Wed, 27 Jan 2021 12:59:18 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 71DD8140CEE for ; Wed, 27 Jan 2021 12:59:17 +0100 (CET) IronPort-SDR: 5bjCmWjA/9uu219OUEZ8G7qjl03s42IiMmGrm2Oew300moBqckguRAcrDx+wWKS4EeamCBb72X g3IqHksXDCvQ== X-IronPort-AV: E=McAfee;i="6000,8403,9876"; a="198862496" X-IronPort-AV: E=Sophos;i="5.79,379,1602572400"; d="scan'208";a="198862496" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2021 03:59:16 -0800 IronPort-SDR: QEgofrdu7rjqK5t7SyyDxbDL+waZ6Wf6pHbo0pp0alqFehXfz36bIvQ+Yz5EjwfJGHVzfkept1 /tuiumCoQ6WQ== X-IronPort-AV: E=Sophos;i="5.79,379,1602572400"; d="scan'208";a="430078506" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.208.215]) ([10.213.208.215]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2021 03:59:15 -0800 To: Hemant Agrawal , dev@dpdk.org References: <20210120062238.18721-1-hemant.agrawal@nxp.com> From: Ferruh Yigit Message-ID: <74fd40e2-54b6-ae09-1ab6-8bb4043b6a18@intel.com> Date: Wed, 27 Jan 2021 11:59:12 +0000 MIME-Version: 1.0 In-Reply-To: <20210120062238.18721-1-hemant.agrawal@nxp.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: add MPLS RSS offload type X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" On 1/20/2021 6:22 AM, Hemant Agrawal wrote: > This patch defines new RSS offload types for MPLS. The distribution > will on the basis of MPLS tag. > > Signed-off-by: Hemant Agrawal > --- > 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|", It should be added to the help string too, in 'cmd_help_long_parsed()', I can do it in next-net, no new version required for this. > .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. >