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 234E046A9C for ; Mon, 30 Jun 2025 14:26:23 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 143514025D; Mon, 30 Jun 2025 14:26:23 +0200 (CEST) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mails.dpdk.org (Postfix) with ESMTP id AB69B40654 for ; Mon, 30 Jun 2025 14:26:19 +0200 (CEST) Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-3a6cd1a6fecso4677652f8f.3 for ; Mon, 30 Jun 2025 05:26:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1751286379; x=1751891179; 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=TF8+H+tG/G3OzaaGoVLqqHig0GnVcUWuhH7TTeraooM=; b=hMnO3/+93MUBGm9mdLSYABOMRBMc4jsOFph8rAakQg5z9bNM4UjlbcQTgSDDnK9+S8 eke3iDwFxtehwmA+ar9Xc98vOFVARfCd/u49NMoCgIv826iOSnayhxKZRtP026R34cmE 1EqGbecpb0s4qCP9jfQTj8LbQutnhFfwBt9ZvcOQgiVjsG+PkItJZYVeRKHrmpN7cmQD f5Y67NmXhj7gqEJyTfaw1s7nCAP4QdVB4xH+jTttasGgbTR8nK/InP1DvI6tuA2VH2Ke F37XXsxte58K5m7Coe++yKClbnKNl0xEj+ZgY45xOetxdCM8epyEYvLUD28q7+mhj+Np 4rCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751286379; x=1751891179; 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=TF8+H+tG/G3OzaaGoVLqqHig0GnVcUWuhH7TTeraooM=; b=JLbe83PhIQUPQSiDNnu4gTCUPoklr1HbyCxXOiJ2cXGoUTW5+uY+xxJULv7pVA2L1Y UWgDnLfje58v0XQMnmXmhX2Ez/vjWsdrA6N+Qw1AxDUNR2Iy5RIL3AORCT0Xa7EFC29f jFr1yTSEqzJi1fycRtQrqBGhruPkvgnu+YqXO96xreU+ShMHlnDXLNxSbpHhjLqPgRPD XkwL846pqcsrha+AMjZby/On4sVx78M61byrxqkBch4yMxM/MObFT6ffP2ZdQTq/48lM 9GpePihNZ2V+62/07EergtfytYXpbVC2fxkxURTFHZbf8pFdGn8uv0iqZ03eqBGJQKb/ scCQ== X-Forwarded-Encrypted: i=1; AJvYcCUoF/Zu1UZ0ggv+gH8t7qHyQ8pgss+zMe7WIa6JefWBdx6FS0+oZi/0hJnBMRxj3dRvKm9t81I=@dpdk.org X-Gm-Message-State: AOJu0YzPOCzcSLlhk/erpf8IM4d/XzmEElF7tuV5Oybkjvjx/fyU+lmg c7UWzj1UFrjhfuOevHqjHRJqKbrRjNvI6wJFQRw9tlFPeF8OXTHFG/sm X-Gm-Gg: ASbGncv4J4F1PE+SCJyz3wN8ZfLZBglSLf9uuqGWrgm1Lu0jG1GIvqFiuyQiFxt5s7K WV1sEmtV0c7ecEJ1qjXC2rtsT3ESGgGRohYH1l5mpT6rCuwyXKNx1P/QQ8z75PDTSlfBfE1xaDy BkXOvYfIfPoi2Fx3mF/3D9mBG+WxE0vHmNGBOweZAZCOuiB37m0iFf8/ge6eHrfLvLOFMJHfxDN 7UvB50slt9suASb4qpHERtbcGjY6i8b+xrjEkDo4esDpJW7rElnt2zsUmLCDA24HiYLZzA5bcTz qxWzFyK+oBsomB7J7vRZ5nZiUSvwsYTonYo370/aIFSJfIvfQTLDzpxxlp7MAsuoaefNLY3v0uw gqQ== X-Google-Smtp-Source: AGHT+IEcchNo5nliRoGF6Z8/rJ8LBOgnIoSifsMRcJ+epLUEAs+ESgB2fbtX8NLT+JFbrY4yLoux2w== X-Received: by 2002:a5d:6409:0:b0:3a4:deb9:8964 with SMTP id ffacd0b85a97d-3a90d69ccd2mr9030283f8f.17.1751286379099; Mon, 30 Jun 2025 05:26:19 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:ded1:f637:68f:c2a6]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-3a892e61fa4sm10330315f8f.97.2025.06.30.05.26.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jun 2025 05:26:18 -0700 (PDT) From: luca.boccassi@gmail.com To: Hengqi Chen Cc: Baoyuan Li , Maxime Coquelin , dpdk stable Subject: patch 'net/virtio: fix check of threshold for Tx freeing' has been queued to stable release 22.11.9 Date: Mon, 30 Jun 2025 13:25:39 +0100 Message-ID: <20250630122556.1133654-9-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250630122556.1133654-1-luca.boccassi@gmail.com> References: <20250612210733.2506558-72-luca.boccassi@gmail.com> <20250630122556.1133654-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 22.11.9 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/02/25. 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/4863a82ac7db22f67294808bc5077b848e057a40 Thanks. Luca Boccassi --- >From 4863a82ac7db22f67294808bc5077b848e057a40 Mon Sep 17 00:00:00 2001 From: Hengqi Chen Date: Mon, 9 Jun 2025 07:23:47 +0000 Subject: [PATCH] net/virtio: fix check of threshold for Tx freeing [ upstream commit 3e3c7f3fa5ac3f2748a4463d87e73eb28024b401 ] Like most drivers, make the fast path of virtio_xmit_cleanup() behave as described by the comments of rte_eth_txconf::tx_free_thresh ([0]): Start freeing Tx buffers if there are less free descriptors than this value. The rationale behind this change is that: * vq->vq_nentries is set during device probe with the queue size specified by vhost backend, this value does not reflect the real nb_tx_desc * the real available tx desc is set to vq->vq_free_cnt via the nb_tx_desc param of rte_eth_tx_queue_setup() API * so `nb_used > vq->vq_nentries - vq->vq_free_thresh` could never be true if say nb_tx_desc=2048, vq->vq_nentries=4096, vq->vq_free_thresh=32, see bug report 1716 ([1]) for details. [0]: https://github.com/DPDK/dpdk/commit/72514b5d5543 [1]: https://bugs.dpdk.org/show_bug.cgi?id=1716 Bugzilla ID: 1716 Fixes: 72514b5d5543 ("ethdev: fix check of threshold for Tx freeing") Signed-off-by: Baoyuan Li Signed-off-by: Hengqi Chen Reviewed-by: Maxime Coquelin --- .mailmap | 3 +++ drivers/net/virtio/virtio_rxtx.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.mailmap b/.mailmap index f53fdf0d85..bda591c1cf 100644 --- a/.mailmap +++ b/.mailmap @@ -150,6 +150,8 @@ Balakrishna Bhamidipati Balasubramanian Manoharan Balazs Nemeth Bao-Long Tran +Baoyuan Li +Bar Neuman Barak Enat Barry Cao Bartosz Staszewski @@ -504,6 +506,7 @@ Hemant Agrawal Heng Ding Hengjian Zhang Heng Jiang +Hengqi Chen Heng Wang Henning Schild Henry Cai diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index c3e686cf0c..66aaeb3c65 100644 --- a/drivers/net/virtio/virtio_rxtx.c +++ b/drivers/net/virtio/virtio_rxtx.c @@ -1870,7 +1870,7 @@ virtio_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) nb_used = virtqueue_nused(vq); - if (likely(nb_used > vq->vq_nentries - vq->vq_free_thresh)) + if (likely(vq->vq_free_cnt < vq->vq_free_thresh)) virtio_xmit_cleanup(vq, nb_used); for (nb_tx = 0; nb_tx < nb_pkts; nb_tx++) { -- 2.47.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-06-30 13:21:22.117954177 +0100 +++ 0009-net-virtio-fix-check-of-threshold-for-Tx-freeing.patch 2025-06-30 13:21:21.747057360 +0100 @@ -1 +1 @@ -From 3e3c7f3fa5ac3f2748a4463d87e73eb28024b401 Mon Sep 17 00:00:00 2001 +From 4863a82ac7db22f67294808bc5077b848e057a40 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 3e3c7f3fa5ac3f2748a4463d87e73eb28024b401 ] + @@ -26 +27,0 @@ -Cc: stable@dpdk.org @@ -32 +33 @@ - .mailmap | 2 ++ + .mailmap | 3 +++ @@ -34 +35 @@ - 2 files changed, 3 insertions(+), 1 deletion(-) + 2 files changed, 4 insertions(+), 1 deletion(-) @@ -37 +38 @@ -index 25a53d06ca..8e898e303e 100644 +index f53fdf0d85..bda591c1cf 100644 @@ -40 +41 @@ -@@ -167,6 +167,7 @@ Balakrishna Bhamidipati +@@ -150,6 +150,8 @@ Balakrishna Bhamidipati @@ -45 +46 @@ - Bar Neuman ++Bar Neuman @@ -47,2 +48,3 @@ - Barbara Skobiej -@@ -552,6 +553,7 @@ Hemant Agrawal + Barry Cao + Bartosz Staszewski +@@ -504,6 +506,7 @@ Hemant Agrawal @@ -57 +59 @@ -index edecd2011f..ab97f03d7d 100644 +index c3e686cf0c..66aaeb3c65 100644 @@ -60 +62 @@ -@@ -1873,7 +1873,7 @@ virtio_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) +@@ -1870,7 +1870,7 @@ virtio_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)