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 6665AA0598; Fri, 10 Apr 2020 18:04:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 648BA1D5B2; Fri, 10 Apr 2020 18:04:31 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 5F14D1D5AE for ; Fri, 10 Apr 2020 18:04:29 +0200 (CEST) IronPort-SDR: AyVJZXzeV1ftWLKL3VbOxEg875+nQGsKT1yQC/zRGfS4hx9zABG8Q5c30kf0Sk8YYNOPGSgXdW xzJH19xZEaHg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2020 09:04:28 -0700 IronPort-SDR: ZCCaweBzg1WnL84T+9KxqLbuNcPT5dmYUpi8tT3mNhvkJugglUGZ5JpwhrzpBbLXmZdZnb1yYm c5wKlLcrHlJg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,367,1580803200"; d="scan'208";a="242958987" Received: from orsmsx101.amr.corp.intel.com ([10.22.225.128]) by fmsmga007.fm.intel.com with ESMTP; 10 Apr 2020 09:04:27 -0700 Received: from orsmsx116.amr.corp.intel.com (10.22.240.14) by ORSMSX101.amr.corp.intel.com (10.22.225.128) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 10 Apr 2020 09:04:27 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX116.amr.corp.intel.com (10.22.240.14) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 10 Apr 2020 09:04:17 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.104) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 10 Apr 2020 09:04:17 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ly47GwLnL4PkT3O31RIj3ZQ98l4dVxHy3/85BNcCirJ7Nz+fIZbn+AZxii8lAn4MrXJCYAHya/b0Ic5lj5+swwqTupzz/ke/swvYWAHc/18OfN2vCBteAuAu5i0c0OImQn0xMCaR519koYgC8PrI1gVvqFMqg32bCnUMMNor/akos0bHuDvN4TeOxz5qwIjSnZ2lMSPLpiOKErtTOLHxZ5rL2QrVE6AHmyIyk2FNeccaN+PZ85DTSR2GeQERb7U9pKNFZVyHuPlNM7tdGCNArFQdU3jCdzmVr3h7uoywVyTDQWGjG2b/VfbT1o6eov96XEeUvrImu7hlzLjsUoZQzg== 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=dJBl/+H4jcSf9k3HU+jG/yZi5IbcUcVSsNLPScTvPfc=; b=OCQpRNVuhQ5nWihh8BkepV0r/I/QQbsNCUVmRkIQebNGKiD9RzseM2Xl0y+U0wx4CSuIgc2TX7Pf40IAH7of4eEpHeUQ3N6gPYlQCLZcd9H4MvB3K2QZEdlAyaIHIlTNl9hb6AQwf1v5XStSQ0fXWTzFrUKgkmraOxroa97OtWhF8ndrmrRTZForQaqZLwFhIiZekodNyeDRJoU86S6avVpZOfHW1m4v5nD0d+INafDOlF+usW5EaXYmOQj5+DovrlHR1QtTxOmCilCjj5ep56Z8Y0fGq221QtpLS5QJ8XTDLWMQoSg4vnsRoNLXuKcYHTr3rLycf24oQdapA0eksQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dJBl/+H4jcSf9k3HU+jG/yZi5IbcUcVSsNLPScTvPfc=; b=etn4yjj1ehr8CK5rPhF42ul+CdV2v7iKS4crJBCU3EjtOUVCFYxOKYfCRYSN1+Wh0XMJSeT4b18MZWCNeoLkAo0TZqPV268fa/qwp43iCWqk2NnZ3H2A2UwVUXlBYEq49hx/ANIoI0akrkG3dGmm5v/jGTEoyTydzulT3PbW/lM= Received: from BYAPR11MB2935.namprd11.prod.outlook.com (2603:10b6:a03:82::24) by BYAPR11MB3686.namprd11.prod.outlook.com (2603:10b6:a03:fc::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.19; Fri, 10 Apr 2020 16:04:14 +0000 Received: from BYAPR11MB2935.namprd11.prod.outlook.com ([fe80::786e:a42b:df03:a829]) by BYAPR11MB2935.namprd11.prod.outlook.com ([fe80::786e:a42b:df03:a829%5]) with mapi id 15.20.2878.021; Fri, 10 Apr 2020 16:04:14 +0000 From: "Dumitrescu, Cristian" To: Suanming Mou , "dev@dpdk.org" CC: "amo@semihalf.com" Thread-Topic: [PATCH v3 1/2] bitmap: add create bitmap with all bits set Thread-Index: AQHWDzYgDZihtLCn80mTRBD/D+L/UahyhLdQ Date: Fri, 10 Apr 2020 16:04:14 +0000 Message-ID: References: <1583828479-204084-1-git-send-email-suanmingm@mellanox.com> <1586522787-403236-1-git-send-email-suanmingm@mellanox.com> <1586522787-403236-2-git-send-email-suanmingm@mellanox.com> In-Reply-To: <1586522787-403236-2-git-send-email-suanmingm@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: spf=none (sender IP is ) smtp.mailfrom=cristian.dumitrescu@intel.com; x-originating-ip: [192.198.151.175] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 968f49e4-ec19-4521-cb4c-08d7dd68d0d4 x-ms-traffictypediagnostic: BYAPR11MB3686: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6108; x-forefront-prvs: 0369E8196C x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2935.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10019020)(376002)(396003)(39860400002)(346002)(366004)(136003)(81156014)(53546011)(66476007)(8936002)(8676002)(6506007)(33656002)(64756008)(316002)(110136005)(66556008)(7696005)(76116006)(66946007)(2906002)(66446008)(4744005)(86362001)(186003)(55016002)(9686003)(4326008)(26005)(478600001)(52536014)(71200400001)(5660300002); DIR:OUT; SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: yzivNoD+7fZIirQ6ssiRTdd+T351dL4lrN8M/+n2sC8n5j/OMEeB1LHCo4A1TRnGhlUERgAQaiawofO9YXO4no+tSGPc4P8Q6PQcarNB4uxWdOdWyctoIRR97CTgtZ0c7bBHKxWcFgQZugYvv9SIs0OwnCfxjkeRApNhiu3KT4GRM5e4gbEh/Vq61buEhEXA+T7/BIGQAa2mYwLSnKNOJ4gGss3JpIQ4AJsHSj2/pLaJI9Rg4bxZGDZFo0OZfzN1qfc1kxLKwBuUbM1hyOAHXIDzo33LuVrajx8Zd5R/vYYdhTtmEBGdZmQyts4oo44XpWQc9DqCXOgBVNgcwFmwLYqeriGySvkwnTFZkvqK2RaGfL4Li4bLmqGtn/d0899CnhMyexziGcq+HReUyppfLgZi84C2l0eQm63LeO6vEZ+5zykA3wARt5XwTLAKGZTf x-ms-exchange-antispam-messagedata: WcQ4kDXB1/QKxtVSSgDua02iYoRj4pDQK86pewquJ35c0K3KmdrkAeqZ99+bBAmeMtI8uCWk+haE1Prtup51p4yFTy0sqvA0suxOabLaWdriAr5Iz3YVmiUBSxCqVBwG4Xx35Vlle8QHCdnGh1qzvA== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 968f49e4-ec19-4521-cb4c-08d7dd68d0d4 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Apr 2020 16:04:14.4169 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: RsmcTv20NBznJtsCbzkDBFTsCYcyoukKF7mqzuOngaJczwuf0PbuXXlk5XH7N18Cdx2hrcvduEKbKUubMSqQRlnWAspWXOwB3eVL1u/cQWA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3686 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 1/2] bitmap: add create bitmap with all bits set 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" > -----Original Message----- > From: Suanming Mou > Sent: Friday, April 10, 2020 1:46 PM > To: Dumitrescu, Cristian ; dev@dpdk.org > Cc: amo@semihalf.com > Subject: [PATCH v3 1/2] bitmap: add create bitmap with all bits set >=20 > Currently, in the case to use bitmap as resource allocator, after > bitmap creation, all the bitmap bits should be set to indicate the > bit available. Every time when allocate one bit, search for the set > bits and clear it to make it in use. >=20 > Add a new rte_bitmap_init_with_all_set() function to have a quick > fill up the bitmap bits. >=20 > Comparing with the case create the bitmap as empty and set the bitmap > one by one, the new function costs less cycles. >=20 > Signed-off-by: Suanming Mou > --- > lib/librte_eal/include/rte_bitmap.h | 78 > +++++++++++++++++++++++++++++++++++++ > 1 file changed, 78 insertions(+) >=20 Acked-by: Cristian Dumitrescu