From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70088.outbound.protection.outlook.com [40.107.7.88]) by dpdk.org (Postfix) with ESMTP id D5B5D4C8C for ; Mon, 5 Nov 2018 14:18:01 +0100 (CET) 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=kxIDPqftHOgsAVehPItt65ZI3tgBjc8XjY4zSO6ew14=; b=CDoJvmpTZtAvUXagSz6rKMTgTG69CdL1AC69T2taDqNItsZPpUIh5JyNu2dKSHJkER8ET8kvkD7HHnmYdUH8st3zHFmITHN6KVA1gmBpzMIaY+xCpTmk+CcaikdfDTQtmzF4Gybx2d9156meFH/dID2DDR2OZaFr+x5jc51NGAI= Received: from DB7PR05MB4426.eurprd05.prod.outlook.com (52.134.109.15) by DB7PR05MB4857.eurprd05.prod.outlook.com (20.176.235.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.26; Mon, 5 Nov 2018 13:18:00 +0000 Received: from DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::bc22:c2f5:208d:826f]) by DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::bc22:c2f5:208d:826f%2]) with mapi id 15.20.1294.028; Mon, 5 Nov 2018 13:18:00 +0000 From: Shahaf Shuler To: Olivier Matz , Tom Barbette CC: "dev@dpdk.org" , Ferruh Yigit , Thomas Monjalon , Andrew Rybchenko , Yongseok Koh Thread-Topic: [dpdk-dev] [PATCH v4] mlx5: Support for rte_eth_rx_queue_count Thread-Index: AQHUbgdFa7YpZOBUAEWIgl1+xlkwxaU0YpJwgASx7wCAAXMSEIAGaIaAgAAPOoCAADgygA== Date: Mon, 5 Nov 2018 13:18:00 +0000 Message-ID: References: <1540653055-67051-1-git-send-email-barbette@kth.se> <1540976475938.69727@kth.se> <1541408462940.66979@kth.se> <20181105095533.yupcifz45metjkgf@platinum> In-Reply-To: <20181105095533.yupcifz45metjkgf@platinum> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB7PR05MB4857; 6:R9qTIV8LyFpajH8cARu+2cJqh5hUBdKcDkQQtA7LsbLjNWFSFSQmlVGEXUeBEBK/3wTHbilzavZdpeExTpkQW2X8UJ9Mhhx2PuQydkWKMcFX4omJqHgQIptUiLCYFIT71Z0559Pa86LkQvXRZxzez88ESCJNW4pSkkJ9jyyTOtls09ESyLG0r+bR+RJReKfvUJCk78FrPZZsxVtL16Yme2z9IHQ8XmAC0fXG8lSOsiCvWD4MNorievRJOaXl81hOH36+FVgKJk1DT+ZP6NnWHR8uWIl+FKooL82Bkz/Yk5YfQPKWwi8gJwiRjBN3+xCpaKXO6gFoMuzYjn309qCfttnCCAvb0AniwVkiBXwV4BdP6FfFeFazBQcaph2pRG1W6Ja9iNSEuJlfwZNZJc0++ZSWeONjuoH1sKQ2/sbeRdC0lwUcpCHNa0JvEjz0ZUrolbkkGV20bvdbj09saacEfQ==; 5:WLYZ36xaAH0XR2C6a8MFwu/AEAczgIz34hecV06FhBY8oFa+QTev7UVhKqDMv1jYChEciMQXfM0Fc8z4XOQ8kP3WKt27ZpPFAYIjUUUo3D46uP9+HCajBOMdcBKP75Fz0w3Iwot49EXC5AdQgbxpKIxqA9F6ZGMMwa60auHbhek=; 7:VwXXNB33BnNprF72rlMJ+KKxcJl7lCAc8K1jibe0n6NxT2lbGA4fdZonrq+plG3gtDOnKwVN8PKpM24t6FTYMogGjpE87U17LgypHv/A1zIJYEyW9ox+kAoHwjsq0TMcRVUtnkzCcqv8uIfXkULVlQ== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: f91149a1-5685-468d-3ee9-08d643211c0a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:DB7PR05MB4857; x-ms-traffictypediagnostic: DB7PR05MB4857: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231382)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:DB7PR05MB4857; BCL:0; PCL:0; RULEID:; SRVR:DB7PR05MB4857; x-forefront-prvs: 08476BC6EF x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(376002)(396003)(136003)(346002)(39860400002)(189003)(199004)(9686003)(229853002)(2900100001)(74316002)(478600001)(110136005)(11346002)(5660300001)(54906003)(446003)(93886005)(25786009)(486006)(2906002)(14454004)(316002)(476003)(6116002)(106356001)(3846002)(105586002)(97736004)(7696005)(71190400001)(71200400001)(6436002)(86362001)(8676002)(53936002)(26005)(55016002)(76176011)(6506007)(102836004)(33656002)(68736007)(4326008)(7736002)(305945005)(107886003)(6246003)(8936002)(256004)(14444005)(99286004)(186003)(66066001)(81166006)(81156014); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR05MB4857; H:DB7PR05MB4426.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: /CwqU7RX08lPVPjL0AWiVIL27ud+eqV5V3sa/o/tQ2BM+rY6x/VfV+5QwPEo1qQVTwONDWJFXmjiQT294WHW9hM2mOuoGWNr81lIascu0pCduGozd3QnWjfvFOYrvyb4DbY2RoQAY/cKpsMsqRcxjcgMBwUtaT4I8v26BDkY3SosEEPg7Lpi+CBgKToJjjzyHSmSXylwKy+juG13n6kNqN5GJHhVKumDXi/22rk6792WgDiOZ/7GQ3HD+FLMHIZcZr1hdlcTIoA+R29FnUEoa6fvDkvJ6Imkgo4S8/o7UFhg4+xvwIxnCvxVu91E4a1y0ElikRM0WuODPtJ/T69qsAUgn5Oa9Z6DL3HbKEzfsbs= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: f91149a1-5685-468d-3ee9-08d643211c0a X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Nov 2018 13:18:00.1512 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB4857 Subject: Re: [dpdk-dev] [PATCH v4] mlx5: Support for rte_eth_rx_queue_count 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: , X-List-Received-Date: Mon, 05 Nov 2018 13:18:02 -0000 Tom, Monday, November 5, 2018 11:56 AM, Olivier Matz: > Subject: Re: [dpdk-dev] [PATCH v4] mlx5: Support for > rte_eth_rx_queue_count >=20 > Hi Tom, >=20 > On Mon, Nov 05, 2018 at 09:01:03AM +0000, Tom Barbette wrote: > > > > > It will tell you if in a given offset on the rxq you have a packet re= ady. I > think it will fit your needs, see below. > > So we just loose in precision here. We're looking at ML techniques that= will > play better with a numerical value and benefit from more entropy than > arbitrarily poking of some thresholds. > > If one had to remain, I'd say rx_descriptor_* should be removed as it c= an > be deduced from queue_count. Moreover, in the MLX5 case, calling the > function 3 times to get "half busy", "partially busy" or "idle" will lead= to > scanning the queue 3 times... >=20 > The rationale of the descriptor_status() API was to avoid to scan the hw = ring > in a linear way, like it was done in *_queue_count() functions (on Intel = NICs). > This costs a lot, especially for large rings. The alternative was to do a= pci > access to read the hw head/tail, but benchmarks showed that it was also > expensive. >=20 > With descriptor_status API, it is fast if you only need a threshold info. > If you need a more precise count, it is possible to do a binary search > algorithm, which is faster than the linear traversal. >=20 > That said, these assumptions may not be true for all NICs types, since th= ere > are different ways of implementing the queue. I will apply this patch, since this API exists and you find the new one not= fit.=20 We will follow up on this when we reach the point we deprecate the old one. Applied to next-net-mlx, thanks.=20 >=20 > Regards, > Olivier