From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by dpdk.org (Postfix) with ESMTP id A1DA71B839 for ; Tue, 24 Oct 2017 17:18:30 +0200 (CEST) Received: by mail-wr0-f194.google.com with SMTP id p96so7180355wrb.7 for ; Tue, 24 Oct 2017 08:18:30 -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=VhRx+v6dvu4ULD/FNmqHv2mnYfv3JtwIU/FXcSi37H0=; b=wSl79cC2nW2TGvPlFPN2/LH6TcXV8+eGim1fLGJ53nki18o09xQLNh5R0JX4byHavL Gq9Z107XlQCc0lNR+eFSqoGa/lWv867s5DafZ+iW3wxv4z9jKzdo1oDIyMvGEguDbc/H 90wRQR1mYlgHZf3Vfl5DBHSOomVEFN4OhoRi3cHQkqcnle5j51k5c2fCeSVWYXO2gCNm KaoQlpazYxgMCaqQc3xLeDr7CEnE68JU90hLhgcsaFOmUDzIvXzpIuMAG1+wejq2nzxS SvqD8dMOk45p9PL7vQL4kDbWQrueDsR/0zK4/aX6VQwkRRCTdoQM2/h3toCeUWF5hADz HsRw== 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=VhRx+v6dvu4ULD/FNmqHv2mnYfv3JtwIU/FXcSi37H0=; b=hnOUHoD5tAk8jJy0YzLoyPK4gGOiYsL+jQYg6CkPWfeAdc0bCDVLMhWN6Dt7atBzJn QLao4lP/oPoBAi+c0bxWhzYxvOo1DREixQMQlcUJecmt1ERqSzxjmDpa0hrHeJBr2Bgk 3HwipSl9YWL8t8AcyVHV66v7iKmnMb63iL3QLUUSwwlyfCVcmBQWWhID6PSWCE7118up bSlNdms3EhqawZfmJ/7k/ByVHapfwgajCHYsNs9fabXg5HKmjU8xzzFAo3y9Q3iYlWZF fxQKkOwkFqciSNsJ/lgUMv6jtV/V0C2iYEpHBVldAHt58FF8gBxPsM/IO3UK2TcVt3f6 0f9A== X-Gm-Message-State: AMCzsaVRata5/nAlGNmu4j+XBobWodEku+DH5Hmk0YN+DaQDkBQARGvG mBeFHT5QvsIOLrVEs/k4LlN+9YAnOg== X-Google-Smtp-Source: ABhQp+TAHGC0PUiM3FGLQLfwrdYSwwlRzieFEktR5W7fW7M5MF/4vSssGDwpBqovcNx0vpw6k8YQWA== X-Received: by 10.223.136.246 with SMTP id g51mr13701734wrg.226.1508858310172; Tue, 24 Oct 2017 08:18:30 -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 v23sm637300wmh.8.2017.10.24.08.18.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Oct 2017 08:18:29 -0700 (PDT) From: Nelio Laranjeiro To: dev@dpdk.org Cc: Yongseok Koh , Adrien Mazarguil Date: Tue, 24 Oct 2017 17:18:13 +0200 Message-Id: <2292f63b3496fd64b94924d660fc66f671b325ef.1508857992.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 v3 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: Tue, 24 Oct 2017 15:18:30 -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 daf05cb09..a1f382b1f 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -1120,7 +1120,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