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 664DEA0543 for ; Tue, 21 Jun 2022 10:12:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B235427E9; Tue, 21 Jun 2022 10:12:43 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2057.outbound.protection.outlook.com [40.107.223.57]) by mails.dpdk.org (Postfix) with ESMTP id 62A67427E9 for ; Tue, 21 Jun 2022 10:12:42 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fy/cb6IPQzz+x7mIl6o0UtiJApWPvOOKYnalbl28iJBYaXYLYns324LEVvaFcFNEIZ5XjrXEftsz1xHv3dWiw96bV8QV0UJc+CRdjHipZVqY+kRH3eN3Sf5utsgvZEAlGHY7qml5tJnKlOHhWORn1EVkL6AEoj6KdZo2aihcIKRlsYul1EfNt4uqd1Lc+3bZ0JnhmhNna0h+dVpkdSEcL1PGH64cxa42d5/II84v7qXBItns1x1G+MT954zDlEsNPrKOI7t66onS/E9DHPktn0w2Dog4LoxDFyPSmKkKqTN2X07ON9fPZq4fNPqJ/EaSu4brx6ucMRo33R9ZdXD5Xg== 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=ij4ZQmrSjFfmDmMWIVM5eL/eEKgrcCD3+Yv8ySuo8gc=; b=Uq/xXz5quIPuiePfMVF9HCcxAnr3xELbeKOgSQwvrJz4bStkmhbtP0b1mRs31NPACi6zQ+xmIJsfB9hpAMuqS/dM2K11GcKhg3YmFXcQWOoJ9b41iZR6n3kQ6Otz0RplB+eN6sQt2v8QHzoMbsxSvTeKrfvuoFi8wM8gOfssmWp0bW6F9vOnt5AY9OV8ldAn/YwfANcRS6A5EqGiwJcRfEXKtw3UGSNnSljRiWeJ+MOaEeZ2E+J3FUvomk73DDF/q2xePN8/LhowBB0+QtudEOMRCkDa202B6Mz4xwicxbHYrGStW9Hp0ChnhQzjoFxNaIqbhxXtdOVybB79ap+mew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.236) smtp.rcpttodomain=dpdk.org 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=ij4ZQmrSjFfmDmMWIVM5eL/eEKgrcCD3+Yv8ySuo8gc=; b=aYzlS65vtv++tfhmmuxQSiorFJWAau+1Pxebot5uu42m90tqhuR616I2PBvx+c3CkBUBC+66s5du+eWsLV/rYM7RqWU2dNNSXH567uIcglh7N6n1IgJWhA+9P2pbaW3e/HYbKjtk2tZHrWbF59j+GIbdbIOw3PwQfVtwwSTc+oQZ3xcr/WYKbm8ln9r9W+D4IeU1q5or+INMK3ikmg7DYLxVHCWRRtP7HTYQHwUPspB2BlfsBhD0EYa5Wtt1t3JlUOs9+0/mPAWRP6fpy/LMYO9/DK5V/Sh9tvJzAoi72i/7UVx0WlkTmfArOBOSdgID1vrF1ULfCZtGF97bdd674g== Received: from BN0PR04CA0183.namprd04.prod.outlook.com (2603:10b6:408:e9::8) by DS0PR12MB6485.namprd12.prod.outlook.com (2603:10b6:8:c6::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.15; Tue, 21 Jun 2022 08:12:39 +0000 Received: from BN8NAM11FT043.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e9:cafe::8d) by BN0PR04CA0183.outlook.office365.com (2603:10b6:408:e9::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.16 via Frontend Transport; Tue, 21 Jun 2022 08:12:39 +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 BN8NAM11FT043.mail.protection.outlook.com (10.13.177.218) 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:39 +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:32 +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:31 -0700 From: Xueming Li To: Raja Zidane CC: Matan Azrad , dpdk stable Subject: patch 'app/testpmd: fix packet segment allocation' has been queued to stable release 20.11.6 Date: Tue, 21 Jun 2022 11:02:54 +0300 Message-ID: <20220621080301.2315720-109-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-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit 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: 64c448a9-754d-4970-c1cb-08da535dcf1c X-MS-TrafficTypeDiagnostic: DS0PR12MB6485: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: tYMmwj726sQ8mPXdxxb5sgIGRnU+tEZt+KGO/qbhUNqZI+AgOiDvlvr5By+fOE35zQBNC0pD0FWXTN3PhlPgeMRgqXmO+x1U5kpaSQGwQRY42vdLzob6ikMxHjNoq+8RPDMJ5G41jJWIHOlxP01mtuJS9ngbPeD64R4R2SmdBrxht1jS3wxzJ1UdfcOTPs6iACeF67HtozANi+qXJ3N9P8kKVBCxSF7dDRyV1373rPcumwOkK8SRDng84FUHJwCFJCMwEH4QrIvHifZ+8IKX55KAPQ9XNI8lWY8nqrLrpPGU6IFfI0n0NeVkVY1cVk8Gev9sHaIc3y1PRABjgMJQOxNetxc8Px68YvPj8jRPXgB1R0WC52e5sYk1+lXoIgohVyoR3p0Wf5Q9h51FEa5le56lugtVg8SXyZOD4meilLlrhnzK6eoxGqtJsESijjwl14xKuYcs1Au1J81pqVZHxZoO5PJ/2ImsWFSTj3W79M52WSFNPb9NWFeFpst91Dbq0ZMe7Jxwp0Yj4bU9yOBLQcVN1+avUgHd9+CNrsXiFUZ4u4arO+3YVrlanEAzyw2GnzXk/E0zcUA8jDiB51EwdIdKZWhE5BRbbn0XkV6VXC/z5ZY2x65opDGc8wAFk1I3GH9SG3HY0PzcmGaScGIvsD7Xb/yXekVBCyYPJqao/3l2TCN1+PFQaDrbRGAdRPiRSOwZnTDAKfXw3J9f7mmEEzOYXbVU1LiDAuQFtyhxA1OHiDGEV2ByOLtwlOtszrqMIgSfuAEhCaR9jiz1ARCe1FGKXbEDuCs6X5kBeS9ZVOuvwO0hcm9z4GqJyp2OWA0yrLpm5s0mPcoW69pPDpUWHWvM/eMTo/EMZmT3pXlpv/0= 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)(136003)(346002)(376002)(40470700004)(46966006)(36840700001)(8936002)(336012)(966005)(6286002)(36860700001)(40480700001)(82740400003)(54906003)(6636002)(36756003)(478600001)(40460700003)(6862004)(2616005)(186003)(86362001)(53546011)(83380400001)(8676002)(316002)(426003)(82310400005)(70206006)(16526019)(81166007)(41300700001)(70586007)(5660300002)(6666004)(26005)(55016003)(2906002)(356005)(4326008)(1076003)(47076005)(7696005)(37006003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2022 08:12:39.6460 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 64c448a9-754d-4970-c1cb-08da535dcf1c 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: BN8NAM11FT043.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB6485 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/9c1410c9b0a7741543cc6c22f3b94196d777318b Thanks. Xueming Li --- >From 9c1410c9b0a7741543cc6c22f3b94196d777318b Mon Sep 17 00:00:00 2001 From: Raja Zidane Date: Thu, 2 Jun 2022 15:59:47 +0300 Subject: [PATCH] app/testpmd: fix packet segment allocation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Xueming Li [ upstream commit 1108c33e743f8be81e765165c8b3cf27d57a7220 ] When --mbuf-size cmdline parameter is specified, the segments to scatter packets on are allocated sequentially from these extra memory pools (the mbuf for the first segment is allocated from the first pool, the second one from the second pool, and so on, if segment number is greater then pool’s the mbuf for remaining segments will be allocated from the last valid pool). A bug in comparing segment index with mbuf index caused wrong mapping of one of the segments. Fix the comparison. Fixes: 2befc67ff679 ("app/testpmd: add extended Rx queue setup") Signed-off-by: Raja Zidane Acked-by: Matan Azrad --- app/test-pmd/testpmd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 0e553d19b9..6ecb032c81 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2406,8 +2406,10 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id, { union rte_eth_rxseg rx_useg[MAX_SEGS_BUFFER_SPLIT] = {}; unsigned int i, mp_n; - int ret; + int ret = -1; + if (mbuf_data_size_n < 1) + goto exit; if (rx_pkt_nb_segs <= 1 || (rx_conf->offloads & RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT) == 0) { rx_conf->rx_seg = NULL; @@ -2424,7 +2426,7 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id, * Use last valid pool for the segments with number * exceeding the pool index. */ - mp_n = (i > mbuf_data_size_n) ? mbuf_data_size_n - 1 : i; + mp_n = (i >= mbuf_data_size_n) ? mbuf_data_size_n - 1 : i; mpx = mbuf_pool_find(socket_id, mp_n); /* Handle zero as mbuf data buffer size. */ rx_seg->length = rx_pkt_seg_lengths[i] ? -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-21 15:37:54.023092616 +0800 +++ 0108-app-testpmd-fix-packet-segment-allocation.patch 2022-06-21 15:37:49.224451914 +0800 @@ -1 +1 @@ -From 1108c33e743f8be81e765165c8b3cf27d57a7220 Mon Sep 17 00:00:00 2001 +From 9c1410c9b0a7741543cc6c22f3b94196d777318b Mon Sep 17 00:00:00 2001 @@ -7,0 +8,3 @@ +Cc: Xueming Li + +[ upstream commit 1108c33e743f8be81e765165c8b3cf27d57a7220 ] @@ -21 +23,0 @@ -Cc: stable@dpdk.org @@ -26,2 +28,2 @@ - app/test-pmd/testpmd.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + app/test-pmd/testpmd.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) @@ -30 +32 @@ -index fc1b64b60d..4d51eb9576 100644 +index 0e553d19b9..6ecb032c81 100644 @@ -33 +35,13 @@ -@@ -2671,7 +2671,7 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id, +@@ -2406,8 +2406,10 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id, + { + union rte_eth_rxseg rx_useg[MAX_SEGS_BUFFER_SPLIT] = {}; + unsigned int i, mp_n; +- int ret; ++ int ret = -1; + ++ if (mbuf_data_size_n < 1) ++ goto exit; + if (rx_pkt_nb_segs <= 1 || + (rx_conf->offloads & RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT) == 0) { + rx_conf->rx_seg = NULL; +@@ -2424,7 +2426,7 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,