From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro Subject: Re: [PATCH] net/mlx5: fix tunnel offload detection Date: Mon, 4 Sep 2017 17:07:12 +0200 Message-ID: <20170904150712.izwsar2m5pm6tdlq@localhost> References: <20170904114351.104617-1-xuemingl@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: Adrien Mazarguil , dev@dpdk.org To: Xueming Li Return-path: Received: from mail-wr0-f171.google.com (mail-wr0-f171.google.com [209.85.128.171]) by dpdk.org (Postfix) with ESMTP id E6C4058F6 for ; Mon, 4 Sep 2017 17:07:17 +0200 (CEST) Received: by mail-wr0-f171.google.com with SMTP id a47so635039wra.1 for ; Mon, 04 Sep 2017 08:07:17 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20170904114351.104617-1-xuemingl@mellanox.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "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 > Acked-by: Shahaf Shuler > --- > 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 -- Nélio Laranjeiro 6WIND