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 B9C28A0577; Mon, 6 Apr 2020 15:50:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 122D02BE2; Mon, 6 Apr 2020 15:50:32 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 11A66F12 for ; Mon, 6 Apr 2020 15:50:29 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 036Do8a4005268; Mon, 6 Apr 2020 06:50:15 -0700 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-0016f401.pphosted.com with ESMTP id 306srm5pxy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Apr 2020 06:50:15 -0700 Received: from m0045851.ppops.net (m0045851.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 036DoE10005335; Mon, 6 Apr 2020 06:50:14 -0700 Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 306srm5pxv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 06 Apr 2020 06:50:14 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 6 Apr 2020 06:50:11 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.107) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Mon, 6 Apr 2020 06:50:11 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kvizhWrFukDnrPOAXDPd/+vjuZppzTbYn5VQBHrl+hcSRjQbnTBad58qFG172zI/oEJmV3Ejmr+n7W3nWTQseKHxc+QlMDTs3mTdUE3GkwliXxB/0eu1etWoDuGAZ+/j/XoLwJQmu7BDxnvUfuTqWJJ28vUSgXj5mdA2hqPNOExSL6UzLsSBnMtrA/QKWWdS6NVTxiCsYHm06zFSUXW6mcOZ1b6L//5IQUJ/x/3Xau3yzvKRxjkWMzTzx0g1kkW55jkRUpJ0BQiwmOPI7wD/Dc/utmfiMsYRC8cRWGqzHzpDIIWgkmFbUdPUu4RiFuOMQuvx7WWBBRVwPMjDn/fnYw== 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=2vrA2arrBMtU4lei1JzItdJ3GRx6f8tJtxKRYtIKUgo=; b=cNuh1OgC8l+I534LrL/xVoF7sx3DkuEWffVzjoTpymk1C/cFVOWWQft4mVBJJIbbZFeUKtIZYL8gHK1CMgNvKWEC4snsQiNPam7vUDro0ilVjEHE/aMUumhScLp4XkjNqxIzk53UdnbyuwiNxtRhwuhyrflR+6YtdWtl+SPWZSiInULzYot+uepsn98GbUk8dTiK39Uz82DWfv1zqo85nD3Vn6cRfJLFVbz/d/r7IF8n/3t7bQ98J9yeO9cUmG+AIMa7PG0kxozDOfa7vxmZMGCM0RklyjV5Lf8zaY6Lk+G4b0Su972nV6yXuXPp6+kQexRvbgdxSBd1RuJD6Q/P9w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2vrA2arrBMtU4lei1JzItdJ3GRx6f8tJtxKRYtIKUgo=; b=b/KlllVthP61xUWMzMzpB2u33PhNZ2k7q8NgUCxGoDxkPtRl7qI3ftj3PMJFz8bh6VcslqxxLJZc59yopxqkNOLpkyZnrwnySQg46rd0POkMRBTtBh+Y3kal5Jcf8M9vhr2gapPJWZpLc0vWhKTe4GdItM+dVJfuB6hor9spbgQ= Received: from CY4PR1801MB1863.namprd18.prod.outlook.com (2603:10b6:910:7b::32) by CY4PR1801MB1894.namprd18.prod.outlook.com (2603:10b6:910:7a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.21; Mon, 6 Apr 2020 13:50:10 +0000 Received: from CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::7424:c6cd:94f2:b27b]) by CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::7424:c6cd:94f2:b27b%4]) with mapi id 15.20.2878.021; Mon, 6 Apr 2020 13:50:10 +0000 From: Pavan Nikhilesh Bhagavatula To: Thomas Monjalon CC: Ori Kam , 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: [EXT] [PATCH v1 4/4] regexdev: implement regex rte level functions Thread-Index: AQHWBZX54UsASpZbek6bztL98vA/6qhpAT8ggAGqpYCAAVKNAIAADc4wgAATDQCAAADrAIAABV8AgAABhVA= Date: Mon, 6 Apr 2020 13:50:09 +0000 Message-ID: References: <1585464438-111285-1-git-send-email-orika@mellanox.com> <5151953.QU4070AmJz@xps> <1620573.TTEOE9XjLl@xps> In-Reply-To: <1620573.TTEOE9XjLl@xps> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [122.181.45.244] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: abc6aa7c-dafc-4da7-216d-08d7da316c40 x-ms-traffictypediagnostic: CY4PR1801MB1894: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4502; x-forefront-prvs: 0365C0E14B x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY4PR1801MB1863.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(366004)(39860400002)(346002)(136003)(396003)(376002)(54906003)(316002)(6916009)(2906002)(26005)(4326008)(7406005)(7416002)(86362001)(186003)(55016002)(8676002)(6506007)(81156014)(9686003)(71200400001)(8936002)(478600001)(66446008)(64756008)(66556008)(66476007)(5660300002)(33656002)(7696005)(52536014)(81166006)(66946007)(76116006); DIR:OUT; SFP:1101; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Ah2GpzvKy7wpYsBo0NC3vknJzaNmjnBhY2LaKK9yMMKfD6JKLfHdXDQRYJRVoTky32OOyjHnBQKJtwJOM8dqjV55WaWjx43VkTvnJauQbJpgJ3RdrHrlY4ZXlZMq41jcCk7jTtec1NM1/GxX5xvn9WHR6HT6Prx89ivkvkJ9qvNAWKjW8k2chlQxNRNTGpGZUiz13/or/nYuf89isE6Q+Mefenijq3/haTsLydqH87kN5lpNEVa92E8uvt38l0UGKdgwmxs9aZJsk/YD8LN9M2wz4iTmqgFLIQbyLRZ5ti9nkX7l2kQkJvJQJEYt1rTm/NoYfHf6vSDejxbXkBOYBQCS79GXNFm3QOwi1ochjp48E/HXWYCgPUkW4uTLTSc52Fuq1QkVjuEfmpEFXCaeO0upkgvmCxzx8PRVE6be0JGU5+YDIpm4mzDBU+2Y9l3e2NOfzrCFAw7Hp5xUHPWKtsMOX9xnUSylqmYsCGoH3QoTMHUxSdtzhJfiCbioIkNqK6M4t0hG60rmArC7HEquGw== x-ms-exchange-antispam-messagedata: X9tw7As4m3OopfgqFyJ1eJwhm7OlscyDAxoo35erOoKAwNWRbB4gHfxkjpHNIZbvGvfzWPaIesPSdfPfzjDbbjZaI7OWkau9SX8bXqzhfaiQ1X5viTI9Ml26u4QDVIJHIGqs4GPQBdjjXbqBu+6ShQ== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: abc6aa7c-dafc-4da7-216d-08d7da316c40 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Apr 2020 13:50:09.8650 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: cYLg8876/NGD6Ij6K50Fmy6sarCsvoG11e5+BYJoksNY65xDgQlSYbTGvnaDaU3v7qle/WFe5QRpZTZ4EwL/EYzaqh0QGvxd78C3nkoTNeo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1801MB1894 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-04-06_07:2020-04-06, 2020-04-06 signatures=0 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: Thomas Monjalon >Sent: Monday, April 6, 2020 7:07 PM >To: Pavan Nikhilesh Bhagavatula >Cc: Ori Kam ; 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 >Subject: Re: [EXT] [PATCH v1 4/4] regexdev: implement regex rte level >functions > >06/04/2020 15:22, Pavan Nikhilesh Bhagavatula: >> >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 pipeline >> >and regexdev would be >> >> experimental for next couple of releases I suggest inlining it now >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://urldefense.proofpoint.com/v2/url?u=3Dhttps- >3A__www.mail- >> >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://urldefense.proofpoint.com/v2/url?u=3Dhttp- >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 capabi= lities. All we are trying to do is reduce the enqueue/dequeue completion time which= would=20 bring down the overall latency. Thanks, Pavan.