DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/mlx5: fix LACP action type casting
@ 2020-06-29 16:01 Shiri Kuzin
  2020-06-30  8:06 ` Raslan Darawsheh
  0 siblings, 1 reply; 2+ messages in thread
From: Shiri Kuzin @ 2020-06-29 16:01 UTC (permalink / raw)
  To: dev; +Cc: matan, viacheslavo

The mlx5_flow_lacp_miss flow rule for matching LACP traffic was
added to steer LACP traffic to kernel.

When setting the action type of rte_flow_action to
MLX5_RTE_FLOW_ACTION_TYPE_DEFAULT_MISS we get an error since the
action is an enum of type mlx5_rte_flow_action_type.

To solve this a casting of MLX5_RTE_FLOW_ACTION_TYPE_DEFAULT_MISS
to rte_flow_action was added.

Fixes: 6ff4a90223c4 ("net/mlx5: add default miss action to flow engine")
Signed-off-by: Shiri Kuzin <shirik@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 4700ec1..4a031a5 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -5060,7 +5060,8 @@ struct rte_flow *
 	};
 	struct rte_flow_action actions[] = {
 		{
-			.type = MLX5_RTE_FLOW_ACTION_TYPE_DEFAULT_MISS,
+			.type = (enum rte_flow_action_type)
+				MLX5_RTE_FLOW_ACTION_TYPE_DEFAULT_MISS,
 		},
 		{
 			.type = RTE_FLOW_ACTION_TYPE_END,
-- 
1.8.3.1


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

* Re: [dpdk-dev] [PATCH] net/mlx5: fix LACP action type casting
  2020-06-29 16:01 [dpdk-dev] [PATCH] net/mlx5: fix LACP action type casting Shiri Kuzin
@ 2020-06-30  8:06 ` Raslan Darawsheh
  0 siblings, 0 replies; 2+ messages in thread
From: Raslan Darawsheh @ 2020-06-30  8:06 UTC (permalink / raw)
  To: Shiri Kuzin, dev; +Cc: Matan Azrad, Slava Ovsiienko

Hi,

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Shiri Kuzin
> Sent: Monday, June 29, 2020 7:01 PM
> To: dev@dpdk.org
> Cc: Matan Azrad <matan@mellanox.com>; Slava Ovsiienko
> <viacheslavo@mellanox.com>
> Subject: [dpdk-dev] [PATCH] net/mlx5: fix LACP action type casting
> 
> The mlx5_flow_lacp_miss flow rule for matching LACP traffic was
> added to steer LACP traffic to kernel.
> 
> When setting the action type of rte_flow_action to
> MLX5_RTE_FLOW_ACTION_TYPE_DEFAULT_MISS we get an error since the
> action is an enum of type mlx5_rte_flow_action_type.
> 
> To solve this a casting of MLX5_RTE_FLOW_ACTION_TYPE_DEFAULT_MISS
> to rte_flow_action was added.
> 
> Fixes: 6ff4a90223c4 ("net/mlx5: add default miss action to flow engine")
> Signed-off-by: Shiri Kuzin <shirik@mellanox.com>
> Acked-by: Matan Azrad <matan@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_flow.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
> index 4700ec1..4a031a5 100644
> --- a/drivers/net/mlx5/mlx5_flow.c
> +++ b/drivers/net/mlx5/mlx5_flow.c
> @@ -5060,7 +5060,8 @@ struct rte_flow *
>  	};
>  	struct rte_flow_action actions[] = {
>  		{
> -			.type =
> MLX5_RTE_FLOW_ACTION_TYPE_DEFAULT_MISS,
> +			.type = (enum rte_flow_action_type)
> +
> 	MLX5_RTE_FLOW_ACTION_TYPE_DEFAULT_MISS,
>  		},
>  		{
>  			.type = RTE_FLOW_ACTION_TYPE_END,
> --
> 1.8.3.1


Squashed into relevant commit in next-net-mlx,

Kindest regards,
Raslan Darawsheh

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

end of thread, other threads:[~2020-06-30  8:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-29 16:01 [dpdk-dev] [PATCH] net/mlx5: fix LACP action type casting Shiri Kuzin
2020-06-30  8:06 ` Raslan Darawsheh

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