[dpdk-stable] [PATCH v1] net/mlx5: fix pmd crash in device probe
Xueming Li
xuemingl at mellanox.com
Tue Jun 12 13:38:11 CEST 2018
This patch initializes counter descriptor struct before invoking Verbs
api to avoid segment fault.
Fixes: 9a761de8ea14 ("net/mlx5: flow counter support")
Cc: orika at mellanox.com
Cc: stable at dpdk.org
Signed-off-by: Xueming Li <xuemingl at mellanox.com>
---
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
More information about the stable
mailing list