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 F0F0CA0518 for ; Fri, 24 Jul 2020 14:05:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E7A201C039; Fri, 24 Jul 2020 14:05:26 +0200 (CEST) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by dpdk.org (Postfix) with ESMTP id 68F931C0C2 for ; Fri, 24 Jul 2020 14:05:25 +0200 (CEST) Received: by mail-wr1-f54.google.com with SMTP id q5so8080313wru.6 for ; Fri, 24 Jul 2020 05:05:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9qQ5GWRtHL9Gc/1KgAmT7iUJJrUZynLrqYLuy9YO51E=; b=PP2lG+W0vSPYHqbVS6dbgvev/yXvIePBMF4ZHJj/5YaUZyqHLfcAeRGlv0ThUFsK7c abL7SFBp5Praw2Q5LLypFoIsuEIog5iMmFT0PIoiGJzVNkCJKQyHFMGYmzj/1ocgfB+6 ah3vZyyhgQ+T2g+TwDJ7WyZ4m7NPC7JTrJyjSVFZBppACv3pMbHjCR0i6hRDB29sfUqZ RkkEF9/6YDmHSsCyP9UGxeq96KOKyfLRH8Iay/id98NrT9wZ+l2Ie+IwzFZNQt07LPKK X1lcsn6vFmJvFTHQDL3VqlxhY3oX7irSad8JrJA/Zip1iN6YJfEKjRen9pFmm4GQKlWO j16A== 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:mime-version:content-transfer-encoding; bh=9qQ5GWRtHL9Gc/1KgAmT7iUJJrUZynLrqYLuy9YO51E=; b=Jx1avb22gTuNiqcHlASzMAc0mJ+ANBz06ettCpYLJWKcxabGHsP7Zw6kQNLAVUHX7+ DieENlvkUfnuhhfeM1LlC3AXK+K7PN7NXdPeHRZeshAcKRMFz88Axq9ZuxlfkagMtFmi hKizvhwCPXyPaeXGaUtDmVm2idq3eb68qYUD9obTNPv3Pd1FwBOFmkO6PiKjAsaQQMTr ciqv3pRR9lg/AZlm5+FTKiygUEoFttI32fxLHevgHSQ0uL9WlfBVpKwXBBW9xTyOMv6N tc8O4KZ7qZWLMMV/lrjP8ZH6KgSw4kz6wUU7ZSe3jc5mGHuVHQRB4r/isR4gKk1yFnrI bLqA== X-Gm-Message-State: AOAM532Z/bUKyzdO5rFWY4fYuoK1Y6PZdbFSRAmXuRxvJW8E659LBiHT FznDs7d6kzAaeKf48+iuges= X-Google-Smtp-Source: ABdhPJxadjntOdauEzE3FjKOQGR16NOMqhOCm21l3IiMoxxfer0foQsTPe8gCEaW8xpZfPwdTwMWMA== X-Received: by 2002:a5d:5704:: with SMTP id a4mr6521010wrv.318.1595592325109; Fri, 24 Jul 2020 05:05:25 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id h6sm1079953wrv.40.2020.07.24.05.05.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 05:05:24 -0700 (PDT) From: luca.boccassi@gmail.com To: Michael Baum Cc: Matan Azrad , dpdk stable Date: Fri, 24 Jul 2020 12:58:27 +0100 Message-Id: <20200724120030.1863487-69-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200724120030.1863487-1-luca.boccassi@gmail.com> References: <20200724120030.1863487-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx5: fix iterator type in Rx queue management' has been queued to stable release 19.11.4 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 stable release 19.11.4 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/26/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. Thanks. Luca Boccassi --- >From 245b44464f9d8a12ba5c0dadb9f1be13faf07226 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 baa868360..e9e8f1278 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -105,7 +105,7 @@ inline int 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; uint16_t n_ibv = 0; diff --git a/drivers/net/mlx5/mlx5_rxtx_vec.c b/drivers/net/mlx5/mlx5_rxtx_vec.c index dbb4cfaeb..0c705d1f7 100644 --- a/drivers/net/mlx5/mlx5_rxtx_vec.c +++ b/drivers/net/mlx5/mlx5_rxtx_vec.c @@ -156,7 +156,7 @@ int __attribute__((cold)) 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) return -ENOTSUP; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-07-24 12:53:51.246695698 +0100 +++ 0069-net-mlx5-fix-iterator-type-in-Rx-queue-management.patch 2020-07-24 12:53:48.295006608 +0100 @@ -1,8 +1,10 @@ -From 0f006468c53c8151fa70ff41869c1a76316fe224 Mon Sep 17 00:00:00 2001 +From 245b44464f9d8a12ba5c0dadb9f1be13faf07226 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. @@ -19,7 +21,6 @@ Fixes: 7d6bf6b866b8 ("net/mlx5: add Multi-Packet Rx support") Fixes: 6cb559d67b83 ("net/mlx5: add vectorized Rx/Tx burst for x86") -Cc: stable@dpdk.org Signed-off-by: Michael Baum Acked-by: Matan Azrad @@ -29,10 +30,10 @@ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c -index bd0037b82..b436f0610 100644 +index baa868360..e9e8f1278 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c -@@ -108,7 +108,7 @@ inline int +@@ -105,7 +105,7 @@ inline int mlx5_mprq_enabled(struct rte_eth_dev *dev) { struct mlx5_priv *priv = dev->data->dev_private; @@ -42,10 +43,10 @@ uint16_t n_ibv = 0; diff --git a/drivers/net/mlx5/mlx5_rxtx_vec.c b/drivers/net/mlx5/mlx5_rxtx_vec.c -index b38bd203c..7fae2010f 100644 +index dbb4cfaeb..0c705d1f7 100644 --- a/drivers/net/mlx5/mlx5_rxtx_vec.c +++ b/drivers/net/mlx5/mlx5_rxtx_vec.c -@@ -156,7 +156,7 @@ int __rte_cold +@@ -156,7 +156,7 @@ int __attribute__((cold)) mlx5_check_vec_rx_support(struct rte_eth_dev *dev) { struct mlx5_priv *priv = dev->data->dev_private;