DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/mlx5: fix tunnel offload detection
@ 2017-09-04 11:43 Xueming Li
  2017-09-04 15:07 ` Nélio Laranjeiro
  0 siblings, 1 reply; 3+ messages in thread
From: Xueming Li @ 2017-09-04 11:43 UTC (permalink / raw)
  To: Nelio Laranjeiro, Adrien Mazarguil; +Cc: Xueming Li, dev

PMD driver got random tunnel_en value on ConnextX-4LX NIC, depends on
compile optimization level. The variable was not initialized and
detection logic was absent.

Fixes: 578ff15e ("net/mlx5: add hardware checksum offload for tunnel
packets")

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
---
 drivers/net/mlx5/mlx5.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index d7968f5..084df88 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -445,7 +445,7 @@ struct mlx5_args {
 	struct ibv_device_attr device_attr;
 	unsigned int sriov;
 	unsigned int mps;
-	unsigned int tunnel_en;
+	unsigned int tunnel_en = 0;
 	int idx;
 	int i;
 
@@ -503,6 +503,7 @@ struct mlx5_args {
 			mps = MLX5_MPW_DISABLED;
 			break;
 		case PCI_DEVICE_ID_MELLANOX_CONNECTX4LX:
+			tunnel_en = 1;
 			mps = MLX5_MPW;
 			break;
 		case PCI_DEVICE_ID_MELLANOX_CONNECTX5:
-- 
1.8.3.1

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

* Re: [dpdk-dev] [PATCH] net/mlx5: fix tunnel offload detection
  2017-09-04 11:43 [dpdk-dev] [PATCH] net/mlx5: fix tunnel offload detection Xueming Li
@ 2017-09-04 15:07 ` Nélio Laranjeiro
  2017-09-05 15:56   ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Nélio Laranjeiro @ 2017-09-04 15:07 UTC (permalink / raw)
  To: Xueming Li; +Cc: Adrien Mazarguil, dev

On Mon, Sep 04, 2017 at 07:43:51PM +0800, Xueming Li wrote:
> PMD driver got random tunnel_en value on ConnextX-4LX NIC, depends on
> compile optimization level. The variable was not initialized and
> detection logic was absent.
> 
> Fixes: 578ff15e ("net/mlx5: add hardware checksum offload for tunnel
> packets")
> 
> Signed-off-by: Xueming Li <xuemingl@mellanox.com>
> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
> index d7968f5..084df88 100644
> --- a/drivers/net/mlx5/mlx5.c
> +++ b/drivers/net/mlx5/mlx5.c
> @@ -445,7 +445,7 @@ struct mlx5_args {
>  	struct ibv_device_attr device_attr;
>  	unsigned int sriov;
>  	unsigned int mps;
> -	unsigned int tunnel_en;
> +	unsigned int tunnel_en = 0;
>  	int idx;
>  	int i;
>  
> @@ -503,6 +503,7 @@ struct mlx5_args {
>  			mps = MLX5_MPW_DISABLED;
>  			break;
>  		case PCI_DEVICE_ID_MELLANOX_CONNECTX4LX:
> +			tunnel_en = 1;
>  			mps = MLX5_MPW;
>  			break;
>  		case PCI_DEVICE_ID_MELLANOX_CONNECTX5:
> -- 
> 1.8.3.1
 
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

-- 
Nélio Laranjeiro
6WIND

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

* Re: [dpdk-dev] [PATCH] net/mlx5: fix tunnel offload detection
  2017-09-04 15:07 ` Nélio Laranjeiro
@ 2017-09-05 15:56   ` Ferruh Yigit
  0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2017-09-05 15:56 UTC (permalink / raw)
  To: Nélio Laranjeiro, Xueming Li; +Cc: Adrien Mazarguil, dev

On 9/4/2017 4:07 PM, Nélio Laranjeiro wrote:
> On Mon, Sep 04, 2017 at 07:43:51PM +0800, Xueming Li wrote:
>> PMD driver got random tunnel_en value on ConnextX-4LX NIC, depends on
>> compile optimization level. The variable was not initialized and
>> detection logic was absent.

Fixes: f5fde5205101 ("net/mlx5: add hardware checksum offload for tunnel
packets")
Cc: stable@dpdk.org

>>
>> Signed-off-by: Xueming Li <xuemingl@mellanox.com>
>> Acked-by: Shahaf Shuler <shahafs@mellanox.com>

> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

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

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

end of thread, other threads:[~2017-09-05 15:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-04 11:43 [dpdk-dev] [PATCH] net/mlx5: fix tunnel offload detection Xueming Li
2017-09-04 15:07 ` Nélio Laranjeiro
2017-09-05 15:56   ` 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).