From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 949491B202 for ; Thu, 19 Oct 2017 14:51:52 +0200 (CEST) Received: by mail-wm0-f65.google.com with SMTP id b189so15689502wmd.4 for ; Thu, 19 Oct 2017 05:51:52 -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=MlX1WJAsJIYMma4Gjq1SXHF0m4SZC6pkARWnCApA7v5gCMq/p2e4+/N67aoeLswMOn BXRwmu4n4tWKEHwyFidav0k8BxfBoqnLzgddAkXJk2QhBZGvgp4DJift/squkcUqO5TJ keXexbL7g+3eV8RPSBw2Cqwx/5H/yV9yrabAhWvsKkWXNGMHu+UAn8Brm42n5cT5v+ka 5KisPLKlav62pA9JByQw8zeR0kRXmLVlDevUoxob/MbizX1lSF8ZtcHbTKypJT5mI1T0 uXfBm6sbNFrAjlYC24h+qxCy5PgCXTqZ8pE/xi+xxNT2vvAROBQuHVk9y79Qu78cKiHM QG2g== 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=DwBqH7DQJOdoDgE1U9SuLKKK89v9X1kQ7p2E2UhJ45r0oroaY6bSxYJ4IuDb1kbRpq 9FzDMTuYaVfeFF/UXDhUZWAMByh95/97eKFu1p213tqgcAjS1jHgAqLjeISoq8klCNC+ f/S3V6eQnfOKAj3gC9dmIg6umZLb/7hVGAfETM6VaSq9TFxsnW2dLfULnv1YrlXVEBIb 5INbEkh+HiSBq4AEImaw5heo21p0FfWKsLJbyzXF6QdXQdYaJjZyvHjbBLrdOARCYthF 1Jt4n5Yk3+oIJ+prK5q4+Mh2wBsmIr/g5MMiBpHBbshsdDzjtPr0hqZAyPYppCtU+wWE Sghg== X-Gm-Message-State: AMCzsaVl2hCMLlFT6LLFNn32AhDpzaT05Cn0OK27tS/yajcRFq8anSNx hFAFv/uMu8LMoGOmFRauLIK18HFOGQ== X-Google-Smtp-Source: ABhQp+QpJ9gj+3WKKESuOyx5toWLxuxNxO4wfozGs3jcRhzQQGGodwmJSg0kqkaPyphoNaHsj+Z7dw== X-Received: by 10.28.91.194 with SMTP id p185mr1497548wmb.84.1508417512053; Thu, 19 Oct 2017 05:51:52 -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 69sm1024189wmp.11.2017.10.19.05.51.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Oct 2017 05:51:51 -0700 (PDT) From: Nelio Laranjeiro To: dev@dpdk.org Cc: Yongseok Koh , Adrien Mazarguil Date: Thu, 19 Oct 2017 14:51:30 +0200 Message-Id: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH 2/6] 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: Thu, 19 Oct 2017 12:51:52 -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