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 6666DA0543 for ; Tue, 21 Jun 2022 10:12:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 88E07427E9; Tue, 21 Jun 2022 10:12:17 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2048.outbound.protection.outlook.com [40.107.92.48]) by mails.dpdk.org (Postfix) with ESMTP id 2F73D427EE for ; Tue, 21 Jun 2022 10:12:16 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DNTukwCQJhnLHc8kIfdAOLI6onW3zlxIl23JPF33BTMa1mxy6JHM9XuTLEsvkvCbjPqL5FgIDV1l2qzF/bbj9E+lvF4/VnLwpWetiGeTAu9NCeMVhVfKicT54dD4g42Yh+RoGIaGRGfnqFS6MiKCJILu03/iv+wXE6BkBlg9MiFCWow47HZDHDq8ZdMHcOlukXpLvi60JCYHrvDSLsDs3g4nxy7cdn+0z7SGeoEn6fC3i0fpRqEKxQBoOOz6vIK+FfjgOiIi698xC97+d3PcFJeVABx/heaIoQMYCRqDevC9XW2qEUmvhI/oB39191A7xcG99zHQH3bQlU/H1mPVCA== 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=HRFYdDL/o/DBxfZrXI71fzMz8PxtZebL6T5Ux9gBviY=; b=hUz5zKM+tKLCe8rTYjmx9go7m29cLsotqXcYH8BxOqpKg32Nz/3uMa9elDvMri3Hy2GnfOnanouMmZHaB2Qpcg6qfVWsi1hoDpu5rgVTgAlFBGoLl8zKJKnzseVEolmgz4ejOMYRkXSrnwv1zTsHYHJCHOMf7pr3MdWt7VX5ASpgPW8XdFKOWE603+ONVJbTUdYhZT1gnl1iEzETbHMVHIXjrX1YSYUgDhVo9ZdsisJ0ea8AlLaVsvqejtisCNUkTe0wgqArvXCgiwdlm9e1wqUnVMNDk1ER0CKg4abWyu8Akvrdx2653BkFtG1MzAe1v3SUxYi5btWopCj9tArUGg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.236) smtp.rcpttodomain=intel.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=HRFYdDL/o/DBxfZrXI71fzMz8PxtZebL6T5Ux9gBviY=; b=rud2Ug1mNhNwz1ZwqaZ4zov0dfBcbuhoVxDhbPjxQLN5u45lpZ+dw3KBx4577dwu+GfW2x2QmHHrWPNZpfVaRCHd4Mlj+1E+XSzHfoMEvs/sd+IgWoGhwUZFU4tjxMTyHjSFoQLbqZfUnseWFTTFsmMEGmOfqoh2oz1Mk+n6sgLPJ1s9fm4ViY9utFQVlforfkJQglWFeYsdGdGm2jk4AAkls+E58Fi9AsmRgQdWQ/VOgqojEVKjHf4z41gI9byIBpdw8CnPX7AOW7AZnb34yFEN4yOfDyoGElF/RD46AplJ3D3SxCPnnbvctslt2SQEvoWH9JN/3jd5dNRF5mkFUg== Received: from BN1PR13CA0004.namprd13.prod.outlook.com (2603:10b6:408:e2::9) by SN6PR12MB2622.namprd12.prod.outlook.com (2603:10b6:805:72::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.19; Tue, 21 Jun 2022 08:12:14 +0000 Received: from BN8NAM11FT068.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e2:cafe::8d) by BN1PR13CA0004.outlook.office365.com (2603:10b6:408:e2::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15 via Frontend Transport; Tue, 21 Jun 2022 08:12:14 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.236) 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 12.22.5.236 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.236; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.236) by BN8NAM11FT068.mail.protection.outlook.com (10.13.177.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5353.14 via Frontend Transport; Tue, 21 Jun 2022 08:12:13 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL109.nvidia.com (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 21 Jun 2022 08:12:09 +0000 Received: from nvidia.com (10.126.230.35) 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.22; Tue, 21 Jun 2022 01:12:07 -0700 From: Xueming Li To: Chengwen Feng CC: Bruce Richardson , Kevin Laatz , dpdk stable Subject: patch 'examples/dma: fix Tx drop statistics' has been queued to stable release 20.11.6 Date: Tue, 21 Jun 2022 11:02:50 +0300 Message-ID: <20220621080301.2315720-105-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220621080301.2315720-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4a37f5aa-c6e7-4778-2500-08da535dbfca X-MS-TrafficTypeDiagnostic: SN6PR12MB2622:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: d1ZXfzIW7oYqXAOaVVNHNsXlBvE0dmfrhQ3Eu42j6UAW5ZPiKqEMm2z7SQky6TQQfMc9qIjCdrXTUnZz30VYqcd0PxMqeGwga7QLUxNE7704a3muv2S2NiiKnxnnpYvxSYydSvZBT6Or+IHwYRHkHS/SsrXYCpLAeQY5sP8oIFOjAfPgbPsIePKmeXIEZxUeHzog+alARvrnuvBBfy+BffoRHYFVATwMqX7wTsfE/L66OrY+wn5tZVMGqGwmuCWiuO/NTsIpBEPdYkTvxZayocxmG0MBHAeGOKDS6Ch9HcgL/J0M2uZfkOn368nwX/VePwSIYQ6Npfz4QgAdTwVBmB4G4KudJc8seU0FasnVDnSqSF2IcomoCP4w12Hiy1pXen4dZvUdXxLuEBekLcYX2zXuT1gWsJXObQ3aOOWpVwzA+3U2YkgJR6bvV0ol4nRS9awM7O+3NwAH6BhXzKpXPaNkPwGf+5fSUwfGwF91FETbRRTJiqe86fjJErF3GTay4eD5AOdfGDNRuU0OIWCGL89SOm987h9xdipG6ZOrXluv2VtGtzdQ+p5DJpkZE4QtPDrTD1CqgQoCGCXjtCnp3opBMV7tW2QrU5N0uTAPn9vWfgEn8Qx9ezlQZZ4mqy0GMv4KdYMamXR02RuyalTWdPs5ZueGw4Ydsns6RapYgWT2V0Dwr7Q3ba7AXI7B9lAdzqs4FACtwnWQJDvlQjm976ZBMBEvkNDp3va/afPCNzDpvbLR0yxSpcEcPbHB3jugjp96w/MM1ki5vSkpeb2R5RkzvkOEKVdg3ewO+pDHBFNCdzhoqidSwuehFgrmi4JENjGRxkwhyvrdmlK8StN365acWNdmyH1ypMjSekvDnD4= X-Forefront-Antispam-Report: CIP:12.22.5.236; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(396003)(39860400002)(376002)(136003)(346002)(46966006)(36840700001)(40470700004)(53546011)(55016003)(70586007)(36756003)(82310400005)(8936002)(70206006)(6916009)(8676002)(4326008)(54906003)(7696005)(2906002)(6666004)(40480700001)(41300700001)(5660300002)(966005)(81166007)(478600001)(356005)(86362001)(316002)(47076005)(82740400003)(426003)(83380400001)(40460700003)(336012)(26005)(6286002)(1076003)(16526019)(36860700001)(186003)(2616005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2022 08:12:13.9387 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4a37f5aa-c6e7-4778-2500-08da535dbfca X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.236]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT068.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR12MB2622 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 20.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/23/22. 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/14a272633109c98fe5c1fdf47385c45b974561e9 Thanks. Xueming Li --- >From 14a272633109c98fe5c1fdf47385c45b974561e9 Mon Sep 17 00:00:00 2001 From: Chengwen Feng Date: Sun, 24 Apr 2022 14:07:40 +0800 Subject: [PATCH] examples/dma: fix Tx drop statistics Cc: Xueming Li [ upstream commit 7d3cb76fba200e1649842319facb932d9a05467d ] The Tx drop statistic was designed to be collected by rte_eth_dev_tx_buffer mechanism, but the application uses rte_eth_tx_burst to send packets and this lead the Tx drop statistic was not collected. This patch removes rte_eth_dev_tx_buffer mechanism to fix the problem. Fixes: 632bcd9b5d4f ("examples/ioat: print statistics") Signed-off-by: Chengwen Feng Acked-by: Bruce Richardson Acked-by: Kevin Laatz --- examples/ioat/ioatfwd.c | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/examples/ioat/ioatfwd.c b/examples/ioat/ioatfwd.c index 4bf37642dc..e30df8118a 100644 --- a/examples/ioat/ioatfwd.c +++ b/examples/ioat/ioatfwd.c @@ -103,7 +103,6 @@ static volatile bool force_quit; /* ethernet addresses of ports */ static struct rte_ether_addr ioat_ports_eth_addr[RTE_MAX_ETHPORTS]; -static struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS]; struct rte_mempool *ioat_pktmbuf_pool; /* Print out statistics for one port. */ @@ -478,11 +477,14 @@ ioat_tx_port(struct rxtx_port_config *tx_config) port_statistics.tx[tx_config->rxtx_port] += nb_tx; - /* Free any unsent packets. */ - if (unlikely(nb_tx < nb_dq)) + if (unlikely(nb_tx < nb_dq)) { + port_statistics.tx_dropped[tx_config->rxtx_port] += + (nb_dq - nb_tx); + /* Free any unsent packets. */ rte_mempool_put_bulk(ioat_pktmbuf_pool, (void *)&mbufs_dst[nb_tx], nb_dq - nb_tx); + } } } @@ -873,25 +875,6 @@ port_init(uint16_t portid, struct rte_mempool *mbuf_pool, uint16_t nb_queues) "rte_eth_tx_queue_setup:err=%d,port=%u\n", ret, portid); - /* Initialize TX buffers */ - tx_buffer[portid] = rte_zmalloc_socket("tx_buffer", - RTE_ETH_TX_BUFFER_SIZE(MAX_PKT_BURST), 0, - rte_eth_dev_socket_id(portid)); - if (tx_buffer[portid] == NULL) - rte_exit(EXIT_FAILURE, - "Cannot allocate buffer for tx on port %u\n", - portid); - - rte_eth_tx_buffer_init(tx_buffer[portid], MAX_PKT_BURST); - - ret = rte_eth_tx_buffer_set_err_callback(tx_buffer[portid], - rte_eth_tx_buffer_count_callback, - &port_statistics.tx_dropped[portid]); - if (ret < 0) - rte_exit(EXIT_FAILURE, - "Cannot set error callback for tx buffer on port %u\n", - portid); - /* Start device */ ret = rte_eth_dev_start(portid); if (ret < 0) -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-21 15:37:53.863814577 +0800 +++ 0104-examples-dma-fix-Tx-drop-statistics.patch 2022-06-21 15:37:49.221118569 +0800 @@ -1 +1 @@ -From 7d3cb76fba200e1649842319facb932d9a05467d Mon Sep 17 00:00:00 2001 +From 14a272633109c98fe5c1fdf47385c45b974561e9 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 7d3cb76fba200e1649842319facb932d9a05467d ] @@ -14 +16,0 @@ -Cc: stable@dpdk.org @@ -20 +22 @@ - examples/dma/dmafwd.c | 27 +++++---------------------- + examples/ioat/ioatfwd.c | 27 +++++---------------------- @@ -23,5 +25,5 @@ -diff --git a/examples/dma/dmafwd.c b/examples/dma/dmafwd.c -index a03ca05129..dd576bcf77 100644 ---- a/examples/dma/dmafwd.c -+++ b/examples/dma/dmafwd.c -@@ -122,7 +122,6 @@ static uint32_t max_frame_size; +diff --git a/examples/ioat/ioatfwd.c b/examples/ioat/ioatfwd.c +index 4bf37642dc..e30df8118a 100644 +--- a/examples/ioat/ioatfwd.c ++++ b/examples/ioat/ioatfwd.c +@@ -103,7 +103,6 @@ static volatile bool force_quit; @@ -29 +31 @@ - static struct rte_ether_addr dma_ports_eth_addr[RTE_MAX_ETHPORTS]; + static struct rte_ether_addr ioat_ports_eth_addr[RTE_MAX_ETHPORTS]; @@ -32 +34 @@ - struct rte_mempool *dma_pktmbuf_pool; + struct rte_mempool *ioat_pktmbuf_pool; @@ -35 +37 @@ -@@ -484,10 +483,13 @@ dma_tx_port(struct rxtx_port_config *tx_config) +@@ -478,11 +477,14 @@ ioat_tx_port(struct rxtx_port_config *tx_config) @@ -45,2 +47,3 @@ - rte_mempool_put_bulk(dma_pktmbuf_pool, - (void *)&mbufs[nb_tx], nb_dq - nb_tx); + rte_mempool_put_bulk(ioat_pktmbuf_pool, + (void *)&mbufs_dst[nb_tx], + nb_dq - nb_tx); @@ -50,2 +53,2 @@ - /* >8 End of transmitting packets from dmadev. */ -@@ -970,25 +972,6 @@ port_init(uint16_t portid, struct rte_mempool *mbuf_pool, uint16_t nb_queues) + +@@ -873,25 +875,6 @@ port_init(uint16_t portid, struct rte_mempool *mbuf_pool, uint16_t nb_queues) @@ -74 +77 @@ - /* Start device. 8< */ + /* Start device */