net/mlx5: fix crash in device probe
This patch initializes counter descriptor struct before invoking Verbs
api to avoid segmentation fault.
Fixes: 9a761de8ea
("net/mlx5: flow counter support")
Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This commit is contained in:
parent
93068a9d5a
commit
a9fc0b0ef0
@ -672,7 +672,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. */
|
||||
|
Loading…
Reference in New Issue
Block a user