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 6591243C41; Sat, 2 Mar 2024 18:05:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F0E6B4025C; Sat, 2 Mar 2024 18:05:44 +0100 (CET) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mails.dpdk.org (Postfix) with ESMTP id 1BCA7400D5 for ; Sat, 2 Mar 2024 18:05:42 +0100 (CET) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-6e57ab846a1so2179447b3a.3 for ; Sat, 02 Mar 2024 09:05:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1709399142; x=1710003942; 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=SPQj4IqotOhJgxss8+9bd2dYatfWvhRuuclFNag9/5k=; b=rlf0WEQbvdZrQ3zy4MwtZOVP3W6ZyY7xfW1IBPkdqRKJ2XucokkdUxm8HIRFvBAa8j n34R3qb/A7sfQT05NHKpfTdLBwDM0sY1oj1to2/apxSQ6gx322Kbbf86QlGjT0u49b5t ppeCIh2YhIrBxr33PjvOCv6wNmxcDfdUfmN78H1BbDzisj13/7KOZ5UYMAmvlRblb+6a yjK3YzmhOXePGL8VVrQ3suCJk1Rxqjo3pTnYd9kyGq16jH6Jhse6BbhNUVL/Pqpn+0PR HEVIvKkTdUs8VbGMVWOc56NGxQq+iePuswgv65qHCPs/sjF8UQYBeMjUH/+Iq+mwvXek mkdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709399142; x=1710003942; 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=SPQj4IqotOhJgxss8+9bd2dYatfWvhRuuclFNag9/5k=; b=HcHD9Ar407fMJ4bCOhahZdvYKDt4EadJ5QJZtrulXmqPuTxryX6Pvwlm7U5fumv7m1 2ByBvneUA8Ia9kCCxo5Wy8BNZxbtnjSUkKt5mx+5hY3qNbGv2TrxsPAjM3suhMDhE6QJ 1D7rghpDYaMaVNiJbLIUL+7WVahE2+ha1qLYzPzHQkcWpgWo5U+GM6zOJ8mBjmrCN+8K vMHgeb5mbcxoHDAjS7l2wDxEhnj4cpez+fPw68KxaLoj8KFEJwoT0PzapIpkvm8qkJCz zqVQ44wNh1ObEW7JNWWykj3a3DwT9BMvVAzZHeWOllxhUQfodO74r1x2544A8sdU5hI/ zqJQ== X-Gm-Message-State: AOJu0YzBkGCWxyQ73Wo4zBpBH9dQoobctKYqvr00KY1MUcgeIS/f1/bP QmbEjphMN2Bp/j6F/L9krIQf2C6Yk/EmZ2RO0tHU23BeZStM13UdNzKcTJ9aZ8w= X-Google-Smtp-Source: AGHT+IElV+ce4xheyWrzOq1HLpbR4C1qSLoWleRZLKs6XQuCRldTjWjXLmXwoYyX1e6hLJTsXmP0LA== X-Received: by 2002:a05:6a00:2342:b0:6e4:f12c:c43e with SMTP id j2-20020a056a00234200b006e4f12cc43emr5959880pfj.24.1709399142099; Sat, 02 Mar 2024 09:05:42 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id i13-20020aa787cd000000b006e4762b5f3bsm4873986pfo.172.2024.03.02.09.05.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Mar 2024 09:05:41 -0800 (PST) Date: Sat, 2 Mar 2024 09:05:40 -0800 From: Stephen Hemminger To: Mattias =?UTF-8?B?UsO2bm5ibG9t?= Cc: , , Heng Wang Subject: Re: [RFC 1/7] eal: extend bit manipulation functions Message-ID: <20240302090540.0e79e42b@hermes.local> In-Reply-To: <20240302135328.531940-2-mattias.ronnblom@ericsson.com> References: <20240302135328.531940-1-mattias.ronnblom@ericsson.com> <20240302135328.531940-2-mattias.ronnblom@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 Sat, 2 Mar 2024 14:53:22 +0100 Mattias R=C3=B6nnblom wrote: > diff --git a/lib/eal/include/rte_bitops.h b/lib/eal/include/rte_bitops.h > index 449565eeae..9a368724d5 100644 > --- a/lib/eal/include/rte_bitops.h > +++ b/lib/eal/include/rte_bitops.h > @@ -2,6 +2,7 @@ > * Copyright(c) 2020 Arm Limited > * Copyright(c) 2010-2019 Intel Corporation > * Copyright(c) 2023 Microsoft Corporation > + * Copyright(c) 2024 Ericsson AB > */ > =20 Unless this is coming from another project code base, the common practice is not to add copyright for each contributor in later versions. > +/** > + * Test if a particular bit in a 32-bit word is set. > + * > + * This function does not give any guarantees in regards to memory > + * ordering or atomicity. > + * > + * @param addr > + * A pointer to the 32-bit word to query. > + * @param nr > + * The index of the bit (0-31). > + * @return > + * Returns true if the bit is set, and false otherwise. > + */ > +static inline bool > +rte_bit_test32(const uint32_t *addr, unsigned int nr); Is it possible to reorder these inlines to avoid having forward declarations? Also, new functions should be marked __rte_experimental for a release or two.