DPDK patches and discussions
 help / color / mirror / Atom feed
From: <kirankumark@marvell.com>
To: Jerin Jacob <jerinj@marvell.com>,
	Nithin Dabilpuram <ndabilpuram@marvell.com>,
	Kiran Kumar K <kirankumark@marvell.com>
Cc: <dev@dpdk.org>, <thomas@monjalon.net>, <ferruh.yigit@intel.com>,
	<arybchenko@solarflare.com>, <orika@mellanox.com>,
	<xuanziyang2@huawei.com>, <cloud.wangxiaoyun@huawei.com>,
	<zhouguoyang@huawei.com>, <rosen.xu@intel.com>,
	<beilei.xing@intel.com>, <jia.guo@intel.com>, <rmody@marvell.com>,
	<shshaikh@marvell.com>, <qiming.yang@intel.com>,
	<qi.z.zhang@intel.com>, <keith.wiles@intel.com>,
	<hemant.agrawal@nxp.com>, <sachin.saxena@nxp.com>,
	<wei.zhao1@intel.com>, <johndale@cisco.com>, <hyonkim@cisco.com>,
	<chas3@att.com>, <matan@mellanox.com>, <shahafs@mellanox.com>,
	<viacheslavo@mellanox.com>, <rahul.lakkireddy@chelsio.com>,
	<grive@u256.net>, <lironh@marvell.com>, <jingjing.wu@intel.com>,
	<xavier.huwei@huawei.com>, <humin29@huawei.com>,
	<yisen.zhuang@huawei.com>, <ajit.khaparde@broadcom.com>,
	<somnath.kotur@broadcom.com>, <jasvinder.singh@intel.com>,
	<cristian.dumitrescu@intel.com>
Subject: [dpdk-dev] [PATCH v4 2/2] net/octeontx2: add rss hash level support
Date: Tue, 18 Aug 2020 16:01:45 +0530
Message-ID: <20200818103145.2192371-2-kirankumark@marvell.com> (raw)
In-Reply-To: <20200818103145.2192371-1-kirankumark@marvell.com>

From: Kiran Kumar K <kirankumark@marvell.com>

Add support to choose rss hash level from ethdev rss config.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
---
V4 Changes:
* Replace ETH_RSS_LEVEL_OUTER | ETH_RSS_LEVEL_INNER_OUTER with
ETH_RSS_LEVEL_MASK

 drivers/net/octeontx2/otx2_ethdev.h | 2 +-
 drivers/net/octeontx2/otx2_rss.c    | 9 +++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
index e9efe52bb..a11411239 100644
--- a/drivers/net/octeontx2/otx2_ethdev.h
+++ b/drivers/net/octeontx2/otx2_ethdev.h
@@ -119,7 +119,7 @@
 #define NIX_RSS_OFFLOAD		(ETH_RSS_PORT | ETH_RSS_IP | ETH_RSS_UDP |\
 				 ETH_RSS_TCP | ETH_RSS_SCTP | \
 				 ETH_RSS_TUNNEL | ETH_RSS_L2_PAYLOAD | \
-				 NIX_RSS_L3_L4_SRC_DST)
+				 NIX_RSS_L3_L4_SRC_DST | ETH_RSS_LEVEL_MASK)

 #define NIX_TX_OFFLOAD_CAPA ( \
 	DEV_TX_OFFLOAD_MBUF_FAST_FREE	| \
diff --git a/drivers/net/octeontx2/otx2_rss.c b/drivers/net/octeontx2/otx2_rss.c
index d859937e6..194f4e8af 100644
--- a/drivers/net/octeontx2/otx2_rss.c
+++ b/drivers/net/octeontx2/otx2_rss.c
@@ -323,6 +323,7 @@ otx2_nix_rss_hash_update(struct rte_eth_dev *eth_dev,
 			 struct rte_eth_rss_conf *rss_conf)
 {
 	struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);
+	uint8_t rss_hash_level;
 	uint32_t flowkey_cfg;
 	uint8_t alg_idx;
 	int rc;
@@ -339,7 +340,9 @@ otx2_nix_rss_hash_update(struct rte_eth_dev *eth_dev,
 		otx2_nix_rss_set_key(dev, rss_conf->rss_key,
 				     (uint32_t)rss_conf->rss_key_len);

-	flowkey_cfg = otx2_rss_ethdev_to_nix(dev, rss_conf->rss_hf, 0);
+	rss_hash_level = ETH_RSS_LEVEL(rss_conf->rss_hf);
+	flowkey_cfg =
+		otx2_rss_ethdev_to_nix(dev, rss_conf->rss_hf, rss_hash_level);

 	rc = otx2_rss_set_hf(dev, flowkey_cfg, &alg_idx,
 			     NIX_DEFAULT_RSS_CTX_GROUP,
@@ -375,6 +378,7 @@ otx2_nix_rss_config(struct rte_eth_dev *eth_dev)
 {
 	struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);
 	uint32_t idx, qcnt = eth_dev->data->nb_rx_queues;
+	uint8_t rss_hash_level;
 	uint32_t flowkey_cfg;
 	uint64_t rss_hf;
 	uint8_t alg_idx;
@@ -399,7 +403,8 @@ otx2_nix_rss_config(struct rte_eth_dev *eth_dev)
 	}

 	rss_hf = eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf;
-	flowkey_cfg = otx2_rss_ethdev_to_nix(dev, rss_hf, 0);
+	rss_hash_level = ETH_RSS_LEVEL(rss_hf);
+	flowkey_cfg = otx2_rss_ethdev_to_nix(dev, rss_hf, rss_hash_level);

 	rc = otx2_rss_set_hf(dev, flowkey_cfg, &alg_idx,
 			     NIX_DEFAULT_RSS_CTX_GROUP,
--
2.25.1


  reply	other threads:[~2020-08-18 10:32 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-07 12:04 [dpdk-dev] [PATCH 1/2] ethdev: add level support for RSS offload types kirankumark
2020-08-07 12:04 ` [dpdk-dev] [PATCH 2/2] net/octeontx2: add rss hash level support kirankumark
2020-08-08 14:36 ` [dpdk-dev] [PATCH v2 1/2] ethdev: add level support for RSS offload types kirankumark
2020-08-08 14:36   ` [dpdk-dev] [PATCH v2 2/2] net/octeontx2: add rss hash level support kirankumark
2020-08-08 14:40   ` [dpdk-dev] [PATCH v2 1/2] ethdev: add level support for RSS offload types Ajit Khaparde
2020-08-14  3:55     ` [dpdk-dev] [EXT] " Kiran Kumar Kokkilagadda
2020-08-18  7:21   ` [dpdk-dev] [PATCH v3 " kirankumark
2020-08-18  7:21     ` [dpdk-dev] [PATCH v3 2/2] net/octeontx2: add rss hash level support kirankumark
2020-08-18 10:03       ` Jerin Jacob
2020-08-18 10:10         ` [dpdk-dev] [EXT] " Kiran Kumar Kokkilagadda
2020-08-18 10:31     ` [dpdk-dev] [PATCH v4 1/2] ethdev: add level support for RSS offload types kirankumark
2020-08-18 10:31       ` kirankumark [this message]
2020-08-18 10:52       ` Jeff Guo
2020-08-18 11:43         ` [dpdk-dev] [EXT] " Kiran Kumar Kokkilagadda
2020-08-19  6:04       ` [dpdk-dev] [PATCH v5 " kirankumark
2020-08-19  6:04         ` [dpdk-dev] [PATCH v5 2/2] net/octeontx2: add rss hash level support kirankumark
2020-08-20  3:19         ` [dpdk-dev] [PATCH v5 1/2] ethdev: add level support for RSS offload types Ajit Khaparde
2020-08-21 10:57           ` [dpdk-dev] [EXT] " Kiran Kumar Kokkilagadda
2020-08-21 11:03         ` [dpdk-dev] [PATCH v6 1/3] " kirankumark
2020-08-21 11:03           ` [dpdk-dev] [PATCH v6 2/3] app/testpmd: support ethdev rss level config kirankumark
2020-08-29  0:48             ` Ajit Khaparde
2020-08-21 11:03           ` [dpdk-dev] [PATCH v6 3/3] net/octeontx2: add rss hash level support kirankumark
2020-08-29 14:52           ` [dpdk-dev] [PATCH v6 1/3] ethdev: add level support for RSS offload types Andrew Rybchenko
2020-09-01 13:23             ` Ferruh Yigit
2020-09-01  3:27           ` [dpdk-dev] [PATCH v7 " kirankumark
2020-09-01  3:27             ` [dpdk-dev] [PATCH v7 2/3] app/testpmd: support ethdev rss level config kirankumark
2020-09-01  3:27             ` [dpdk-dev] [PATCH v7 3/3] net/octeontx2: add rss hash level support kirankumark
2020-09-01 13:37             ` [dpdk-dev] [PATCH v7 1/3] ethdev: add level support for RSS offload types Ferruh Yigit
2020-09-01 14:27               ` [dpdk-dev] [EXT] " Kiran Kumar Kokkilagadda
2020-09-01 14:44                 ` Ferruh Yigit
2020-09-01 14:54                 ` Ferruh Yigit
2020-09-01 17:11                 ` Ajit Khaparde
2020-09-03 10:11                   ` Kiran Kumar Kokkilagadda
2020-09-03 13:14                     ` Ferruh Yigit
2020-09-07  8:12                       ` Andrew Rybchenko
2020-09-08 19:40                         ` Ajit Khaparde
2020-09-17  2:07             ` [dpdk-dev] [PATCH v8 " kirankumark
2020-09-17  2:07               ` [dpdk-dev] [PATCH v8 2/3] app/testpmd: support ethdev rss level config kirankumark
2020-09-17 18:58                 ` Ajit Khaparde
2020-09-17  2:07               ` [dpdk-dev] [PATCH v8 3/3] net/octeontx2: add rss hash level support kirankumark
2020-09-17  9:36               ` [dpdk-dev] [PATCH v8 1/3] ethdev: add level support for RSS offload types Andrew Rybchenko
2020-09-17 18:56                 ` Ajit Khaparde
2020-09-18 11:40                   ` Ferruh Yigit
2020-08-18 17:39     ` [dpdk-dev] [PATCH v3 1/2] " Ajit Khaparde
2020-08-19  3:58       ` [dpdk-dev] [EXT] " Kiran Kumar Kokkilagadda

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=20200818103145.2192371-2-kirankumark@marvell.com \
    --to=kirankumark@marvell.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=arybchenko@solarflare.com \
    --cc=beilei.xing@intel.com \
    --cc=chas3@att.com \
    --cc=cloud.wangxiaoyun@huawei.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=grive@u256.net \
    --cc=hemant.agrawal@nxp.com \
    --cc=humin29@huawei.com \
    --cc=hyonkim@cisco.com \
    --cc=jasvinder.singh@intel.com \
    --cc=jerinj@marvell.com \
    --cc=jia.guo@intel.com \
    --cc=jingjing.wu@intel.com \
    --cc=johndale@cisco.com \
    --cc=keith.wiles@intel.com \
    --cc=lironh@marvell.com \
    --cc=matan@mellanox.com \
    --cc=ndabilpuram@marvell.com \
    --cc=orika@mellanox.com \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=rahul.lakkireddy@chelsio.com \
    --cc=rmody@marvell.com \
    --cc=rosen.xu@intel.com \
    --cc=sachin.saxena@nxp.com \
    --cc=shahafs@mellanox.com \
    --cc=shshaikh@marvell.com \
    --cc=somnath.kotur@broadcom.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@mellanox.com \
    --cc=wei.zhao1@intel.com \
    --cc=xavier.huwei@huawei.com \
    --cc=xuanziyang2@huawei.com \
    --cc=yisen.zhuang@huawei.com \
    --cc=zhouguoyang@huawei.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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git