From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5898742CF7; Mon, 19 Jun 2023 13:30:12 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D8D4840E0F; Mon, 19 Jun 2023 13:30:11 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id DC35F40DF8 for ; Mon, 19 Jun 2023 13:30:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687174210; x=1718710210; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=ngNQu3Wtq1oJ0V1I/ExX5wwXfQMpbueN+u0yL3Da1b8=; b=Wg7QuY6HUB/WbrdwSwEjIYTAObVZ8EvuIdJGvWF7bI2oOCPLi+5gaYES 37jGzROe8Hh43MINoyQt6uacXI9RytmL+qnuYwz2j9xtVizyHXj0Koueq HDxUpYwr/F7wM2kI8+Wail0zC8b+hV9UD3zcObClMImxBZk+POOSx2yJn 4WnPdrbv21UBaDTora9stMBfT16NEqxevQopwkDWzChejhT8wVfwwyQdB F994G02hBQeIxQmgtVssf83L+uMNslce/ErxuKAIchsGukOClU7SLKUGB 6gKP1ZeEVW9NOHL5EFSmv9ezVd/rpNjMjhtfUnm8emxqLIV7yqHJk84lQ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10745"; a="339947503" X-IronPort-AV: E=Sophos;i="6.00,254,1681196400"; d="scan'208";a="339947503" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2023 04:30:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10745"; a="713639583" X-IronPort-AV: E=Sophos;i="6.00,254,1681196400"; d="scan'208";a="713639583" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga002.jf.intel.com with ESMTP; 19 Jun 2023 04:30:05 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Mon, 19 Jun 2023 04:30:04 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Mon, 19 Jun 2023 04:30:04 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.174) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Mon, 19 Jun 2023 04:30:04 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iPEOlLRXw5EYVeeqY4y86f8b1rHP11boHgOxBmbwrDcq8YaZYJ+WRg0EF1+a4YqHfwAyr/pKo1/MfPTfKS83oY1ALJgOPPdeM7v+1b4PeeKpSI9KKlSNGeQxwCR/b1x9vSAJOslgbZxr1XAIcD5ox8tZcAp+YjN1IOWTWOh2tEcywQH43YoMwIgUtS+CLC8H0Ty6O3p9nhDGA3SjAfSlWitJ/+nXYuhmBDequJNXU7hLlDZfUf0aeSMaMqf33Ad3qUDGEP9uFuxZL5WE9ol2EpM7eTCd0N85iV6MuxzuC1mfkqihQCtqXcE02mPBwCHkpUsv/S7EC5RY6tiw5yCeDw== 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=qTUgBSclNREWZ6EEv1X9NyUmU+zfZTACtf3L2skCTYY=; b=BM8v0Sr/pOhgxS4Auotk6kP0GNr64UfxtGey1KJOdHQnEw5iKxcPajf5k8cLjrPH8jHGIX4tQUr/00IKkSycBhVgVELZ3O11r74ZyL3opkdb8JAk1FM34IMgUbhDfnimpFrPYuf8AmkzZDOxG0A8soPPIzZReM2BSQyb8yzuid/UAfmR43pAYAI42oIdA0n6Gc+oLcEJrsXMjAVwxEiDSMjbVnA1yvIZylkePsKFsNexCCqd7wV9k5iQcXHM2/C5X97e/Q48BsUMDBceJdVnWg1K0wO6Lqfjl/Vt5DTaW/USJAxb6PMgXaft29lWbLUyXkvruQGLsFbF+FAV3fd1gw== 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 Received: from DS0PR11MB7442.namprd11.prod.outlook.com (2603:10b6:8:14d::22) by SN7PR11MB7041.namprd11.prod.outlook.com (2603:10b6:806:298::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.37; Mon, 19 Jun 2023 11:30:01 +0000 Received: from DS0PR11MB7442.namprd11.prod.outlook.com ([fe80::e536:321a:f1ad:7484]) by DS0PR11MB7442.namprd11.prod.outlook.com ([fe80::e536:321a:f1ad:7484%4]) with mapi id 15.20.6500.029; Mon, 19 Jun 2023 11:30:00 +0000 From: "Dumitrescu, Cristian" To: Volodymyr Fialko , "dev@dpdk.org" CC: "jerinj@marvell.com" , "anoobj@marvell.com" , "thomas@monjalon.net" Subject: RE: [PATCH v2] bitmap: add scan from offset function Thread-Topic: [PATCH v2] bitmap: add scan from offset function Thread-Index: AQHZng177mvtJKMgVku5/Jc3lDltiK+SBiWQ Date: Mon, 19 Jun 2023 11:30:00 +0000 Message-ID: References: <20230414083943.270651-1-vfialko@marvell.com> <20230613154013.2648333-1-vfialko@marvell.com> In-Reply-To: <20230613154013.2648333-1-vfialko@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DS0PR11MB7442:EE_|SN7PR11MB7041:EE_ x-ms-office365-filtering-correlation-id: e15f2199-8b1a-47e6-8f6e-08db70b884d7 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: zinXr18+0oz/5qmMr/dxKEM1NvCKZ3/KhwX2Sn6wzvlcIfK5EbFENTNAnn9kX0Tni5ZxwE3uKVafkQx8BG44eGNZmeVqqyLO/CM61moyGfn0RqfJ3EJbdU7fEA8Aby6cpiqrkwodcRBV3npEMlpnbfkr83aUkmCgg/tdwXfAXkP+YufRaNxezw1kKXbYhBje8WHqGtH71Ua3eUf7v16TAGua07st22QMSvxbjoi/x8nyEoknkrBhwey5lPuRfPVBS+NB0x9E4aawNzQbW2+TSjO4zd2KUonb5ZTcJQ+WUxFPqerksPjpfkIGI3ixOiZ5+r6efMKqToV09h1xNosQZIhEoQBiIK0hmFi+dQEtUNq2T4Di/7gjN+u1vUQRev/UZ2bssIxqBKyD6J+9Ozb0jN5e3w9xyMGaNyHoNxeklHJKHF92FUbgtwWRVkm+BDAJg2P09jNnQ/auoAujhbZa129Bgtdes5GbOAAN4U57hmcRyQiSY5yLZos6Ztly9cuoYqeu5tNZq9aQT2ZtG7RT+KsZjZN/3GxVFb5VVnxiz7TMsVwwE11ASjrYGbNZfVZMS1OsGNDt2qIRb3O9obS5XP4bMRDeHvWVp3ek8KfhQvbyn+1mtLnGUGjjQCFSX18y x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7442.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(396003)(376002)(366004)(346002)(39860400002)(136003)(451199021)(478600001)(52536014)(66946007)(76116006)(66446008)(64756008)(66556008)(66476007)(8676002)(4326008)(41300700001)(55016003)(33656002)(83380400001)(38100700002)(122000001)(86362001)(7696005)(2906002)(71200400001)(5660300002)(110136005)(54906003)(8936002)(316002)(6506007)(53546011)(26005)(9686003)(38070700005)(186003)(82960400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?jUK4dJ1sFN5cv/Ah/rUyZWBAexTctzlqjsFDNpdjmA8TsGQ8HcDnP5MNO7jw?= =?us-ascii?Q?/FzqGyzftukCyCOEvHTbIA8o3Rx3LHUtfo3dRT9E+W1YwFHQdz5Z4QQsM4gV?= =?us-ascii?Q?mrfn7gzZAX7dDJtWZWqpQ7KC+f4zTnna5ZrHIvriBoYmSKjuiYzPK8oHDQs5?= =?us-ascii?Q?Y+OYM6PLbeSXi/IBbL+W5UQMJA+yohvjjkKqVFANl65QCGFEi81lu1XaQykX?= =?us-ascii?Q?wMEteWv26uZuLEeL0LwbbZqFd8wgkeiem7tvAx+7IVxRP0IyQFuUHlEIsPDK?= =?us-ascii?Q?QxJFANPGZA4JawmoFU/beTkvfmBsSjqks0Q25un40vktnHjnCPi2+QzXi/Ag?= =?us-ascii?Q?P7FuV6FSSi9YDBlhYPIRAvJqirlexbb8aG0U+ddsoz9p/2q7Vb6SLVsCU8Cs?= =?us-ascii?Q?nFgZus0n9n4HWs+YQoN6PCcPDkTVNDieBHJ2676pSNl8NmUwCNWE8jKrHICk?= =?us-ascii?Q?/qYPriqmeY7ancrifsXEXiiMHX0uOCDMVYa/Px+qAlZkeddq+jOkKg1iYXJo?= =?us-ascii?Q?2j6qbX4AL+o7hAo26wL3E/ymd4ilkbMdB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bw0yIArM38WQnn5yMB9gQrRRToZUBT2+rmhXumwWpF8aDq5R?= =?us-ascii?Q?GzcgzkzZtGx0Oen7/B5xHai2BRDHGHYYkfoXISKg7aIuV9wn0SIFwdzPie/k?= =?us-ascii?Q?8xnGbyAb9dchWCISqnyrKO6ikNQinHE+shvqSuZzL+17UL0cOJP52bk1hlla?= =?us-ascii?Q?xg=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7442.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e15f2199-8b1a-47e6-8f6e-08db70b884d7 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jun 2023 11:30:00.7627 (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: 9h2qczBtnrBIrGGAdRrMrA+O7J6LTDDa/xpWyiRQgyQXT7p3iidWbW9Kglw2OLI92ipwuw+mgTKqNuZofUckO/sSDNzpcZDfHxClt9nAUSE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB7041 X-OriginatorOrg: intel.com 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 > -----Original Message----- > From: Volodymyr Fialko > Sent: Tuesday, June 13, 2023 4:40 PM > To: dev@dpdk.org; Dumitrescu, Cristian > Cc: jerinj@marvell.com; anoobj@marvell.com; thomas@monjalon.net; > Volodymyr Fialko > Subject: [PATCH v2] bitmap: add scan from offset function >=20 > Currently, in the case when we search for a bit set after a particular > value, the bitmap has to be scanned from the beginning and > rte_bitmap_scan() has to be called multiple times until we hit the value. >=20 > Add a new rte_bitmap_scan_from_offset() function to initialize scan > state at the given offset and perform scan, this will allow getting > the next set bit after certain offset within one scan call. >=20 > Signed-off-by: Volodymyr Fialko > --- > app/test/test_bitmap.c | 33 ++++++++++++++++++++- > lib/eal/include/rte_bitmap.h | 56 ++++++++++++++++++++++++++++++++++++ > 2 files changed, 88 insertions(+), 1 deletion(-) >=20 > +/** > + * @warning > + * @b EXPERIMENTAL: this API may change without prior notice. > + * > + * Bitmap initialize internal scan pointers at the given position for th= e scan > function. > + * > + * @param bmp > + * Handle to bitmap instance > + * @param pos > + * Bit position to start scan > + */ > +__rte_experimental > +static inline void > +__rte_bitmap_scan_init_at(struct rte_bitmap *bmp, uint32_t pos) Please add a note for this function to mark it as internal, which should be= obvious from the double underscore prefix in the name, but better to write= it explicitly as well.