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 ED7B043345 for ; Thu, 16 Nov 2023 14:24:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E6C2E402DD; Thu, 16 Nov 2023 14:24:19 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 04C98402C6 for ; Thu, 16 Nov 2023 14:24:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700141058; 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=EvcG9c4d4N0Th8BtfTVaaeIjxUVD7o5QYPDlGAAlep0=; b=CEhaxgxLWDTMgJf9ac12hNSKE+EtH/G/v7axLCUalaIB6fr8Ytcj1D7xuwCuYpjQ/FMI+f lBoyemI1a742Gux+MJuqO9qzkixCxfpVLIGmWcNzQJtoUsMDnpplVYBBgURA35fVPk1HPe YMFH4ZEQ1t0LI/zqJaioMNQ1hmhKGYM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-140-asZAOj1AMMewOEE80UYgyg-1; Thu, 16 Nov 2023 08:24:15 -0500 X-MC-Unique: asZAOj1AMMewOEE80UYgyg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2E132185A781; Thu, 16 Nov 2023 13:24:15 +0000 (UTC) Received: from rh.Home (unknown [10.39.194.169]) by smtp.corp.redhat.com (Postfix) with ESMTP id 825EC2166B28; Thu, 16 Nov 2023 13:24:14 +0000 (UTC) From: Kevin Traynor To: Dengdui Huang Cc: dpdk stable Subject: patch 'net/hns3: fix unchecked Rx free threshold' has been queued to stable release 21.11.6 Date: Thu, 16 Nov 2023 13:22:54 +0000 Message-ID: <20231116132348.557257-12-ktraynor@redhat.com> In-Reply-To: <20231116132348.557257-1-ktraynor@redhat.com> References: <20231116132348.557257-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 21.11.6 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/21/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/fc1e7c7b6e370c8accf5a6ded2560496b5e1854c Thanks. Kevin --- >From fc1e7c7b6e370c8accf5a6ded2560496b5e1854c 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 a758300060..5abb3556d1 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -1797,4 +1797,10 @@ hns3_rx_queue_conf_check(struct hns3_hw *hw, const struct rte_eth_rxconf *conf, } + 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 " -- 2.41.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-11-16 13:21:52.864960846 +0000 +++ 0012-net-hns3-fix-unchecked-Rx-free-threshold.patch 2023-11-16 13:21:52.413946267 +0000 @@ -1 +1 @@ -From c1f0cd3a4c834c2e550370b6d31b6bcd456a15f9 Mon Sep 17 00:00:00 2001 +From fc1e7c7b6e370c8accf5a6ded2560496b5e1854c 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 a758300060..5abb3556d1 100644 @@ -27 +28 @@ -@@ -1786,4 +1786,10 @@ hns3_rx_queue_conf_check(struct hns3_hw *hw, const struct rte_eth_rxconf *conf, +@@ -1797,4 +1797,10 @@ hns3_rx_queue_conf_check(struct hns3_hw *hw, const struct rte_eth_rxconf *conf,