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 834044334B for ; Fri, 17 Nov 2023 02:14:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 773D140649; Fri, 17 Nov 2023 02:14:31 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2058.outbound.protection.outlook.com [40.107.94.58]) by mails.dpdk.org (Postfix) with ESMTP id 2F4AF40271; Fri, 17 Nov 2023 02:14:28 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hLejGQNbeuqKpCLlzHBY/FxRzCeGzMo3cobs5hG6iJo0L+DvPH9mZm8AvdXDwvChXj3yB3cUL0wwyBo1pYrP0edbB71RmmJm2Pppt6zBsSoxdgKMuCSwGOU66VQgRwDiSv4dhVviBnUGNFTi0DLe/610XSyRTAFEXg9EY3Os3W11cdr32xC6SPx2CoSYz7MfoSszMUteclvYZiK5tb+zDGGDzFL+X2p8ygl/TPtdZRFxXIpmLlabiIoM4Aav0ZNcza8yiQMjeKzAikZBWmCEM8d7a9enifs9Q8RXeW1J1St34yBSyQBq9ZDqPGGndPhilAppi3sIETBgixUXLcZjbg== 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=h5sWPx9zaoDLewLcRDeRCXjG6O4/m4brgN4ZiFVsf8k=; b=FYLatJMuuh4bj3L3T1mqjBHRUaofUZHt7jWbvniREhioYggAAJ+db7Bq2x4Lm9jnssARqkh/UW14Wy176/UlRUW3SahHR6QS0uygpE3KTHnIgo5//Zyl614fOkQEKVByjumpqeUf2yKF05TAXO+pWg3uihEvMbiZxOFkcsS/r65DSViVgy2fvelUyzuDaJ6AFHyZV/rzPxVi6GRT1X9dDaoOZq0loLT3hlX7XViKeZ1m/6UWK4ECtM4GMAlE+37/mj929IRGgCMw7DFRYTeJ/RTvpbRibjRwZMjk+h4SMVcWdaHpnz+mJO7CbhYTyNLiHOHOv5Th1GY4oW05RNI8kQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=h5sWPx9zaoDLewLcRDeRCXjG6O4/m4brgN4ZiFVsf8k=; b=Ans/ApeKt6MPIFwDKSvqfSzj/fVKjjJytwQolUgrJmmNtf056Ez5DbXjypHj/wtcgK7EhKOSDSpC0XDdF2WOBs7Hy69AYBK4HWdZ+PiHffYx7Pc3LNUlyGyZRZThKO1v7mkjtgpDZLqjy4i7U6PnjHWv0Ntmcgugnduc8cBTfxU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by DM4PR12MB5037.namprd12.prod.outlook.com (2603:10b6:5:39a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.21; Fri, 17 Nov 2023 01:14:25 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::2569:edb2:670f:816f]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::2569:edb2:670f:816f%6]) with mapi id 15.20.7002.022; Fri, 17 Nov 2023 01:14:24 +0000 Message-ID: <1e14d58f-b543-4e20-b009-fa241a5b30cb@amd.com> Date: Fri, 17 Nov 2023 01:13:49 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] app/test-pmd: fix L4 checksum with padding data Content-Language: en-US To: Kaiwen Deng , dev@dpdk.org Cc: stable@dpdk.org, qiming.yang@intel.com, yidingx.zhou@intel.com, Aman Singh , Yuying Zhang , Olivier Matz , Pablo de Lara References: <20230804082849.533059-1-kaiwenx.deng@intel.com> From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAIZARYhBEm7aYjps5XGsPHCElRTPtCKKm/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2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <20230804082849.533059-1-kaiwenx.deng@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR2P281CA0086.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:9b::14) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|DM4PR12MB5037:EE_ X-MS-Office365-Filtering-Correlation-Id: 085c7e78-12a8-489b-0904-08dbe70a8989 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Oq2VdcrwmtJ+Nr+t4/PgdlcnM7W2d7Y1qGp+jpIOIB+pZo/khDTa9RaO7Ln/GTRXXxb9La4/gqkfTT4Ts5pvayAc31MmMY44AV00UVivZ4cMBqAbxRj5tiwQ8zS5/U17NR7fOWBVFRYmKw3hcHNqHIF2CLlbOYLu5wSb+kwr1FUs7v/w3sSbJKzA6cm6Ru4xKW1mGgFv3W+w1Jby2InIUxgXRC6yWHhpo7TNs9ypKXKGJKCAHZXl7nGTzmglEqMTWP/ZeSaoOoVsFCriPv3GFLs0d0WdPS+kmq9PGGWmqFpuQfOXVCtXywXuahuIbQVDjjSoOx3VSr8xQqkh/z4vdqqDcYb9bUSUmu/sil/lZ/fEr1zQyMshycVbQiu54V1rnPz/nnv/p8WEWSoknoQy/Bh/A3k3kwMVfoGVwTcjHiJBsjgS1rl+NrX+AJ140qpO5fS7nobcbbWUA5VsX1h6A4F8zB71Y7rShkvLSTdWAxx25aBRRhB3v2LMY1o0dG4yMMH3qn+4qk3beajQRwaZXkwzQwcOnal69sME53SDN1M2VhUj2K2cdott4OCrJPgJZ/hhvRqf2EHb0gde80z3ib25ttGzy5Vw7CqHbfh/tGZ3w+TCeLTqhy1YSdxq9x9aAUi4mfaoesek1dnlsuUhzA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366004)(136003)(346002)(396003)(376002)(39860400002)(230922051799003)(1800799009)(451199024)(186009)(64100799003)(31696002)(86362001)(5660300002)(44832011)(8936002)(4326008)(8676002)(41300700001)(36756003)(2906002)(83380400001)(2616005)(26005)(38100700002)(6666004)(31686004)(66476007)(66556008)(66946007)(316002)(54906003)(6506007)(53546011)(6512007)(6486002)(478600001)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SDVycmVReHBGMHNzZGJKZVpYOUYxbUVQUDZ0ZVExUmw1Y1A2WVdkUHFFL3p3?= =?utf-8?B?RXdGZjFRWmZ1VnhYMlFxTnBuZFdKYjdJUHV5clROL081M05GQkZTVTE5YnhB?= =?utf-8?B?OUp6NWRxTWFocmhqamI2YkdRTGlBN0l1b2JTMkZUYkxyeC9nTitta09VNWwr?= =?utf-8?B?eXQ5bXJvL0xHUkwzQm0vMERlaG14NTFXbWJwY3ZHRStkWDZCcHk2SGVZR1R5?= =?utf-8?B?YTE0ZXcxOFpUOEFLVXgwWkdML2g5c1YvR0JUblNqMVBXUlVzVTVTNEtHSi9j?= =?utf-8?B?ZTg2SUswdmNCOXozVmJ1TGpxb1NsRFdNWGFrWTUyN0tITHlrSXJDQlpDTllS?= =?utf-8?B?RnZBeFB6bUpDSWZDVmNDTjZtMnZaOTZ3MGIxUkJlQ1oyMHBsbFd5R2xtNkNM?= =?utf-8?B?S3B6T0JDNWNISEMxZ0dwa1JPTHJ5QUpiWHloem4xSVNtOXVwcCtvWFlOMHZk?= =?utf-8?B?THBnYngyTVJ3YnJyTjBXejgwRW96Y0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MEtyckhJQ3FTdkgzNk4wODJWMlQ3cHZnMXJBUFpjQTFKQ1JGVCtI?= =?utf-8?B?ZUlhSmp2ZFZJYytWUlBSaW9md291NGE4QW1XQ0c3MzhSWFduc3RUcVQwSmNY?= =?utf-8?B?TGl0amFuREl5TVlLVXhwYk1OMjlITzNWS3MyVEZVTHJuYXowTjE5a0xXSmRh?= =?utf-8?B?UzFoYzh1SDhMRUFxcnc2dXo2MlFiV0l4Z0gyUTVuTU1jZDFnVHl4NVRyd1dD?= =?utf-8?B?YWdmRVRYdHVYRW5BMCtHNXRBSkRsQ1hNK0VGQ1FWdXUxd3VON1hPY1dPbGdt?= =?utf-8?B?Z3dBbUFTbEJaT1JUZGpVaXBLZE1HRC9UdXNIS0VXb0dzZGV5L0JRTEl3Vmxh?= =?utf-8?B?QXhINURmVFV3TWdINWxIUkJ3Ump0V3MvMFZWK2dNdHp2YlR3NXZ3WVBudjlI?= =?utf-8?B?eXg2Tk01eFIrcUxrOVpHb2JtQVJIVTNwZld6VXhrZmlwLy9IRWN0RnpUdjdL?= =?utf-8?B?TGVlaEcwWGxFZWxLU2pjZ3BEYWRnZnpOcFpVcWVYRFNKZ2FjVUI3Zm50SjBk?= =?utf-8?B?aTlONnRxUTFBN3AwaGpzSDYraVJZSDdmTFI4b1UydUVtOUM1aFJ2d2xJL2h2?= =?utf-8?B?QXJYdlVZbk9VS0YyTkRPWUxiYWQ3d1B1NENCMlp5Qnl3djh0MzZIdnc0bENF?= =?utf-8?B?MG1jYU9kTmkrUVNXeTF2RUtBc1BTVHMyWnZFd2xucC9wRkNNcDZyS3J4eDRj?= =?utf-8?Q?BfqE=3D?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 085c7e78-12a8-489b-0904-08dbe70a8989 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2023 01:14:24.8818 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: aTq5cOpCciq+IvLr3YfJiRjHbmf3ECnmRNMQguueNSOc59LO3B53g7ELOiWFqtAC X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5037 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 On 8/4/2023 9:28 AM, Kaiwen Deng wrote: > IEEE 802 packets may have a minimum size limit. The data fields > should be padded when necessary. In some cases, the padding data > is not zero. Testpmd does not trim these IP packets to the true > length of the frame, so errors will occur when calculating TCP > or UDP checksum. > > This commit fixes this issue by triming IP packets to the true > length of the frame in testpmd. > > Fixes: 03d17e4d0179 ("app/testpmd: do not change IP addrs in checksum engine") > Cc: stable@dpdk.org > > Signed-off-by: Kaiwen Deng > --- > app/test-pmd/csumonly.c | 32 ++++++++++++++++++++++++++++++++ > 1 file changed, 32 insertions(+) > > diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c > index 7af635e3f7..58b72b714a 100644 > --- a/app/test-pmd/csumonly.c > +++ b/app/test-pmd/csumonly.c > @@ -853,12 +853,14 @@ pkt_burst_checksum_forward(struct fwd_stream *fs) > uint16_t nb_rx; > uint16_t nb_prep; > uint16_t i; > + uint16_t pad_len; > uint64_t rx_ol_flags, tx_ol_flags; > uint64_t tx_offloads; > uint32_t rx_bad_ip_csum; > uint32_t rx_bad_l4_csum; > uint32_t rx_bad_outer_l4_csum; > uint32_t rx_bad_outer_ip_csum; > + uint32_t l3_off; > struct testpmd_offload_info info; > > /* receive a burst of packet */ > @@ -980,6 +982,36 @@ pkt_burst_checksum_forward(struct fwd_stream *fs) > l3_hdr = (char *)l3_hdr + info.outer_l3_len + info.l2_len; > } > > + if (info.is_tunnel) { > + l3_off = info.outer_l2_len + > + info.outer_l3_len + > + info.l2_len; > I don't know much about tunnel code but is above calculation correct for all tunnel protocols, like for the case inner packet over UDP, should outer l4_len also added etc... > + } else { > + l3_off = info.l2_len; > + } > + switch (info.ethertype) { > + case _htons(RTE_ETHER_TYPE_IPV4): > + pad_len = rte_pktmbuf_data_len(m) - > + (l3_off + > + rte_be_to_cpu_16( > + ((struct rte_ipv4_hdr *)l3_hdr)->total_length)); > + break; > + case _htons(RTE_ETHER_TYPE_IPV6): > + pad_len = rte_pktmbuf_data_len(m) - > + (l3_off + > + rte_be_to_cpu_16( > + ((struct rte_ipv6_hdr *)l3_hdr)->payload_len)); > As far as I remember ipv6 payload_len doesn't contain the header length, so pad_len calculation should be different than ipv4 one, like "l4_off + l3_hdr->payload_len", did you verify this code with ipv6? > + break; > + default: > + pad_len = 0; > + break; > + } > + > + if (pad_len) { > + rte_pktmbuf_data_len(m) = rte_pktmbuf_data_len(m) - pad_len; > + rte_pktmbuf_pkt_len(m) = rte_pktmbuf_data_len(m); > Can't received mbuf be multi-segment mbuf, as far as I can see checksum calculation API takes this possibility into account. If so need to check that possibility here before updating 'pkt_len'