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 027B8A053D for ; Fri, 17 Jul 2020 18:32:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BE5A11BEDD; Fri, 17 Jul 2020 18:32:54 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id 64EB21BED9 for ; Fri, 17 Jul 2020 18:32:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595003571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yUD06+AAvePGWcFriiP51cTZs9COwdSsIBUq82sMcbI=; b=KUOet1N8VDKR+muEHI/wzw9RQHTYSaWLNm5dPg6cFWTQe3dGL9m6zBZHlKsYbD4c54Jgmw YEvgmln6G4bpRqqEMnrL+SOpkLRN4Phi0V3RiX5ofrIBY+rEQcOztmdxTfkIjaeVitK6qy IEtV3mW0DKS0euF6rB4RYYUJuLfdC+4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-388-ukrlTCAzPiCTMB3SOJUOCA-1; Fri, 17 Jul 2020 12:32:48 -0400 X-MC-Unique: ukrlTCAzPiCTMB3SOJUOCA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 002461902EA0; Fri, 17 Jul 2020 16:32:47 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1D14672E48; Fri, 17 Jul 2020 16:32:45 +0000 (UTC) From: Kevin Traynor To: Michael Baum Cc: Matan Azrad , dpdk stable Date: Fri, 17 Jul 2020 17:32:04 +0100 Message-Id: <20200717163214.4839-16-ktraynor@redhat.com> In-Reply-To: <20200717163214.4839-1-ktraynor@redhat.com> References: <20200717163214.4839-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx5: fix iterator type in Rx queue management' has been queued to LTS release 18.11.10 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.10 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/23/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/f8a7fe45edad4e9520be4f66c9140fa3c72407e1 Thanks. Kevin. --- >From f8a7fe45edad4e9520be4f66c9140fa3c72407e1 Mon Sep 17 00:00:00 2001 From: Michael Baum Date: Wed, 24 Jun 2020 13:50:39 +0000 Subject: [PATCH] net/mlx5: fix iterator type in Rx queue management [ upstream commit 0f006468c53c8151fa70ff41869c1a76316fe224 ] The mlx5_check_vec_rx_support function in the mlx5_rxtx_vec.c file passes the RX queues array in the loop. Similarly, the mlx5_mprq_enabled function in the mlx5_rxq.c file passes the RX queues array in the loop. In both cases, the iterator of the loop is called i and the variable representing the array size is called rxqs_n. The i variable is of UINT16_T type while the rxqs_n variable is of unsigned int type. The size of the rxqs_n variable is much larger than the number of iterations allowed by the i type, theoretically there may be a situation where the value of the rxqs_n will be greater than can be represented by 16 bits and the loop will never end. Change the type of i to UINT32_T. Fixes: 7d6bf6b866b8 ("net/mlx5: add Multi-Packet Rx support") Fixes: 6cb559d67b83 ("net/mlx5: add vectorized Rx/Tx burst for x86") Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_rxq.c | 2 +- drivers/net/mlx5/mlx5_rxtx_vec.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index 566fb64fad..314ffc3876 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -105,5 +105,5 @@ mlx5_mprq_enabled(struct rte_eth_dev *dev) { struct mlx5_priv *priv = dev->data->dev_private; - uint16_t i; + uint32_t i; uint16_t n = 0; diff --git a/drivers/net/mlx5/mlx5_rxtx_vec.c b/drivers/net/mlx5/mlx5_rxtx_vec.c index 9a3a5ae437..b8d624d146 100644 --- a/drivers/net/mlx5/mlx5_rxtx_vec.c +++ b/drivers/net/mlx5/mlx5_rxtx_vec.c @@ -320,5 +320,5 @@ mlx5_check_vec_rx_support(struct rte_eth_dev *dev) { struct mlx5_priv *priv = dev->data->dev_private; - uint16_t i; + uint32_t i; if (!priv->config.rx_vec_en) -- 2.21.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-07-17 17:17:00.895016480 +0100 +++ 0016-net-mlx5-fix-iterator-type-in-Rx-queue-management.patch 2020-07-17 17:16:59.990771210 +0100 @@ -1 +1 @@ -From 0f006468c53c8151fa70ff41869c1a76316fe224 Mon Sep 17 00:00:00 2001 +From f8a7fe45edad4e9520be4f66c9140fa3c72407e1 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 0f006468c53c8151fa70ff41869c1a76316fe224 ] + @@ -22 +23,0 @@ -Cc: stable@dpdk.org @@ -32 +33 @@ -index bd0037b823..b436f06107 100644 +index 566fb64fad..314ffc3876 100644 @@ -35 +36 @@ -@@ -109,5 +109,5 @@ mlx5_mprq_enabled(struct rte_eth_dev *dev) +@@ -105,5 +105,5 @@ mlx5_mprq_enabled(struct rte_eth_dev *dev) @@ -41 +42 @@ - uint16_t n_ibv = 0; + @@ -43 +44 @@ -index b38bd203ce..7fae2010f9 100644 +index 9a3a5ae437..b8d624d146 100644 @@ -46 +47 @@ -@@ -157,5 +157,5 @@ mlx5_check_vec_rx_support(struct rte_eth_dev *dev) +@@ -320,5 +320,5 @@ mlx5_check_vec_rx_support(struct rte_eth_dev *dev)