From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (xvm-189-124.dc0.ghst.net [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 27398A0A01; Mon, 4 Jan 2021 12:09:39 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CB3FF1606E0; Mon, 4 Jan 2021 12:09:37 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 9DED31606DB for ; Mon, 4 Jan 2021 12:09:35 +0100 (CET) IronPort-SDR: HJXTJrStO2ox0WnuHZWIQGHb1VcoXvbpp/yBQaBArzWfVBxs5Eumiq18NvQ2Tvs+r6wCmWZXxI t9JC46KeZY/g== X-IronPort-AV: E=McAfee;i="6000,8403,9853"; a="261698660" X-IronPort-AV: E=Sophos;i="5.78,473,1599548400"; d="scan'208";a="261698660" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jan 2021 03:09:34 -0800 IronPort-SDR: qunQrJYwkCus0MqM/xQWE4WfgMPkMdhU556SLBEGx8oSDuVi0X6+lEcJQdkEpJVfuM/C3u0i49 LzWVVzXCUjoQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,473,1599548400"; d="scan'208";a="566714561" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga006.fm.intel.com with ESMTP; 04 Jan 2021 03:09:34 -0800 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 4 Jan 2021 03:09:34 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 4 Jan 2021 03:09:33 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 4 Jan 2021 03:09:33 -0800 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (104.47.38.50) 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.1713.5; Mon, 4 Jan 2021 03:09:33 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fnppTrYA26ri/oTBgADOMYK0heJbudn3bzU+hK4wFXSlkLC7XfVe2XZMfrHvcMyB7nR4xTfrFXl9oDsgXzxHsSxWsU5lTlVHpvtetnl0jfuhgZ9MmgfSfpVT3CuSM9dwEJ9FB6dmmdtD1UeUH5a9yvEPjAgVofy0XaKPkwldEVXr1ccgBcWJ+/y6//8TgBNtwyzbuazpECkWF23Fa83uc/P9NPkke060nHvQvk/FmPncjCdaIXYUG2HVsvgqUi+kbwj3i8si8IqNsmUbX2hYpFVQ/14T/1FJN8Zb5R3GoCztaTSeSfmoSZ8o23V72qcPmAlCtHmLmIKZ+DUgJGs4/g== 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=0c1LZ3qta4VIp/8FcQjAy5ch2vAbjw6Icsl6UkR8z9k=; b=dMa7Ml8d1ikRWHS6hKrKko8QWheRt01te1O/5bpxhOfQY+u1uTlPOTceXLAYCC4+1BEcqcehzwuq1Yt1XLuUDCIDeQdHEV/VcE31sUE36lLvvjVqKMDWCUhAa++6rgt1bhvs/TBOadQphFWNuGjzZo/jRoflnEJ7Tdmcl7xMEYC4SIjwUR155T/QzFijGNZzRS2N/qpGuyzMwyyXyFYsMDCcTcOvNALbx+1pwoown6M58TgPmVU9i46MQYZdp1lyJLku2hsbWvRdjiXlZLIfcpcET1mFtWHQHOZyclUerkUMsr4kjbjNL/ncqZj6d2M/8hAbi9WZjm3T5s2oG2QxZw== 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=0c1LZ3qta4VIp/8FcQjAy5ch2vAbjw6Icsl6UkR8z9k=; b=FnvfDLVOsNE+00c1nkdjOAgLHvOJZx97Vqi1iGrF2vDtOHURBNjevLSMN7sYjTt/xFOLOt+TiS+92LNiwLxMCFkL9ZRBtAThFhsmajc81ZMgYVz2rFGv0gbyrRMIxroQjxfO2UeD4d9yDwSn/14RoB9oR49Ip5qgOy7aBK/JxMA= Received: from CY4PR11MB1702.namprd11.prod.outlook.com (2603:10b6:903:2e::8) by CY4PR1101MB2262.namprd11.prod.outlook.com (2603:10b6:910:18::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.23; Mon, 4 Jan 2021 11:09:32 +0000 Received: from CY4PR11MB1702.namprd11.prod.outlook.com ([fe80::accb:802d:8946:2470]) by CY4PR11MB1702.namprd11.prod.outlook.com ([fe80::accb:802d:8946:2470%10]) with mapi id 15.20.3721.024; Mon, 4 Jan 2021 11:09:31 +0000 From: "Dumitrescu, Cristian" To: Nithin Dabilpuram CC: "jerinj@marvell.com" , "dev@dpdk.org" Thread-Topic: [PATCH 2/2] bitmap: fix bitmap not empty API for 128B cacheline Thread-Index: AQHW0gP8VaVtkxEwfkGPbF729BOTGaoXb/yQ Date: Mon, 4 Jan 2021 11:09:31 +0000 Message-ID: References: <20201214102835.19980-1-ndabilpuram@marvell.com> <20201214102835.19980-2-ndabilpuram@marvell.com> In-Reply-To: <20201214102835.19980-2-ndabilpuram@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [51.37.31.53] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f9733274-b4b1-4f2e-ee24-08d8b0a13639 x-ms-traffictypediagnostic: CY4PR1101MB2262: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:873; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: q0B9YX1IH3Alx6UWcZ0d8dmbnAQ1xUszQxR5UJmCjHC2hAiWgvk89cXlBeuPiDM9hrCZLwWZjvSO479IArr0DFIfpU0scEHvxm4jwg6iEXywfmiu0eSgVXFKlG+yglaFFaEGhgSBbORrgzmNyMrnD8JiqKJZUFYR1Z7TcvVkbMApFe7huC7cT1Jx5q5nmbukkLs3DRukWNJdlm0FCG8dU/P3HZ3wCNpJlkg0bFuXPQ1G1CXztAUmmeC144Wv/LzEjytIgQkQmxs2vLye0TQyRO34/k0IUvt8i5f38VJ/lqbd/Xm4j72r/7vMvroGYtggpm89BcCGPOpgQ4tNLRI4RPDxfvNp5EstcmfWyPCuT2RPZCZNdUWxOJWSC21K2rmXkJOKPr1m2N28NMJ4zjBAUQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY4PR11MB1702.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(376002)(136003)(346002)(39860400002)(396003)(33656002)(54906003)(4326008)(6916009)(5660300002)(86362001)(316002)(478600001)(2906002)(8676002)(6506007)(186003)(53546011)(26005)(71200400001)(55016002)(76116006)(66946007)(66446008)(66476007)(64756008)(66556008)(9686003)(7696005)(8936002)(83380400001)(52536014); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?K9lLoaprUmJW/++Hc+mJLDiPSlmEcTT7TNK4Oqm90JABtRII7+XVAd6r79dD?= =?us-ascii?Q?iu0Ti2eBR3/ntw83W3idfr/UQfItUq+zMXbZITHZXSdHI88LKqLf08htyK0c?= =?us-ascii?Q?HL8wd3zNnLW2HGNffmsO6CtOvlrZWSvJzTaWhaX8GmbQCsJAcsa/JxnzuJTa?= =?us-ascii?Q?k9Sb52RTJ60j/PASHTCrBACYqRk9ow3CIEet2Eox0wtHQ/EUyY3yHDNoueye?= =?us-ascii?Q?Pf+hAlgYl2fg31FfWzIcBx6xiqyBOW3NohMRqYPQMuej+1td7uXE0Izbtsja?= =?us-ascii?Q?RERpegp5JAREqwDSAN+bcURJ1tl1wM7T4gGxTvpjc8wgltv4wHLEgCI664Hm?= =?us-ascii?Q?O0/A1vFoYpzwFApiNjn6UhLNwrhKZFhSn1Qcr6mQrAL7JRvV6kVHSyMUb85K?= =?us-ascii?Q?dbwVjFabwEYuvXjsgqFKAH6UZn98qYmpW96sQ/eBA4hqGHg+nQYOSgj8dZT+?= =?us-ascii?Q?g6aFxZZQ1zTwtjeSWFZ3e80Rvaee/cMwt75tEQeYGdxsYqYR9SobVItCaYCJ?= =?us-ascii?Q?yq0ZhvH0JPKSvmpuQv5LQ7j9GEqgHm4DxJaA9lxF8Zgq4iDZxtB1y9eG+kD0?= =?us-ascii?Q?RuesEal03uf4tmjaD8o/GCWnndYb61z/Oc4Z49HBtOWkxWJS/aySOKh/CDEM?= =?us-ascii?Q?PPJ8fdnluKvFVsNhdsHhLJMVyalMzFi+BIG32f9nSIIjxbCPQ8M564W6g1lz?= =?us-ascii?Q?IW17IjgqSYzTr9hMkZx8A9VGjtdmGFYVliHPnsYFmd9Bakn9e4cUthUMPapo?= =?us-ascii?Q?2We3JgcfdFtDUqmCFQxqQ7EZ/8oPuycJ/QuZ26caOzGJ3U9jJXDkUogZhCr/?= =?us-ascii?Q?vi4n2kp+HCWSpbe4pQ4Bt5dBaDpgjnw8t421nqlV40hdWfgJGRXxpXiU/KSY?= =?us-ascii?Q?CUm3jtF1oVyYM7s6DzNq/Z9rnMm+2PNN5+iccrdOhsiAqdVy5zXMPZY9k/cr?= =?us-ascii?Q?jdVsB6jnk7iuZLGn1q2govnCdWTkWboZKPPAUWgTjmI=3D?= 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-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY4PR11MB1702.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f9733274-b4b1-4f2e-ee24-08d8b0a13639 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jan 2021 11:09:31.7105 (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: F6cgWo0dEzx82IzEWpXNBqFEjmXZ5VKyCZkBWKGBT9syCFTYkUQcdGL6cXG7j0zJWlvjURXFGKzX8P2RRQ0z7pCk39ln/weX5/ABzHiw6WQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2262 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 2/2] bitmap: fix bitmap not empty API for 128B cacheline 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 Sender: "dev" > -----Original Message----- > From: Nithin Dabilpuram > Sent: Monday, December 14, 2020 10:29 AM > To: Dumitrescu, Cristian > Cc: jerinj@marvell.com; dev@dpdk.org; Nithin Dabilpuram > > Subject: [PATCH 2/2] bitmap: fix bitmap not empty API for 128B cacheline >=20 > Currently bitmap line not empty check API assumes cache line > of 64B and only checks 8 slabs. Since in 128B cacheline, we > have 16 slabs per cacheline, plt_bitmap_clear() will mark > complete line as empty as soon as 8 slabs are full thereby > breaking bitmap scan functionality. Fix it by defining new > __plt_bitmap_line_not_empty() for 128B cacheline platform. >=20 > Signed-off-by: Nithin Dabilpuram > --- > lib/librte_eal/include/rte_bitmap.h | 25 +++++++++++++++++++++++++ > 1 file changed, 25 insertions(+) >=20 > diff --git a/lib/librte_eal/include/rte_bitmap.h > b/lib/librte_eal/include/rte_bitmap.h > index 7c90ef3..d9a1b54 100644 > --- a/lib/librte_eal/include/rte_bitmap.h > +++ b/lib/librte_eal/include/rte_bitmap.h > @@ -417,6 +417,7 @@ rte_bitmap_set_slab(struct rte_bitmap *bmp, > uint32_t pos, uint64_t slab) > *slab1 |=3D 1llu << offset1; > } >=20 > +#if RTE_BITMAP_CL_SLAB_SIZE =3D=3D 8 > static inline uint64_t > __rte_bitmap_line_not_empty(uint64_t *slab2) > { > @@ -432,6 +433,30 @@ __rte_bitmap_line_not_empty(uint64_t *slab2) > return v1 | v3; > } >=20 > +#elif RTE_BITMAP_CL_SLAB_SIZE =3D=3D 16 > +static inline uint64_t > +__rte_bitmap_line_not_empty(uint64_t *slab2) > +{ > + uint64_t v1, v2, v3, v4, v5, v6, v7, v8; > + > + v1 =3D slab2[0] | slab2[1]; > + v2 =3D slab2[2] | slab2[3]; > + v3 =3D slab2[4] | slab2[5]; > + v4 =3D slab2[6] | slab2[7]; > + v5 =3D slab2[8] | slab2[9]; > + v6 =3D slab2[10] | slab2[11]; > + v7 =3D slab2[12] | slab2[13]; > + v8 =3D slab2[14] | slab2[15]; > + v1 |=3D v2; > + v3 |=3D v4; > + v5 |=3D v6; > + v7 |=3D v8; > + > + return v1 | v3 | v5 | v7; > +} > + > +#endif > + > /** > * Bitmap bit clear > * > -- > 2.8.4 Acked-by: Cristian Dumitrescu