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 14EBEA0519; Fri, 3 Jul 2020 15:47:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EB8C31DBB4; Fri, 3 Jul 2020 15:47:05 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2079.outbound.protection.outlook.com [40.107.20.79]) by dpdk.org (Postfix) with ESMTP id 386B51DBB2 for ; Fri, 3 Jul 2020 15:47:04 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IZtJxIOPotwtBkAE7QTBi45IYSEFgMyykHfYwQshFUWpIKR3xA2bOthjoSgOwWebJeAJ/UGswIPP3B85mRHfpCNHVYBnbUqEEkMBztW5muODD1/8AIqJd8MB4lx7+OgnSglklt22/gyRvItrTYlNnK+O8+0jPfexJdZ9nFgmdQeXG7HqepdDCnyoPWB693Cqv1u9hG+Y9EujZrf2tFMqm9mdvCZQTr4sD5klqFOrTIXI3RUAYGCS2QhX8BrCIK+DZUD81pVCmnx7Km/vo/nChEQkAZfqP7iRcNj+I1OzMimkPpkLd9gR0f5o83Bv/OKjI7nNCRZPWxvyLm4rZUmkxg== 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=HWLKpJWeU7H+f0WP5Ic734R3aJY1CYaBZFAr0Zjimjg=; b=DedIgGGq4A+0LPOnuxMETlZcp+Z00yWG1DZP1IvQqOnBfAHbzxjZ5sbGTqDk/Ei8I9QBq9pDwOnqi/cCYVNT00HZ2w+vEUFaKWcNlpmPzkzJqUimREV/n5k6ic7WNZlngpxgQOJq+e0rNRB9yOvIieuZ6XEWEBeiwFP6IGHvSSJepuYZvqZND4pvUygkiEcfle4F9mbK+eyP00WuWO4z7erdIDRflJN0lJyHRGRMkvNKYzVfst9GYzB3vVoaP7bxW9rthrjdH7Zy9fpbGuAFE5q7FLy8nHCE1w4TU2eZDtrYrKzAbA5duorryw7lMx8gcG/skp5tkbjk4VxgHJQS8Q== 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=HWLKpJWeU7H+f0WP5Ic734R3aJY1CYaBZFAr0Zjimjg=; b=LpTqzmOq9BBzubJ8/HRkTE4M790yWbxXvOgOlo0pOqep6FkHHxbdZrp792aPsThIBmsnnNol12x8dRZ/7Y/09iDudiMIQkxMzKsx7Vdf5RrYHduPTV96A3Jy+X5eW5OXdMmzKvXnIdiq9dab4/v9tQenkkl22cCLbk5qtEFjnug= 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 AM4PR05MB3345.eurprd05.prod.outlook.com (2603:10a6:205:a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.21; Fri, 3 Jul 2020 13:47:02 +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.3153.024; Fri, 3 Jul 2020 13:47:02 +0000 From: Parav Pandit To: dev@dpdk.org, grive@u256.net, ferruh.yigit@intel.com Cc: thomas@monjalon.net, orika@mellanox.com, matan@mellanox.com, Parav Pandit Date: Fri, 3 Jul 2020 16:46:32 +0300 Message-Id: <20200703134641.386297-2-parav@mellanox.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200703134641.386297-1-parav@mellanox.com> References: <20200610171728.89-2-parav@mellanox.com> <20200703134641.386297-1-parav@mellanox.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SN4PR0401CA0009.namprd04.prod.outlook.com (2603:10b6:803:21::19) 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 SN4PR0401CA0009.namprd04.prod.outlook.com (2603:10b6:803:21::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.21 via Frontend Transport; Fri, 3 Jul 2020 13:47:01 +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: 187d3b80-888f-4727-d315-08d81f5790ab X-MS-TrafficTypeDiagnostic: AM4PR05MB3345: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1079; X-Forefront-PRVS: 045315E1EE X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1tzkwO6k171jZUZsvHN66N9pcmGWNFjq16UgglqSbK+08XHebe7K2V3rPGRQyEuFPIAd8dcrbT8Qv4Umu2RBTUAnxVj7GxvpzewcIZPdQX0syaRSaRntq+XJNiuPAnXvkwti1O7sfMc7ZFsQFnUOVERx37NHAlQTGIunHyyAXlEghxTr2XRt5qukzkQhifvlkOmfnSysDPaJx8EZhU8Si4BCQG0x3euTBMX5SAByPKAhrLyoyLr4mwrrxG+55gDr4BNQ/iC0Cl1wiGHFmXffAoU6rGtdI/Ap3JjNuka/B6xYx/KNudh0TPOXMvB4LobWiCvqoYKwSevEE+t6fit/sg== 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)(376002)(136003)(39860400002)(4326008)(66476007)(8936002)(4744005)(8676002)(6486002)(6506007)(478600001)(66946007)(52116002)(956004)(6666004)(186003)(26005)(1076003)(16526019)(107886003)(66556008)(5660300002)(2616005)(2906002)(86362001)(36756003)(316002)(6512007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: BQw1yelrgCMbuPfweo2215qc8IOkZ3oIGjSmZp8mA28ro/MxIKPeSKE/bnsxoH5677fD/f0HyBmaUWdrJ98MQs1SPdpD6a60vt1oiTzfgEikIjAeg9fnw35V72L41mxTR4MoyWsQcIIQh1WzkyI65rDcENY/pOBVTA6QkCOpz6ZJGZpiBMTVb+m2fD30FNgMX8b7hqpOokC5ymwJ019agzSfQr/UYxm01US41Co2XUS+GHN8eY+MRyilgmDGeH0yqb9gJ2Lkr9CftXXN0g6WCB2lBRV4YxYqXhMxYHpndTTgAxF4SXo/2ltSa1OuJOR/wAqZzHE7oCq95Q8PlNr+0yWNIz734Hxbz0KsjWw8HwaD30HcrKXEFwZrio4TkuSxPWwUEnXarjbt9nS7PzjDjfm6fOkItK3+J6s29RvFpfaXkgNfWARViObPAMGk18EBGLLAiMfrkqhHwaFHE7AUZMn7IyxLU9xzv+ZB7cCX5df3E3eDIceTx8f/meDixrwJ X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 187d3b80-888f-4727-d315-08d81f5790ab X-MS-Exchange-CrossTenant-AuthSource: AM0PR05MB4866.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2020 13:47:02.5779 (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: upxaKtaIwDJDxD0/9+czX5m2X3Dcfc4P45Vvn1dKvf9HapQoOMbj4G0LiphVtCA/B9n6Cxfr96mBeuDBX1pzcA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3345 Subject: [dpdk-dev] [PATCH v4 01/10] 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 Acked-by: Matan Azrad --- Changelog: v1->v2: - Addressed comments from Thomas and Gaten. - Avoided new file, added macro to rte_bitops.h --- lib/librte_eal/include/rte_bitops.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_eal/include/rte_bitops.h b/lib/librte_eal/include/rte_bitops.h index 740927f3b..d72c7cd93 100644 --- a/lib/librte_eal/include/rte_bitops.h +++ b/lib/librte_eal/include/rte_bitops.h @@ -17,6 +17,8 @@ #include #include +#define RTE_BIT(bit_num) (1UL << (bit_num)) + /*------------------------ 32-bit relaxed operations ------------------------*/ /** -- 2.26.2