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 980794613A; Mon, 27 Jan 2025 19:16:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6970540A6F; Mon, 27 Jan 2025 19:16:31 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mails.dpdk.org (Postfix) with ESMTP id D3FED40698 for ; Mon, 27 Jan 2025 19:16:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1738001791; x=1769537791; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=TkIeNen6Wkftw4k7ibaz6gldAFr1t6BmlftxPWefaB4=; b=U98eHnB89xdmp8iCHIKpUegegqe6M2Ba1CXM9IAqhSxiZoH7iunfvBBl fuXPki+U52QgFHYH4znKaVAsCMtoL8VZvy3wFTHcvYwGMA44Lo7usDEx3 FmkMwtZX5KAr9b4ceU1qIW8fcGbyiijdq6QgYDrVJRDmuPe/10skxthOc KKY5E1XRb8nCiXbhyChfa2O7ocGTCvB/q5QwbZw1zwLYDy5FpPjVJ5tCU 8Vlx5Q8dxP0pjWuknotet4UhKXqGvL4FYcVUeWf9isnX1D6EDHrtz/mWs tb5uwO1ocKzmByCPU2VmukXuphCdWlKXWbXbzhY/qyYMxh9MHwXIYIUGc g==; X-CSE-ConnectionGUID: j9VRcpjbQ/afV8TfEzpf8Q== X-CSE-MsgGUID: XOhb8eTSSqG27kLST4DK6A== X-IronPort-AV: E=McAfee;i="6700,10204,11328"; a="60942469" X-IronPort-AV: E=Sophos;i="6.13,239,1732608000"; d="scan'208";a="60942469" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2025 10:16:30 -0800 X-CSE-ConnectionGUID: 6grJzyagRIqRWRyz6sCrqQ== X-CSE-MsgGUID: PLq9a3hCSR+0xKtb9krctg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="113644229" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 27 Jan 2025 10:16:29 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.44; Mon, 27 Jan 2025 10:16:28 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.44 via Frontend Transport; Mon, 27 Jan 2025 10:16:28 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.42) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.44; Mon, 27 Jan 2025 10:16:26 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=fZ+c9zjQyOxZTU2RRZAUa5v90fzFYsX5NiaB/iNe5qIW980ym4G2b/ZguYsW7mYbRJwNOLCJNsP0rtUYDN/dwetLx5Ni7mR9e7QFCh53dEfGH9ZgqOx64GYUjHOYh2LU2VM2yHlZ4FV21ZK+R/KokyChCP+uEqz5+F2kUZ4+J7lX0VlgJZHvb5iR35v/xQeWoyMY9gxfY3oV4/c+T4kwHXVWc3+EeunVMNCAfyACflEJvk43gcU78R2QW87TaGzoq/8sx8hqg2zvxmgWwI2wlB3iV0Ot2aezor0Fnd4tNGgxwOI1T0RfpmZ/pj8lY5/CwLZulbYGdDZBDlXPvibXyw== 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=iPBbjuJdtpb+eJyijHKDvlveY3cYrY2ssMihMr8tCqw=; b=eNSn0U7W6f1KOnexgVw6rhvN2wo/vRhz7mDjuuvH/vr6TTQ7xAtYLZvLmXvTRez1DSc9t81bcSb8CHHY6zAsPxyDimtVp+NUjtOrTILbkD8uZfFQ3bf3OvVwaUdpa6rMSsjK3cEM7CH5WTNjbIjmcdr+FjGL1pHDz+gdJOU++hM4AHEAL8mUpPxhGEguufdKpmuVnpHcCNTGMR+xqdJP89N65ARwgKN89CHLIOWMs1IRQYXb3xxSd1d5sjn1FywbxKHkySoMwKZFEBTJwmqgPLYH1VZRxZIy9+9YKAwsFuJmhejboqQOTVqIRwzfzXxMpF0bzE7gmTIbraCzwTKz5A== 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 IA1PR11MB6292.namprd11.prod.outlook.com (2603:10b6:208:3e4::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8377.21; Mon, 27 Jan 2025 18:16:24 +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.8377.021; Mon, 27 Jan 2025 18:16:24 +0000 Date: Mon, 27 Jan 2025 18:16:18 +0000 From: Bruce Richardson To: Stephen Hemminger CC: Subject: Re: [RFC 0/7] Introduce FreeBSD macros for SAFE iteration Message-ID: References: <20250127180842.97907-1-stephen@networkplumber.org> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20250127180842.97907-1-stephen@networkplumber.org> X-ClientProxiedBy: DU7PR01CA0020.eurprd01.prod.exchangelabs.com (2603:10a6:10:50f::25) To CY8PR11MB7290.namprd11.prod.outlook.com (2603:10b6:930:9a::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY8PR11MB7290:EE_|IA1PR11MB6292:EE_ X-MS-Office365-Filtering-Correlation-Id: ea63f3cf-f182-4105-9f90-08dd3efeb57a 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?f5cm2xYp7kQdx9ObbUaWXf8HGqgi2bT77mhZxiPgxH+qNc3fJehcbgJLiSPL?= =?us-ascii?Q?vUPMiyS40/PbeFv2orYg6tTIi9HMKOll40DHaw6UfbIeM2ZjzPtycY2peyQW?= =?us-ascii?Q?h7VQwaWibpBJjIDJWsQFLxUX3QPtljxW5XK6aTafbxGWtonqoGdv9pF5W1Gc?= =?us-ascii?Q?LYBgBOa4soTWb38b6CLOknk1ejmIi2HBGt3bqnQ+KGEbzlY6lXvd+kiLQhCi?= =?us-ascii?Q?X1hCmBIJJetkH06JM6h3EbOhnXwFrtLBCVYJ3AKKZzpM696mn3WVwbAu4uFu?= =?us-ascii?Q?38wWNMB3ryTtswDFIlmeCFGqwKreIyuaKc9u2f8w/OV0+7L8v9/Sd4gMUaPm?= =?us-ascii?Q?1KvMIM70s2w80rSl5d5YRqjqM33vOAr0cy/s6UEznmSJIVejPorXgruhJ5rW?= =?us-ascii?Q?YsdwgBOO0XELlzBVl95QqQo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lVUD7OU8W?= =?us-ascii?Q?jGZP1vrXAjRgjjqmAhkB0VvOFr5/dnwsyVHiPaDcfYGzwTnj5Lm6JTKbeKyM?= =?us-ascii?Q?VK8xSTVrp+d+Hl8p5srYOhq9mUw9?= 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?WOySHaF5mEhc4EmZNK1q/CTzd0lrJpQATGP2dZguf3evFxBHJk9RWu66j03R?= =?us-ascii?Q?IP/8aYLu8BQYLccbW3l6bx+HNs26tr7txvvUIOCdVlYVP6kKtqKqAaH7sh4a?= =?us-ascii?Q?ZWgzqTNnMPYvfSGyrt/9ukTyQwF4wTaW4CR+2wlPX1ie4nWap9AOOBN3/ukF?= =?us-ascii?Q?AKJJzEnsNaTXdiGlETQ1cO2RtUUu63RFHKiSvuBrXjbsbbR406SffXHQ2qGS?= =?us-ascii?Q?oCfUhj42/o+z/1prl3CTgs8P2pM4fXYK0DH1vpoRZth0SBa/OERjMlGm1x9H?= =?us-ascii?Q?bMHr0lrKQgoMkqt3ZYHM/BqtIxm+C/+sOuOJLz/EF6/sVYp6EjaI6R8gx+w1?= =?us-ascii?Q?IMePPhw0mcSvHlB/gpC/M5OY3IhMEIpCdXU+W+9XKf6dbvexIshXgq/6un6n?= =?us-ascii?Q?mHKDUrueLWWh8SCgr4rztSESgEP1Naem6RNKZCqFqGaTt+cc7jQ6FuOwHZBo?= =?us-ascii?Q?edLo/2fbxCFuwh+YIfeM3qHd9dsdQmafx139dbhd9AVs/iEzFGLo0dC8B4yF?= =?us-ascii?Q?trHHoKsD1/a/ifEgVrwOMAIxXIN7UUN8Aoqf1dFbQ19PyjFDQBhcLQye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4wwxtO9Pe7GHnb1ZSKnh+wmfSmXv?= =?us-ascii?Q?JFlsr/+TIH8ZTJkOe6RxTnChuVVqmiI4JYC/6OQ2fonbg1T13g4A1mlbvsdQ?= =?us-ascii?Q?CWg1Os4vXFpt7SXHUFrxKAAKrXPCQcIshmb6OshxEbzXmKEuEw/OFlRn3efQ?= =?us-ascii?Q?xA=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: ea63f3cf-f182-4105-9f90-08dd3efeb57a X-MS-Exchange-CrossTenant-AuthSource: CY8PR11MB7290.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jan 2025 18:16:24.5086 (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: Owk+G72DHuke1EFNm0LqSbbZzK2J63HqxLgu4GnGOIr7ujCAmrsSksty+jr4qlskS2tGWdKvX6P4HsVenbI9y6M3x4CQAdRQdvIBWEEagvU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR11MB6292 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 Mon, Jan 27, 2025 at 10:03:54AM -0800, Stephen Hemminger wrote: > This series adds common macros for safe iteration over lists. > It is a subset copy of the macros from FreeBSD that are > missing from the Linux header sys/queue.h > > Chose this over several other options: > - let each driver define their own as needed. > One Intel driver got it wrong, others will as well. > - rename all the queue macros to RTE_XXX variants. > Seems like useless renaming and confusion. > - Several distros have libbsd package with the correct macros. > But adding yet another dependency to DPDK would be annoying > for something this basic. > Actually, I wouldn't be that quick to eliminate the last option. It may give us some additional options for simplification. For example, the strlcpy and strlcat functions are in libbsd too, and if we had that as mandatory dependency, perhaps we could remove some extra code there too? /Bruce