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 6ACA8A0577; Sun, 5 Apr 2020 22:02:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A9AAE2B83; Sun, 5 Apr 2020 22:02:15 +0200 (CEST) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80040.outbound.protection.outlook.com [40.107.8.40]) by dpdk.org (Postfix) with ESMTP id 3F119F12 for ; Sun, 5 Apr 2020 22:02:14 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VEv/jPpPAx4jS+frS3qqBvl7mpAaGMwY0JBQJV3wkb8q2AOeVOdIPFmwqaqHVOjIZ4KLfGPK+tmj+AalkypJH4jI19cWIlI2NAYfUpClPsbk2L5V00zDqxVbrm/g7jGyF8W/U65ysV0rtrR1/6lQ3V6dFECMdWyRXSHFGjyEXLrdTbRanykn5k9uqTW6GRaGO/1K6QkJBcEmLVIVyPW9roFQRB7nbgh5WwG9ChSbDavQfmSSN20iQZSPi7/mwhxS0/mgHBXqZgYi5NTEFN/zEi+CfTARVN77l69Ye70t1/XO3nm52Wt5Va5c+dMxJROZqALUT8M75a97RJFo4iyShQ== 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=iVUtop8hZdq5lSCbA2YFx4YiZ6Ha/tBtmvH3yTMsno0=; b=C1Lv463/5FoKRkfk7fb28uO4wx7apQOc3Ul/rigFVn0Fd3VYkHMV9duy9tCbBJF7aVBXWtLSD9YmxhVYc/s5XmvlyLBER8lPt2ZILpVwpttB8wXNbKZeP51TA2pb6Tc8RY6STCsJ7usCzyBDfuW49QjQnBurlAKSTiwuMx7bFMkJp+hoIy6BJb7Ntg2l9Dwf5FV/PgpGC4kaiVapSFgGHvL4uJj5FdoTpZWBHo/F1r24TeIwEPdmB/UMsoVfsP9l5c9zRVh+79CD/zS+yGqTWMNsEvL+2a/gaQ7LeNGz+dbDHWoZqq398BAFpPzlJcGZaHWrgb/jJ6xZzEbS2ky/nQ== 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=iVUtop8hZdq5lSCbA2YFx4YiZ6Ha/tBtmvH3yTMsno0=; b=IPXTjMmoFQ+BtK/rrwo/teAr2rtO+tEA24lVarZcJTXfJjC2bLTz1q8r6XSUHN001yrxIopollKkBa0/vAt9E0bIFHrvBMl20ARIxUx9zJbgUxvZjtRwtIlj/YE9OGrB4x4X/OrcWNCJyMCnVpEHEb/BbIpxp0jEotiEPa7vHvo= Received: from AM6PR05MB5176.eurprd05.prod.outlook.com (2603:10a6:20b:63::30) by AM6PR05MB6487.eurprd05.prod.outlook.com (2603:10a6:20b:73::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.19; Sun, 5 Apr 2020 20:02:12 +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; Sun, 5 Apr 2020 20:02:12 +0000 From: Ori Kam To: Pavan Nikhilesh Bhagavatula , Jerin Jacob Kollanukkaran , "xiang.w.wang@intel.com" CC: "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" , Thomas Monjalon , Parav Pandit Thread-Topic: [dpdk-dev] [EXT] [PATCH v1 3/4] regexdev: add regexdev core functions Thread-Index: AQHWC20rjyOqJHNps0GqsGjjydBzu6hq76UA Date: Sun, 5 Apr 2020 20:02:11 +0000 Message-ID: References: <1585464438-111285-1-git-send-email-orika@mellanox.com> <1585464438-111285-4-git-send-email-orika@mellanox.com> In-Reply-To: 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.175.32.251] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 7fcfb908-9f14-4588-6847-08d7d99c3ad6 x-ms-traffictypediagnostic: AM6PR05MB6487:|AM6PR05MB6487: 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:10000; x-forefront-prvs: 03648EFF89 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)(376002)(346002)(366004)(39860400002)(136003)(396003)(52536014)(316002)(71200400001)(55016002)(9686003)(81156014)(81166006)(110136005)(54906003)(8936002)(6506007)(53546011)(4326008)(86362001)(26005)(2906002)(186003)(33656002)(107886003)(478600001)(76116006)(5660300002)(66476007)(66556008)(7416002)(64756008)(7696005)(66446008)(66946007); 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: hTLOXbk2VNlLC7/D0/L2irGIhNN8SljqqDMQqb8Rrc53bD3NABIt9ZbH5KJfd867mJPzRiradZsDJaj53SSta3UTfsU7ufSS1ZEcRL6Lga2E1Tz74O6uJaa0YT8H0RFQ2s+jUXawmbUFM21geUG6IOivLmjmVdNS46dz8ie0BNglCBlAONagIpzscEXqvKMHx3avzmn2PgB7zu9/YjAP8ZgYdRRC6RVOCKdb+ACdOZ4GtRthb8jj3a+llW02rGmYk65306r0pJXsjOMmzUT/k38gf2r1HGCapV5UCt7v8ZcnYDqpvJ1+tlZvu4qbW7kd/oQhSrJoNy1klCffGhYUcNn97nPY9gmWVn38RVAuSHfzcEgUQIH3ByZdfrV1wpnBh4gSvreBVyYwmBWPjL52FNy8ia8G8bHkQxyFrvzY7puxhdCX4Zq14JR+IIoBKJMw x-ms-exchange-antispam-messagedata: XoCbEwWJ1B6AqnWbx5YBzPWmv2i1JrD9SF5HkroGkiDwzqcjPCnRwWlOF8dHaemBSIbnl0qGCYRTpu49CCpMXb+//IPYSmrr+OC3dDLQhxVwA9iPr45BmoDoM2PT/WvdDBMmuuGnz+zrPCYK0Ag7xQ== 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: 7fcfb908-9f14-4588-6847-08d7d99c3ad6 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Apr 2020 20:02:11.9311 (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: ntNOFvCa2ccStxWn4Zq+T/JFlUxnfdyIkolKqVrQAWY3AFoPt6LrmbL6fqtQE8jk6wgSq8/Ji/l91ZqymoEd0g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB6487 Subject: Re: [dpdk-dev] [EXT] [PATCH v1 3/4] regexdev: add regexdev core 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" Hi Pavan, > -----Original Message----- > From: dev On Behalf Of Pavan Nikhilesh Bhagavatula > Sent: Sunday, April 5, 2020 8:11 PM > To: Ori Kam ; Jerin Jacob Kollanukkaran > ; xiang.w.wang@intel.com > Cc: 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; Thomas Monjalon > ; Parav Pandit > Subject: Re: [dpdk-dev] [EXT] [PATCH v1 3/4] regexdev: add regexdev core > functions >=20 > Hi Ori, >=20 > >> From: dev On Behalf Of Pavan Nikhilesh > >Bhagavatula > >> > >> Looks like this implementation is incomplete? > >> I don't see any pmd specific helper functions for @see > >rte_cryptodev_pmd.c, > >> rte_eventdev_pmd* > >> > >I think the current implementation includes all needed functions, > >at least for the first stage. > >You can find in rte_regexdev_driver.h the functions that should be > >called > >by the PMD. We have the register / unregister which acts the same as > >create > >and destroy. For parsing argument the PMD may call rte_kvargs_parse. > > >=20 > _driver.h should atleast include > rte_regex_dev_pci_generic_probe/rte_regex_pmd_vdev_init > else there would be a lot of code repetition and possibly udefined behavi= or > at the driver layer. >=20 Why should they be included? At least in this stage, there is no code to sh= are ethdev why should we add code for the vdev?=20 I agree that if we see that there is shared code, we should think about cre= ating those functions. > And also why take a different path than the rest of the rte subsystems? > Even now if you look at the reference code you will see that there is reall= y minimum shared code. also this result in that the PMD is not free to allocate resource in the or= der he needs. My thinking is that if there are only 2 lines of shared code I prefer to le= t the PMD handle it. I know that sharing code should be the first option, but this also makes th= e PMD developer unaware what is going on. and lose some control. For example if the PMD programmer wants to create hy= brid PMD net + regex for example, then either he will be forced to do some hacks or just b= y pass the function so when this function will be updated his code will break. So I prefer if i= t is very short code and this code can be developed in different ways to leave it to the PMD. I suggest that if needed we will add such function. Is that O.K by you? =20 > > > >> >This commit introduce the API that is needed by the RegEx devices in > >> >order to work with the RegEX lib. > >> > > >> >During the probe of a RegEx device, the device should configure > >itself, > >> >and allocate the resources it requires. > >> >On completion of the device init, it should call the > >> >rte_regex_dev_register in order to register itself as a RegEx device. > >> > > >> >Signed-off-by: Ori Kam > >> >Signed-off-by: Parav Pandit > >> >--- > >> > config/common_base | 3 +- > >> > config/meson.build | 1 + > >> > lib/librte_regexdev/Makefile | 1 + > >> > lib/librte_regexdev/meson.build | 5 ++- > >> > lib/librte_regexdev/rte_regexdev.c | 74 > >> >++++++++++++++++++++++++++++++- > >> > lib/librte_regexdev/rte_regexdev.h | 7 +++ > >> > lib/librte_regexdev/rte_regexdev_core.h | 2 + > >> > lib/librte_regexdev/rte_regexdev_driver.h | 50 > >> >+++++++++++++++++++++ > >> > meson_options.txt | 2 + > >> > 9 files changed, 142 insertions(+), 3 deletions(-) > >> > create mode 100644 lib/librte_regexdev/rte_regexdev_driver.h > >> > > >> > >>