net/mlx5: fix geneve tunnel flow validation

Message ID 1582095131-11534-1-git-send-email-matan@mellanox.com (mailing list archive)
State Accepted, archived
Delegated to: Raslan Darawsheh
Headers
Series net/mlx5: fix geneve tunnel flow validation |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/Intel-compilation fail apply issues
ci/travis-robot warning Travis build: failed

Commit Message

Matan Azrad Feb. 19, 2020, 6:52 a.m. UTC
  The new Mellanox devices support geneve tunnel statless offloads by
native HW parsers, FW doesn't need to configure flex parser to support
it.

The FW capability for geneve flex parser is not set for the above
devices, hence the geneve flow validation failed for them.

Remove the flex parser validation for geneve, stay only with the direct
FW capability for geneve support.

Fixes: e59a5dbcfd07 ("net/mlx5: add flow match on GENEVE item")
Cc: stable@dpdk.org

Signed-off-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
  

Comments

Slava Ovsiienko Feb. 19, 2020, 7:24 a.m. UTC | #1
> -----Original Message-----
> From: Matan Azrad <matan@mellanox.com>
> Sent: Wednesday, February 19, 2020 8:52
> To: dev@dpdk.org
> Cc: Slava Ovsiienko <viacheslavo@mellanox.com>; stable@dpdk.org
> Subject: [PATCH] net/mlx5: fix geneve tunnel flow validation
> 
> The new Mellanox devices support geneve tunnel statless offloads by native
> HW parsers, FW doesn't need to configure flex parser to support it.
> 
> The FW capability for geneve flex parser is not set for the above devices,
> hence the geneve flow validation failed for them.
> 
> Remove the flex parser validation for geneve, stay only with the direct FW
> capability for geneve support.
> 
> Fixes: e59a5dbcfd07 ("net/mlx5: add flow match on GENEVE item")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>

> ---
>  drivers/net/mlx5/mlx5_flow.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
> index 2548201..eb6bd27 100644
> --- a/drivers/net/mlx5/mlx5_flow.c
> +++ b/drivers/net/mlx5/mlx5_flow.c
> @@ -2135,9 +2135,7 @@ uint32_t mlx5_flow_adjust_priority(struct
> rte_eth_dev *dev, int32_t priority,
>  		.protocol = RTE_BE16(UINT16_MAX),
>  	};
> 
> -	if (!(priv->config.hca_attr.flex_parser_protocols &
> -	      MLX5_HCA_FLEX_GENEVE_ENABLED) ||
> -	    !priv->config.hca_attr.tunnel_stateless_geneve_rx)
> +	if (!priv->config.hca_attr.tunnel_stateless_geneve_rx)
>  		return rte_flow_error_set(error, ENOTSUP,
>  					  RTE_FLOW_ERROR_TYPE_ITEM, item,
>  					  "L3 Geneve is not enabled by device"
> --
> 1.8.3.1
  
Slava Ovsiienko Feb. 19, 2020, 9:14 a.m. UTC | #2
> -----Original Message-----
> From: Matan Azrad <matan@mellanox.com>
> Sent: Wednesday, February 19, 2020 8:52
> To: dev@dpdk.org
> Cc: Slava Ovsiienko <viacheslavo@mellanox.com>; stable@dpdk.org
> Subject: [PATCH] net/mlx5: fix geneve tunnel flow validation
> 
> The new Mellanox devices support geneve tunnel statless offloads by native
> HW parsers, FW doesn't need to configure flex parser to support it.
> 
> The FW capability for geneve flex parser is not set for the above devices,
> hence the geneve flow validation failed for them.
> 
> Remove the flex parser validation for geneve, stay only with the direct FW
> capability for geneve support.
> 
> Fixes: e59a5dbcfd07 ("net/mlx5: add flow match on GENEVE item")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>

> ---
>  drivers/net/mlx5/mlx5_flow.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
> index 2548201..eb6bd27 100644
> --- a/drivers/net/mlx5/mlx5_flow.c
> +++ b/drivers/net/mlx5/mlx5_flow.c
> @@ -2135,9 +2135,7 @@ uint32_t mlx5_flow_adjust_priority(struct
> rte_eth_dev *dev, int32_t priority,
>  		.protocol = RTE_BE16(UINT16_MAX),
>  	};
> 
> -	if (!(priv->config.hca_attr.flex_parser_protocols &
> -	      MLX5_HCA_FLEX_GENEVE_ENABLED) ||
> -	    !priv->config.hca_attr.tunnel_stateless_geneve_rx)
> +	if (!priv->config.hca_attr.tunnel_stateless_geneve_rx)
>  		return rte_flow_error_set(error, ENOTSUP,
>  					  RTE_FLOW_ERROR_TYPE_ITEM, item,
>  					  "L3 Geneve is not enabled by device"
> --
> 1.8.3.1
  
Raslan Darawsheh Feb. 19, 2020, 1:42 p.m. UTC | #3
Hi,

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Matan Azrad
> Sent: Wednesday, February 19, 2020 8:52 AM
> To: dev@dpdk.org
> Cc: Slava Ovsiienko <viacheslavo@mellanox.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/mlx5: fix geneve tunnel flow validation
> 
> The new Mellanox devices support geneve tunnel statless offloads by
> native HW parsers, FW doesn't need to configure flex parser to support
> it.
> 
> The FW capability for geneve flex parser is not set for the above
> devices, hence the geneve flow validation failed for them.
> 
> Remove the flex parser validation for geneve, stay only with the direct
> FW capability for geneve support.
> 
> Fixes: e59a5dbcfd07 ("net/mlx5: add flow match on GENEVE item")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Matan Azrad <matan@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_flow.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
> index 2548201..eb6bd27 100644
> --- a/drivers/net/mlx5/mlx5_flow.c
> +++ b/drivers/net/mlx5/mlx5_flow.c
> @@ -2135,9 +2135,7 @@ uint32_t mlx5_flow_adjust_priority(struct
> rte_eth_dev *dev, int32_t priority,
>  		.protocol = RTE_BE16(UINT16_MAX),
>  	};
> 
> -	if (!(priv->config.hca_attr.flex_parser_protocols &
> -	      MLX5_HCA_FLEX_GENEVE_ENABLED) ||
> -	    !priv->config.hca_attr.tunnel_stateless_geneve_rx)
> +	if (!priv->config.hca_attr.tunnel_stateless_geneve_rx)
>  		return rte_flow_error_set(error, ENOTSUP,
>  					  RTE_FLOW_ERROR_TYPE_ITEM,
> item,
>  					  "L3 Geneve is not enabled by
> device"
> --
> 1.8.3.1


Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh
  

Patch

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 2548201..eb6bd27 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -2135,9 +2135,7 @@  uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority,
 		.protocol = RTE_BE16(UINT16_MAX),
 	};
 
-	if (!(priv->config.hca_attr.flex_parser_protocols &
-	      MLX5_HCA_FLEX_GENEVE_ENABLED) ||
-	    !priv->config.hca_attr.tunnel_stateless_geneve_rx)
+	if (!priv->config.hca_attr.tunnel_stateless_geneve_rx)
 		return rte_flow_error_set(error, ENOTSUP,
 					  RTE_FLOW_ERROR_TYPE_ITEM, item,
 					  "L3 Geneve is not enabled by device"