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 828EC436EF for ; Thu, 14 Dec 2023 12:20:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 766FC4325E; Thu, 14 Dec 2023 12:20:25 +0100 (CET) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 87DA6406B4; Thu, 14 Dec 2023 12:20:24 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id 597CF206A3; Thu, 14 Dec 2023 12:20:21 +0100 (CET) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [PATCH v5] lib/net: fix tcp/udp cksum with padding data X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Thu, 14 Dec 2023 12:20:18 +0100 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F0C7@smartserver.smartshare.dk> In-Reply-To: <20231214092259.2126634-1-kaiwenx.deng@intel.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH v5] lib/net: fix tcp/udp cksum with padding data Thread-Index: AdoudiiL/81FePzwT1Sv73qO/AJKygACTihA References: <20231213043732.2113867-1-kaiwenx.deng@intel.com> <20231214092259.2126634-1-kaiwenx.deng@intel.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Kaiwen Deng" , Cc: , , , "Aman Singh" , "Ferruh Yigit" , "Xiaoyun Li" 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 > From: Kaiwen Deng [mailto:kaiwenx.deng@intel.com] > Sent: Thursday, 14 December 2023 10.23 >=20 > 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. >=20 > In 'rte_ipv4_udptcp_cksum_mbuf()', as payload length > "mbuf->pkt_len - l4_off" is used, which includes padding and if > padding is not zero it will end up producing wrong checksum. >=20 > This patch will use IP header to get the payload size to calculate > tcp/udp checksum. >=20 > Fixes: d178f693bbfe ("net: add UDP/TCP checksum in mbuf segments") > Cc: stable@dpdk.org >=20 > Signed-off-by: Kaiwen Deng > --- Reviewed-by: Morten Br=F8rup