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 E335A428F8 for ; Sun, 9 Apr 2023 17:34:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DD62E42BFE; Sun, 9 Apr 2023 17:34:11 +0200 (CEST) Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2063.outbound.protection.outlook.com [40.107.100.63]) by mails.dpdk.org (Postfix) with ESMTP id A20EC40EDE for ; Sun, 9 Apr 2023 17:34:10 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mffhBDgxvAD1wBfo4g6c15MXt2rpguRZJ5x1wMZePyREPEch7SE46UB0rdb5nI6tlSqy1hRnAgsxzhe/8p+1sXtDZDsqhX+NgKlWX5lRM5EBE1vHOKT5e6bGIQi+Q2gMraKgMgN8nfPCfFGPh3ibtD8HrK7stWGqPPrLz6yEzn6vicmTBTnt0g3F+SWMT5X1y4FyTub6pBfgwx9qeGhWcaHyURgj2ZJo8OTpEEUH8qokINFiH/4wGu0JsMAixNzO5sJWj1370pgqm6e9HnuB08VdNeEfNQKXxqxyJHskp+WL8ZyGjOrjD4CnlUjFUM1ZLPciUehkQ3HzwdMFPAoHhw== 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=tANpTeiJzm34fe0/3+pdJeFoLjbM5G5tZVJrYCm79bI=; b=UTMji0uTEtoSFGR7AJkdgVBa6c/ivNum1YSQQwYtirAw52TiOKsGynm7M/lC+clYVuU9N7JM3YN5Q7E7chsOQ6MHSTd4znpNQpgEvizUGsBtXkMNfPgT4MXVlJy2z8rEBEQ7ssu57c06XcUFxuPIXCrHO1esO87KBsUJgCjjN1a4SnJ/O1Vifp0Iysm0JCesrS9W4wuq9fS1uxwqmY6iSd3hz8h+yo4ZZv4Xi3fP90LSj3QP+p0wP5Ly11psgVFN7zwf4KUazX16mBEzbr7G/TpdZF50YZFf8ZaOub/1NuqePqNIsu08WPNg2Is6dw1zdvNZAh9X9xRet67z1pHcMQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=gmail.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=tANpTeiJzm34fe0/3+pdJeFoLjbM5G5tZVJrYCm79bI=; b=pHTwE4cN9XCnnNNBTXdDVX6XXJNvtOUA7KnZG8vGTY8CnpQCquQo4xWECpIRYLpHn/YC3vbW3e+CMe07S68jW2AeixTPG6nfHO0DtajGAqsVfrWOhqXNtBg3iwwodO6VmQWpyXS+awt3iD8AD9gQXMKyJ4MZ6n0Xo2dS71gibQf/GjRywPFwNvOhmdt4rqh2VhWpMY3NG/8y7g6+C/o2mNHAIBcaXm8MB/9etGyV4n/LnEdgCpga1f+QmyAqyeASGf1W0BJWpzKHzZz3FahHyaqHRlG3xjiKinNvvcPRMV2PawBne3hUzjmessGKw4Y+XAlEcbLxUk4pt5O2DLCIxA== Received: from BN7PR06CA0061.namprd06.prod.outlook.com (2603:10b6:408:34::38) by SN7PR12MB8130.namprd12.prod.outlook.com (2603:10b6:806:32e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.36; Sun, 9 Apr 2023 15:34:08 +0000 Received: from BN8NAM11FT094.eop-nam11.prod.protection.outlook.com (2603:10b6:408:34:cafe::89) by BN7PR06CA0061.outlook.office365.com (2603:10b6:408:34::38) 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:34:08 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by BN8NAM11FT094.mail.protection.outlook.com (10.13.176.131) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.20 via Frontend Transport; Sun, 9 Apr 2023 15:34:08 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) 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:33:55 -0700 Received: from nvidia.com (10.126.230.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:33:54 -0700 From: Xueming Li To: Zhuobin Huang CC: David Marchand , dpdk stable Subject: patch 'test: fix segment length in packet generator' has been queued to stable release 22.11.2 Date: Sun, 9 Apr 2023 23:24:46 +0800 Message-ID: <20230409152529.5308-99-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.230.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: BN8NAM11FT094:EE_|SN7PR12MB8130:EE_ X-MS-Office365-Filtering-Correlation-Id: 8e7b0973-d211-4e7a-bbcb-08db390fdc4c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: M/Wt+CqjmfVFqy1s0bEBki1DhWYnsl37DHzVRQ0P8HKPvwiPtimxPwza7470jOrXRk4/M7NVc2RnfCMRe6azFJZNWRnc+UMZqsXCA6SnQU1Kh4K2sjfcuNBRmn2kQGUcsKigc1GTYfI9vSZ08Fgh3hBsCr0/u8qsuMQLpoBhV5MgkbMeTt9ENs6mmxIpnchhIJD79ps5QwMYoa+zZFGFX+NrscHmDPEZZQi0ylubimfMmUgJoTtoT26J/ixamxTVWc9b1TkZe29rbDwuLj801DJhR910mBli6GLUFp0zzfAmII1ypL63MxCPgAA4HFClWcpwSUXM6i+skcvnU/u5mDE7Se4T3UeQrZDnoqo3VRb6RiWrPLqhuFQOZlWsZHZdsxy1LOpbCzySeq48JAA7LVpunxWyuvJ2TfjEJfie+doP9ElYQHTcrah7UH066jkRBSb7pv/L1b77LsgjDnYK6txxSMfB14au6Vr93NWQXE1LZ9pSqwW2edZX1U1LoLmlWr3ZLnGnz4E88jjq3NmHmgWIepTFmC05Ct/iIO9mRNxE++C18WmbaEd/nDNB0GyVoI/AcJFxEuQS8C94fluvxmDr+iFufejUc+lBu+8Nw5cuPt09892zPulEpOFTJqkRYop4F9AiqhhUgUdVwqhI1KsRDWQiQ1Zzzx7hZUjLHCDuQLgZxybB8GdGPrz23OdB/Im78YX/zZOWpxhPcn7R6C1Xr2dzbwGg2eDPFjIp7qwxc3K/WBluUIAyY1p0JX80vEh09wAcylFIWvonIGK7NC+3+hOecx+bf3EhOyEkwkCoc07iI5OHbmowovNksFrJ282Ay7oj5AOIRM//vCGdKA== X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(346002)(376002)(136003)(396003)(39860400002)(451199021)(46966006)(36840700001)(40470700004)(7636003)(5660300002)(356005)(41300700001)(40480700001)(55016003)(478600001)(82310400005)(2616005)(36860700001)(8676002)(8936002)(82740400003)(83380400001)(47076005)(2906002)(336012)(426003)(186003)(6286002)(16526019)(40460700003)(86362001)(1076003)(26005)(70586007)(70206006)(53546011)(4326008)(6916009)(316002)(7696005)(54906003)(36756003)(6666004)(966005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2023 15:34:08.4022 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8e7b0973-d211-4e7a-bbcb-08db390fdc4c 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.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT094.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB8130 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/64f4cb8bcee5e0cf9db41ff606270c4fa97dff6b Thanks. Xueming Li --- >From 64f4cb8bcee5e0cf9db41ff606270c4fa97dff6b Mon Sep 17 00:00:00 2001 From: Zhuobin Huang Date: Mon, 6 Mar 2023 14:51:56 +0800 Subject: [PATCH] test: fix segment length in packet generator Cc: Xueming Li [ upstream commit b88b8af25e7cbb267584bd4c36d3615c4b20109f ] Assign correct data length to each segments according to the given pkt_len and nb_pkt_segs, instead of using pkt_len as the data_len of every packet segment. Fixes: a9c9e9698d5e ("app/test: allow to create packets of different sizes") Signed-off-by: Zhuobin Huang Reviewed-by: David Marchand --- .mailmap | 1 + app/test/packet_burst_generator.c | 26 ++++++++++++++++---------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.mailmap b/.mailmap index 89fdbe2542..da2ce216a3 100644 --- a/.mailmap +++ b/.mailmap @@ -1573,6 +1573,7 @@ Zhipeng Lu Zhirun Yan Zhiwei He Zhiyong Yang +Zhuobin Huang Zi Hu Zijie Pan Ziyang Xuan diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c index 6b42b9b83b..867a88da00 100644 --- a/app/test/packet_burst_generator.c +++ b/app/test/packet_burst_generator.c @@ -263,11 +263,11 @@ generate_packet_burst(struct rte_mempool *mp, struct rte_mbuf **pkts_burst, void *ip_hdr, uint8_t ipv4, struct rte_udp_hdr *udp_hdr, int nb_pkt_per_burst, uint8_t pkt_len, uint8_t nb_pkt_segs) { - int i, nb_pkt = 0; - size_t eth_hdr_size; - + const uint8_t pkt_seg_data_len = pkt_len / nb_pkt_segs; struct rte_mbuf *pkt_seg; struct rte_mbuf *pkt; + size_t eth_hdr_size; + int i, nb_pkt = 0; for (nb_pkt = 0; nb_pkt < nb_pkt_per_burst; nb_pkt++) { pkt = rte_pktmbuf_alloc(mp); @@ -278,7 +278,7 @@ nomore_mbuf: break; } - pkt->data_len = pkt_len; + pkt->data_len = pkt_seg_data_len; pkt_seg = pkt; for (i = 1; i < nb_pkt_segs; i++) { pkt_seg->next = rte_pktmbuf_alloc(mp); @@ -288,7 +288,10 @@ nomore_mbuf: goto nomore_mbuf; } pkt_seg = pkt_seg->next; - pkt_seg->data_len = pkt_len; + if (i != nb_pkt_segs - 1) + pkt_seg->data_len = pkt_seg_data_len; + else + pkt_seg->data_len = pkt_seg_data_len + pkt_len % nb_pkt_segs; } pkt_seg->next = NULL; /* Last segment of packet. */ @@ -344,11 +347,11 @@ generate_packet_burst_proto(struct rte_mempool *mp, uint8_t ipv4, uint8_t proto, void *proto_hdr, int nb_pkt_per_burst, uint8_t pkt_len, uint8_t nb_pkt_segs) { - int i, nb_pkt = 0; - size_t eth_hdr_size; - + const uint8_t pkt_seg_data_len = pkt_len / nb_pkt_segs; struct rte_mbuf *pkt_seg; struct rte_mbuf *pkt; + size_t eth_hdr_size; + int i, nb_pkt = 0; for (nb_pkt = 0; nb_pkt < nb_pkt_per_burst; nb_pkt++) { pkt = rte_pktmbuf_alloc(mp); @@ -359,7 +362,7 @@ nomore_mbuf: break; } - pkt->data_len = pkt_len; + pkt->data_len = pkt_seg_data_len; pkt_seg = pkt; for (i = 1; i < nb_pkt_segs; i++) { pkt_seg->next = rte_pktmbuf_alloc(mp); @@ -369,7 +372,10 @@ nomore_mbuf: goto nomore_mbuf; } pkt_seg = pkt_seg->next; - pkt_seg->data_len = pkt_len; + if (i != nb_pkt_segs - 1) + pkt_seg->data_len = pkt_seg_data_len; + else + pkt_seg->data_len = pkt_seg_data_len + pkt_len % nb_pkt_segs; } pkt_seg->next = NULL; /* Last segment of packet. */ -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-04-09 21:45:41.270341800 +0800 +++ 0098-test-fix-segment-length-in-packet-generator.patch 2023-04-09 21:45:38.719042200 +0800 @@ -1 +1 @@ -From b88b8af25e7cbb267584bd4c36d3615c4b20109f Mon Sep 17 00:00:00 2001 +From 64f4cb8bcee5e0cf9db41ff606270c4fa97dff6b Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit b88b8af25e7cbb267584bd4c36d3615c4b20109f ] @@ -20 +23 @@ -index 4018f0fc47..6a56239c3a 100644 +index 89fdbe2542..da2ce216a3 100644 @@ -23 +26 @@ -@@ -1584,6 +1584,7 @@ Zhipeng Lu +@@ -1573,6 +1573,7 @@ Zhipeng Lu