From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by dpdk.org (Postfix) with ESMTP id 8B7EA1B600 for ; Mon, 23 Oct 2017 16:50:15 +0200 (CEST) Received: by mail-wm0-f66.google.com with SMTP id b9so4653019wmh.0 for ; Mon, 23 Oct 2017 07:50:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=FkNG9i8X549zBvuWf5umcwZG40ysUbVjBctbdmJfhEc=; b=r/gt2EOuzr3i0fNMB+WC2ta1fH8rBQJ48PGQnv5Lk2/YpuqkOGou7HVGbz+tzgvfLJ 5IjqIXyawDFyp3ffMJqpljWLpAEl9UMWXaT5eia0VD2JK9meYcSt/CTnoBwB8NpAyEFu VfcmZep8BxktXUVHRJ0J/fQT0+FKuKYS/ew6S6jMOQSifvRAfu9bV9emcX1VzhMdOl+N OjEaR39azvB0uIvdCxZ/YKjIxk3dSH/pDRmv2UKrAeyi/yBTmJaicz1T0wl8ywC1omDz REqs/IDM7Wnjpxs0yjQ11D+DBZJ65aqwFCKSxo9H0SZaUhwSnfKnPX8PF0ZUFD5w9NBM bNrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=FkNG9i8X549zBvuWf5umcwZG40ysUbVjBctbdmJfhEc=; b=YvpPnUTj8RxuK2Q6RSMqGqJ9jQBC1fPZCPD3s+UnmAYlvBdv/M08whsKIH6iLyyjY+ vILkF9VmRU95II+fTYsM7OhaF5rM7G2lNnPWW36m9+nQoyu/pQoKeacCNG+OttjcdNPA /Vc9bwOiNav/GiERSai2y7Pqo/buE8z1qzNRtYOxBguw3fqTTXF+lpYe93NI/9EO+j50 HBeqABBO2pHoCYaB2w1osuiY79UGMUoqK2d3KPPNUVo2K33+eW5pQ7fDtAq45GzpZxsC PiP2w9ykyXd1C9YeRIDwaiPg4rk7+C1P3lDHeyNvdmq1akwuD8gXp/6K/1jbotudh9y6 Wz+Q== X-Gm-Message-State: AMCzsaVid2u2xL/43sufJq8mLRF15FytkytvUBCbZSN6AtgvaQlbedQe 9r3Gh7TAi0WlLHS4Sqf+1P5NEr30Jw== X-Google-Smtp-Source: ABhQp+R7OKrXxAQ9Xf4bN04C+9FplZBbetddnVgaIdsJZHPIEy1WlNH9FUWRPfq9gPx7b5Kp092ojA== X-Received: by 10.28.197.201 with SMTP id v192mr6231613wmf.52.1508770215059; Mon, 23 Oct 2017 07:50:15 -0700 (PDT) Received: from laranjeiro-vm.dev.6wind.com. (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id s196sm4908234wmb.26.2017.10.23.07.50.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Oct 2017 07:50:14 -0700 (PDT) From: Nelio Laranjeiro To: dev@dpdk.org Cc: Yongseok Koh , Adrien Mazarguil Date: Mon, 23 Oct 2017 16:49:52 +0200 Message-Id: <445f14773a544d41d37a6a63a718f97269b86165.1508768946.git.nelio.laranjeiro@6wind.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v2 2/7] net/mlx5: fix work queue array size 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: Mon, 23 Oct 2017 14:50:16 -0000 Indirection table size must be in log to communicate with verbs when the number of queue is not a power of two, the maximum indirection table size is use, but not converted to log2. This makes a memory corruption. Fixes: 4c7a0f5ff876 ("net/mlx5: make indirection tables shareable") Signed-off-by: Nelio Laranjeiro Acked-by: Yongseok Koh --- drivers/net/mlx5/mlx5_rxq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index ad741ef44..fce9fb116 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -1113,7 +1113,7 @@ mlx5_priv_ind_table_ibv_new(struct priv *priv, uint16_t queues[], struct mlx5_ind_table_ibv *ind_tbl; const unsigned int wq_n = rte_is_power_of_2(queues_n) ? log2above(queues_n) : - priv->ind_table_max_size; + log2above(priv->ind_table_max_size); struct ibv_wq *wq[1 << wq_n]; unsigned int i; unsigned int j; -- 2.11.0