* [dpdk-stable] [PATCH 2/2] app/testpmd: fix RSS structure initialisation
[not found] ` <b014d4116d1fe8ce46a641f00e7a2a8ac8b9e61f.1507896510.git.nelio.laranjeiro@6wind.com>
@ 2017-10-13 12:09 ` Nelio Laranjeiro
2017-10-20 19:46 ` Ferruh Yigit
2017-10-23 9:45 ` [dpdk-stable] [PATCH 2/3] " Nelio Laranjeiro
1 sibling, 1 reply; 4+ messages in thread
From: Nelio Laranjeiro @ 2017-10-13 12:09 UTC (permalink / raw)
To: dev; +Cc: Yongseok Koh, Adrien Mazarguil, ivan.boule, stable
Struct rss_conf.rss_key_len is not initialised forcing the user to verify
the rss_conf.rss_key pointer to know if the key is present or not.
rss_conf.rss_key_len should have a valid length according to the size of
the rss_key pointed.
Fixes: 560e02ee5237 ("app/testpmd: configure RSS without restart")
Cc: ivan.boule@6wind.com
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
app/test-pmd/cmdline.c | 2 +-
| 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 120460452..abbe52ad6 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1750,7 +1750,7 @@ cmd_config_rss_parsed(void *parsed_result,
__attribute__((unused)) void *data)
{
struct cmd_config_rss *res = parsed_result;
- struct rte_eth_rss_conf rss_conf;
+ struct rte_eth_rss_conf rss_conf = { .rss_key_len = 0, };
int diag;
uint8_t i;
--git a/drivers/net/mlx5/mlx5_rss.c b/drivers/net/mlx5/mlx5_rss.c
index ad6d9ab70..dd9ddf2e0 100644
--- a/drivers/net/mlx5/mlx5_rss.c
+++ b/drivers/net/mlx5/mlx5_rss.c
@@ -72,7 +72,7 @@ mlx5_rss_hash_update(struct rte_eth_dev *dev,
int ret = 0;
priv_lock(priv);
- if (rss_conf->rss_key_len) {
+ if (rss_conf->rss_key && rss_conf->rss_key_len) {
priv->rss_conf.rss_key = rte_realloc(priv->rss_conf.rss_key,
rss_conf->rss_key_len, 0);
if (!priv->rss_conf.rss_key) {
--
2.11.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-stable] [PATCH 2/2] app/testpmd: fix RSS structure initialisation
2017-10-13 12:09 ` [dpdk-stable] [PATCH 2/2] app/testpmd: fix RSS structure initialisation Nelio Laranjeiro
@ 2017-10-20 19:46 ` Ferruh Yigit
0 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2017-10-20 19:46 UTC (permalink / raw)
To: Nelio Laranjeiro, dev; +Cc: Yongseok Koh, Adrien Mazarguil, ivan.boule, stable
On 10/13/2017 5:09 AM, Nelio Laranjeiro wrote:
> Struct rss_conf.rss_key_len is not initialised forcing the user to verify
> the rss_conf.rss_key pointer to know if the key is present or not.
> rss_conf.rss_key_len should have a valid length according to the size of
> the rss_key pointed.
>
> Fixes: 560e02ee5237 ("app/testpmd: configure RSS without restart")
> Cc: ivan.boule@6wind.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> Acked-by: Yongseok Koh <yskoh@mellanox.com>
> ---
> app/test-pmd/cmdline.c | 2 +-
> drivers/net/mlx5/mlx5_rss.c | 2 +-
Hi Nelio,
Can you please separate test-pmd and driver patch please?
Thanks,
ferruh
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-stable] [PATCH 2/3] app/testpmd: fix RSS structure initialisation
[not found] ` <b014d4116d1fe8ce46a641f00e7a2a8ac8b9e61f.1507896510.git.nelio.laranjeiro@6wind.com>
2017-10-13 12:09 ` [dpdk-stable] [PATCH 2/2] app/testpmd: fix RSS structure initialisation Nelio Laranjeiro
@ 2017-10-23 9:45 ` Nelio Laranjeiro
1 sibling, 0 replies; 4+ messages in thread
From: Nelio Laranjeiro @ 2017-10-23 9:45 UTC (permalink / raw)
To: dev; +Cc: Yongseok Koh, Adrien Mazarguil, ivan.boule, stable
Struct rss_conf.rss_key_len is not initialised forcing the user to verify
the rss_conf.rss_key pointer to know if the key is present or not.
rss_conf.rss_key_len should have a valid length according to the size of
the rss_key pointed.
Fixes: 560e02ee5237 ("app/testpmd: configure RSS without restart")
Cc: ivan.boule@6wind.com
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
app/test-pmd/cmdline.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index bb01e989a..7002ff2c1 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1750,7 +1750,7 @@ cmd_config_rss_parsed(void *parsed_result,
__attribute__((unused)) void *data)
{
struct cmd_config_rss *res = parsed_result;
- struct rte_eth_rss_conf rss_conf;
+ struct rte_eth_rss_conf rss_conf = { .rss_key_len = 0, };
int diag;
uint8_t i;
--
2.11.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-stable] [PATCH v3 2/3] app/testpmd: fix RSS structure initialisation
[not found] ` <cover.1508750504.git.nelio.laranjeiro@6wind.com>
[not found] ` <b014d4116d1fe8ce46a641f00e7a2a8ac8b9e61f.1507896510.git.nelio.laranjeiro@6wind.com>
@ 2017-10-23 11:17 ` Nelio Laranjeiro
1 sibling, 0 replies; 4+ messages in thread
From: Nelio Laranjeiro @ 2017-10-23 11:17 UTC (permalink / raw)
To: dev; +Cc: Yongseok Koh, Adrien Mazarguil, ivan.boule, stable
Struct rss_conf.rss_key_len is not initialised forcing the user to verify
the rss_conf.rss_key pointer to know if the key is present or not.
rss_conf.rss_key_len should have a valid length according to the size of
the rss_key pointed.
Fixes: 560e02ee5237 ("app/testpmd: configure RSS without restart")
Cc: ivan.boule@6wind.com
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
app/test-pmd/cmdline.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index bb01e989a..7002ff2c1 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1750,7 +1750,7 @@ cmd_config_rss_parsed(void *parsed_result,
__attribute__((unused)) void *data)
{
struct cmd_config_rss *res = parsed_result;
- struct rte_eth_rss_conf rss_conf;
+ struct rte_eth_rss_conf rss_conf = { .rss_key_len = 0, };
int diag;
uint8_t i;
--
2.11.0
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-23 11:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <cover.1508757360.git.nelio.laranjeiro@6wind.com>
[not found] ` <cover.1508750504.git.nelio.laranjeiro@6wind.com>
[not found] ` <b014d4116d1fe8ce46a641f00e7a2a8ac8b9e61f.1507896510.git.nelio.laranjeiro@6wind.com>
2017-10-13 12:09 ` [dpdk-stable] [PATCH 2/2] app/testpmd: fix RSS structure initialisation Nelio Laranjeiro
2017-10-20 19:46 ` Ferruh Yigit
2017-10-23 9:45 ` [dpdk-stable] [PATCH 2/3] " Nelio Laranjeiro
2017-10-23 11:17 ` [dpdk-stable] [PATCH v3 " Nelio Laranjeiro
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).