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 010A245C87; Tue, 5 Nov 2024 11:19:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8A84D402B3; Tue, 5 Nov 2024 11:19:15 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by mails.dpdk.org (Postfix) with ESMTP id 71D2140151 for ; Tue, 5 Nov 2024 11:19:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730801955; x=1762337955; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=nl7DpDM6ugYO9MqV5WdDlMbncwEgUe2wmBf1VjUrlUQ=; b=RAUDFzCpY0dDMs/LfrIQbFDDvqKYBYG0QepfXbsY6JCrcZBcaa4WCt2z o3KMoik5GRAmOW7aBaMPJ/gV7dy+36+e6phVSrBJkAIorCTXnDJkik2sH mzdL7LrveMAD4Rp9XIbUhSceGIW9YS/X++n+usbjU2JPp+w/pWarWksz1 9Vzkwism45pKjoFDLPmKW5epZAt/uhbG7+5lczrmCTeQSspiDsFHPix74 2O4f3B79RLDwqNqHTw7ItaKsoZ6WtAPHFvBZ4RyaoOWWnJdiKlv7n1j0b /aL6B9V0agwQgA7wIKmr0HKFgSPXtbp8X9GlvG1MLE9aWmH8qvo67WSZb A==; X-CSE-ConnectionGUID: rDuRem2WTA2aYkUSX7njnQ== X-CSE-MsgGUID: TVT9rUsJTvmIri/6JU7b+Q== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="30496372" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="30496372" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Nov 2024 02:19:12 -0800 X-CSE-ConnectionGUID: KmMNGOC+RL+E9pz8JIQoNg== X-CSE-MsgGUID: H0ajem9rQQWDHIHURci25w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,259,1725346800"; d="scan'208";a="84075856" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmviesa009.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 05 Nov 2024 02:19:11 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 5 Nov 2024 02:19:11 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 5 Nov 2024 02:19:11 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 5 Nov 2024 02:19:11 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ETXUPNnGDWlIkABZ3pkhBUtLK6AS9mnG9qNM8SfVNrB+2F060ZlrzjdMcKtJtLpkYwH6xuPcFyXKPfwwxG5ZsqI7kQNU31tbLCkLxZhkneCSUIpkv6s0e2EL09fYUOprTqZv3QRyC0xMyy4ikx3KMlnpnj4nYdxh+aoLIAUoMPwDF5en5aCEs5RI9J39F9looB9YCEd+2sTmqnuJ79NbGhQURczeD4xyunEmR8huJKVvEP0h4NhAyj04Z2WXOO3ca6PMJ+YEGG5p5RfVbCm1fG7/6gzvJp4rWwIZJfU7PyCzl9o5UPzwIDYFPEhUmyK5cijgVZPHilgm06YKqmPeRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=xRycxxQbUW18huiEQUM92O594EOEb3thODPUPRwS1u8=; b=kNxPRVNYaat+zpy3eV4uZFuCbNA++tzc6aaLM6Ka5qFF5nJNBrWOFxeyv7tt8fm2gczR6dFVjKcfje/hxHSPKFnNtVCMvSw1vbaHpextpXNlzpgO3qsVUPNN8bgQ81qfS/7QRfiLYxfRd1a4vO6HN/nCWVHVP0iLzzBhr+Qir4OxZ5bKxrnX2EpmdPcrw7x0PqRHzCl/Nmq1ZkPSBLOYyF7B6/bfigcTgLO2oTj5MtupbGSiEud4ImAXmnn5P9iKwCz0UkJOkt0wHHFwakM3e5Iirp+DzxlBDlT7o893CCd72/2iuF4wfgRYVKrtkUPaISAt3CU7dHBzU2X5iJMAuA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by DM4PR11MB7760.namprd11.prod.outlook.com (2603:10b6:8:100::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Tue, 5 Nov 2024 10:19:03 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b%4]) with mapi id 15.20.8093.018; Tue, 5 Nov 2024 10:19:03 +0000 Date: Tue, 5 Nov 2024 10:18:57 +0000 From: Bruce Richardson To: David Marchand CC: , Stephen Hemminger , "Chengwen Feng" , Morten =?iso-8859-1?Q?Br=F8rup?= Subject: Re: [PATCH] net: fix IPv4 cksum simple function Message-ID: References: <20241105085912.4148208-1-david.marchand@redhat.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20241105085912.4148208-1-david.marchand@redhat.com> X-ClientProxiedBy: DU7PR01CA0041.eurprd01.prod.exchangelabs.com (2603:10a6:10:50e::6) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|DM4PR11MB7760:EE_ X-MS-Office365-Filtering-Correlation-Id: 765af50c-4f62-410d-5666-08dcfd83457c X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?BFi4qxcDq3+kTS7AdDKofpTY2brU6EezPdAFKagas3cVd64ryXNwpO0LvpwL?= =?us-ascii?Q?qxRFHtWK8harEFqRJ/bg69aXWLge1UwDMaOW+Wagyd5bFMyFf5QHD732mLor?= =?us-ascii?Q?uKjoWDzRGwJT7Gtd5E7gKNL+VRAR/z34kf6WZYLOTKrE+2rL822MG6cd2Yw/?= =?us-ascii?Q?MLVLPV3JwyfKAko6aI5z4oOIEFLE+lGpN3c46RAg6Cv6EAKzEb6g+Tcc9kJI?= =?us-ascii?Q?UK8DAkRHS1ykGXhvRH22gnBjRhfkovoba8/Gj+gVDW+FbMMT/FD4XdP1cu1w?= =?us-ascii?Q?0muh1rDePv3QEFFIv/4v6auyc/zKnpmPteeukMctUstfO5i/GDtpgcB6JZpc?= =?us-ascii?Q?ec2AGKc8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/UsCZ8ogJeMG9kBqIHoUbc9K+XT?= =?us-ascii?Q?M8Ubx0WNTJ9+Dig9rAgpRWGVzrz/zzsML19hYDtMtJjDQROP4zFvWrtkz91x?= =?us-ascii?Q?ojLajfWYTwDSNOfE7HgO3kYZ?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?onNr2jStIwRaPhZYgAbGFOonAbpGSVDZe8PFgZZDdVymv6oOpKWjhlF0o2vw?= =?us-ascii?Q?LWshT31k5M8A1iUnZdMU8RqBiXYpjaHRxy64hA6YfbigEOF/Ma5MOP9O6MFz?= =?us-ascii?Q?nRbw91R1Xi9P6xX8/6eOqZe4pAWr7uTb8WLeVPH7mUaj4spx/iNWB7I932MM?= =?us-ascii?Q?xqdMHuwf+KF4AnLfNdXFkam3rfZVGflak45wD2feEnrzQAi6Uma+/w21T4Y+?= =?us-ascii?Q?Ml0pp6U2igQlBzPdWyEq8WT4p7oQtphrWEbRBYU25CtcQO+rDMuNeXAsD+Sz?= =?us-ascii?Q?KvBpIxbZ8Bo/IXBI6+FSxo8Ugmw+7uQpjP+YTiOkJ3+EAB1TF2CWK+B/9fQf?= =?us-ascii?Q?Am/oOODExxpqNfwCUM6EJmO1nHpUMZkGWYNZ2zbUDV3LaLF6SleFKRZ38kap?= =?us-ascii?Q?YhwISfWU8K/OixUhnKzupbXkj1o4VrYohxoFLK/63o70tJaSJ8dXo4GPqRKv?= =?us-ascii?Q?STNPG6La439Xcq8hneQZipzzvHS62xWuoij0yqwk2xnrFfJrFfbbhzWTdNA/?= =?us-ascii?Q?TuXhlLYpluW5rGEJ5zlfzTWBzO7ydmIiDax9ldJwFrc3X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hRSNpvJHmzOtwrBw1coq+A7hTmiV9TJ1mOcx1ZQODM739+WBT+Y8DQ6v9DQ?= =?us-ascii?Q?G+NVuQdqNpoiKLhryz1IC+decPgLps++c6Da0rJStK9lUo7x6MO8qYR2H/ti?= =?us-ascii?Q?Fu7+ghcABCXIzD7lxAZWI9hqNKHKR1ypIo3Xi/pbAZm0TYqFwExgGOk5CfXW?= =?us-ascii?Q?uA=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 765af50c-4f62-410d-5666-08dcfd83457c X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Nov 2024 10:19:02.9694 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: gZeqzM2mSziSM+/Sitb3dL7EqJGmQo54LTr47vvsD6BWp8suttKNi6w0woY5WL9Gn5Cw4lldeQSzJsVmFU6oVrDJIPbzvtzzAeZVPZKy0LY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB7760 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, Nov 05, 2024 at 09:59:11AM +0100, David Marchand wrote: > The new function breaks compilation with -Wcast-align. > > In file included from /home/runner/work/ovs/ovs/dpdk-dir/include/rte_ip.h:9: > /home/runner/work/ovs/ovs/dpdk-dir/include/rte_ip4.h:191:10: > error: cast from 'const uint8_t *' (aka 'const unsigned char *') > to 'const unaligned_uint16_t *' (aka 'const unsigned short *') > increases required alignment from 1 to 2 [-Werror,-Wcast-align] > v16_h = (const unaligned_uint16_t *)&ipv4_hdr->version_ihl; > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Fix this by aligning rte_ipv4_hdr to two bytes, and point at the start > of the structure rather than the first field (which happens to be 1 byte > large). > > Fixes: f9e1d67f237a ("net: add IPv4 cksum function for simple cases") > > Signed-off-by: David Marchand > --- > doc/guides/rel_notes/release_24_11.rst | 2 ++ > lib/net/rte_ip4.h | 4 ++-- > 2 files changed, 4 insertions(+), 2 deletions(-) > Acked-by: Bruce Richardson