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 DB4E44332E for ; Tue, 14 Nov 2023 20:10:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B596F402B3; Tue, 14 Nov 2023 20:10:08 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2061.outbound.protection.outlook.com [40.107.220.61]) by mails.dpdk.org (Postfix) with ESMTP id F333B4027B; Tue, 14 Nov 2023 20:10:06 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XVS75BwtLY75ahyQUDgLEsejWumruwXelW3dbhllK1Aw2amY49Gtmh1SAylzL4ZwQ0MbyFUOFFm81hUYi/JAJbhTN36MyiOMzO7Ns6zEe4gD+71Ceb123DlXFIa8QGV/UO4lU17YFih+VR9F+SGf+xX0cEjbb9lnKsUisH2HoSiWTrBdE8ObGEXzwIzAuRhULU4hTCKrkGZu2R+3zfMqRsiAYFiUH74FYkGK28svqafWZruO5kogSshN9TSwJzxZ1eq7Npl6x7eCaRxOhK+xTtyBCE7FnWYo1xJEQRxwH/+zW5M64+EMNDzeRpKD78ZJW/RklTXiNaLIgwnVzGHtJg== 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=AIFCOpUd+waQVcY/u6BdOyXqUO+T6VM6mJIBr4nmBdA=; b=PTovYFMswdo6b1UdmfPr079r/kEPbNQ2hJ+7C9EHDwGdHgsDuQoxtqhtiq7krE6tL/tLjWZe14Lyp4EpzhipK4fD5RLqMcNa7utaPMLMTGrqZVIDAxh37rn9cbWeGf3v5e+QOVS54Tw6YJSGI4Q+4w11vRBGMoH12xf8bwnDvZxTzsfYy7PacgFK5cZmmnwQ4ugDIwxpFJEoO/HxOH0Z7k3URi00dCOPGMCpdySG6iH9jlPD2aAglEvjDHj8PCsJHZqY9V4SYrs8+Bol6kJWHS79ydbqtL514WCmfneChCwh5hEly1URSMpHTxsZvxb0B0aY0jOaaPT5iIMHVGrxJA== 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=AIFCOpUd+waQVcY/u6BdOyXqUO+T6VM6mJIBr4nmBdA=; b=G/vpqSO1Rd7ky4/6xu//DfJ43d1ldNFsW8xe9U1VD/UC6P+jbwuDyxhiKDVU2eQFS/mJWn+ShT9wbOQ3YMMlDcrFOYeBkS8zWiv28fJoJfUxaRiUJ8c2XsxDzPv2FF70M2MJOqTLPtqrxtN4MrWCgk4VYg7m/FI8R81Ym6cWSHU= 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 IA1PR12MB8224.namprd12.prod.outlook.com (2603:10b6:208:3f9::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.29; Tue, 14 Nov 2023 19:10:03 +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.015; Tue, 14 Nov 2023 19:10:03 +0000 Message-ID: <91ce866b-301c-4f46-bf28-efa6015746e0@amd.com> Date: Tue, 14 Nov 2023 19:09:32 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] app/test-pmd: fix L4 checksum with padding data Content-Language: en-US To: "Deng, KaiwenX" , "dev@dpdk.org" Cc: "stable@dpdk.org" , "Yang, Qiming" , "Zhou, YidingX" , "Singh, Aman Deep" , "Zhang, Yuying" , "Matz, Olivier" , "De Lara Guarch, Pablo" References: <20230804082849.533059-1-kaiwenx.deng@intel.com> <892f0567-e1ee-4283-9726-5db1dd92c2cb@amd.com> <3aa757eb-23e1-4492-8c14-342540d0899d@amd.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 aXQgPGZlcn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2qVe cMh1CLUHXF1GlofpGbe1lj4KUJVse5g3qwV7i9VrseA8c4VIZewdIjkzAhmmbxl+8rM/LKBH dZUMTzME5PFCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR4P281CA0353.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:f4::16) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|IA1PR12MB8224:EE_ X-MS-Office365-Filtering-Correlation-Id: 96c8f1c2-fd18-4b39-ed16-08dbe5454e46 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TflqmVP/CTrt095k1MvZRUUy0ZQQNXgzdLBFIKZhIP8pdy/WESEq862u8B3vaUbDY9BetzmZKpdvdcFF9K8sUnO4egQoCfFr9ai3tqNTAAJJHAJJgGBrTrhyRzfVxKOH39ffXjf58ck1IlEEfAOuaM3fe7qLJGQXvcWxF09l9J/cdTWdRjuf+roLDEQZf88WGJDo5NFmRK0VJqQh3/at9k+elql0awt33DTRv19io/xBFeZaoVK/+efgWd8DWZV2FuP9POvPdz2iWcxr526FWX+J2IvekDvtlkykIvlNNXL1z5B31fONmSdabWA2wFN5dPWaE5LpVeudXTqsgIL0KoRPYTW/o4UUHXF1kkbBZGinw4a0zt1tK7R0SjIcDmhNhtIjAnOi1WX5lrSW0X1EmTtC9i23CZMgsycIQXNy/RWIsxzXXH78VVfWAVTaNOoOmzqPCSuXoa0kusVQPYBklCnv8l01CSibgIRc+Zylp8KXJQbnVpS6Hz7HOcTRQmBewHTefp7Puo6sxNpSLAxcqj0l363qtsl+X9OeJN831ANwkKjkxYoQQi0ph6mAvT0En+TPnPFNrB3jtXbE/PCMUD8muEGjBirXVBmORgjGGPeE5/LoTAk7I6C9PldsmGjmLEEoS8hS15laf0MaBrwuKQ== 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)(39860400002)(346002)(396003)(136003)(376002)(230922051799003)(186009)(1800799009)(64100799003)(451199024)(6486002)(478600001)(36756003)(6666004)(6506007)(53546011)(316002)(6512007)(54906003)(66476007)(66946007)(66556008)(110136005)(31686004)(38100700002)(41300700001)(83380400001)(8676002)(31696002)(44832011)(4326008)(8936002)(5660300002)(2616005)(86362001)(2906002)(26005)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RHRLZUNka3VuY2xoM2s1VEkxR3A5Y2FIN2g4cFhwTmg2REZZRzkwM2dvNXkv?= =?utf-8?B?cHE4WWZRY3VINzlmVEpMTlpFZEE3ZngyazA0eVJYM2xNSFZySkx2Ly9TWHhz?= =?utf-8?B?aVB4WWVzQTFqR204T1h5cnI2dUpzZGNlU1VIcEJ0V0ZNMDJPdTlOT20wK2t3?= =?utf-8?B?N2M1a1owRkNJVmNVamhLNElhYVpEVitTZS8wQ3BTT2VYT3dyem0yZktBb0Vu?= =?utf-8?B?a1A4RVJld0pwQkJ2Q3Vod1BhakptSU9hVkNaYWFzMmJJa3RpVWFNZmk4RUJZ?= =?utf-8?B?UkRSOFhWd1RtcDZ2NzJsRmtoWFI4TnEwZDFDZm1WTGQ0UWkrdUFLS282YS8v?= =?utf-8?B?R3l1Zmh3TytpVkZya0VXMkw4OThuQVpLcUc0dFRHbWVOdFJVVUJjbllzLzht?= =?utf-8?B?OGhvYlZjNGlmY0FaeFFvSGh2Q2puVHp4ZFRLVFA0VUF6eG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9aNk1XSisvM3RGVmNmb1VtYjR5YlpzY1V3aUJWckZrUk9K?= =?utf-8?B?bGpOZ0NZaVByZnUyZE5ESVpTOU5pbERWZXBvOU42QTZ2eEZNYk1EelBqVHE1?= =?utf-8?B?VVRFbkRNWFlaeUEycUpIMmx4WjZpbWluYmp6dVZPQVVjTDdxcS9aRUd4TDNQ?= =?utf-8?B?QktIR3Y5UEtPMWwrcHlCcTZGcEhJR25sL2VKUjUzbHk5L1E4TG1BYi9NZlBR?= =?utf-8?B?b0h3bERWd3RRZnhpc0hMWVVLdTBOU2hBNFZLZ0doTHJ6RU53eVZCQ21IZmtJ?= =?utf-8?B?ZUphajVuRGdDbGRLNVdRQlZkdW5yN1RId1QxSmNrMXljaURjV2RDTWNoYVZx?= =?utf-8?B?RzRTRFpMcDlqMit3SysvNmZoRjlhNHZEckpKb3R2TkQrdGtscjE0TlJMam1L?= =?utf-8?B?SEVHMy9zajl1aitGcndINkhPMml4eHM1SUc5bm1LZDloSENSdlFvQjI1cmM2?= =?utf-8?B?R016RnhjazAyaHlHQS9reC8zeHY3VVI3NTVudEJEN2djRGhjcmdycEZIS1Fn?= =?utf-8?B?RUxVRnQwcWxmZVBteXhWS0IwNkpmb2VkWEhqNmhJYk9jODdtQXdjaGFTUEFz?= =?utf-8?B?SGlIRTVkVFg1U3k5WHA0VDNibTB0SFZOU2JJSHF0NG5CSW54RHhPSnI5dzQy?= =?utf-8?B?OXNMQ0lYcHU3RmRIYUxNM3lBR0FjcXpCUDh0N1AyUERFUVRZRmhsQVJEV1pL?= =?utf-8?B?OUgyMWl4MXRUSDR5TVA2cjVmaDM1NmNnWmlkZGVpbEg5eDFZZGIySXBsd3dR?= =?utf-8?Q?D+Ms=3D?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 96c8f1c2-fd18-4b39-ed16-08dbe5454e46 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2023 19:10:03.5341 (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: QeqCub5EVrxsU0jvM8IPkolrKMUCqqo/BCqT5FYd4HfWJl0v4kLoc7ai0S7SmZ+L X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB8224 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 11/14/2023 2:19 AM, Deng, KaiwenX wrote: > > >> -----Original Message----- >> From: Ferruh Yigit >> Sent: Friday, November 3, 2023 12:03 PM >> To: Deng, KaiwenX ; dev@dpdk.org >> Cc: stable@dpdk.org; Yang, Qiming ; Zhou, YidingX >> ; Singh, Aman Deep ; >> Zhang, Yuying ; Matz, Olivier >> ; De Lara Guarch, Pablo >> >> Subject: Re: [PATCH] app/test-pmd: fix L4 checksum with padding data >> >> On 11/3/2023 2:49 AM, Deng, KaiwenX wrote: >>> >>> >>>> -----Original Message----- >>>> From: Ferruh Yigit >>>> Sent: Friday, November 3, 2023 3:20 AM >>>> To: Deng, KaiwenX ; dev@dpdk.org >>>> Cc: stable@dpdk.org; Yang, Qiming ; Zhou, >>>> YidingX ; Singh, Aman Deep >>>> ; Zhang, Yuying ; >>>> Matz, Olivier ; De Lara Guarch, Pablo >>>> >>>> Subject: Re: [PATCH] app/test-pmd: fix L4 checksum with padding data >>>> >>>> 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. >>>>> >>>> >>>> Hi Kaiwen, >>>> >>>> I am trying to understand the problem, what is the testcase that has >>>> checksum error? >>>> >>>> Are the received mbuf data_len & pkt_len wrong? Instead of trying to >>>> fix the mbuf during forwarding, can we fix where packet generated? >>>> >>> Hi Ferruh, >>> >>> In effect, the packet is padded by the switch. >>> IEEE 802 packets may have a minimum size limit. The data fields should >>> be padded by switch when necessary. In some switches, the padding data is >> not zero. >>> >>> Csumonly doesn't trim these packets to the true length of the frame. >>> In csumonly, the received mbuf data_len is the true length of the packet plus >> the padding data len. >>> Therefore, padding data is included in the checksum calculation. >>> When the padding data is not zero, the checksum is wrong. >>> > Hi, > Sorry for late reply. > The minimum frame length specified by IEEE 802.3 is 64 bytes. In practice, > there are many packets less than 64 bytes that are padding through the switch. > > We found this issue because some customers found that their packets could not > calculate checksum correctly, they would send some packets less than 64 bytes, > but our app didn't strip the padding data for such packets. > OK, so switch in between is padding packets to make them compatible with standard. >From DPDK application perspective received packet is 64 bytes, right? Problem happens because where verifies the checksum gets different checksum that expected, but this is because packet is modified in between by the networking setup. I am not sure about trying to fix this in the testpmd. Why not send packets that are >= 64 bytes from sender side, or configure switch to not add padding or maybe use different switch? >> >> Thanks for clarification. >> >> Even some non-zero padding added, it will calculate the csum successfully, but >> I assume in this case csum becomes different than expected csum and test >> fails? >> >> In this case why not fix the generated packets, and make them compatible to >> minimum size requirement? What is generating packets? >> >> >>>>> 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; >>>>> + } 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)); >>>>> + 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); >>>>> + } >>>>> + >>>>> /* step 2: depending on user command line configuration, >>>>> * recompute checksum either in software or flag the >>>>> * mbuf to offload the calculation to the NIC. If TSO >>> >