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 8D8B3A034F for ; Wed, 10 Nov 2021 07:37:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 86B9240142; Wed, 10 Nov 2021 07:37:43 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2052.outbound.protection.outlook.com [40.107.237.52]) by mails.dpdk.org (Postfix) with ESMTP id 78DD940683 for ; Wed, 10 Nov 2021 07:37:42 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TizxCnAd6duwq9l0AAeQK9fGlnDdHUn+u3yLVlPySi0hRer/0ZTwTLd5ujTyXIpbIVzhPKdIkuwean10Pfk9NjgNd3FG4VP/gmzDqVHe0bX6FtujpD/0Bvw70BKSt20n3KckTJSb8ZZWICVguhzXDkR0tb8EZ75VRj0ODC9BfcyobDbHi3xxQWRMzk+5rzcskPtqi4YsZdMAeL97eKudu1862/6V4THremTJiNOhwxpKoyshDwMUxkQ5buG65tYQL4vy61HEdlu6D4pPExSUfV43GOOZbiJzaRDx6bxQ0fpiZCPYmw1wAbm+NMR2jd7F3W7YGNQcDbfkRZ9HvDgY2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Lqepi4nMHADBzusUX5Pj3rMEgnEwcZ2cGXNIAN/JVxE=; b=dJXbGZ5UtwdDigaPPwHKGXxdeawtu4UGAd5kxVcmsKocnxXhStEMygmsmt3V6m9uLTBJ0dLGSEkQ5Keg3tuvfAiXhQz+7hZRq+6pUdy0XCgsjfycrXpdFZEEN9STpiB4CPdVfxgzNeHW5KMiJdQW6tlhpWnvA0ESucZXla1sinO9Kf3Y0YT2Ni5733emX1k8I202PzN0RJ9+ZW1sEB/qP+jCg2d5VY44db+NzW8Y8cc9zZIp5zngJew0DgmndBj3Ke2NfsM9mGgNQWKxxJ2kK0MaHdp/tn5dDKAk5YZKiX0DWI//zC92jr33BCuEcpI+7TAyQIoP38gjpOVOG7DG0g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=redhat.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Lqepi4nMHADBzusUX5Pj3rMEgnEwcZ2cGXNIAN/JVxE=; b=fhefUeDm2EcB1ye47NiMdhWaXlFSIkbQreeJgTS9dxGrBQlV2z+ZiqNEU4vcGvfDhfNnBidSqo2jo/71O3t/wo+PpihCl6NUB62nkGGAdCpy1HGprVVfk+MaSHVXsVL6/0XqIhx5IWssThA7A/+ab9AfLoYRCXTTjioru7OLtGtG1hYv82KMcM9AOYWPZ4StpCvfRq9BZ5R3wpOkB7aAK7VmjlXU7bSfFQvdvqkb3kk4wmR2CR9QNsg66/65f/cq/rZuhENeyn3TKdmXa+p0xYUqZLylFWW7vFojYcuxPyVDjOPk6iokyB5TMvnkcQSujCaDe2qKdzOskvV3BaT55A== Received: from DS7PR06CA0004.namprd06.prod.outlook.com (2603:10b6:8:2a::19) by BN6PR1201MB0033.namprd12.prod.outlook.com (2603:10b6:405:54::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11; Wed, 10 Nov 2021 06:37:41 +0000 Received: from DM6NAM11FT053.eop-nam11.prod.protection.outlook.com (2603:10b6:8:2a:cafe::e9) by DS7PR06CA0004.outlook.office365.com (2603:10b6:8:2a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 06:37:41 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT053.mail.protection.outlook.com (10.13.173.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 06:37:40 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:37:38 +0000 From: Xueming Li To: Ivan Ilchenko CC: Luca Boccassi , Andrew Rybchenko , Maxime Coquelin , dpdk stable Date: Wed, 10 Nov 2021 14:28:53 +0800 Message-ID: <20211110063216.2744012-50-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110063216.2744012-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a0911ac1-b034-42a3-f53f-08d9a4149808 X-MS-TrafficTypeDiagnostic: BN6PR1201MB0033: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Kmpu5FZFs5f/zcRSsZL8hQc/ydvFyCT+JYJSn5Ah4r/C+zQq60FMbL6/2NaIgAqPw93yxtsOTmhtfQr7UjoSi54ygPg1Wf7E8jwfXTrBGOXbwGEoXK18GNUUkhE1YL3EVhLi5vxfg4UpUKqUGfzYVxNonjsmIjCjHGtUn82dDQjY3sf6gHSyb0/E/eGgPxpG7SfBYj4UwIMD00/NWufW6lAvvQ9pkRBrAsIxl+PM1+swlRNY+tdpAuu1vLlXLA4qz4Sg7iT5CKaxM3amPqqGbgxztFfloaZmUSP9o8CQPJ+teK2xyqk1SZdIxgQF9igzj7YWbh1UFwyP5CZB5U2tlyG5RKCMNfBTbdstGHBJVYgYWZV/GGtN5gAnDbFNhSdR+RdpN1IFCsz1PeeNmQeGAQf0LGcA4XUk2cc0oh0CJc0nr3MCFADjl7lOR7HZa6vJKkaDSoj3oxD3f9tVcgXVm1ax6FV9aLKYPSa/tW/HuIj6dZGytla8aLzDwyvbkiwxuSb5TtpyxGzioU5/hd5cAapejsdVpTKhyQTnp56Ad+xjduizdHKwnSh/UCFKVc+52V7cayiGnp9Lg+LOvgoD25Jv1o20Ubafd4h0GJwT5DlOMZegLO1fkafmkkJXkZlEM/lAedzlbQ4yGa0bwBx+K6iEzMZWDNvIc372EtcY/dwqaRw8cBqOOwtkl3zZR1Hki22r5jLNAxletPCh2ZoLaWJMEAEZ5PddMW0HTFAHxF2CTOEEJTeNxotLXMG7sAtrnDXzulpx23B1NAkYOny97vdtnkZ3D6jB5YbnwnvAizjJI3YvMnLAeLd0sq3YBTkSKDni8BhtnrIxwWUquV4e0w== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(36840700001)(46966006)(7636003)(6666004)(16526019)(83380400001)(82310400003)(186003)(36756003)(47076005)(426003)(1076003)(8936002)(2906002)(5660300002)(54906003)(70586007)(53546011)(26005)(356005)(316002)(6286002)(966005)(55016002)(508600001)(70206006)(336012)(6916009)(2616005)(8676002)(7696005)(36860700001)(4001150100001)(86362001)(4326008); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:37:40.5531 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a0911ac1-b034-42a3-f53f-08d9a4149808 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT053.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1201MB0033 Subject: [dpdk-stable] patch 'net/virtio: fix mbuf count on Rx queue setup' has been queued to stable release 20.11.4 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.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 11/12/21. 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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/24ae55b075d60fe8e0f4196108238e35c0b49a8f Thanks. Xueming Li --- >From 24ae55b075d60fe8e0f4196108238e35c0b49a8f 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 Cc: Xueming Li [ 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 6cfdfc63c2..b5b99d19f8 100644 --- a/drivers/net/virtio/virtio_rxtx.c +++ b/drivers/net/virtio/virtio_rxtx.c @@ -776,10 +776,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.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:04.290749180 +0800 +++ 0049-net-virtio-fix-mbuf-count-on-Rx-queue-setup.patch 2021-11-10 14:17:01.804079970 +0800 @@ -1 +1 @@ -From b8d0a27842dc2a90f1bf341d1e5cbf0dfbc7c4e5 Mon Sep 17 00:00:00 2001 +From 24ae55b075d60fe8e0f4196108238e35c0b49a8f Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit b8d0a27842dc2a90f1bf341d1e5cbf0dfbc7c4e5 ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org @@ -22 +24 @@ -index d0365ce4bf..8a48fba5cc 100644 +index 6cfdfc63c2..b5b99d19f8 100644 @@ -25 +27 @@ -@@ -768,10 +768,11 @@ virtio_dev_rx_queue_setup_finish(struct rte_eth_dev *dev, uint16_t queue_idx) +@@ -776,10 +776,11 @@ virtio_dev_rx_queue_setup_finish(struct rte_eth_dev *dev, uint16_t queue_idx)