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 3BA61428F8 for ; Sun, 9 Apr 2023 17:28:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 319F3427F2; Sun, 9 Apr 2023 17:28:30 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2066.outbound.protection.outlook.com [40.107.243.66]) by mails.dpdk.org (Postfix) with ESMTP id 3E082427F2 for ; Sun, 9 Apr 2023 17:28:29 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WjbccMqleCn/WzqQEFGDGb+U4mb/e3A7qeigPBB+1m/h7tY0j2bqnO2g+4/hjzhG93YbBGYF4YvQdUf6XOLBpe1DcXPyBFxxnJHicombVT9HdSaoy4/AB2B+nose+1ZQBZLKb5Cx79yEwjMQTOdffYPR0JrleYdfGWFQ3U8ykL+Js/IsgNv/J3tE4m3aM2CP67nfDwHvokUyIcDINSJ1lefJVPp/pTKFKoNwfmnCI3s6E/qUq+Uba/lVMSWexBgmpIiiFv3wf9B02Mg6G0S4bYzqARV9msdyzat3Jbhi3E37lXf3zN2g7qIlwWh7M1tJKVmsN5sdpUvRSjSbzrNrRA== 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=UJH32hAWnRBm27ZLQe5Iv6EhCpRpMk8j5NmWUaelGZs=; b=MIIHN7FRV4+R4jPp+kBSz7e5DghJZ1bP1nI7dzIcg6ipfXOWuzFrinNj0fzvWMhbKYYSY1LRsV4T5U+uIgk0v/SWkQ31JTISzXaZK3Z5Hz1T4kuXkTe6DUX7ZCI6Z6HWZ+bX9tTG32+6ID+WC4cYyz2wJ7I04I2umX0aG5jT0NVoxx6OHI+Mlhp2h2aRQ1Pvy/CuReMOACdDtoJGzvtwje4rpMLYEj0g8ILRmwDV3WlaSiwqV7uljquSZSJO4ShzLT4zG110VNp2kdxCYaXedmX2q04CU8tdwUK3PQeBh++LSQjzVuMD+pwSPEL6bEpE1ujICHpxk1X20VYQDpIaJQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=redhat.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject 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=UJH32hAWnRBm27ZLQe5Iv6EhCpRpMk8j5NmWUaelGZs=; b=F1ByKdpQlzja/mlfPD+Y72tu0TZrOxOYT1JUpdEU/m152+1VO/5dCviFIrS0pdWXBfXMQv7TVKsIzKSDrj5sGWG/8nW7USIHaiqTPa6OwL9W7LFCGMaeWJMQyikPBXKQIUBXX3RBF9DgbGmFYm0QVge7sjtc8bran9WEQCNTX5EpBehPJVAD6JcuE9wWwdpN+/Dln6qVLNeYNHlb3DU6mSqsJLibTlvVjhG9RBeYG+oQHNfqhdaqETvwG+l1diA60A0f4DhYqD/WPbycn0tFmWACb/uOF5uNuUgyVXQ4o28R5rfrJ0ssa7Zvr0vFIKUrFLJ1aLiHK9aJgcImjMKJEw== Received: from BN0PR03CA0041.namprd03.prod.outlook.com (2603:10b6:408:e7::16) by PH7PR12MB6467.namprd12.prod.outlook.com (2603:10b6:510:1f5::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37; Sun, 9 Apr 2023 15:28:26 +0000 Received: from BN8NAM11FT110.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e7:cafe::df) by BN0PR03CA0041.outlook.office365.com (2603:10b6:408:e7::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.38 via Frontend Transport; Sun, 9 Apr 2023 15:28:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BN8NAM11FT110.mail.protection.outlook.com (10.13.176.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.23 via Frontend Transport; Sun, 9 Apr 2023 15:28:25 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Sun, 9 Apr 2023 08:28:22 -0700 Received: from nvidia.com (10.126.231.37) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Sun, 9 Apr 2023 08:28:20 -0700 From: Xueming Li To: David Marchand CC: Ferruh Yigit , dpdk stable Subject: patch 'app/testpmd: fix Tx preparation in checksum engine' has been queued to stable release 22.11.2 Date: Sun, 9 Apr 2023 23:23:40 +0800 Message-ID: <20230409152529.5308-33-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230409152529.5308-1-xuemingl@nvidia.com> References: <20230227062349.13764-1-xuemingl@nvidia.com> <20230409152529.5308-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.37] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT110:EE_|PH7PR12MB6467:EE_ X-MS-Office365-Filtering-Correlation-Id: 8e5d2c92-cff8-4ddc-eb5f-08db390f1020 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kq/YY1ZdBwo3/UxINrzOBUYgR9y1n7KU6WLnen8f+NeEMggzyNgJiHhEct8Jia7UXiEDdy1fgipevN9nHLr1sIPoSBh7CoqLupiBIyf5THOoHXZwHIgeNAZWMv5/a01ZjKAr3/1PW/cqKZrWeX8ZPnTaPGbeh6JV59UJ3uH38UOtnoJqePqZn5HQ1w7Ozx8gcL9sRFLecNmpaoPkmmca99KhaFwnzPwB72gvcPUicChOgjvS39BDCWyLlvUoD++Tkpq39p1+A5BX3DNkHmdwg0+AhZ6gho/t0GBjkivrwSdp2PBgS19RQ4A1FnsfUQRf2x3ItYMepzBl/MSbpHNIHTpIf4x5As6EhoUGgtVM6n3zZanEhykSHNmLGZxh1HXbUTRDmBLS55fpqCgkkuvn/SbjThaZWafd4C9RI/v8TbxqTs9cPD92QhNJJezqlVa7w9AYdBkj7lyl5OcgL2+ObctBUiompqyX4a4RFaUMHCMug09H/aBsYL/IIJApKZm2MouNI3IR/I/BLAkfmF6PP5h/IBLCtcnwop1ULXc8evAY5EF2TcVHnxQAMBEUB4mDIuBExvwjy41Hg3GszGXVOdsqhbUrTxYQ5Bo4BbR5vLRPyH+TmDrFw5azvDdXU+JxS7qd3pik235hTKozl0Zqd9ff+fbRaSzCjKhjx3erImjMp69T3aarIKM62+UuyiTgms5O8DBbloumE1U3+5FD8/sDJ/Eoy6tIpmgeu9EvMI+eez586KBGc7hbX0bjLH+AhphXpiQwDcn/i0RtO6ASZExaBbH+ECn120vvP/2bgUc2y24/cixj8azcFvaAiEnqSAPrYtxYEVHe76tNo+7gVg== X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(396003)(39860400002)(376002)(346002)(136003)(451199021)(40470700004)(36840700001)(46966006)(47076005)(8676002)(83380400001)(4326008)(966005)(336012)(186003)(7636003)(54906003)(426003)(55016003)(82310400005)(6666004)(1076003)(53546011)(16526019)(86362001)(2616005)(2906002)(40480700001)(36756003)(36860700001)(7696005)(40460700003)(356005)(5660300002)(41300700001)(6916009)(82740400003)(26005)(316002)(70206006)(8936002)(6286002)(478600001)(70586007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2023 15:28:25.8911 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8e5d2c92-cff8-4ddc-eb5f-08db390f1020 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT110.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6467 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.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/11/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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging/commit/a4141026d791b6521c60a4cf9ad21e9ccf112ff7 Thanks. Xueming Li --- >From a4141026d791b6521c60a4cf9ad21e9ccf112ff7 Mon Sep 17 00:00:00 2001 From: David Marchand Date: Mon, 20 Feb 2023 19:34:54 +0100 Subject: [PATCH] app/testpmd: fix Tx preparation in checksum engine Cc: Xueming Li [ upstream commit 88a0b0f3858bf430616fe2bcac6f3eee05c383f5 ] "unprepared" packets could get to the wire in the retry loop. Split packets freeing in two stages: one for preparation failure, and one for transmission failure. Adjust dropped counter update accordingly. Fixes: 6b520d54ebfe ("app/testpmd: use Tx preparation in checksum engine") Signed-off-by: David Marchand Reviewed-by: Ferruh Yigit --- app/test-pmd/csumonly.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index 1c24598515..90a59e0aa5 100644 --- a/app/test-pmd/csumonly.c +++ b/app/test-pmd/csumonly.c @@ -1168,10 +1168,13 @@ tunnel_update: nb_prep = rte_eth_tx_prepare(fs->tx_port, fs->tx_queue, tx_pkts_burst, nb_rx); - if (nb_prep != nb_rx) + if (nb_prep != nb_rx) { fprintf(stderr, "Preparing packet burst to transmit failed: %s\n", rte_strerror(rte_errno)); + fs->fwd_dropped += (nb_rx - nb_prep); + rte_pktmbuf_free_bulk(&tx_pkts_burst[nb_prep], nb_rx - nb_prep); + } nb_tx = rte_eth_tx_burst(fs->tx_port, fs->tx_queue, tx_pkts_burst, nb_prep); @@ -1179,12 +1182,12 @@ tunnel_update: /* * Retry if necessary */ - if (unlikely(nb_tx < nb_rx) && fs->retry_enabled) { + if (unlikely(nb_tx < nb_prep) && fs->retry_enabled) { retry = 0; - while (nb_tx < nb_rx && retry++ < burst_tx_retry_num) { + while (nb_tx < nb_prep && retry++ < burst_tx_retry_num) { rte_delay_us(burst_tx_delay_time); nb_tx += rte_eth_tx_burst(fs->tx_port, fs->tx_queue, - &tx_pkts_burst[nb_tx], nb_rx - nb_tx); + &tx_pkts_burst[nb_tx], nb_prep - nb_tx); } } fs->tx_packets += nb_tx; @@ -1194,11 +1197,11 @@ tunnel_update: fs->rx_bad_outer_ip_csum += rx_bad_outer_ip_csum; inc_tx_burst_stats(fs, nb_tx); - if (unlikely(nb_tx < nb_rx)) { - fs->fwd_dropped += (nb_rx - nb_tx); + if (unlikely(nb_tx < nb_prep)) { + fs->fwd_dropped += (nb_prep - nb_tx); do { rte_pktmbuf_free(tx_pkts_burst[nb_tx]); - } while (++nb_tx < nb_rx); + } while (++nb_tx < nb_prep); } get_end_cycles(fs, start_tsc); -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-04-09 21:45:39.627227100 +0800 +++ 0032-app-testpmd-fix-Tx-preparation-in-checksum-engine.patch 2023-04-09 21:45:38.619042200 +0800 @@ -1 +1 @@ -From 88a0b0f3858bf430616fe2bcac6f3eee05c383f5 Mon Sep 17 00:00:00 2001 +From a4141026d791b6521c60a4cf9ad21e9ccf112ff7 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 88a0b0f3858bf430616fe2bcac6f3eee05c383f5 ] @@ -13 +15,0 @@ -Cc: stable@dpdk.org