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 0ED42A034F for ; Wed, 10 Nov 2021 07:42:13 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 00E424014D; Wed, 10 Nov 2021 07:42:12 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2081.outbound.protection.outlook.com [40.107.92.81]) by mails.dpdk.org (Postfix) with ESMTP id 21854410F2 for ; Wed, 10 Nov 2021 07:42:11 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CXAyHT5MVbguyh9WDvzwlKA+ycj+m4e0Y9+LnUmiAmzBhe/XxB6E7SWWcbXwxktuk0YB9vBmqX8daovHaE4YcmCPUBm3iRvUCSDBxvzpiIjfOZpHxgl9vAPfqhAnL4A+D7NsxeRsPBMCBsplE39mLWv2xvD/YG+qt8q6LqgLD7E3khCQxqQQvX+EuMFrwcy0Qw9DuqbYe8VQwz1exS0+5HIFg+SZ42yToQJ6YE3p01w8p+zrXqo4hHQgkMx9GPUvYH1RGYQK0UGcO5WE4zGmEEpcf6JTg5iDDjI59B+oRL90YBchZa7QkgY259RfqABjOdBhtYGKZzs6y+MPWyu0cw== 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=epI126T7u9WJCr0e3ZgXpoNAt3r9TrRJsi+PWKJE7jI=; b=SnTHO3lwzkyJxZwnruWIHsCg7IZQVZuyL1rbASoFBUj9sHPsZ7gN3TdAH2b/EWxKvRPmNwbh+/oxIaAXbeFaMe1zYlerwf56xFuykMIsPE7GtwgcWhLMOz3TqO6RTPPmhBie24KXDW56AVg1d/1L49kwr0aoRefHL6//NWXlyvoFiIlfLVhMq9NsUDBVdVIj/h7Bi289PF5jZYaQDHr9esF8XBhuxXUpPF2bEgVuFI8iD4QSRH5TLF6Y1lzakOpZE2M1JMUcv8k+5L0AfwUgxdUU/CgUczJI6h7CSl4eDXRPHMMOnESMidHyyrNTMrh8dTTJ6W5mEm8A7C7lzgjfFA== 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=epI126T7u9WJCr0e3ZgXpoNAt3r9TrRJsi+PWKJE7jI=; b=jppNNgTh0mQY/bRQgE2g1IhEEEHDnMQuLef55UlsVjDPw4MqgES39WtvhNjy1rh3bjHWmVsq0JTmJIIYftJiW80BR6SLKIyv72qEOp9yz6ULXTgqyn2n9V6/rwRDJ6n5LnnaMNoT3V1mJRTMOoi3aBVshJ2cssPLiluUR35fzTGdNWHn9aM8Jxk99XJzwoIVYugG5rq6oFYrKSy07w+YLl8/GeQyiIlhVzjpBU2WXpUbKuQTGcPn8M/jQ7lwzxSgsdn+yYDRgkZujgvU8oJWww9iGT8iF8Xs95E8uK7hCsV62fYjRROq4Xk2/LdIQZTt5FGf5nSTV0q2s3BZ4bfzeg== Received: from DS7PR03CA0015.namprd03.prod.outlook.com (2603:10b6:5:3b8::20) by DM6PR12MB3977.namprd12.prod.outlook.com (2603:10b6:5:1ce::22) 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:42:09 +0000 Received: from DM6NAM11FT032.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3b8:cafe::8a) by DS7PR03CA0015.outlook.office365.com (2603:10b6:5:3b8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.10 via Frontend Transport; Wed, 10 Nov 2021 06:42:09 +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 DM6NAM11FT032.mail.protection.outlook.com (10.13.173.93) 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:42:09 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:42:05 +0000 From: Xueming Li To: Ivan Ilchenko CC: Luca Boccassi , Andrew Rybchenko , Maxime Coquelin , dpdk stable Date: Wed, 10 Nov 2021 14:29:33 +0800 Message-ID: <20211110063216.2744012-90-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.6] 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: 3f580e63-cb17-40f2-ec83-08d9a4153836 X-MS-TrafficTypeDiagnostic: DM6PR12MB3977: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: d19OMdn02Ti3j1oyyCThNAPm/NGS6NlRsukc3vw5GVRV7CpZRn4c9Yhcm8eZZswCEfmj8O5OW39GbMK2/UdYeq2hu5FzOsZfW+p9pkUFM5ZddKOTLpb8rIt/bpiy74iJku83aeggUjnhhKXp8/gajOujHHUeJAlvVY5i6mcf1J11aWYa6zFDOZr+AuhVYeghEt6uZ2D9/4J/1HzQ73JZlGUbItJGP1+IfEIhXslwH4fmPcnWGH/QZbg7tWAXmmB5nEng7p35eysg3TTXYkft6pAsqzSVHXXGzN/qc5/0mzFYBxsF/qybbVS33xGf1BjxUJzXtKFtAgkp/lof9dFGtkyIOz+YuKNPUcKmEDRtesflZUF7XS4VDXBoB0R4nykcSEXtAjD40upHoQoq9vPinOwsmZrSgUx+fZQtf2rQAtMvwHT961oTvdSVM2kWHypQl3pUDmm460eue+g7Gdwl4RPZooNbp0W806wwYglPuckDgpPdiihDQfTH82lDJin/rVvn4ZYs1EBBIssFHtki+0/GHCWmuXm4SuMARmtH2ysnDBw3B7bmA/6GSsO2+VG3AMxbGMysJm9Blz802fMTZ1+uRNu7RMJkeul0vsDF2tHaIGU8pPsZcZ1RJaEqwB1RRBtGyEDucogrPkxl6KwhONQKCve3se867R6ygLNweqsDF3GnKixSStW/smPAOcsF2lQobeEYyOnhNl9i41T65JWOqA6x1gmFZ4F9zaSExBRt24ukIQ2tpRwa5zia3JTKoviYs4eWE0wItQQ1xiz0Dh6XveLFcrp6tutXXfw2K9ANDXF3J8RQLUn+y5eanJwpBUq6dVclSTsA69XwzL3nlQ== 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)(46966006)(36840700001)(2616005)(16526019)(186003)(7696005)(508600001)(6286002)(83380400001)(426003)(36756003)(70586007)(336012)(4001150100001)(8936002)(4326008)(1076003)(70206006)(966005)(26005)(316002)(2906002)(86362001)(47076005)(5660300002)(7636003)(356005)(54906003)(6916009)(36860700001)(53546011)(55016002)(82310400003)(6666004)(8676002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:42:09.2858 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3f580e63-cb17-40f2-ec83-08d9a4153836 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: DM6NAM11FT032.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3977 Subject: [dpdk-stable] patch 'net/virtio: fix Tx cleanup functions to have same signature' 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/0da178c94e72f8a8a9e5673e3d66929b68d398cf Thanks. Xueming Li --- >From 0da178c94e72f8a8a9e5673e3d66929b68d398cf Mon Sep 17 00:00:00 2001 From: Ivan Ilchenko Date: Wed, 15 Sep 2021 12:19:41 +0300 Subject: [PATCH] net/virtio: fix Tx cleanup functions to have same signature Cc: Xueming Li [ upstream commit e2ca43a35ea60e6194a72d37c964d52827fcff71 ] There is a family of cleanup from completed transmits functions. Fix packed virtqueues cleanup functions to have the same signature as split virtqueues have. This lets all functions of the family to match the same callback prototype. Fixes: 892dc798fa9c ("net/virtio: implement Tx path for packed queues") Signed-off-by: Ivan Ilchenko Signed-off-by: Andrew Rybchenko Reviewed-by: Maxime Coquelin --- drivers/net/virtio/virtqueue.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h index 42c4c9882f..c169518ec8 100644 --- a/drivers/net/virtio/virtqueue.h +++ b/drivers/net/virtio/virtqueue.h @@ -828,25 +828,26 @@ vq_ring_free_id_packed(struct virtqueue *vq, uint16_t id) } static void -virtio_xmit_cleanup_inorder_packed(struct virtqueue *vq, int num) +virtio_xmit_cleanup_inorder_packed(struct virtqueue *vq, uint16_t num) { uint16_t used_idx, id, curr_id, free_cnt = 0; uint16_t size = vq->vq_nentries; struct vring_packed_desc *desc = vq->vq_packed.ring.desc; struct vq_desc_extra *dxp; + int nb = num; used_idx = vq->vq_used_cons_idx; /* desc_is_used has a load-acquire or rte_io_rmb inside * and wait for used desc in virtqueue. */ - while (num > 0 && desc_is_used(&desc[used_idx], vq)) { + while (nb > 0 && desc_is_used(&desc[used_idx], vq)) { id = desc[used_idx].id; do { curr_id = used_idx; dxp = &vq->vq_descx[used_idx]; used_idx += dxp->ndescs; free_cnt += dxp->ndescs; - num -= dxp->ndescs; + nb -= dxp->ndescs; if (used_idx >= size) { used_idx -= size; vq->vq_packed.used_wrap_counter ^= 1; @@ -862,7 +863,7 @@ virtio_xmit_cleanup_inorder_packed(struct virtqueue *vq, int num) } static void -virtio_xmit_cleanup_normal_packed(struct virtqueue *vq, int num) +virtio_xmit_cleanup_normal_packed(struct virtqueue *vq, uint16_t num) { uint16_t used_idx, id; uint16_t size = vq->vq_nentries; @@ -892,7 +893,7 @@ virtio_xmit_cleanup_normal_packed(struct virtqueue *vq, int num) /* Cleanup from completed transmits. */ static inline void -virtio_xmit_cleanup_packed(struct virtqueue *vq, int num, int in_order) +virtio_xmit_cleanup_packed(struct virtqueue *vq, uint16_t num, int in_order) { if (in_order) virtio_xmit_cleanup_inorder_packed(vq, num); -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:05.991845129 +0800 +++ 0089-net-virtio-fix-Tx-cleanup-functions-to-have-same-sig.patch 2021-11-10 14:17:01.847412948 +0800 @@ -1 +1 @@ -From e2ca43a35ea60e6194a72d37c964d52827fcff71 Mon Sep 17 00:00:00 2001 +From 0da178c94e72f8a8a9e5673e3d66929b68d398cf Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit e2ca43a35ea60e6194a72d37c964d52827fcff71 ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org @@ -22 +24 @@ -index 03957b2bd0..d0c48ca415 100644 +index 42c4c9882f..c169518ec8 100644 @@ -25 +27 @@ -@@ -803,25 +803,26 @@ vq_ring_free_id_packed(struct virtqueue *vq, uint16_t id) +@@ -828,25 +828,26 @@ vq_ring_free_id_packed(struct virtqueue *vq, uint16_t id) @@ -55 +57 @@ -@@ -837,7 +838,7 @@ virtio_xmit_cleanup_inorder_packed(struct virtqueue *vq, int num) +@@ -862,7 +863,7 @@ virtio_xmit_cleanup_inorder_packed(struct virtqueue *vq, int num) @@ -64 +66 @@ -@@ -867,7 +868,7 @@ virtio_xmit_cleanup_normal_packed(struct virtqueue *vq, int num) +@@ -892,7 +893,7 @@ virtio_xmit_cleanup_normal_packed(struct virtqueue *vq, int num)