From: Ophir Munk <ophirmu@mellanox.com>
To: Wenzhuo Lu <wenzhuo.lu@intel.com>,
Jingjing Wu <jingjing.wu@intel.com>,
Bernard Iremonger <bernard.iremonger@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>,
Adrien Mazarguil <adrien.mazarguil@6wind.com>
Cc: Asaf Penso <asafp@mellanox.com>,
Shahaf Shuler <shahafs@mellanox.com>,
Thomas Monjalon <thomas@monjalon.net>,
Olga Shern <olgas@mellanox.com>,
Ophir Munk <ophirmu@mellanox.com>
Subject: [dpdk-dev] [PATCH v1] app/testpmd: revert setting default rss
Date: Fri, 9 Nov 2018 09:02:16 +0000 [thread overview]
Message-ID: <1541754129-26009-1-git-send-email-ophirmu@mellanox.com> (raw)
This reverts the patch that enables default RSS action by setting
key=NULL and key_len=0.
In current testpmd implementation a key pointer must exist if
key_len!=0. For example, the following flow rule will cause a
segmentation fault:
flow create 0 <pattern> actions rss queues 0 1 end key_len 40 / end
Fixes: a4391f8bae ("app/testpmd: set default RSS key as null")
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
---
app/test-pmd/cmdline_flow.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 91e2e35..23ea7cc 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -3248,15 +3248,26 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
.func = RTE_ETH_HASH_FUNCTION_DEFAULT,
.level = 0,
.types = rss_hf,
- .key_len = 0,
+ .key_len = sizeof(action_rss_data->key),
.queue_num = RTE_MIN(nb_rxq, ACTION_RSS_QUEUE_NUM),
- .key = NULL,
+ .key = action_rss_data->key,
.queue = action_rss_data->queue,
},
+ .key = "testpmd's default RSS hash key, "
+ "override it for better balancing",
.queue = { 0 },
};
for (i = 0; i < action_rss_data->conf.queue_num; ++i)
action_rss_data->queue[i] = i;
+ if (!port_id_is_invalid(ctx->port, DISABLED_WARN) &&
+ ctx->port != (portid_t)RTE_PORT_ALL) {
+ struct rte_eth_dev_info info;
+
+ rte_eth_dev_info_get(ctx->port, &info);
+ action_rss_data->conf.key_len =
+ RTE_MIN(sizeof(action_rss_data->key),
+ info.hash_key_size);
+ }
action->conf = &action_rss_data->conf;
return ret;
}
--
1.8.3.1
next reply other threads:[~2018-11-09 9:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-09 9:02 Ophir Munk [this message]
2018-11-09 9:38 ` [dpdk-dev] [PATCH v2] app/testpmd: revert setting default RSS Ophir Munk
[not found] ` <CGME20181109104253eucas1p1b60fccca0a181cc6bb974a3aea697748@eucas1p1.samsung.com>
2018-11-09 10:42 ` [dpdk-dev] [v2] " Ilya Maximets
2018-11-11 9:56 ` Ophir Munk
2018-11-11 11:41 ` Shahaf Shuler
2018-11-12 14:49 ` [dpdk-dev] [dpdk-stable] [PATCH v2] " 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=1541754129-26009-1-git-send-email-ophirmu@mellanox.com \
--to=ophirmu@mellanox.com \
--cc=adrien.mazarguil@6wind.com \
--cc=asafp@mellanox.com \
--cc=bernard.iremonger@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=olgas@mellanox.com \
--cc=shahafs@mellanox.com \
--cc=thomas@monjalon.net \
--cc=wenzhuo.lu@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).