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 5791F1E9EA for ; Tue, 12 Jun 2018 13:38:23 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from xuemingl@mellanox.com) with ESMTPS (AES256-SHA encrypted); 12 Jun 2018 14:40:42 +0300 Received: from dev-r630-06.mtbc.labs.mlnx (dev-r630-06.mtbc.labs.mlnx [10.12.205.180]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id w5CBcJqk015517; Tue, 12 Jun 2018 14:38:20 +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 w5CBcJGb008591; Tue, 12 Jun 2018 19:38:19 +0800 Received: (from xuemingl@localhost) by dev-r630-06.mtbc.labs.mlnx (8.14.7/8.14.7/Submit) id w5CBcIVc008589; Tue, 12 Jun 2018 19:38:18 +0800 From: Xueming Li To: Cc: Xueming Li , dev@dpdk.org, Adrien Mazarguil , Shahaf Shuler , stable@dpdk.org, orika@mellanox.com Date: Tue, 12 Jun 2018 19:38:11 +0800 Message-Id: <20180612113811.8543-1-xuemingl@mellanox.com> X-Mailer: git-send-email 2.13.3 Subject: [dpdk-dev] [PATCH v1] net/mlx5: fix pmd crash in device probe 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: Tue, 12 Jun 2018 11:38:23 -0000 This patch initializes counter descriptor struct before invoking Verbs api to avoid segment fault. Fixes: 9a761de8ea14 ("net/mlx5: flow counter support") Cc: orika@mellanox.com Cc: stable@dpdk.org Signed-off-by: Xueming Li --- drivers/net/mlx5/mlx5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index c933e274f..9ab965968 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -706,7 +706,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, int i; struct mlx5dv_context attrs_out = {0}; #ifdef HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT - struct ibv_counter_set_description cs_desc; + struct ibv_counter_set_description cs_desc = { .counter_type = 0 }; #endif /* Prepare shared data between primary and secondary process. */ -- 2.13.3