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 2A34FA0577; Mon, 6 Apr 2020 20:54:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8C6672B96; Mon, 6 Apr 2020 20:54:00 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60048.outbound.protection.outlook.com [40.107.6.48]) by dpdk.org (Postfix) with ESMTP id A5B772B86 for ; Mon, 6 Apr 2020 20:53:58 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T18a+DfrbnczQ511B3W3qklDt+/I+5+r0CZwkt6u34DTMqh6WWAOuvhVwSexXastgXtjQTTXgSvmRT8eww2tjr7ALl6wKYuAqTh8BTy48854xQ0ubTAxTnXXu7MJtVPzxlb7T6tXckxwXnDPP3v77+x0y7/Q9ZeMudQ/iRtL8Y6pLodRA0LqE3C+aKvRaQICA3Gc1ZMUOuOz0zlC3KVAPw5g00ql0QUDfb2TsCgN0AckznUcDRrYXR4SqKT3ZN4CAfYNRuL4FDjDMuirBbV0bo0Eezrisue9qputLXDBDgr4YwmvkQaknse4jp4qeWjJbWwMKySZB94ODumVcXwE+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=Tq0WB4+kbTHUuI1yEg8EOL8NofIY9nHMftzR7jk0xMM=; b=oGIiABZ1jo8Mp1wGY3N8CD6CsYfPv8Hnijxf5agc7LA87Zogeuf2emB3ajPiFbeJJZXCszdXFtnw/lTTaBdHROEXQmukyHOkGESs8m0ZwYsXrDtZRWDQ3qIBIC/2RWQDwwSFXP4qZ7MPFaCBcZhZjZzIUG/hZgL0U2TVm88C1RCtAMVmDbLwNvsRpb3u8Bb9RrNODn80lPCfQc6Pu1HxJJ3E+pfCsm9LYm+2KYw8Encj8m7/kYy43WOLkAFQ4+fo8rbqWOgoooJXum0hDZi5lZh4Y0bPoXMOgiSIAgbSb2agIEhIMU+4LuZ0Ki1iOk6yXj+Yohs9oRVO8are19ekvQ== 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=Tq0WB4+kbTHUuI1yEg8EOL8NofIY9nHMftzR7jk0xMM=; b=EjX1fvWQ44bP9b/A6NLuU3IZ54GZ6n6Lnb2PMIv0rNiRlYR2xj0P+lIjl8Db1anRSVoUgEyL338pHPhhFcpOQeI8hUniJ3xIF5XrYuFMhequBkWwFZ1fXkFT0QUt5gA3xsX03tKLMcOc4bllZUNQs+jZd3UZ1Dzv7JjOUeKsnbU= Received: from AM6PR05MB5176.eurprd05.prod.outlook.com (2603:10a6:20b:63::30) by AM6PR05MB4247.eurprd05.prod.outlook.com (2603:10a6:209:41::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.20; Mon, 6 Apr 2020 18:53:56 +0000 Received: from AM6PR05MB5176.eurprd05.prod.outlook.com ([fe80::f5cd:b10f:5f1b:4b22]) by AM6PR05MB5176.eurprd05.prod.outlook.com ([fe80::f5cd:b10f:5f1b:4b22%7]) with mapi id 15.20.2878.018; Mon, 6 Apr 2020 18:53:56 +0000 From: Ori Kam To: Thomas Monjalon , Pavan Nikhilesh Bhagavatula CC: Jerin Jacob Kollanukkaran , "xiang.w.wang@intel.com" , "dev@dpdk.org" , Shahaf Shuler , "hemant.agrawal@nxp.com" , Opher Reviv , Alex Rosenbaum , Dovrat Zifroni , Prasun Kapoor , "nipun.gupta@nxp.com" , "bruce.richardson@intel.com" , "yang.a.hong@intel.com" , "harry.chang@intel.com" , "gu.jian1@zte.com.cn" , "shanjiangh@chinatelecom.cn" , "zhangy.yun@chinatelecom.cn" , "lixingfu@huachentel.com" , "wushuai@inspur.com" , "yuyingxia@yxlink.com" , "fanchenggang@sunyainfo.com" , "davidfgao@tencent.com" , "liuzhong1@chinaunicom.cn" , "zhaoyong11@huawei.com" , "oc@yunify.com" , "jim@netgate.com" , "hongjun.ni@intel.com" , "j.bromhead@titan-ic.com" , "deri@ntop.org" , "fc@napatech.com" , "arthur.su@lionic.com" , "david.marchand@redhat.com" Thread-Topic: [dpdk-dev] [EXT] [PATCH v1 4/4] regexdev: implement regex rte level functions Thread-Index: AQHWDBu4/wTU37ZTYk23JcTeW3g8EKhsaz6Q Date: Mon, 6 Apr 2020 18:53:55 +0000 Message-ID: References: <1585464438-111285-1-git-send-email-orika@mellanox.com> <1620573.TTEOE9XjLl@xps> <9615243.0lO9i7VF8o@xps> In-Reply-To: <9615243.0lO9i7VF8o@xps> 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=orika@mellanox.com; x-originating-ip: [185.149.253.12] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 1e8cdaf9-c88a-4195-e0f7-08d7da5bdc1b x-ms-traffictypediagnostic: AM6PR05MB4247:|AM6PR05MB4247: 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:5797; x-forefront-prvs: 0365C0E14B x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR05MB5176.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(396003)(39860400002)(366004)(346002)(376002)(136003)(81166006)(8936002)(81156014)(9686003)(55016002)(86362001)(71200400001)(64756008)(76116006)(66476007)(7406005)(66946007)(45080400002)(478600001)(7416002)(52536014)(66556008)(5660300002)(2906002)(33656002)(66446008)(4326008)(110136005)(186003)(54906003)(6506007)(7696005)(53546011)(316002)(26005); DIR:OUT; SFP:1101; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: IdA6CXNuaGTBWykgA6PDtfH4mVK6nSNLWHLWIvEq0JvW0IZuAYBGXQbWBWw22gPgeLz4/gFrylK6wRMAL0mRKjDWpxYNp1/4tFLESniv7WAQelVJJDf+6CATPrtvB87gI+fSji3CgIz6Z1OUYBIr91T2CEVxC31/ZqeFy7BZ1bsyzDcC5RIbTgp+d12frSREWLLRz+dvPbyDSdSwFk5tPH2RgYtDzUYTWBBfPeRsTGQsDDylXTSrhSK0+Hvgo0cFnFtu1Oab31VgJi3/RXD2Lx3boryVRh6Qrun2U3itU5LJ6cZMHcx3GlnOkTbHBJnSyIGjFTsyr8oGX4ouk1O52CmH96Z4Uu1ieuG9YlaFoVrJ2K3U3iM9Vpz6n3X63EIiQDXwiEvcEPkUFisJD+3kwGt8Ggn5aps/PLib88KdSM1x28W62pqZ0EAmC6cdp8SeShaqnscBmjls9U1LlR+eND8xuGkk+f+QLxoM+vXB0yxh2vMZqVu8nErYTf244dkK x-ms-exchange-antispam-messagedata: XfPT0AwVlPL7ubFOajz3w05aCTJUupfv9vQFjQBMHWu1xsR2Fm7DZzSTQDZHdHUb0+wnSIsV8Ymu12d5DCIPD3NUMj3x3LeI+xkM2xkp5wN0fkJPuStrKqG0+MmQ9Xa3thjSIevC6iA1Qx/7fcDoHQ== 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: 1e8cdaf9-c88a-4195-e0f7-08d7da5bdc1b X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Apr 2020 18:53:55.2146 (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: kmcuhZU0VWIcYNjNg8iVtwNg5c+W8eJqBau6R4q96c1C6sk+0xqmwJQv2xOwCDg4/LBrDXaN/rtC+Ps5XYXCpQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4247 Subject: Re: [dpdk-dev] [EXT] [PATCH v1 4/4] regexdev: implement regex rte level functions 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: dev On Behalf Of Thomas Monjalon > Sent: Monday, April 6, 2020 5:00 PM > To: Pavan Nikhilesh Bhagavatula ; Ori Kam > > Cc: Jerin Jacob Kollanukkaran ; xiang.w.wang@intel.co= m; > dev@dpdk.org; Shahaf Shuler ; > hemant.agrawal@nxp.com; Opher Reviv ; Alex > Rosenbaum ; Dovrat Zifroni ; > Prasun Kapoor ; nipun.gupta@nxp.com; > bruce.richardson@intel.com; yang.a.hong@intel.com; harry.chang@intel.com; > gu.jian1@zte.com.cn; shanjiangh@chinatelecom.cn; > zhangy.yun@chinatelecom.cn; lixingfu@huachentel.com; wushuai@inspur.com; > yuyingxia@yxlink.com; fanchenggang@sunyainfo.com; > davidfgao@tencent.com; liuzhong1@chinaunicom.cn; > zhaoyong11@huawei.com; oc@yunify.com; jim@netgate.com; > hongjun.ni@intel.com; j.bromhead@titan-ic.com; deri@ntop.org; > fc@napatech.com; arthur.su@lionic.com; david.marchand@redhat.com > Subject: Re: [dpdk-dev] [EXT] [PATCH v1 4/4] regexdev: implement regex rt= e > level functions >=20 > 06/04/2020 15:50, Pavan Nikhilesh Bhagavatula: > > From: Thomas Monjalon > > >> >06/04/2020 14:33, Pavan Nikhilesh Bhagavatula: > > >> >> >> From: Pavan Nikhilesh Bhagavatula > > >> >> >> > >+uint16_t > > >> >> >> > >+rte_regexdev_enqueue_burst(uint8_t dev_id, uint16_t > > >> >qp_id, > > >> >> >> > >+ struct rte_regex_ops **ops, uint16_t > > >> >nb_ops) > > >> >> >> > >+{ > > >> >> >> > >+ return regex_devices[dev_id]- > > >> >> >> > >>enqueue(regex_devices[dev_id], qp_id, > > >> >> >> > >+ ops, nb_ops); > > >> >> >> > >+} > > >> >> >> > > > >> >> >> > Move these functions to .h in-lining them. > > >> >> >> > Also, please add debug checks @see > > >> >> >rte_eth_rx_burst/rte_eth_tx_burst. > > >> >> >> > > >> >> >> O.K will update. > > >> >> > > > >> >> >In general, inlining is a pain for ABI compatibility. > > >> >> >Please inline only if the gain is very significant. > > >> >> > > > >> >> > > >> >> The performance gain mostly comes from hoisting > > >> >`regex_devices[dev_id]` load above the > > >> >> poll loop. > > >> >> Since, the performance measurement application is still in pipeli= ne > > >> >and regexdev would be > > >> >> experimental for next couple of releases I suggest inlining it no= w > > >and > > >> >worrying about ABI when > > >> >> experimental tag needs to be removed. > > >> > > > >> >No, we must worry about ABI from the beginning. > > >> > > >> I though performance was the primary objective :-). > > > > > >It is. > > > > > >> >> We can follow the same path as done by ethdev > > >> > >[https://eur03.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Furl= defe > nse.proofpoint.com%2Fv2%2Furl%3Fu%3Dhttps- > &data=3D02%7C01%7Corika%40mellanox.com%7Cc3e07910f52846f64b5008 > d7da32d82e%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C6372177 > 84252928490&sdata=3D8Pxq8ciUVW7bMiB1XmQBNm%2Fsmy8m1Wa7yKXK > JRL4d%2B4%3D&reserved=3D0 > > > >3A__https://eur03.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fw= w > w.mail- > %2F&data=3D02%7C01%7Corika%40mellanox.com%7Cc3e07910f52846f64b > 5008d7da32d82e%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C637 > 217784252928490&sdata=3DsTDsN85xShTU7WOLQQ2iF8eh%2FyoVHYwDq% > 2FTdgdHdlbM%3D&reserved=3D0 > > >> >2Darchive.com_dev- > > >> > > >>40dpdk.org_msg142392.html&d=3DDwICAg&c=3DnKjWec2b6R0mOyPaz7xt > > >f > > >> >Q&r=3DE3SgYMjtKCMVsB-fmvgGV3o- > > >> >g_fjLhk5Pupi9ijohpc&m=3D7Gqb6WKmZV5uY3xa7FRVrRVDz8Usrsd- > > >> > > >>rDjIKr6CUQQ&s=3DsQo2Kx9fzTNXwiQ2Fzki3s5GSuiiAEzz2VtN68_KKXo&e > > >=3D > > >> >] > > >> > > > >> >ethdev is not an argument. > > >> > > >> What about ring? > [https://eur03.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Furld= efens > e.proofpoint.com%2Fv2%2Furl%3Fu%3Dhttp- > &data=3D02%7C01%7Corika%40mellanox.com%7Cc3e07910f52846f64b5008 > d7da32d82e%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C6372177 > 84252928490&sdata=3Dt2qUIj51WPzqQhJngheYh1s7DWzOxd%2FcAyAQK39C > HgQ%3D&reserved=3D0 > > >3A__mails.dpdk.org_archives_dev_2020- > > >2DApril_161506.html&d=3DDwICAg&c=3DnKjWec2b6R0mOyPaz7xtfQ&r=3DE3S > > >gYMjtKCMVsB-fmvgGV3o- > > >g_fjLhk5Pupi9ijohpc&m=3Du9gnM_YrOJDusN4yR8YUcUuUkri4tOjnHrQ0A > > >Qd5zTw&s=3Duv6AQA- > > >Zu7o6ugyhpGHLxFOk4SfEdkHfFGDmhzANRME&e=3D ] > > >> > > >> Why do we need to prove the same performance advantage using in- > > >lining for datapath > > >> critical functions again and again? > > > > > >Because every libraries have not the same usage and load. > > >We should compare how much cycle is saved with inline vs > > >how much cycles is, "in average", a regex burst? > > > > > >If you tell me regex processing is fast, OK, let's inline. > > > > > > > Regex processing speed would still be dependent on underlying device > capabilities. > > > > All we are trying to do is reduce the enqueue/dequeue completion time > which would > > bring down the overall latency. >=20 > Take your regex HW and do a simple regex processing burst. > How many cycles it takes to complete? > How many cycles you lose if not inline? > If the ratio is lower than 1/200, I think inline is not a must. >=20 > Ori, please consider the same measure for your HW. >=20 I think that the default for data path should be inline. In this specific case maybe the benefit is small. I guess that by definition the RegEx is slower than the net device. It is much harder to check the performance of RegEx device due to the=20 fact that it depends on the data itself and on the rules. I don't have HW to check the numbers right now. Even if I have them this is for Mellanox implementation other PMD may have different values. I suggest that we change to inline, and after getting the HW we will run so= me tests and based on them we can decide if the API should be changed. Please note that the API change will be before the first integration of thi= s patch so it is not real API change. =20