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 F35AC4613A; Mon, 27 Jan 2025 19:43:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C67F540A72; Mon, 27 Jan 2025 19:43:48 +0100 (CET) Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by mails.dpdk.org (Postfix) with ESMTP id E364240A6F for ; Mon, 27 Jan 2025 19:43:46 +0100 (CET) Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-2ee46851b5eso6355797a91.1 for ; Mon, 27 Jan 2025 10:43:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1738003426; x=1738608226; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=9xZCZbs1k10YVFfd6GvPTZnu7SQ8iBgKItVi4Z4flZ0=; b=T32syvKWi77bRDuzi75i1NwOOuQGCVS+ADRoyqdZMI9uwrrvkScwg+0uAmvmIPvag+ d3HBQkaKA75yNA5/uAELCMjDZxEBrxg3XfwqRrl+GsoROD9SANYYNvOQstUQLEIc0dKM qF0lxea2sa+Ic5R14RakCDdLj6W1RBTl4d8P08IhQAAKX0jjSt386CliNRqA037mLVff QlKTxJeF0sFht9VLO+lhe7YbiSo2UVwL7JZ5vwn0O68mA6e18phqnURXV9Orz5jz4DxC 9u+TZoJTwecR2BlDz7tfnv9UvKo7It65xCxLV54H5ybRjbv2SwnRLDVLaVxoS8hvVHv4 RLUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738003426; x=1738608226; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9xZCZbs1k10YVFfd6GvPTZnu7SQ8iBgKItVi4Z4flZ0=; b=qf8QKhGHhhc2Yd8MRecS9OXCPHynhoQgfzS5LmsPAN/731qaCxketG8aPe5ozsEzff Mo7OZbyT4jcRsgKfx+zCIAreC1s6GaflG+Ho+u4MkXyBvFJwpVPYO04ZksvSllD++nPH fI6jQYYA80wML2w+pjQhdacuZ2B4eNoB/Bu5Dq1PZFkvJksdWA7ljAC3Jh7dyCjb3T20 HJxB/8PvZKB4qBC1CdPpLwIskcJfKSuNEAOSiVEabEIRbgGFcPtQt1lh5ou79CxmafMH IwSzLpNAmEmhYa0SR3PZIOSQKG5w4BVvsRog4U+/4Ri8u+G1r0w1+uux3D2Y4GBhL807 RPEw== X-Gm-Message-State: AOJu0YzJsyuto+OCki01OrSqLLYJsBxVWOOK4qQzphHBC9NyHXf7wiNe 1wi2zZ7MWSnHvXxVck2diGJ74LCgOJAfE9P2ob27HtWpKL/15x728Fc6ZfX+4OM= X-Gm-Gg: ASbGnctffxgiVj7jEcvwtE+phncQlnx1249n1oGFhEmEno8bQM9pLtOgrkNFjwkN1je AHjsEJcHkhn3Nn7uTJNcrSzbYB+UtelZ8n1FxHwp3vCL0FovmTbkgKqvJGaPlcZIKhgzXnk4ofm nLgv2JLBH/fJ06b3nFwTMH7bLyP4KUYm1ahwE71OZiYw2LyFgtGDAKikPystqa1+bj6VHqMbyKC Wsqe3SFyyx9bEmz1LzAgWSE+ydus8ULjXrbLP0QZWXeMK2d1HvXTIWaDggONgok5XFcgclzYtjL 3GyjH4hpEFcYRCUGNIS3V+F2nP7t/IRxAaze6cAKW5GSr4A/kAcq+siVLA== X-Google-Smtp-Source: AGHT+IED0oZnS0jrpwdlmh7tFfdWPGhgsc22z/PsvOIakJSikEzmxb0pgTHY8XPQZwNCPzx5YoV7QA== X-Received: by 2002:a05:6a00:179b:b0:729:a31:892d with SMTP id d2e1a72fcca58-72daf94f5bdmr69098408b3a.8.1738003424388; Mon, 27 Jan 2025 10:43:44 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72f8a6d3016sm7537025b3a.79.2025.01.27.10.43.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jan 2025 10:43:44 -0800 (PST) Date: Mon, 27 Jan 2025 10:43:41 -0800 From: Stephen Hemminger To: Bruce Richardson Cc: Subject: Re: [RFC 0/7] Introduce FreeBSD macros for SAFE iteration Message-ID: <20250127104341.749f7cff@hermes.local> In-Reply-To: References: <20250127180842.97907-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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, 27 Jan 2025 18:16:18 +0000 Bruce Richardson wrote: > 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 > I would be ok with using libbsd but only if we didn't have to keep a parallel copy for all the other compiler and OS variants. And would it be global or a per-driver dependency?