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 155E5A0518; Thu, 23 Jul 2020 22:09:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 406141C001; Thu, 23 Jul 2020 22:09:36 +0200 (CEST) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80083.outbound.protection.outlook.com [40.107.8.83]) by dpdk.org (Postfix) with ESMTP id 7E6C41BFEE for ; Thu, 23 Jul 2020 22:09:33 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IkxsN7IKPHCX1HlGErObBddZX0P0zMUWpLl4r/e6aRR3yTK1okqU8KZ5bi+hHWkWijhTtsAo2wAA+h39N6jDPsaaDMKfNBheWNPrBx0YO2L7ahmxi8QE2bk+s5zZW8qb2pvDa1tYGEHPFOnp3AQFX4FaYjCr0uAp0tGx0CLC4RfNMbUfvrcAqckod77amAwzLwG6ADFJoMpxtqBIoIuD2ohKdakxS/Bl2fOlz7KEAKBp3zS8XlFRAE/FsMQ/AUVONqyb/uTsar2+2a+WprMzZvvZbQfZIwrQ7pXIpcUvpM8cPN6JPFvX1bsETyzdVik2srfGwHoUXL9srq2AePEXqw== 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=3Ly9h1mQuauz3VX/u1iQIlVYZ3tpQhYiVkJlTZ8VXos=; b=VCsMQFwE1s3AYm5o0cZaSBf4wJGaTDIhjg+DE9tl7Hk2nt049KTk1ou/sLyxxLyr05NxtrPuzyf/+59nJtETkmxzsdEKs3XuzS1vIDw0nXeGr3NozjZCUtFC61nljl7zcMao4OKgXmofzI4BhF7JQiinhAC+l+au3YFKQb31DdJaAEp2pmycsE9+RNX2UeVj1ptIgmkJ/AkEMfPjfQS5/VZd70Nu+aiwEZDNPtWEu+H25ul/XjYP92NgT9mwYK7jASWQpzwTXrAQQma1sKk5cGmorQGl5ifRs0FIPwRwklO3x4osUzCPdu31slgAZsu9gHnill0WIl67BRgOZW1u/Q== 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=3Ly9h1mQuauz3VX/u1iQIlVYZ3tpQhYiVkJlTZ8VXos=; b=jxZNvbZpFP+d2RO4gR53nd1+HRvU4R1A+7XwZ1mWBppZDe+L0M8ABr30HXnA+ToLgT6Zhq2vDbdFYKOHW3iIMlgAxCfQ7TRJAyxDRwEDQRSUsgAJkJuULu9dLPBHWYy5jvrsykTHlVHMSyLWXlx2vFqTIJKAuWwVUHHHH3IkdX0= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=mellanox.com; Received: from DB7PR05MB4876.eurprd05.prod.outlook.com (2603:10a6:10:1d::32) by DB7PR05MB5558.eurprd05.prod.outlook.com (2603:10a6:10:5c::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.20; Thu, 23 Jul 2020 20:09:32 +0000 Received: from DB7PR05MB4876.eurprd05.prod.outlook.com ([fe80::8cb3:93cb:c3ef:4293]) by DB7PR05MB4876.eurprd05.prod.outlook.com ([fe80::8cb3:93cb:c3ef:4293%5]) with mapi id 15.20.3216.022; Thu, 23 Jul 2020 20:09:32 +0000 From: Parav Pandit To: dev@dpdk.org, grive@u256.net, ferruh.yigit@intel.com, thomas@monjalon.net Cc: rasland@mellanox.com, orika@mellanox.com, matan@mellanox.com, joyce.kong@arm.com, Parav Pandit , =?UTF-8?q?Morten=20Br=C3=B8rup?= Date: Thu, 23 Jul 2020 23:09:01 +0300 Message-Id: <20200723200910.376581-2-parav@mellanox.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200723200910.376581-1-parav@mellanox.com> References: <20200610171728.89-2-parav@mellanox.com> <20200723200910.376581-1-parav@mellanox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DM6PR03CA0009.namprd03.prod.outlook.com (2603:10b6:5:40::22) To DB7PR05MB4876.eurprd05.prod.outlook.com (2603:10a6:10:1d::32) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sw-mtx-036.mtx.labs.mlnx (208.176.44.194) by DM6PR03CA0009.namprd03.prod.outlook.com (2603:10b6:5:40::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.21 via Frontend Transport; Thu, 23 Jul 2020 20:09:30 +0000 X-Mailer: git-send-email 2.26.2 X-Originating-IP: [208.176.44.194] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 88006555-0ee8-4d3c-010e-08d82f444fbe X-MS-TrafficTypeDiagnostic: DB7PR05MB5558: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtFwd,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:843; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: M3wWyFs1PfZYPEysB9HQDxjPJhR37LqW+bViN913ZaC6Zr/0Ojg/VsmFXBmB9s8C+vw14fwtokrRNdzFqeo676WktWfTgHD90kOANGjaxkes+USE4XRTsqvoiAamQ+ibcPPPGWGiIgdCEgzfKqIINE7M/JjoY+6S8ytflDr01R9HOQmRmre2jabS+XfQXKoavJDqc5eEDvZPTkJ/3UPEOfcKCI5uQohQJ3WcKCOAsYburO4fpA0fXoOiZiYbJPmfdv4ZenDLgQ+JH8zJRi4t24pts6bICnXfddCdrl51WJU98TnBcym84nHdfS4T9cA800Gct1J7Wc59X2FeyAWyfQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB7PR05MB4876.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(376002)(346002)(366004)(396003)(136003)(39860400002)(6506007)(8676002)(8936002)(26005)(52116002)(2906002)(54906003)(4326008)(478600001)(66946007)(66476007)(66556008)(36756003)(5660300002)(2616005)(6486002)(86362001)(956004)(4744005)(1076003)(6512007)(6666004)(186003)(16526019)(316002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: YFun4DOMUbDWtLO27EPas3BKdeIZuS+6/myT+KUrHF5MazpHZWRXlM7z4pxvaJpwxQRXZ76v86B7iwRXszyVVfcY5JbMxLclXH+7pKwIeaUJOOwxXSvUfb7QJbEifk/llIG/yzNlE7ociMBbF/clV+/o5at6gx60iMLrHfymc4fDsfNQX1hnpOU8PgX84NmUuKR4tAOUp6gUF7R8U4aDBjPLBcrbBr/7sFN4G5GlKftdhvIJFzg6rUtsWxqD4/RhvPS3Bc3mmJxnyjT9dRQvx6oR/VJr4Q30I0+17pMh2iUOzdFGTKjXa2x8+bVKzslQVLkZJv2t2aMxNKqwOQgw72rDrmwyu8crCOKZjaDl0tNmEZ7EWsV42KJiSWgog68JcHpOHgy2FIBL5qen/6SqMl3UoAF7kbPalzJksTHfe8iD3kXGG8KL+cKwF8JPO1NnU0damZ4UFBB4on8HaeJIsTdoCxUwKAGyWEF4bl3AiXS71ohx5DAULFA4AQkjIuzs X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 88006555-0ee8-4d3c-010e-08d82f444fbe X-MS-Exchange-CrossTenant-AuthSource: DB7PR05MB4876.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jul 2020 20:09:31.8676 (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: fpYJIwp/uFema/hk0k7Ojn3QiWRLie17gyxrfgoA+s8dYinTO2iRgcXFpjdXjnzT/cvgk4ZjUd2ETE2QS2rT1w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB5558 Subject: [dpdk-dev] [PATCH v8 01/10] eal: introduce macro for bit definition 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 Acked-by: Matan Azrad Acked-by: Morten Brørup --- lib/librte_eal/include/rte_bitops.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/librte_eal/include/rte_bitops.h b/lib/librte_eal/include/rte_bitops.h index 740927f3b..ca46a110f 100644 --- a/lib/librte_eal/include/rte_bitops.h +++ b/lib/librte_eal/include/rte_bitops.h @@ -17,6 +17,14 @@ #include #include +/** + * Get the uint64_t value for a specified bit set. + * + * @param nr + * The bit number in range of 0 to 63. + */ +#define RTE_BIT64(nr) (UINT64_C(1) << (nr)) + /*------------------------ 32-bit relaxed operations ------------------------*/ /** -- 2.25.4