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 B2C3045B60; Thu, 17 Oct 2024 19:01:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3DE574025F; Thu, 17 Oct 2024 19:01:45 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by mails.dpdk.org (Postfix) with ESMTP id 108774021E for ; Thu, 17 Oct 2024 19:01:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1729184503; x=1760720503; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=E/j94lzEFwUp2dBxVjF6tDHDdwiA/n1xH55lwSVSQws=; b=StQkcg5AF9SNrhgXUP6bi0HB611iA0rWoS6UM+0R535+eHXWU2tYWnfD 70W+C7adft463Ah0ClZWYlIC1cfxB0esk1V5bsewAXzzGeKRQNzoQmFUo 0O3UuF93ebjVDWzdgR7VONuFWbOMT2vjkeWzVbKATVq+BC+Jfqcl9DECE qqG6Dr6HR1tX3wQ7kZ39oxgWak5YAApMton3PtLsd0SMdGjDXZhoJneNs uqKx0cw0AcSPI0owOWru1tXgI2KKpzhcZrWwjVOOePA0U5WGLVz3sxFt4 2HEW4LascZJ764y1rb2CPBf6lOUj9L+temJPRXj/nad5IdsVFzRzg1s7q w==; X-CSE-ConnectionGUID: i/tOLcC7RBKXtT6FRAQowA== X-CSE-MsgGUID: E5ZSbmsqQDiP1VTGBUOI7w== X-IronPort-AV: E=McAfee;i="6700,10204,11228"; a="46180494" X-IronPort-AV: E=Sophos;i="6.11,211,1725346800"; d="scan'208";a="46180494" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2024 10:01:42 -0700 X-CSE-ConnectionGUID: 4D7cD3pJQZeYBUzU6cb7uQ== X-CSE-MsgGUID: nzz4z3XNQy+blwkhGYmK2A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,211,1725346800"; d="scan'208";a="83375532" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 17 Oct 2024 10:01:42 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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; Thu, 17 Oct 2024 10:01:41 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 17 Oct 2024 10:01:41 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.43) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 17 Oct 2024 10:01:40 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HgqCL8ysLwx5VvzqjZXZAf7QLJvfEAYCRWwohuHWMh5EAn8JdUbb8ALoy0pgpMZ7hx41dZTlF5vmtlgMMlhitLTB+gxTE/ndibj8m1Ypn6WhWyJZ2UVOCJBOlLB9WAh+75r5pOsWITUsxUi7UYTCsY3PX/1N8bRzzYzUgV1Y1B+2ZcPgxwBHYKhTeMHm4g+RrmH7DpmPhGlnPXMAhaHhvpUhBmROQ5PuEZx7BV16Irvw5padT7vo0DVxenB4m/N4FyNKzG1nfIwyakRq5ygDTNhY28zGQyHzK8lXeHT+DNBI8ZRI0RqDuDq85kzvjqvKjtdEzpaGwQywpPZPjJhcuw== 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=l8+6cBQXJpZpjxmoh7b+127xgJ+dIuStviqcFBni660=; b=szNHPySEJf0jgkkDY8/3ZjD99PWO660nl7y0e91bFJL86N9OJ9XeQj7oRxauNDVrdjAtHsYaPR8upIrAgFxisrDMc76mlN8Eywt9sC9lYTwlYXRqYrwRRb7hGjqkpjoIpxMk4+8dEAmfotl3IGzJwocE306ovP4gVpI/uh+fdPysoJxmxdp+FcJ7TxRgleaHsGZ554hqcOpxNOIilG8YbNbQCFLusz8JZgJbyuM2C7RVMaM3YvQ89kxnJL0zAs8Ez09Bs0FUhn9mEnxDd4VKAWmCcP8ZACeeNtmvjXcUg1oe9oTwoQxGG2++tmFzquQWVo3SmkFOn3aFmud2u1xPfw== 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 CY8PR11MB7290.namprd11.prod.outlook.com (2603:10b6:930:9a::6) by PH7PR11MB6649.namprd11.prod.outlook.com (2603:10b6:510:1a7::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.17; Thu, 17 Oct 2024 17:01:37 +0000 Received: from CY8PR11MB7290.namprd11.prod.outlook.com ([fe80::2fa:a105:f81e:5971]) by CY8PR11MB7290.namprd11.prod.outlook.com ([fe80::2fa:a105:f81e:5971%5]) with mapi id 15.20.8069.018; Thu, 17 Oct 2024 17:01:37 +0000 Date: Thu, 17 Oct 2024 18:01:32 +0100 From: Bruce Richardson To: Stephen Hemminger CC: , Jerin Jacob , Aman Singh , Konstantin Ananyev Subject: Re: [PATCH 5/6] net: add smaller IPv4 cksum function for simple cases Message-ID: References: <20241017142214.1669370-1-bruce.richardson@intel.com> <20241017142214.1669370-6-bruce.richardson@intel.com> <20241017092431.75cf1b45@hermes.local> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20241017092431.75cf1b45@hermes.local> X-ClientProxiedBy: DB8PR04CA0005.eurprd04.prod.outlook.com (2603:10a6:10:110::15) To CY8PR11MB7290.namprd11.prod.outlook.com (2603:10b6:930:9a::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY8PR11MB7290:EE_|PH7PR11MB6649:EE_ X-MS-Office365-Filtering-Correlation-Id: a715d708-1eef-41ca-9eae-08dceecd5cdc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?jj2mi/V2ycFq5pJwbd9mnCY9ZCoHgCziUq9ndnHxoLOoIHml8uYQuzW0r7K8?= =?us-ascii?Q?DMS1tYRXXk6wMgrmb/LuUxoBsUTnL09y/JkWnRssUiA0fPj1Mq1SQ75s4RtZ?= =?us-ascii?Q?3/fVNp030f3OY44nZjigOuha/7FtDxjtIYTuH1CiyHo01PcqKuIdSFxojhOy?= =?us-ascii?Q?1fiPnQk+7gWc/GkA4+HylwQ51jsqVTq3BXJsmOkasxifNj53Z73DxWJeHgFa?= =?us-ascii?Q?YsetcDjGAG02QUGi78SQamRl4u2Ic/cYebfcxi40tJ8Qpu3gvpPqVDTKvCBg?= =?us-ascii?Q?WlY/oDtIhoXKx2Z1go3nuhIVSozsSeix7uhMl28E5qSGabwOlrai65HN3HGC?= =?us-ascii?Q?forUdZLnGUytd1HirRo550yEurS28PrH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JWmhGk+LmfvgT9GUM1/eYnuA7ikM3S/tOBCVn9bHbpDTxFafwaicqK3LNqD?= =?us-ascii?Q?r7b8MQX65Lgl0PncHj0/LNMx?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY8PR11MB7290.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?z+w40b4sCKF8S+DT9FFomlKngN1fsL2ZhvzDU9A0uj7BOPizHH1r01UkSjKy?= =?us-ascii?Q?XSbowA2wBdqeXgOKAkz/2t4sL71jqTFfN38dgczK5TtFKGAFFiQkZ5Lx/FGw?= =?us-ascii?Q?iR1QEx1/TdH1qc78+6phhwI/qz5YhIzdm7CtDpL+duUWt4hmQ5Dhza8yG+fm?= =?us-ascii?Q?9UIo+p/78OVqoBFxAWqA9UEz4owQ6Fa8nFEBPlZOX/k7wKdi8mHLUFl8rvzd?= =?us-ascii?Q?Q2CsWeU2qpAmqOK6ATNHpUqvP5QHQdh8lQRh3bux4532VP6To4ckvanu5P3V?= =?us-ascii?Q?dV4n4Z+9Nd+UT/jSMdUvnJl+ks1rPU4rvhbWPgaYvc/8kikSwpv8rMr78EK2?= =?us-ascii?Q?NJRghTEqh62Wi8q3ZSDko+60aDnKe9ut7yK0w4CBPV+HjtKNA5zPuC313nIg?= =?us-ascii?Q?Q+iQwOLaDozh45JhaaEfmLSTx5Dd+CqOb9kf2qVsO1oFaZhmqSWWKp9IL1vO?= =?us-ascii?Q?6gGx/T/vSMpZ8eTwkZDnrL0nhXEM7upeJ9oJyIYsXdiCZS/TgZVaAqaURq7L?= =?us-ascii?Q?5yagEtnf/G9ENvsFfnUvHz8+ZaFdCqSlZzh0s0mwYNUSrZgIkOevH1bkbtLf?= =?us-ascii?Q?0YoW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us-ascii?Q?7AkOvTEBTjjf5rBvSHchuV5EW7B2/ufNvX91mGyflstWaLZAifNl2Tcd+RcV?= =?us-ascii?Q?03vCXOTe9fOqDcceapHj5sMJV6vmHGJJcmlgSoXRWFnLmXF2DsNIhV19bAmH?= =?us-ascii?Q?zg=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: a715d708-1eef-41ca-9eae-08dceecd5cdc X-MS-Exchange-CrossTenant-AuthSource: CY8PR11MB7290.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2024 17:01:37.5944 (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: rjU6hHkhcpeDVxYo3p4jRGLGRFY4JPpuXb6+6dvyyzsmcN/9TWtkPItVh8TT/DKtRHSjCN9WWBJ50AgzW+Pk/6JV8hYDNq6akQdNQsxvLTE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB6649 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 Thu, Oct 17, 2024 at 09:24:37AM -0700, Stephen Hemminger wrote: > On Thu, 17 Oct 2024 15:22:12 +0100 > Bruce Richardson wrote: > > > There are multiple instances in the DPDK app folder where we set up an > > IP header and then compute the checksum field by direct addition of > > nine uint16_t values in the header (20 bytes less the cksum field). > > The existing rte_ip.h checksum function is more general than necessary > > here and requires that the checksum field is already set to zero - > > rather than having it skipped. > > > > Fix the code duplication present in the apps by creating a new > > rte_ipv4_cksum_simple function - taking the code from the existing > > testpmd icmpecho.c file - and using that in app/test, testpmd and > > testeventdev. > > > > Within that new function, we can adjust slightly how the typecasting to > > uint16_t is done, and thereby ensure that the app can all be compiled > > without -Wno-address-of-packed-member compiler flag. > > > > Signed-off-by: Bruce Richardson > > DPDK should use the same optimization as FreeBSD and Linux > and use 32 bit add's here. > Yep. And if we get this patch applied, there is only one place to optimize, not a dozen! :-)