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 5855D43BC0; Fri, 1 Mar 2024 09:38:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D67A44025C; Fri, 1 Mar 2024 09:38:41 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) by mails.dpdk.org (Postfix) with ESMTP id A68C4400D5 for ; Fri, 1 Mar 2024 09:38:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709282320; x=1740818320; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=G+B7pw+mG47waNmnHf6ADRiYEhFSxbpAVBSPJ8uolbk=; b=FROii1dPGhKfR24wj9xRMS14napCiOrDtB0ycIofvbyhG30JFLOrqHHC 7pwCguaKDgtQAZbM4LEP9iq4lqY8ugq31lJcakN0iNMmDWxb8dhJ5CsT/ 1qA2DGWAmBvYhOB0DyDoYhfqfgGpZtB1fFfpU9Kuly7brnwqDnoB1pkZX w7TXd7YT/3ttPXp6cdOrm3IFCZ5cX7t71n5F3HFMgvSpJ0Cbt5djs3u0x iVPtBQRzVy3VAgrRUfd30PMhySugBkH+sJqNXaB6Be48XFycELPfp3iX2 yX3l98KGPlk1oTou9fLfQuir0LAm4vPufaCn0DadHryO0gPqJEctxfxz8 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10999"; a="15219969" X-IronPort-AV: E=Sophos;i="6.06,195,1705392000"; d="scan'208";a="15219969" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2024 00:38:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,195,1705392000"; d="scan'208";a="12817735" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 01 Mar 2024 00:38:37 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 1 Mar 2024 00:38:35 -0800 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.35 via Frontend Transport; Fri, 1 Mar 2024 00:38:35 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.101) 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.35; Fri, 1 Mar 2024 00:38:32 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e3j/8xD5bOlfSbJQhcv7CTFCsOxDZsEY1hsrRhma8w6sbtfYhAvxnnNb6QDYfzVSmn/dcFAqyRuhQHtt2jLwYdL3f1Q39cGr9DSq33w+dHHeeEayGUrpYC5UWBT0Sq0BG5kv5+zq1GnvqJbbvi6heRoYRQNWwZVfLDPFBZAMyV1VLF9DCNlCcpE3a56c613CfHcbGmnCeiOiSqWMuTeHD+YYv9q63LVhPKYqyshAtwhb/1lgZ680rbqr81imnALhjTuERTcvBe8aTLk0ZGJtkKHpWAmIDelBTDSLC9xR3QjF8Itq1Alhp8uAAyoh6X2NBpO42ouujNFEW8hmLLgvkQ== 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=jRx7tIKjKUZsfKqkMiXInCkZRWD4l7GWYaMAAwyJ1J0=; b=J1k8JkJLgMHlf3GswNfaJQ1XQ82zXkRfG0xA5w7sbF8EBLpM6konsGjnl4zcmm0eFjExclDqmxDZOsHF8rit7TKTTDGgag4m4j241zxRHCHvxRK9phpoSWo2s9W4O0vpwfHsmWHZrFpG+GR5/8kYdphbP1S9bvVXCplK8c7Tq5a8J2O8llfkoaI91IzI8IqBIpBEynyf4vRdEsTj8rceZ988G01AevjkfFgAkQT4CkakPayczKTTqgSTvisgFCy71LK1A9Dh/6TnIztAUDsZ5vB0UrfOqy1DnKY01eckP5tPOq2Uttbik3jAIv5WO3c3gLOPsPM8iWNd6dscDf6neg== 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 DS0PR11MB7650.namprd11.prod.outlook.com (2603:10b6:8:151::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.23; Fri, 1 Mar 2024 08:38:30 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::d10:3009:a8d3:1d2e]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::d10:3009:a8d3:1d2e%7]) with mapi id 15.20.7339.024; Fri, 1 Mar 2024 08:38:30 +0000 Date: Fri, 1 Mar 2024 08:38:26 +0000 From: Bruce Richardson To: Stephen Hemminger CC: Subject: Re: [PATCH 00/71] replace use of fixed size rte_memcpy Message-ID: References: <20240229225936.483472-1-stephen@networkplumber.org> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20240229225936.483472-1-stephen@networkplumber.org> X-ClientProxiedBy: FR4P281CA0261.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:e8::17) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|DS0PR11MB7650:EE_ X-MS-Office365-Filtering-Correlation-Id: 6d9f66a1-28b9-4b11-fe34-08dc39caf91e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: E5VyL9sNk4y1KUERfg7gsc7HL6gUju/cXO0C/k3j1xHtGucmUN5gjlK/Xu5bLXl6tazT+QtmcBwd/oP0i8U6Bq11g0SB0Y+ZtPi/McBKRgi1ynGifOextJyQUDRWdmhuJPrWN6Tcwiik13T7/JoQKJ8NfrQJxGLTUOQY2WHk9gHjNlzZsZoYv2vUNYLf25DzSQmaOzClPw8WeKBInrzD3H04uMECGjnoOQGOAKxuX5VZw5lPRXdcFuvs4pH5UsykuHBgYvhyaosnnBD0ytJc2u4aRcmeG2LjEFz93iMuW7XiIUC9LBS+PI2J8rceYOgTfZmNzHILwPw6yTGUdLUXYFgR9dqhZVtQdqhN1zURsdH8YI+fWZTAGf5h6XQeXdEPd3/NWW1hoMGJMPFXgbR3/D7P7VT39+NlJlab29P/4aFlT3DMi8FogLQ6QeEDrUdACVWMTVtjHxGEYVbWFE8NRyxIakqkYgc5bhQChv/zrNHIzcG+uz0mGEOCT5d+MrNcOf4fh/q4p9t7YVrjWCmMjUQt53UrUHheRuagxmxEskwIs+hBF+dq3tpDF6Uv/qvgmfPOnPZKE3UHeuELmrJvuQRJrNELrcTtxcYMJjSmOYXugFvEcGY+8x3YRCBsLL53 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:(13230031); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?xbEiRsz24FBM0Twin590Ym7YTkflzZH5fW+zerakxdIA/TlBm7P0afLUVzuI?= =?us-ascii?Q?eDwddZKOKCClcXuIUm9Fp3It0cXT+TnxByBR4Tvztjk0GHOHbADK9CpcjZmK?= =?us-ascii?Q?5krP0Gu++jn2nLeUOkPkns3qqdsZ2nb3BieGT6S3DT08OjJgtDivpIbZW3bA?= =?us-ascii?Q?UjU8l4Gozev1qZ+aM3pM2PM2rMXmSeT7KbX3VFNQLEg0RSbt5HrOyysw9gJ4?= =?us-ascii?Q?+0WiDy9y1mqXXVAaDE4bOCIhH87KMKFqg8GTpCXola7dUi/VJX4igbNZdCI6?= =?us-ascii?Q?pNFsgo/OpaoVRI2SYbWoaUDPkpG7BXQEF5DgUI+Xs4iKQiBVF2R7yDlxuYeu?= =?us-ascii?Q?gsnVZJOtykLy4hAj8TqWT6jNV8Hpz9Z0oxcndnYo8daAIMPnF6EzbdEUlnvG?= =?us-ascii?Q?6uMp4auuaCA9JLhNLeIq6fA9qqpFyC9LnzCwe6Q2A0SCmvzgDCCPgGjHK21m?= =?us-ascii?Q?KYU4ozPcbs1oDDGGA6JfTAZXJfLOWv6Lo12vzAT8LeFKUME1jwfIGp7fmTNc?= =?us-ascii?Q?wshL7L9VVWecswfDarRx0Wfalxqm3XqZ+d7ZjQ6ytJjaTaBg+sYgJ+MLEzZ8?= =?us-ascii?Q?eBEg9Ct7S7EvM7vE9Lsjl/BGv6sNabBBX+vmhm/oP9AWQEs6bZ/RGul0szwn?= =?us-ascii?Q?pn0Okzi11TVqLz5ES4soSSlwKHABi78U0UW/XwyuMTbNEeXlZdYd26boxXKB?= =?us-ascii?Q?2UNX6YirucTrNK5rC39u1L5w3Tm38akeUR3FcXGfeHNNjVA4zv3t3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Tenant-Network-Message-Id: 6d9f66a1-28b9-4b11-fe34-08dc39caf91e X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2024 08:38:30.7146 (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: E/GOxD6rPDatQpO+yL983WU5bjYkYo8TJak3z0Hc6ZvvYsEiZGmjyxj+BREPl6a9YQQMKqb3SEi7aw1Ra+/YebA8bB/DAcChonWCmcOP7og= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB7650 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, Feb 29, 2024 at 02:57:47PM -0800, Stephen Hemminger wrote: > The DPDK has a lot of "cargo cult" usage of rte_memcpy. > This patch set replaces cases where rte_memcpy is used with a fixed > size constant size. > > Typical example is: > rte_memcpy(mac_addrs, mac.addr_bytes, RTE_ETHER_ADDR_LEN); > which can be replaced with: > memcpy(mac_addrs, mac.addr_bytes, RTE_ETHER_ADDR_LEN); > > This has two benefits. Gcc (and clang) are smart enough that for > all small fixed size values, they just generate the necessary instructions > to do it inline. It also means that fortify, Coverity, and ASAN > analyzers can check these memcpy's. > > So faster, better, safer. > > The first patch is a simple coccinelle script to do the replacement > and the rest are the results broken out by module. > > The coccinelle script can be used again to make sure more bad > usage doesn't creep in with new drivers. > Thanks for this Stephen. Series-acked-by: Bruce Richardson