patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 18.11] net/mlx5: block RSS action without Rx queue
@ 2019-12-30 12:59 Dekel Peled
  2020-01-07 14:04 ` Kevin Traynor
  0 siblings, 1 reply; 2+ messages in thread
From: Dekel Peled @ 2019-12-30 12:59 UTC (permalink / raw)
  To: stable

[ upstream commit 15c80155874e
  ("net/mlx5: block RSS action without Rx queue") ]

This patch modifies function mlx5_flow_validate_action_rss(), to
prevent the setting of rule with rss action, but without specifying
any queues.
For example:
flow create 0 ingress pattern end actions rss queues end / end

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index f19b27e..369689c 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -943,6 +943,10 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority,
 					  &rss->types,
 					  "some RSS protocols are not"
 					  " supported");
+	if (!rss->queue_num)
+		return rte_flow_error_set(error, EINVAL,
+					  RTE_FLOW_ERROR_TYPE_ACTION_CONF,
+					  NULL, "No queues configured");
 	for (i = 0; i != rss->queue_num; ++i) {
 		if (!(*priv->rxqs)[rss->queue[i]])
 			return rte_flow_error_set
-- 
1.8.3.1


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

* Re: [dpdk-stable] [PATCH 18.11] net/mlx5: block RSS action without Rx queue
  2019-12-30 12:59 [dpdk-stable] [PATCH 18.11] net/mlx5: block RSS action without Rx queue Dekel Peled
@ 2020-01-07 14:04 ` Kevin Traynor
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Traynor @ 2020-01-07 14:04 UTC (permalink / raw)
  To: Dekel Peled, stable

On 30/12/2019 12:59, Dekel Peled wrote:
> [ upstream commit 15c80155874e
>   ("net/mlx5: block RSS action without Rx queue") ]
> 
> This patch modifies function mlx5_flow_validate_action_rss(), to
> prevent the setting of rule with rss action, but without specifying
> any queues.
> For example:
> flow create 0 ingress pattern end actions rss queues end / end
> 
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>

Fixed upstream commit reference format and applied. Note, this wouldn't
apply cleanly with a plain 'git am'. For future patches direct to 18.11,
please check against head of 18.11 branch.

fyi - I noticed that the 'if(!priv->rxqs_n)' check is not in 18.11 in
case you wanted to send a patch for that as well.

thanks,
Kevin.

> ---
>  drivers/net/mlx5/mlx5_flow.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
> index f19b27e..369689c 100644
> --- a/drivers/net/mlx5/mlx5_flow.c
> +++ b/drivers/net/mlx5/mlx5_flow.c
> @@ -943,6 +943,10 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority,
>  					  &rss->types,
>  					  "some RSS protocols are not"
>  					  " supported");
> +	if (!rss->queue_num)
> +		return rte_flow_error_set(error, EINVAL,
> +					  RTE_FLOW_ERROR_TYPE_ACTION_CONF,
> +					  NULL, "No queues configured");
>  	for (i = 0; i != rss->queue_num; ++i) {
>  		if (!(*priv->rxqs)[rss->queue[i]])
>  			return rte_flow_error_set
> 




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

end of thread, other threads:[~2020-01-07 14:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-30 12:59 [dpdk-stable] [PATCH 18.11] net/mlx5: block RSS action without Rx queue Dekel Peled
2020-01-07 14:04 ` Kevin Traynor

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