From patchwork Fri Aug 9 09:04:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Mattias_R=C3=B6nnblom?= X-Patchwork-Id: 143037 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8597745777; Fri, 9 Aug 2024 11:14:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 76ADA42DC9; Fri, 9 Aug 2024 11:14:19 +0200 (CEST) Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2045.outbound.protection.outlook.com [40.107.104.45]) by mails.dpdk.org (Postfix) with ESMTP id 78D7C40274 for ; Fri, 9 Aug 2024 11:14:18 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=D6CvFyOCtZIq4YuPsUv98IOGtkv4sc6KGO4OdOsj1gAO119Etek0Qz4fdJZXKNkhc7NinSFGY64w3p8FejNkyV5WHbiJuw63gprE7b8LXEOMNdDtYrXxFgDLAOM6Ne5oRKVHfwg1DioUp4ydcGpEYfWQL+6fBE3onJMqWvBrjXwZqvSgxVGnTDJcBNWVpDNsKZZe7uQOmS1aM2NzgGnToNq656ob8kknB7iuoxPkl5wcS0z2BvbBQuYTiwpclsItPWc6P2w/xBt8rMLZHd1KZ3xSczsmgo09UyMIfmAMzojdJcQV2wFCjfBcl0oElFoOIPPAgZDOfLSuJdYLsGct7A== 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=uGaYNBWczZiaiy2F567USLR166LHBzCdDI8GvTpYwsg=; b=SL+HijfozMKAin7iDP2TIEtOnod416MLhLhXOCkakISukzvf/1hxjChjTZDaBqi+GHUizQ5ATOJf+UymR0YdbXuNr+A6+GBzcsnmK6D96e7l0BjnkniQouFrW9eF6XG/Pc7tQquoy3+hUCiCa0OUCUQdIf1l6ZUcHoT6kJo6gE2uwUugMSNAqR8xm0mQRSQi7lhy9a4MJdx4ANhZmUHlQv4uA7eE3bSkwvmc+DrEPjfe3S2cIH6UUWZsObDJmJTIJLvl/VrgP4l1E2YGXGGDt/nlhL3EcyhQtnzuCz8EHsRSgNkho0qhHFL22CJOvEpE+a6kC7F56zDIAAlM0Hm/AQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 192.176.1.74) smtp.rcpttodomain=arm.com smtp.mailfrom=ericsson.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=ericsson.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uGaYNBWczZiaiy2F567USLR166LHBzCdDI8GvTpYwsg=; b=nzGx8jaAsLtV4srtwPWa4O6SjpjrMxq4m3DusTGPkPf46Xm3qtj+zmO8j0olLB0cWjG3+X8gsO5N0d5FzvDl+YKs3KaPDKxhV4tgFkmM+kxTKgTrF95J2+/tR/ryDkAEn3zXli+/wBkVCAXOc5SPs0RLxQtGx00qZHkQJ0MQ7UiL/fSWzQvoPw3kyv/AZKIUkEdFZz3avWazp/vgz1bYJ9DFP6o43OB2EKyqw+lWqKOjT+/956ESxZN2+YFdCfcqsiqLWxoK8lHGsxvbUSOU/n7tHKHFZrXsOngeKOy4fvdI4qbLAoAlc5la+B6BdufP7sSvKDI6w9uzDU/5A5RJbg== Received: from PR2P264CA0003.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::15) by AM7PR07MB6849.eurprd07.prod.outlook.com (2603:10a6:20b:1c1::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.15; Fri, 9 Aug 2024 09:14:16 +0000 Received: from AM4PEPF00025F98.EURPRD83.prod.outlook.com (2603:10a6:101:0:cafe::e2) by PR2P264CA0003.outlook.office365.com (2603:10a6:101::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.15 via Frontend Transport; Fri, 9 Aug 2024 09:14:16 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 192.176.1.74) smtp.mailfrom=ericsson.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ericsson.com; Received-SPF: Pass (protection.outlook.com: domain of ericsson.com designates 192.176.1.74 as permitted sender) receiver=protection.outlook.com; client-ip=192.176.1.74; helo=oa.msg.ericsson.com; pr=C Received: from oa.msg.ericsson.com (192.176.1.74) by AM4PEPF00025F98.mail.protection.outlook.com (10.167.16.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.2 via Frontend Transport; Fri, 9 Aug 2024 09:14:16 +0000 Received: from seliicinfr00050.seli.gic.ericsson.se (153.88.142.248) by smtp-central.internal.ericsson.com (100.87.178.63) with Microsoft SMTP Server id 15.2.1544.11; Fri, 9 Aug 2024 11:14:15 +0200 Received: from breslau.. (seliicwb00002.seli.gic.ericsson.se [10.156.25.100]) by seliicinfr00050.seli.gic.ericsson.se (Postfix) with ESMTP id 8D5CE1C006B; Fri, 9 Aug 2024 11:14:15 +0200 (CEST) From: =?utf-8?q?Mattias_R=C3=B6nnblom?= To: CC: , Heng Wang , "Stephen Hemminger" , Joyce Kong , Tyler Retzlaff , =?utf-8?q?Morten_Br=C3=B8rup?= , =?utf-8?q?Mattia?= =?utf-8?q?s_R=C3=B6nnblom?= Subject: [PATCH 1/5] eal: extend bit manipulation functionality Date: Fri, 9 Aug 2024 11:04:35 +0200 Message-ID: <20240809090439.589295-2-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240809090439.589295-1-mattias.ronnblom@ericsson.com> References: <20240505083737.118649-2-mattias.ronnblom@ericsson.com> <20240809090439.589295-1-mattias.ronnblom@ericsson.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM4PEPF00025F98:EE_|AM7PR07MB6849:EE_ X-MS-Office365-Filtering-Correlation-Id: 66e43faf-4b08-4850-0f0a-08dcb853a476 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|82310400026|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?f302fxhS+JcDkJsKbT2sgyf+jfNts2e?= =?utf-8?q?t39IhL2OjYn/vftQ2DKLQbk6V3KHWpMJpv9DvWvuRfWbX33G0ZF4XXuAtvKpyHoP/?= =?utf-8?q?Z3pHwYHN0h/fivloYrcEe15xQdS2nU4kLaPQlb2+v8hNSa89u2ZoU9BNg0NeQFlic?= =?utf-8?q?Gx0b44Um0zg0P54HGSbcHXewOBw2UxQ0fk33Rd9wo2LVvjj26HWHjaMLf+dT6m6um?= =?utf-8?q?KBm8dcI+hOiVMmQJJhYfToDo5lHvObowTCGdt4bM7tX23gl2/YZtTMUA5cRVsPGKR?= =?utf-8?q?UVgbrjsc2mECzVL7HPygt90LIEkEPdes3R7UpEGNADUFMlHM+MVJ7KZL3EGb9EcGg?= =?utf-8?q?0TWkBZtyY5XnUnV8xDd0W4kQ7EuGCibvyHRF5729YQPSeac01wtW/X8ULZW4cRst8?= =?utf-8?q?MAclj4FQdpa6a1NV9uaBuGyl/82f5IM+BabJDhbnTryUnaTqPnSga41kbxADP7K3B?= =?utf-8?q?fPdjtwv8UR04JN/9txiHPHIORknsgk+8FxhF1IYrYbtJtN+JPkOgKIVve8bencHrC?= =?utf-8?q?ISNdcnMzf6W3OMThdnGEuBZi177339PZs3cD59Yk69e3S0pKZX5kfkmNHoqAfnCZH?= =?utf-8?q?xZZVixnBhdMZouDR9NknFZce17KtVTMCqLRQESWqSJ/K/KSbAepnnKFz7FZV9owsw?= =?utf-8?q?KUMpHClVpGrXOzlMiwm6vuCrKFg6ht7USU8gY5UNO6PLcyEUEqFYum51cyDvQCE8N?= =?utf-8?q?DuctRHdG/ulwXKdTFtOyZm6CUiT/IzcureCFx8j6j1r/707XOPqYILS/i9tSctIAY?= =?utf-8?q?vYilec6MBHWd3kY+6tAl1bQBZTvYtsew+fduFNwBwN+K8HxwJFHNZXOciAchAheHl?= =?utf-8?q?tMSzHWdDF3Akx4w9DXwLS2fc0u7QEeeXdCojtWYT2ik84CvdvXupxF/zL4GxJKfb9?= =?utf-8?q?cNZowkpD95hIYJ7LfjW6SdM6WYgNnqIQRNgMxn4omFGWiAyBgjn8SQFYcpQZ3TbAn?= =?utf-8?q?mt5RlVMsoYpK0tGzhWWTG+2Vvy/g1TXtxZp7m6T34OhUb/oCSQUnPt///G8GPP44e?= =?utf-8?q?SXwB9ysDQlcDFUu0e9Oq4Po5AKdf2ruxEXGtdD2JoD+eAblIIuZE6OmH/i2Aj78Q7?= =?utf-8?q?HtuD1MTG/PtQ1118v8r/aWEO+eLUjVY/BZbl03UTdV4HvndovkhTK+fjaqmxCuI/3?= =?utf-8?q?RKFeWNOrXg0ngsaoYG8r+3VxnbxrU6bXJnTThCQs40bsiL7zdBmIcPLtYciJCbVCo?= =?utf-8?q?BLkz+KlguGtU9KxeyeK4KxkSDHoNFw6RIKQBdOywZ149aNGaqiaov0VegUm+v99AK?= =?utf-8?q?FuoulQGIx0Vjpcifw4X7Rjc2NfGBWx+YOTxt0M23osetg9+gUwKbx8uY/HhNn1jHr?= =?utf-8?q?CHjp4pMdAa6QeE0fCdRp+n4Wr7rN0Si0BA=3D=3D?= X-Forefront-Antispam-Report: CIP:192.176.1.74; CTRY:SE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:oa.msg.ericsson.com; PTR:office365.se.ericsson.net; CAT:NONE; SFS:(13230040)(1800799024)(36860700013)(82310400026)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Aug 2024 09:14:16.0295 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 66e43faf-4b08-4850-0f0a-08dcb853a476 X-MS-Exchange-CrossTenant-Id: 92e84ceb-fbfd-47ab-be52-080c6b87953f X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=92e84ceb-fbfd-47ab-be52-080c6b87953f; Ip=[192.176.1.74]; Helo=[oa.msg.ericsson.com] X-MS-Exchange-CrossTenant-AuthSource: AM4PEPF00025F98.EURPRD83.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR07MB6849 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 Add functionality to test and modify the value of individual bits in 32-bit or 64-bit words. These functions have no implications on memory ordering, atomicity and does not use volatile and thus does not prevent any compiler optimizations. RFC v6: * Have rte_bit_test() accept const-marked bitsets. RFC v4: * Add rte_bit_flip() which, believe it or not, flips the value of a bit. * Mark macro-generated private functions as experimental. * Use macros to generate *assign*() functions. RFC v3: * Work around lack of C++ support for _Generic (Tyler Retzlaff). * Fix ','-related checkpatch warnings. Signed-off-by: Mattias Rönnblom Acked-by: Morten Brørup Acked-by: Tyler Retzlaff --- lib/eal/include/rte_bitops.h | 259 ++++++++++++++++++++++++++++++++++- 1 file changed, 257 insertions(+), 2 deletions(-) diff --git a/lib/eal/include/rte_bitops.h b/lib/eal/include/rte_bitops.h index 449565eeae..3297133e22 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 */ #ifndef _RTE_BITOPS_H_ @@ -11,12 +12,14 @@ * @file * Bit Operations * - * This file defines a family of APIs for bit operations - * without enforcing memory ordering. + * This file provides functionality for low-level, single-word + * arithmetic and bit-level operations, such as counting or + * setting individual bits. */ #include +#include #include #ifdef __cplusplus @@ -105,6 +108,196 @@ extern "C" { #define RTE_FIELD_GET64(mask, reg) \ ((typeof(mask))(((reg) & (mask)) >> rte_ctz64(mask))) +/** + * @warning + * @b EXPERIMENTAL: this API may change without prior notice. + * + * Test bit in word. + * + * Generic selection macro to test the value of a bit in a 32-bit or + * 64-bit word. The type of operation depends on the type of the @c + * addr parameter. + * + * This macro does not give any guarantees in regards to memory + * ordering or atomicity. + * + * @param addr + * A pointer to the word to modify. + * @param nr + * The index of the bit. + */ +#define rte_bit_test(addr, nr) \ + _Generic((addr), \ + uint32_t *: __rte_bit_test32, \ + const uint32_t *: __rte_bit_test32, \ + uint64_t *: __rte_bit_test64, \ + const uint64_t *: __rte_bit_test64)(addr, nr) + +/** + * @warning + * @b EXPERIMENTAL: this API may change without prior notice. + * + * Set bit in word. + * + * Generic selection macro to set a bit in a 32-bit or 64-bit + * word. The type of operation depends on the type of the @c addr + * parameter. + * + * This macro does not give any guarantees in regards to memory + * ordering or atomicity. + * + * @param addr + * A pointer to the word to modify. + * @param nr + * The index of the bit. + */ +#define rte_bit_set(addr, nr) \ + _Generic((addr), \ + uint32_t *: __rte_bit_set32, \ + uint64_t *: __rte_bit_set64)(addr, nr) + +/** + * @warning + * @b EXPERIMENTAL: this API may change without prior notice. + * + * Clear bit in word. + * + * Generic selection macro to clear a bit in a 32-bit or 64-bit + * word. The type of operation depends on the type of the @c addr + * parameter. + * + * This macro does not give any guarantees in regards to memory + * ordering or atomicity. + * + * @param addr + * A pointer to the word to modify. + * @param nr + * The index of the bit. + */ +#define rte_bit_clear(addr, nr) \ + _Generic((addr), \ + uint32_t *: __rte_bit_clear32, \ + uint64_t *: __rte_bit_clear64)(addr, nr) + +/** + * @warning + * @b EXPERIMENTAL: this API may change without prior notice. + * + * Assign a value to a bit in word. + * + * Generic selection macro to assign a value to a bit in a 32-bit or 64-bit + * word. The type of operation depends on the type of the @c addr parameter. + * + * This macro does not give any guarantees in regards to memory + * ordering or atomicity. + * + * @param addr + * A pointer to the word to modify. + * @param nr + * The index of the bit. + * @param value + * The new value of the bit - true for '1', or false for '0'. + */ +#define rte_bit_assign(addr, nr, value) \ + _Generic((addr), \ + uint32_t *: __rte_bit_assign32, \ + uint64_t *: __rte_bit_assign64)(addr, nr, value) + +/** + * @warning + * @b EXPERIMENTAL: this API may change without prior notice. + * + * Flip a bit in word. + * + * Generic selection macro to change the value of a bit to '0' if '1' + * or '1' if '0' in a 32-bit or 64-bit word. The type of operation + * depends on the type of the @c addr parameter. + * + * This macro does not give any guarantees in regards to memory + * ordering or atomicity. + * + * @param addr + * A pointer to the word to modify. + * @param nr + * The index of the bit. + */ +#define rte_bit_flip(addr, nr) \ + _Generic((addr), \ + uint32_t *: __rte_bit_flip32, \ + uint64_t *: __rte_bit_flip64)(addr, nr) + +#define __RTE_GEN_BIT_TEST(family, fun, qualifier, size) \ + __rte_experimental \ + static inline bool \ + __rte_bit_ ## family ## fun ## size(const qualifier uint ## size ## _t *addr, \ + unsigned int nr) \ + { \ + RTE_ASSERT(nr < size); \ + \ + uint ## size ## _t mask = (uint ## size ## _t)1 << nr; \ + return *addr & mask; \ + } + +#define __RTE_GEN_BIT_SET(family, fun, qualifier, size) \ + __rte_experimental \ + static inline void \ + __rte_bit_ ## family ## fun ## size(qualifier uint ## size ## _t *addr, \ + unsigned int nr) \ + { \ + RTE_ASSERT(nr < size); \ + \ + uint ## size ## _t mask = (uint ## size ## _t)1 << nr; \ + *addr |= mask; \ + } \ + +#define __RTE_GEN_BIT_CLEAR(family, fun, qualifier, size) \ + __rte_experimental \ + static inline void \ + __rte_bit_ ## family ## fun ## size(qualifier uint ## size ## _t *addr, \ + unsigned int nr) \ + { \ + RTE_ASSERT(nr < size); \ + \ + uint ## size ## _t mask = ~((uint ## size ## _t)1 << nr); \ + (*addr) &= mask; \ + } \ + +#define __RTE_GEN_BIT_ASSIGN(family, fun, qualifier, size) \ + __rte_experimental \ + static inline void \ + __rte_bit_ ## family ## fun ## size(qualifier uint ## size ## _t *addr, \ + unsigned int nr, bool value) \ + { \ + if (value) \ + __rte_bit_ ## family ## set ## size(addr, nr); \ + else \ + __rte_bit_ ## family ## clear ## size(addr, nr); \ + } + +#define __RTE_GEN_BIT_FLIP(family, fun, qualifier, size) \ + __rte_experimental \ + static inline void \ + __rte_bit_ ## family ## fun ## size(qualifier uint ## size ## _t *addr, \ + unsigned int nr) \ + { \ + bool value; \ + \ + value = __rte_bit_ ## family ## test ## size(addr, nr); \ + __rte_bit_ ## family ## assign ## size(addr, nr, !value); \ + } + +__RTE_GEN_BIT_TEST(, test,, 32) +__RTE_GEN_BIT_SET(, set,, 32) +__RTE_GEN_BIT_CLEAR(, clear,, 32) +__RTE_GEN_BIT_ASSIGN(, assign,, 32) +__RTE_GEN_BIT_FLIP(, flip,, 32) + +__RTE_GEN_BIT_TEST(, test,, 64) +__RTE_GEN_BIT_SET(, set,, 64) +__RTE_GEN_BIT_CLEAR(, clear,, 64) +__RTE_GEN_BIT_ASSIGN(, assign,, 64) +__RTE_GEN_BIT_FLIP(, flip,, 64) + /*------------------------ 32-bit relaxed operations ------------------------*/ /** @@ -787,6 +980,68 @@ rte_log2_u64(uint64_t v) #ifdef __cplusplus } + +/* + * Since C++ doesn't support generic selection (i.e., _Generic), + * function overloading is used instead. Such functions must be + * defined outside 'extern "C"' to be accepted by the compiler. + */ + +#undef rte_bit_test +#undef rte_bit_set +#undef rte_bit_clear +#undef rte_bit_assign +#undef rte_bit_flip + +#define __RTE_BIT_OVERLOAD_SZ_2(fun, qualifier, size, arg1_type, arg1_name) \ + static inline void \ + rte_bit_ ## fun(qualifier uint ## size ## _t *addr, \ + arg1_type arg1_name) \ + { \ + __rte_bit_ ## fun ## size(addr, arg1_name); \ + } + +#define __RTE_BIT_OVERLOAD_2(fun, qualifier, arg1_type, arg1_name) \ + __RTE_BIT_OVERLOAD_SZ_2(fun, qualifier, 32, arg1_type, arg1_name) \ + __RTE_BIT_OVERLOAD_SZ_2(fun, qualifier, 64, arg1_type, arg1_name) + +#define __RTE_BIT_OVERLOAD_SZ_2R(fun, qualifier, size, ret_type, arg1_type, \ + arg1_name) \ + static inline ret_type \ + rte_bit_ ## fun(qualifier uint ## size ## _t *addr, \ + arg1_type arg1_name) \ + { \ + return __rte_bit_ ## fun ## size(addr, arg1_name); \ + } + +#define __RTE_BIT_OVERLOAD_2R(fun, qualifier, ret_type, arg1_type, arg1_name) \ + __RTE_BIT_OVERLOAD_SZ_2R(fun, qualifier, 32, ret_type, arg1_type, \ + arg1_name) \ + __RTE_BIT_OVERLOAD_SZ_2R(fun, qualifier, 64, ret_type, arg1_type, \ + arg1_name) + +#define __RTE_BIT_OVERLOAD_SZ_3(fun, qualifier, size, arg1_type, arg1_name, \ + arg2_type, arg2_name) \ + static inline void \ + rte_bit_ ## fun(uint ## size ## _t *addr, arg1_type arg1_name, \ + arg2_type arg2_name) \ + { \ + __rte_bit_ ## fun ## size(addr, arg1_name, arg2_name); \ + } + +#define __RTE_BIT_OVERLOAD_3(fun, qualifier, arg1_type, arg1_name, arg2_type, \ + arg2_name) \ + __RTE_BIT_OVERLOAD_SZ_3(fun, qualifier, 32, arg1_type, arg1_name, \ + arg2_type, arg2_name) \ + __RTE_BIT_OVERLOAD_SZ_3(fun, qualifier, 64, arg1_type, arg1_name, \ + arg2_type, arg2_name) + +__RTE_BIT_OVERLOAD_2R(test, const, bool, unsigned int, nr) +__RTE_BIT_OVERLOAD_2(set,, unsigned int, nr) +__RTE_BIT_OVERLOAD_2(clear,, unsigned int, nr) +__RTE_BIT_OVERLOAD_3(assign,, unsigned int, nr, bool, value) +__RTE_BIT_OVERLOAD_2(flip,, unsigned int, nr) + #endif #endif /* _RTE_BITOPS_H_ */