This patch initializes counter descriptor struct before invoking Verbs
api to avoid segmentation fault.
Fixes:
9a761de8ea14 ("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>
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. */