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 936B7A0577; Mon, 6 Apr 2020 14:48:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C566C2B86; Mon, 6 Apr 2020 14:48:39 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 87D33F12 for ; Mon, 6 Apr 2020 14:48:38 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 036CVt3I007618; Mon, 6 Apr 2020 05:48:28 -0700 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-0016f401.pphosted.com with ESMTP id 306qkqwvgp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Apr 2020 05:48:27 -0700 Received: from m0045849.ppops.net (m0045849.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 036CjOLI020114; Mon, 6 Apr 2020 05:48:27 -0700 Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 306qkqwvgk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 06 Apr 2020 05:48:27 -0700 Received: from SC-EXCH02.marvell.com (10.93.176.82) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 6 Apr 2020 05:48:25 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.36.58) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Mon, 6 Apr 2020 05:48:25 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cf4Ut8Gh/RpbcWTOw+aB43LbT69nuYshzwhN0S+Yop5LBAdlEQK7prQMp75uct+EsmkHvNEgBQyyBXBufDfejn3szKMvXXcZEGkLCUNIJeQbiu1x3aXCQ5UHA87wU4wI49SjEycmfyAOpL08XgdNpGB+6xaslukk7orj0C6j3dbYK13EbbK08MHbW30RbcyP9wknnF2Ks7eQ6LEBxHNPe10vwMdNqud2vROAm7jTiBzw0ko6Y9WznjD8FakB4Osq3RcvftyiQEh4xYFPomg4phj2q/Bjy4CWb2Tl+H/xpVOf0PAo5ybB/WbU+ZVAtmOFWMZslbKT/a1XbNl/PVIgmw== 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=WYNxJGxnpYnKmwML8Eb6ZeI05dmkPZ65zpT9sPr8eMc=; b=QqOcETOP4RTfeHcJn4SG7XofvLBtUtxs+kxJb2KIVwpEPNEyL6A4SHbp0QWGXfkLx4+MGjgwY5sdfnkBJn3+/9BFvOpM7T5/HnrZyvzaB6X04FnA2njgYC1z1hDwxqvYZqOgzgORlNUF4lXpoIXnyTW8yZmI5vjFESK6sM/CznY2YtJInXaxzpqPZWBAcP8/bup+9opBwmqv2ZjLRMUHKoQ2qX+AzbGrfvdg0PkSUFswtuaQx+2d99fQASRh06CBzd+lLz0zB75IvG2qTJTDzsDqF1FwlrOlA+PkjkSwNKIzmS1AQ8Ct632XAaM7Dv1RzZzxVdfEK1it0GjQaP1kDw== 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=WYNxJGxnpYnKmwML8Eb6ZeI05dmkPZ65zpT9sPr8eMc=; b=gXPg/0zIQQN4WtO32UrpU1V5k82KpN6r5qucfEpUjQ/ycWXHslo5ihccl61JQ+Zt7V00Nhete1YmGcT28aCeHLBoEKsruhNotr55iFTq7CpHZLyL5XBVi6dS/Fd1NvD7n6B/xXnmd2YmP3UCY5+mCLWJ3K+A5aaipPdnqpljIrg= Received: from CY4PR1801MB1863.namprd18.prod.outlook.com (2603:10b6:910:7b::32) by CY4PR1801MB1814.namprd18.prod.outlook.com (2603:10b6:910:78::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.16; Mon, 6 Apr 2020 12:48:23 +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 12:48:23 +0000 From: Pavan Nikhilesh Bhagavatula 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 Thread-Topic: [dpdk-dev] [EXT] [PATCH v1 3/4] regexdev: add regexdev core functions Thread-Index: AQHWC4UfArroxDSjd0upe/VJKRY0HqhsCDlA Date: Mon, 6 Apr 2020 12:48:22 +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-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: 3432f3f1-0a76-424f-7913-08d7da28cac1 x-ms-traffictypediagnostic: CY4PR1801MB1814: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; 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)(396003)(366004)(346002)(376002)(136003)(39850400004)(478600001)(33656002)(186003)(86362001)(7416002)(4326008)(26005)(5660300002)(52536014)(66476007)(9686003)(6506007)(7696005)(66446008)(66556008)(76116006)(64756008)(54906003)(110136005)(7406005)(55016002)(66946007)(81166006)(81156014)(71200400001)(53546011)(316002)(2906002)(8936002); 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: yvy4bkuiCfu+zNIJdoir8uOBj2ONmd350rkx0N5vKQ8kqly4MklpiIS6NZVU8KSH173xyoUfNF4GnWC7mIPAOKiazH5tsK+E6PkDq6HDeLODtr610oyy7Y6EgC6KwOKRe+NqkZGOer0kREJGfCzl9e53WX2CfGnvELQilCdFJiMKj1S6OKZhFA8BD+sCjAd093GJWTIcvdw7KxBVK0UonCmPYyiaYUMQ71spDDI9FbMJBrqpfAOugW0alt55qxxCLm22IRMKqANNSwmWguKqPTvwqgceiLhTKJCkOidtZReGcE5Rq27UctOJn5t6G1XDn8Gigk/TjqVAvoVx6RdisGGXP05j9LDfpAsCpNbjITc8gD5YfMoQKcxo6bLgy4Ybrwyj4B8bvBtOdiOOv+kBanaodRsH4UT0xeIURuGIT9P867Wfu2Wx1m3xjZlXwwQQ x-ms-exchange-antispam-messagedata: MZE+KoinIRaZpWuSSyKaz/uDnTRLfMal6NQQLEqOW/0Kba/glFiWW8m0a9lwlmRuxJ3rQKBImd80VYRyOmkS5xupRzAgdLvbfCk8k5wUCcEqBwfci4aiG3OcBAy+7o5+C+xdYvGNhSN2GEnZcvS4fQ== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 3432f3f1-0a76-424f-7913-08d7da28cac1 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Apr 2020 12:48:22.9349 (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: j+m2k+dNC7NBwz3oe30o0FNQAoQdoKqnxfXhMxi3zwPmWTFD2Dfe3HkX9pQFHo1NmoxOuWai2u58DN68+39qD4r7YQ1yhFWfOLSMbhz7pqg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1801MB1814 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 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 Ori, >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 >> >> Hi Ori, >> >> >> 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. >> > >> >> _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 >behavior >> at the driver layer. >> >Why should they be included? At least in this stage, there is no code to >share >ethdev why should we add code for the vdev? Ok I think I failed to communicate my concerns across.=20 Let me retry 1. SW based regex devices such as PCRE/Hyperscan rely on vdev framework i.e. user needs to pass an EAL argument --vdev=3D"regex_pcre" for the drive= r to=20 initialize all the other EAL subsystems (ethdev, eventdev, cryptodev, etc..= )support this. 2. HW based independent regex devices that are exposed as PCI devices would= need pci probe helpers. >I agree that if we see that there is shared code, we should think about >creating >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 >really minimum shared code. >also this result in that the PMD is not free to allocate resource in the >order he needs. >My thinking is that if there are only 2 lines of shared code I prefer to l= et >the PMD handle it. >I know that sharing code should be the first option, but this also makes >the PMD developer unaware what is going on. >and lose some control. For example if the PMD programmer wants to >create hybrid PMD net + >regex for example, then either he will be forced to do some hacks or >just by pass the function >so when this function will be updated his code will break. Shouldn't the application/end user make that decision rather than PMD progr= ammer?. If application wants to connect net to regex it should be made possible to = do it via rte_flow. As an example if we see event device spec. It has robust features to connec= t multiple=20 subsystems(ethernet/crypto/timer) to event device and it is controlled from= RTE layer. PMD layer should act on the inputs from RTE layer rather than action on it = own. Thoughts? Thanks, Pavan. So I prefer if it >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? > >> > >> >> >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 >> >> > >> >> >> >>