From patchwork Tue Apr 30 12:08:05 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: 139737 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 21D3A43F54; Tue, 30 Apr 2024 14:19:15 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6DCA7402ED; Tue, 30 Apr 2024 14:18:41 +0200 (CEST) Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2057.outbound.protection.outlook.com [40.107.105.57]) by mails.dpdk.org (Postfix) with ESMTP id 13485402CD for ; Tue, 30 Apr 2024 14:18:37 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AXe2FTubK1BRC9lY3kG0bPSZMNU4bsAikhLSraJ/LnIoaOvsNBpSd11hhvxD3fE3KQ4JAkZKfXfF7sniV9CPna/76mWGJuipOeNEzp1XoQXsXN/4t36AnFtaSsr5GS3zwdu+LoNx4QYDwPf9MBtwyRmNE5Ip/upHpHs0x5knLAUWSATqy1jvKXFituW2A7+QySZcAuut6wC8Fn6INQjEvxWh20rrsqmkKqo5Q/LeadXGfqWfHwwxbPQAWv09xomfgNoaGXwZSUXAC3eHTFd/qKbBtrulW+VhL+aaIo3iIL3H5FZAollg8vsyL4E8LqmNdilsSrFkbTjgHl6xb+2ehw== 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=f5HAbuFsAhlunqLGlzVjT0YEbYgMjTahD6lsx+VsdgU=; b=cVzsDjGIh7HI4rji/M6CQ6lEwW0QMkHpsu8bgEirFw4K4eMsy51XuHqhpOKKCTNUG7FtTOeUSE0VhyEUg+hqvFB3NCq3tESuRnkm5YqJhYvCT1erZP1A4HWwT0bSLPvRitGHM0kqr14L7epfylefJ217dkeOYSs+HK5Sw7Ws/Fnp6Di5PtHs65tWR8nwszpim8T1+0HnMNk4Kp5W5sR0CJrdzcNyDxjEp1NYnMq2vCe+DfeiVq0IKTH+vNBm1cr78EO2w2UzhV6+TQPYCB0uvcwfrL4i/gTJRBIlUg1RWx5nPLv54av/m5CXHTCTTxmkkGRnP38O9EPtExuPjefF6A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 192.176.1.74) smtp.rcpttodomain=dpdk.org 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=f5HAbuFsAhlunqLGlzVjT0YEbYgMjTahD6lsx+VsdgU=; b=SgGawp5gpIzeayC8F6Yo1hGICBhH9838efqam6Opi14gpv4AsdT74MVR5DxpxvRuDAtruKcSo7hFJzTRkC5AoZUfxN2SAk9Sr7JWzQ0XXBPWNWn00kC0t5GDePY4yy7mcGIFTs70+w2qxmIdFFCdOi++jzktRRT2xjmeDkMIkXgI/j/a/L2D13vVgHuCUEdcTwBEoRG9ZDTknjTKRXHTTt/XPONd4gUVAQKn69WNkHruWG0En3oE0BuQRpdEqd6mvy4Apc4ZW0L2LuO+1R+UYHqhGZSbsoUToAsDdeq90KQC30je+CcxFDc7IdiDtJ6qM/6l9KytwuXW+cIQJfOoDA== Received: from AM0PR03CA0076.eurprd03.prod.outlook.com (2603:10a6:208:69::17) by AS8PR07MB8281.eurprd07.prod.outlook.com (2603:10a6:20b:379::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.34; Tue, 30 Apr 2024 12:18:35 +0000 Received: from AM3PEPF0000A792.eurprd04.prod.outlook.com (2603:10a6:208:69:cafe::b7) by AM0PR03CA0076.outlook.office365.com (2603:10a6:208:69::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.36 via Frontend Transport; Tue, 30 Apr 2024 12:18:35 +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 AM3PEPF0000A792.mail.protection.outlook.com (10.167.16.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.18 via Frontend Transport; Tue, 30 Apr 2024 12:18:35 +0000 Received: from seliicinfr00049.seli.gic.ericsson.se (153.88.142.248) by smtp-central.internal.ericsson.com (100.87.178.68) with Microsoft SMTP Server id 15.2.1544.9; Tue, 30 Apr 2024 14:18:31 +0200 Received: from breslau.. (seliicwb00002.seli.gic.ericsson.se [10.156.25.100]) by seliicinfr00049.seli.gic.ericsson.se (Postfix) with ESMTP id 41538380061; Tue, 30 Apr 2024 14:18:31 +0200 (CEST) From: =?utf-8?q?Mattias_R=C3=B6nnblom?= To: CC: , Heng Wang , "Stephen Hemminger" , Tyler Retzlaff , =?utf-8?q?Morten_Br=C3=B8rup?= , =?utf-8?q?Mattia?= =?utf-8?q?s_R=C3=B6nnblom?= Subject: [RFC v5 1/6] eal: extend bit manipulation functionality Date: Tue, 30 Apr 2024 14:08:05 +0200 Message-ID: <20240430120810.108928-2-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240430120810.108928-1-mattias.ronnblom@ericsson.com> References: <20240430095523.108688-2-mattias.ronnblom@ericsson.com> <20240430120810.108928-1-mattias.ronnblom@ericsson.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM3PEPF0000A792:EE_|AS8PR07MB8281:EE_ X-MS-Office365-Filtering-Correlation-Id: 4d489b94-43f6-4b8f-b0df-08dc690fa8bb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|1800799015|36860700004|82310400014|376005; X-Microsoft-Antispam-Message-Info: =?utf-8?q?KBMapmhH34WBCkFs5JatgWBKPHUj/pu?= =?utf-8?q?C3DAGxFrP9MeT3Yb05GZkLegU00+lZiMcAxoqhqJx+zZGeH1TnCj1ucSemGe/hgVL?= =?utf-8?q?FpPDcSfdcGEtvUwAwr1u51ujie1XXUZZq5gQyltUZSdWifUWWbJ9Lo5VihNNrnXEo?= =?utf-8?q?mc1ZJHLmA7ntSVfi/PpzM1FeaAoNeGNVJfHy5bHj1oZndwK7D7z7ml6w4msQVeeHS?= =?utf-8?q?eXGAUjicufTQo/REElVQrrLMrPLLY7IukaY6z+sbg7DAqGZUp+afxUrlCJtbA3RtB?= =?utf-8?q?Mti5VkX2Ofvr76UzCjlUp6ZR5jU1zdwTbgkAnY0EChdkC4MXKfoqFuyrz5UfQe8mC?= =?utf-8?q?42H0bVl/P3NgrH6OitTDGC49tbZ+HxNgDOQeQbZk7zwUNGFaNKTt5fDGojvT0EpEE?= =?utf-8?q?JfXt46OZ0Bjv66w2kxFe1h0qMr9e3XdsfSPZaePb23j/VTpevg5Pm16+Fj4p6Kqa5?= =?utf-8?q?2ZsUK/OleJQhCFGKYYHIlbBcsl1TOIv3aTf0scNnZKUV4fIzodtVcSWriy2Aawo01?= =?utf-8?q?B8MtKqALwTG9WXdvaSvw/NSVm4gr1Iws+6L9WtzXoRoiRCZ4FHsZHtoAUu1a36BJe?= =?utf-8?q?mt1C1h0FOkrA2bdY4QR9G5DyWrwmJiAFL2NtnBDGGBs5m7yY43xjTa9R5/9hTsB16?= =?utf-8?q?7qTKsM+84bmf1nTS96FfibtYMGLKe+BS5j0NkhmsxMJesY91MrJajxm9nthwspRyr?= =?utf-8?q?hasDWUf+gNPRM8mhg8rjn2HdrAH+zgGMdYecWn4Aa8vEafuak7p32QGXIGJI1cH5j?= =?utf-8?q?bqILdP8W4Tem5CoZv8gGuMBIhZL372ml0rc8Bva4BzX/OxQZ/k9qP/bXd8I51/MFu?= =?utf-8?q?wKaNBwJGD0FWsO84Cakbu+paWGH4ks3Ko1F4XyV69m2/5nDZ/bmZ6IvY7TgJ1ChgB?= =?utf-8?q?rH7qJayxsFTBGGXNCEhOJfpMaFljtuVAQ/j2L1PLpdaonGERgcNNmHPmj2Glt7Xdr?= =?utf-8?q?/coENJl+iT6lDLn7kpCQVWYHCm68T3RCYiePXqi/273cFKlyjjeZO3A7BLnKqyfMT?= =?utf-8?q?vtkUoXWrKT09iba4Ak/d5mOwrkXKPP+P7Qgg4gPwoho0Af7ItfO2SarG8ZvO+Ydn4?= =?utf-8?q?Np80I5iv6IQY/3UKPI0ucakC5Tl3cRycXDpsd9uI5G0y8lZ0iMba45iPefg7cuLyJ?= =?utf-8?q?6U6k6rV95RmUp6/9P9BhcIvRae5is8ScvKB1iXFvpqwEz4mOSepaGXJ9HDXnSNlaE?= =?utf-8?q?qywFzuQgvLLxNqxZmgL424jXIrb+otobg5OaYZbQUSc45KLZP93I7xz3oO5LNWJCV?= =?utf-8?q?TmhozdnHZVtSPdOF1xvWUy8fOpDBIjaGs63VoQbtzD0O7VAukKqSlL228jb/riMU9?= =?utf-8?q?Wif3HPntLmFB?= 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:(13230031)(1800799015)(36860700004)(82310400014)(376005); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Apr 2024 12:18:35.5597 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4d489b94-43f6-4b8f-b0df-08dc690fa8bb 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: AM3PEPF0000A792.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR07MB8281 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, set, clear, and assign the value to 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 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 | 257 ++++++++++++++++++++++++++++++++++- 1 file changed, 255 insertions(+), 2 deletions(-) diff --git a/lib/eal/include/rte_bitops.h b/lib/eal/include/rte_bitops.h index 449565eeae..9d426f1602 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,194 @@ 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, \ + 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 +978,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_ */