From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id E45687CA9 for ; Mon, 4 Sep 2017 13:46:45 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from xuemingl@mellanox.com) with ESMTPS (AES256-SHA encrypted); 4 Sep 2017 14:46:44 +0300 Received: from dev-r630-06.mtbc.labs.mlnx (dev-r630-06.mtbc.labs.mlnx [10.12.205.222]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id v84Bkh33010565; Mon, 4 Sep 2017 14:46:44 +0300 Received: from dev-r630-06.mtbc.labs.mlnx (localhost [127.0.0.1]) by dev-r630-06.mtbc.labs.mlnx (8.14.7/8.14.7) with ESMTP id v84BkgVS104701; Mon, 4 Sep 2017 19:46:42 +0800 Received: (from xuemingl@localhost) by dev-r630-06.mtbc.labs.mlnx (8.14.7/8.14.7/Submit) id v84Bkcof104700; Mon, 4 Sep 2017 19:46:38 +0800 From: Xueming Li To: Nelio Laranjeiro , Adrien Mazarguil Cc: Xueming Li , dev@dpdk.org Date: Mon, 4 Sep 2017 19:43:51 +0800 Message-Id: <20170904114351.104617-1-xuemingl@mellanox.com> X-Mailer: git-send-email 2.13.3 Subject: [dpdk-dev] [PATCH] net/mlx5: fix tunnel offload detection X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Sep 2017 11:46:46 -0000 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