From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 10EB5A053A; Mon, 27 Jul 2020 16:30:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 972881BFF2; Mon, 27 Jul 2020 16:30:19 +0200 (CEST) Received: from git-send-mailer.rdmz.labs.mlnx (unknown [37.142.13.130]) by dpdk.org (Postfix) with ESMTP id 782BF1BFE8 for ; Mon, 27 Jul 2020 16:30:18 +0200 (CEST) From: Xueming Li To: Cc: dev@dpdk.org, Asaf Penso , viacheslavo@mellanox.com Date: Mon, 27 Jul 2020 14:29:53 +0000 Message-Id: <1595860193-2771-1-git-send-email-xuemingl@mellanox.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH] vdpa/mlx5: fix completion queue initialization 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Vdpa device failed to initialize 2nd VQ during setup. From FW syndrome, unsupported CQE size was specified in CQ initialization attributes. The unsupported CQE size comes from uninitialized stack struct data, and the struct has new fields defined recently which are not initialized in vdpa code. This patch initializes cq creation attributes with zero to avoid such random data. Fixes: 79a7e409a2f6 ("common/mlx5: prepare support of packet pacing") Cc: viacheslavo@mellanox.com Signed-off-by: Xueming Li Acked-by: Matan Azrad --- drivers/vdpa/mlx5/mlx5_vdpa_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_event.c b/drivers/vdpa/mlx5/mlx5_vdpa_event.c index e14b380f19..13ad43611e 100644 --- a/drivers/vdpa/mlx5/mlx5_vdpa_event.c +++ b/drivers/vdpa/mlx5/mlx5_vdpa_event.c @@ -121,7 +121,7 @@ static int mlx5_vdpa_cq_create(struct mlx5_vdpa_priv *priv, uint16_t log_desc_n, int callfd, struct mlx5_vdpa_cq *cq) { - struct mlx5_devx_cq_attr attr; + struct mlx5_devx_cq_attr attr = {0}; size_t pgsize = sysconf(_SC_PAGESIZE); uint32_t umem_size; uint16_t event_nums[1] = {0}; -- 2.17.1