From: <psatheesh@marvell.com>
To: Nithin Dabilpuram <ndabilpuram@marvell.com>,
Kiran Kumar K <kirankumark@marvell.com>,
Sunil Kumar Kori <skori@marvell.com>,
Satha Rao <skoteshwar@marvell.com>
Cc: <dev@dpdk.org>, Jerin Jacob <jerinj@marvell.com>
Subject: [dpdk-dev] [PATCH 1/2] common/cnxk: limit RSS key config with RTE Flow operations
Date: Mon, 4 Sep 2023 16:27:41 +0530 [thread overview]
Message-ID: <20230904105742.1159342-1-psatheesh@marvell.com> (raw)
From: Kiran Kumar K <kirankumark@marvell.com>
Limit the configuring RSS key with RTE Flow operations for cnxk
device. Key can be update only with dev operations using
rte_eth_dev_rss_hash_update.
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
---
drivers/common/cnxk/roc_npc.c | 33 ++++++++++++++++++++++++++-------
1 file changed, 26 insertions(+), 7 deletions(-)
diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c
index c0c168db76..0611a83bba 100644
--- a/drivers/common/cnxk/roc_npc.c
+++ b/drivers/common/cnxk/roc_npc.c
@@ -943,9 +943,35 @@ npc_rss_action_configure(struct roc_npc *roc_npc,
uint8_t key[ROC_NIX_RSS_KEY_LEN];
const uint8_t *key_ptr;
uint8_t flowkey_algx;
+ uint32_t key_len;
uint16_t *reta;
int rc;
+ roc_nix_rss_key_get(roc_nix, key);
+ if (rss->key == NULL) {
+ key_ptr = key;
+ } else {
+ key_len = rss->key_len;
+ if (key_len > ROC_NIX_RSS_KEY_LEN)
+ key_len = ROC_NIX_RSS_KEY_LEN;
+
+ for (i = 0; i < key_len; i++) {
+ if (key[i] != rss->key[i]) {
+ plt_err("RSS key config not supported");
+ plt_err("New Key:");
+ for (i = 0; i < key_len; i++)
+ plt_dump_no_nl("0x%.2x ", rss->key[i]);
+ plt_dump_no_nl("\n");
+ plt_err("Configured Key:");
+ for (i = 0; i < ROC_NIX_RSS_KEY_LEN; i++)
+ plt_dump_no_nl("0x%.2x ", key[i]);
+ plt_dump_no_nl("\n");
+ return -ENOTSUP;
+ }
+ }
+ key_ptr = rss->key;
+ }
+
rc = npc_rss_free_grp_get(npc, &rss_grp_idx);
/* RSS group :0 is not usable for flow rss action */
if (rc < 0 || rss_grp_idx == 0)
@@ -960,13 +986,6 @@ npc_rss_action_configure(struct roc_npc *roc_npc,
*rss_grp = rss_grp_idx;
- if (rss->key == NULL) {
- roc_nix_rss_key_default_fill(roc_nix, key);
- key_ptr = key;
- } else {
- key_ptr = rss->key;
- }
-
roc_nix_rss_key_set(roc_nix, key_ptr);
/* If queue count passed in the rss action is less than
--
2.39.2
next reply other threads:[~2023-09-04 10:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-04 10:57 psatheesh [this message]
2023-09-04 10:57 ` [dpdk-dev] [PATCH 2/2] drivers: add represented port flow item for cnxk psatheesh
2023-12-05 11:53 ` [dpdk-dev] [PATCH v2] " psatheesh
2023-09-20 3:46 ` [dpdk-dev] [PATCH 1/2] common/cnxk: limit RSS key config with RTE Flow operations Jerin Jacob
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=20230904105742.1159342-1-psatheesh@marvell.com \
--to=psatheesh@marvell.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=kirankumark@marvell.com \
--cc=ndabilpuram@marvell.com \
--cc=skori@marvell.com \
--cc=skoteshwar@marvell.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).