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 35EF6A0C41 for ; Tue, 30 Nov 2021 17:37:39 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2FE15410F7; Tue, 30 Nov 2021 17:37:39 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id 49967410F7 for ; Tue, 30 Nov 2021 17:37:38 +0100 (CET) Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (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 smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 3A3463FFE1 for ; Tue, 30 Nov 2021 16:37:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638290257; bh=wyt3Jg2tPeFMxMMOYx44YeL5FRDi/RcDtLxUZnvmRiE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qRnMIT6z1PG1sjpqVhnx/KRD+3EQfz5i9xyYjyKa9tO/kiBqFVPOQHni5dHjYzH1z IyF+1z1grDyPMvmrAV7RWayitoyVy3kN44K6i8yCR43bIkIpAWaTWmDJlXE+mF2m3Y W9Zy0KNBcE0glOyqVhEDvDInBiBMBsiz/lgKrrdlxIk3U764cVK4YCSVtvXF+F0bf3 gWOx/u26NzHpI80HFFya/SyLyQWQ50MrRslnrfWK+wXg5RsCSGtCHxTGnOsjOrcdvU VZo8twvE2+tdHcF1ByDMvbIxMk91OLko+Da0Cdu+VrT6P62G1vaFFPNwmiLGvfLOcC YC32B6go7xeUw== Received: by mail-ed1-f71.google.com with SMTP id w5-20020a05640234c500b003f1b9ab06d2so5316335edc.13 for ; Tue, 30 Nov 2021 08:37:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wyt3Jg2tPeFMxMMOYx44YeL5FRDi/RcDtLxUZnvmRiE=; b=hKbz2NdC4/oISwyCHgZyD8hSgabxUMzXPHnSDKeH3yKX15JO2pWQOmnYz70TtjsnWH NujzPFQTeEpRP/C1/k8w3BWi2oxasJEa3MkRht32yMBkkggtyjhj490gcjTxFG36/ghr ow3Me7gcAPrBl++LYbZChGZXCOSMwVWfvq+ksdjK6YyXCRLIRAzKRORkizhube9jK0tc eq4QQnwWz2FkUqTUA57iinBB09y3lfYa0x+/j5Hw6M6haJzIa5uYOM1rhSL6u60AUwzc YgO1NVYI7vC9wcr17Dk8agxvYlnPi5BNeUCvQ5VTWJ3/SUCOM7JRUNHjTxGrcIz82DAF 0qdA== X-Gm-Message-State: AOAM532CCi+WWVNhUWUtNc4MBK+/p/y4y+UUBH1i/1RgSQccFDrTY9tf 0NqHIyMIK/3ZxTfVtqy0/fe5Kpc4qEshHoh7I6aRp7Y5QiZWU/gUdN9iBMtvuWpUIhySwfPtE3j lH+t00uOC6DcYfFE+3sQkESeI X-Received: by 2002:a17:907:1c85:: with SMTP id nb5mr207480ejc.502.1638290255524; Tue, 30 Nov 2021 08:37:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJxtWNFOsFxqVvWvzF9DppY+JF8nQAPynW8jXnMg8mTQYJ2Th/XvbfiAVhr8KW81txn30egm6g== X-Received: by 2002:a17:907:1c85:: with SMTP id nb5mr207468ejc.502.1638290255374; Tue, 30 Nov 2021 08:37:35 -0800 (PST) Received: from localhost.localdomain ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id sd28sm10442587ejc.37.2021.11.30.08.37.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 08:37:34 -0800 (PST) From: christian.ehrhardt@canonical.com To: Ivan Ilchenko Cc: Andrew Rybchenko , Maxime Coquelin , dpdk stable Subject: patch 'net/virtio: fix mbuf count on Rx queue setup' has been queued to stable release 19.11.11 Date: Tue, 30 Nov 2021 17:33:51 +0100 Message-Id: <20211130163605.2460997-27-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> References: <20211130163605.2460997-1-christian.ehrhardt@canonical.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 19.11.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before December 10th 2021. 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/9fa5eea192721c30d506a7a41db30efbbf7176b0 Thanks. Christian Ehrhardt --- >From 9fa5eea192721c30d506a7a41db30efbbf7176b0 Mon Sep 17 00:00:00 2001 From: Ivan Ilchenko Date: Fri, 20 Aug 2021 15:47:20 +0300 Subject: [PATCH] net/virtio: fix mbuf count on Rx queue setup [ upstream commit b8d0a27842dc2a90f1bf341d1e5cbf0dfbc7c4e5 ] Rx queue setup finish function may report wrong number of allocated mbufs in case of in-order feature. Fix the function to not ignore allocation error and count only successfully allocated number of buffers. Fixes: e5f456a98d3c ("net/virtio: support in-order Rx and Tx") Signed-off-by: Ivan Ilchenko Signed-off-by: Andrew Rybchenko Reviewed-by: Maxime Coquelin --- drivers/net/virtio/virtio_rxtx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 421e4847e7..b6a89d59e7 100644 --- a/drivers/net/virtio/virtio_rxtx.c +++ b/drivers/net/virtio/virtio_rxtx.c @@ -1040,10 +1040,11 @@ virtio_dev_rx_queue_setup_finish(struct rte_eth_dev *dev, uint16_t queue_idx) if (unlikely(error)) { for (i = 0; i < free_cnt; i++) rte_pktmbuf_free(pkts[i]); + } else { + nbufs += free_cnt; } } - nbufs += free_cnt; vq_update_avail_idx(vq); } } else { -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-30 16:50:07.672013998 +0100 +++ 0027-net-virtio-fix-mbuf-count-on-Rx-queue-setup.patch 2021-11-30 16:50:05.610872209 +0100 @@ -1 +1 @@ -From b8d0a27842dc2a90f1bf341d1e5cbf0dfbc7c4e5 Mon Sep 17 00:00:00 2001 +From 9fa5eea192721c30d506a7a41db30efbbf7176b0 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b8d0a27842dc2a90f1bf341d1e5cbf0dfbc7c4e5 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index d0365ce4bf..8a48fba5cc 100644 +index 421e4847e7..b6a89d59e7 100644 @@ -25 +26 @@ -@@ -768,10 +768,11 @@ virtio_dev_rx_queue_setup_finish(struct rte_eth_dev *dev, uint16_t queue_idx) +@@ -1040,10 +1040,11 @@ virtio_dev_rx_queue_setup_finish(struct rte_eth_dev *dev, uint16_t queue_idx)