From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id BDF68A051E; Wed, 10 Jun 2020 19:18:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 283771BF74; Wed, 10 Jun 2020 19:18:10 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140053.outbound.protection.outlook.com [40.107.14.53]) by dpdk.org (Postfix) with ESMTP id 0FF961BF70 for ; Wed, 10 Jun 2020 19:18:08 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mo9bqoNH7qEDzTPyxNXmyXWj2BFYAx4XenDZ7Z8FXHu+/PmnMzuUjElTDkhm7BwszSL3SwjjXOMFVk937ZXJHnhEVyZ6ZWWdQT4mBiSVBN4Jm0KsC2+mlzi9R42T42WKTgxqcfGyipHgbekFMsLxEgFHZUXGprNbegLuPu9Jw7yq131h/8+WDwPo/yhedhpA4sKhtOK33Btb0mUMgwswczIwZCk62M6vq0FgWHTAtLbXfKTEu41d6JkEykUKme5wa2ZrhZcdpoFxrBTo1ppm2DY6fVpMQ3xdumANgX6SEA7n1eZyMiKTfFnKaT3LVaJs5GzoiuxHvndhEmbzaFuNyg== 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-SenderADCheck; bh=3NdPQPQmPubvBWvfqC3RNVUKi1dlEz2S5BKFAhmUjHY=; b=CSkl3WIOfjU2sCENY+v80YWocKnichPL54dYwlzkxRztYH9vPc1yYWBw7ZVhZXiETwtKQTklONCjKfnm/UGSdXlwtz1rnSU+Odj+GPKy5fF0ALgbzsbzkKyr6gGanu1po9mPPAh1We0EBKx/WO4xat/WsJOK6tSnveemMXTt1MkayhIqJWsxClDmQ5Ojudt7pw+0qR0myyrc65Oobcn+6JxX3vxTWCoU8fptuqu5rxJAVqWitc05qLquR1bJ2SHmmjdZ0wUyulU2eqCdmf9SEe3i4oyUF6T46x+zIP0usmGFwNNcY6qpiYimqoluwX9+IAfxfWZT3ULkQE33ymUImw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3NdPQPQmPubvBWvfqC3RNVUKi1dlEz2S5BKFAhmUjHY=; b=K7Cwfvt6ZHGflIH8ccv5+09NbZ8s/C2wRG/wAl2FMecwmkVwXBJvPwJhu51osFLXxnrEJ9hROYftdZDRDPjJNPtHSfhkgQd6J+5pz/Wz6AaGkwZF551tE9ITdkq1qGUrv07T18U3iomXPkqz2kJPCfB/RoeMoN8knAuuWMnHRew= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=mellanox.com; Received: from AM0PR05MB4866.eurprd05.prod.outlook.com (2603:10a6:208:c0::32) by AM0PR05MB5346.eurprd05.prod.outlook.com (2603:10a6:208:f5::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.18; Wed, 10 Jun 2020 17:18:06 +0000 Received: from AM0PR05MB4866.eurprd05.prod.outlook.com ([fe80::d44d:a804:c730:d2b7]) by AM0PR05MB4866.eurprd05.prod.outlook.com ([fe80::d44d:a804:c730:d2b7%2]) with mapi id 15.20.3066.023; Wed, 10 Jun 2020 17:18:06 +0000 From: Parav Pandit To: dev@dpdk.org Cc: ferruh.yigit@intel.com, thomasm@mellanox.com, orika@mellanox.com, matan@mellanox.com, Parav Pandit Date: Wed, 10 Jun 2020 17:17:23 +0000 Message-Id: <20200610171728.89-2-parav@mellanox.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200610171728.89-1-parav@mellanox.com> References: <20200610171728.89-1-parav@mellanox.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SN6PR16CA0060.namprd16.prod.outlook.com (2603:10b6:805:ca::37) To AM0PR05MB4866.eurprd05.prod.outlook.com (2603:10a6:208:c0::32) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sw-mtx-036.mtx.labs.mlnx (208.176.44.194) by SN6PR16CA0060.namprd16.prod.outlook.com (2603:10b6:805:ca::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.21 via Frontend Transport; Wed, 10 Jun 2020 17:18:05 +0000 X-Mailer: git-send-email 2.25.4 X-Originating-IP: [208.176.44.194] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 49ef1083-2bed-4aa0-821d-08d80d623d87 X-MS-TrafficTypeDiagnostic: AM0PR05MB5346: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:655; X-Forefront-PRVS: 0430FA5CB7 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ulAneHAjbZY2DVw/f9PYsnZavD+Gkep/+YpMkkuE8TCeVK7a3fmQuWjKrE1rtHF/FjUxsJ85/IGlVCFkbDk06LDT3FZWiIAcYp2oDLcxBvLAIzjJcxdSTndcK99fSC9cFo4toeujGDprI14tp9WlOUmxpU8tw4C5ICFgGdNP2qvmIcHn+nv8jHa8g8JlXVCNsLpMAY07pARw58yyGfKGauQV5wrLyULefVIyQbWw2YTPpnMCGQLe4exUEhUyEpD1TBzy+LjBheHbfEYIpFigeoc7Lc6wPO3ucqfczFvZuF2VYQDFDX6GKSQlYfJM7PrFk6a9FdtxS2QHjBEBIdmANg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR05MB4866.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(346002)(396003)(136003)(39860400002)(376002)(66476007)(6506007)(36756003)(16526019)(6486002)(6916009)(2906002)(316002)(26005)(5660300002)(186003)(66556008)(66946007)(6512007)(6666004)(8936002)(8676002)(4326008)(2616005)(956004)(478600001)(1076003)(4744005)(86362001)(52116002)(107886003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 6pYxNKxK6hZjTcl4NjmmfOQQiLuFafhydH8DmYdGKkv3CkX5/GQo/JADXmPnsmHag96bFt8nvHGXCXBENdc+iObjprzf1x1OoCUMDTbUyzcjVjRBemAj2YdUvwUtimuduljtJO0oOL4tUDpzGq+nzOKs1rsgbzQVIXNIq3PulcsD9ogBlaQrYMQ6Qj9Vunbbg4mSHpmjRLeioLBj4DaaDKmvhWmGUqV7cbn9tMzeyaNOGaxUdfcXghsWFMbfAyt13jMt1NnQp+9D+Xrc6s3GIsxnWvu32sBNoWT08UMALYeOOqnjxNXdfxYg4aFiscJrcj+qU4uwp8FZbzqqBwx1eTxgeVwfPSNklr3YLaa4Yz0tOngpvTYLq7sxxnqzU6E4tVyxsJVvHda/8g9dOrtt4rG+xjKtSqy+YfV/0XI/9FAqArNxONA6h4gwgTa4K6hJTtBtTIIjrfag+4uD5YPI1lwkCT5CeyBrftMEmr6CZ17w/+ANJzIMrC38dfs0YDTH X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 49ef1083-2bed-4aa0-821d-08d80d623d87 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jun 2020 17:18:06.8039 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /ObpHUUa7NcIl0t3LnvUhwu9JE/gHHLXu0Gdib3Zly8AAKliSLB7Xq7yJesaEyM8r0h4VWSfOaWeLTu6EPML5w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB5346 Subject: [dpdk-dev] [RFC PATCH 1/6] eal: introduce macros for getting value for bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" There are several drivers which duplicate bit generation macro. Introduce a generic bit macros so that such drivers avoid redefining same in multiple drivers. Signed-off-by: Parav Pandit --- lib/librte_eal/include/rte_bits.h | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 lib/librte_eal/include/rte_bits.h diff --git a/lib/librte_eal/include/rte_bits.h b/lib/librte_eal/include/rte_bits.h new file mode 100644 index 000000000..37f284971 --- /dev/null +++ b/lib/librte_eal/include/rte_bits.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright 2020 Mellanox Technologies, Ltd. + */ + +#ifndef _RTE_BITS_H_ +#define _RTE_BITS_H_ + +#define RTE_BIT(bit_num) (1UL << (bit_num)) + +#endif -- 2.25.4