From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A9549432DA for ; Wed, 8 Nov 2023 20:26:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A28E1406A2; Wed, 8 Nov 2023 20:26:01 +0100 (CET) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) by mails.dpdk.org (Postfix) with ESMTP id 7CA9C40EE3 for ; Wed, 8 Nov 2023 20:25:59 +0100 (CET) Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-507c78d258fso16154e87.2 for ; Wed, 08 Nov 2023 11:25:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699471559; x=1700076359; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SSynkW1zM5X/pKJ0D2sbYxcQl1Nyzjs7zz1kwPz5SmE=; b=HEmJ0sw8Xxk2wI8NKBIHP5whNEuKxE1rgwbb9E87nkmdKYYyJRP+kwKk2z6ihpJcyO 5aDDovzEXsun1Ce1esEBwAZ9QCKeaC6Dm1zDrw9dkdAiQ0CRvXXsfHK1uCfeR0OjCIYm aFvfb6paSMKAEZ8sm56oIPvp2fPnpJ7/z9PQRC9Ht3SyJHpyTfdjNUTJZqHoSKzjDW/E TKmk+IOeGiiVDzzqdkl3+pkCSvWuht1azlTtq7dWrSlIXtW0CmM/E0shhy5Eqz5b/VHx Bi2JOvP2MR1Tqv0IY0VUsdyzksnt++f4ChH7pt5/rF8jntmhvEi/IXo6kfnFeInktWUz JjzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699471559; x=1700076359; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SSynkW1zM5X/pKJ0D2sbYxcQl1Nyzjs7zz1kwPz5SmE=; b=GfGxC/4aPVsQvGIVvGfFPF/pFDjC1tK1AsT5K1d8fQuZKTyS+dpuHurrs1iH3OFPQX KHO/C2QcA3/opVBKFq5HOyJtjUUDuhcsw3Z3JFKIZlJP6+fE7h6OhsJB98moKOGIzzoe DKYCKy3Bla/0TjLGy6Lwx803giMjGF2QYFgFa+z8SCSHHqmELEk32gBFZz81t9f19shz 8eLXyYdlPdsUCn5YCPKa04dh+9INmgKeGwF1TNEO5w1A+BD3IY6xWQ3NyiPbAdyXLZjO CSsbwflvnN/3AlUOvSlYbLQH9tEAiNeu7+d8PsFALPdJhw+c0ourtEYvr6av6G3O1vYx WqTA== X-Gm-Message-State: AOJu0Yxhi/FmlCRxdJlV0O8+LvudYcLMrGPUSCYnYIBGIbQtoMW24Llk HEr2QQ6XzdhC25A6CZjdzDqZhPwqu2ypzw== X-Google-Smtp-Source: AGHT+IEGHB+IQpNSMItoj84vGAnk29YkBrbWy/oz9ddXwgdiwIp7I8gLwkNsvyeTKWqblnqv6guHtw== X-Received: by 2002:a05:6512:ac3:b0:509:31da:43fd with SMTP id n3-20020a0565120ac300b0050931da43fdmr2681446lfu.7.1699471558913; Wed, 08 Nov 2023 11:25:58 -0800 (PST) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id ba15-20020a0560001c0f00b0032326908972sm5664707wrb.17.2023.11.08.11.25.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Nov 2023 11:25:58 -0800 (PST) From: luca.boccassi@gmail.com To: Dengdui Huang Cc: dpdk stable Subject: patch 'net/hns3: fix unchecked Rx free threshold' has been queued to stable release 20.11.10 Date: Wed, 8 Nov 2023 19:25:08 +0000 Message-Id: <20231108192535.922238-10-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231108192535.922238-1-luca.boccassi@gmail.com> References: <20231018235930.3144-41-luca.boccassi@gmail.com> <20231108192535.922238-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 20.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 11/10/23. 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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/83132d1f9f526b0b4446f5f6d918f35631986457 Thanks. Luca Boccassi --- >From 83132d1f9f526b0b4446f5f6d918f35631986457 Mon Sep 17 00:00:00 2001 From: Dengdui Huang Date: Fri, 27 Oct 2023 14:09:40 +0800 Subject: [PATCH] net/hns3: fix unchecked Rx free threshold [ upstream commit c1f0cd3a4c834c2e550370b6d31b6bcd456a15f9 ] To reduce the frequency of updating the head pointer of Rx queue, driver just updates this pointer when the number of processed descriptors is greater than the Rx free threshold. If the Rx free threshold is set to a value greater than or equal to the number of descriptors in Rx queue, the driver does not update this pointer. As a result, the hardware cannot receive more packets. This patch fix it by adding Rx free threshold check. Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations") Signed-off-by: Dengdui Huang --- drivers/net/hns3/hns3_rxtx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c index 963a20627b..e0abcce695 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -1788,6 +1788,12 @@ hns3_rx_queue_conf_check(struct hns3_hw *hw, const struct rte_eth_rxconf *conf, return -EINVAL; } + if (conf->rx_free_thresh >= nb_desc) { + hns3_err(hw, "rx_free_thresh (%u) must be less than %u", + conf->rx_free_thresh, nb_desc); + return -EINVAL; + } + if (conf->rx_drop_en == 0) hns3_warn(hw, "if no descriptors available, packets are always " "dropped and rx_drop_en (1) is fixed on"); -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-11-08 19:23:52.445443238 +0000 +++ 0010-net-hns3-fix-unchecked-Rx-free-threshold.patch 2023-11-08 19:23:51.753395878 +0000 @@ -1 +1 @@ -From c1f0cd3a4c834c2e550370b6d31b6bcd456a15f9 Mon Sep 17 00:00:00 2001 +From 83132d1f9f526b0b4446f5f6d918f35631986457 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit c1f0cd3a4c834c2e550370b6d31b6bcd456a15f9 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index f3c3b38c55..13214d02d5 100644 +index 963a20627b..e0abcce695 100644 @@ -27 +28 @@ -@@ -1785,6 +1785,12 @@ hns3_rx_queue_conf_check(struct hns3_hw *hw, const struct rte_eth_rxconf *conf, +@@ -1788,6 +1788,12 @@ hns3_rx_queue_conf_check(struct hns3_hw *hw, const struct rte_eth_rxconf *conf,