DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/mlx5: fix empty RSS flow action
@ 2017-04-18  8:30 Nelio Laranjeiro
  2017-04-18  9:55 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Nelio Laranjeiro @ 2017-04-18  8:30 UTC (permalink / raw)
  To: dev; +Cc: Adrien Mazarguil, Shahaf Shuler

Empty RSS action is causing a segmentation fault.

Fixes: 3d821d6fea40 ("net/mlx5: support RSS action flow rule")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 drivers/net/mlx5/mlx5_flow.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 8d62f85..1784e64 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -506,6 +506,13 @@ priv_flow_validate(struct priv *priv,
 				actions->conf;
 			uint16_t n;
 
+			if (!rss || !rss->num) {
+				rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ACTION,
+						   actions,
+						   "no valid queues");
+				return -rte_errno;
+			}
 			if (action->queues_n == 1) {
 				uint16_t found = 0;
 
-- 
2.1.4

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/mlx5: fix empty RSS flow action
  2017-04-18  8:30 [dpdk-dev] [PATCH] net/mlx5: fix empty RSS flow action Nelio Laranjeiro
@ 2017-04-18  9:55 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2017-04-18  9:55 UTC (permalink / raw)
  To: Nelio Laranjeiro, dev; +Cc: Adrien Mazarguil, Shahaf Shuler

On 4/18/2017 9:30 AM, Nelio Laranjeiro wrote:
> Empty RSS action is causing a segmentation fault.
> 
> Fixes: 3d821d6fea40 ("net/mlx5: support RSS action flow rule")
> 
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-18  9:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-18  8:30 [dpdk-dev] [PATCH] net/mlx5: fix empty RSS flow action Nelio Laranjeiro
2017-04-18  9:55 ` Ferruh Yigit

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).