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 F2FB4A0350; Sun, 28 Jun 2020 16:10:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C26521C2F5; Sun, 28 Jun 2020 16:10:40 +0200 (CEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10057.outbound.protection.outlook.com [40.107.1.57]) by dpdk.org (Postfix) with ESMTP id DE41A1C2A9 for ; Sun, 28 Jun 2020 16:10:38 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XAuqNxeDnjR3V1qYfR6bXcOPCb+95SoEjioq2DN6b3q7/qJhoV93dgASiXfj3ouUx3Fuo1TY3OUQ33hgjHrtxwEVJMK55vxTvYHpx6UNFg8mWpNEEwYO2rSuZKL51K9e6Bc6BdY5sx60tgKqpzD7kHWlNylor+GN4fhtgJrbjON7+FhlTgPQJLX73X8MA46nRIDDtNJ+pBxGEGlft1GpXj3YpXrv+RrE2S6N/sZvNNaRem3fdXZxZvMrOE30y9Ogkhr2bfPyEln12DN9de8TmahE4GTaWWBMIqgkOohNrDXgv/4QL/mS32j7pOz6Sc+gkfoUFZ8DMAZdmkMi3AlGkQ== 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=tssVVD4+DZB+9TnFu/Mwb7r4ncCegkDeHlZIjPSxvX8=; b=IgXYfp1Jl5v1eNGWA9VLjTM3tzRPMWhm80lG7NnW/Yoad+Pyx+9yNeRV1t20MrazH4XFM/GHixOxMwfejYgORrWxSylMKdb+tk/J+h+qxFZUCBj6kyS6a4hR38v0kbxLna5kKX6c/QUjPBSJnq+pUn3b8BPLH6oTOftmMYfgIsJ2gsagJgsW58n8vFVnP+OCRC3CwjPatYCViZtRALQ/Jk0DUNKzKqyIOwEyvK6PoVxGf1hX35qXtJpEfSKqq5iTvAHHeSQHAqNkzedZEt/NF79ylcfvxCtx6XSB5oTwPGjEXC1koZ6WoN0s5bQmHnL5JhwicmcJ3MivNeh0Rfs3rA== 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=tssVVD4+DZB+9TnFu/Mwb7r4ncCegkDeHlZIjPSxvX8=; b=Zk7qfL4Do72H8qfDg080G/K23esiIueq632VA0urjWQkfw/M62Gk2cMRjtMl7c0HChhum92hZrHvjbupFWiIPiCgyCh8Rw6bb/hV/hKAy2JnKvr+i4jXa0KeFTsRUDoKISrxRrreujkJlTgUUZ9cyYauapXudugAvCK4j2rFn+k= Received: from AM6PR05MB5176.eurprd05.prod.outlook.com (2603:10a6:20b:63::30) by AM6PR05MB5489.eurprd05.prod.outlook.com (2603:10a6:20b:34::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.23; Sun, 28 Jun 2020 14:10:37 +0000 Received: from AM6PR05MB5176.eurprd05.prod.outlook.com ([fe80::9024:accb:4d6b:805f]) by AM6PR05MB5176.eurprd05.prod.outlook.com ([fe80::9024:accb:4d6b:805f%3]) with mapi id 15.20.3131.026; Sun, 28 Jun 2020 14:10:37 +0000 From: Ori Kam To: Guy Kaneti , Jerin Jacob Kollanukkaran , "xiang.w.wang@intel.com" CC: "dev@dpdk.org" , Pavan Nikhilesh Bhagavatula , 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 Thread-Topic: [EXT] [PATCH v3 4/4] regexdev: implement regex rte level functions Thread-Index: AQHWJFR067FNku5jjUKYRl6kPqzLN6juXAcAgAAHA7A= Date: Sun, 28 Jun 2020 14:10:36 +0000 Message-ID: References: <1585464438-111285-1-git-send-email-orika@mellanox.com> <1588844756-10086-1-git-send-email-orika@mellanox.com> <1588844756-10086-5-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: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=mellanox.com; x-originating-ip: [147.236.152.129] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: f49bdac5-9efb-437a-c777-08d81b6d07e4 x-ms-traffictypediagnostic: AM6PR05MB5489: 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:8882; x-forefront-prvs: 0448A97BF2 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: tXpMg0dcUVpyiGiHUmAw4PxhTYHtJRS4M25qbmSAoKW7u3JXVcaPSMH2bmHNvQw7oha3FrezFdLuwMak2FOz/dVBp/yAgbI0O54j7fIrGUq7AHSsbl7Q3bvNJtkXb+FAWUlPipZyBfVvR/gvjHxDZ8ogjs93F9YZPudV6aDJlF8KuTcNDTbAuMuxrMxJzARi78i3QEzWIo8+i1Tr04tFwX2Qvdlkt5PG1EXaqtytvm2HhMS+Lj4fy0t4h7acOd24Y/Z4N1rAhgv0i/E6bSELVDtmab9mMGm3gSf4AHdLyPudZPmPyBGy6ut0dgiVRCElFlkPLzBfrHBwXMVXliot1Q== 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:(4636009)(39860400002)(346002)(366004)(136003)(396003)(376002)(53546011)(110136005)(86362001)(54906003)(52536014)(478600001)(7416002)(66556008)(64756008)(6506007)(66476007)(5660300002)(33656002)(66446008)(71200400001)(66946007)(8936002)(8676002)(2906002)(7696005)(26005)(83380400001)(9686003)(55016002)(4326008)(76116006)(316002)(186003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: guoPZT6AY1efAa57UgU3LgqqZ+kw1CId9/+XSI2ZTQ33aI18ax54aaI8vLg8tM5qcKkmBNZeJeKBF08cIgrmVexN1POCyVQZApD32oMwdm2G1QpMQavVUml8t7OlLH+r3bXeZF82u6wdDNr21tsiVgJfuWtdCkAKLf5nu01KFL2Dv++wHFNP2W26T+AxaGoUFagrSpyxUZ28DO18+qMagmqsLpJQn1sl0zElzErZvgXj8ihk60nHcymbwBoFKgai9QDWLxYppkWr016UrdzLM4wXLAHCOK5fk1V2rV3KHHbDHkqMD1fNYcTJOzB/MPNrfWavjvuMcsBxL6pEYYnVrjHx84qjgytSVQ7+WAS30WP1WiVYSmisfwcLpm+q0EZANTANmgPtmLI6xc/f2utwLWWX5t/aclKpAVk2kxR5VvQsoMOg3AaCWOziZ3f1iTkIZiS0t6HjEC8TYTC4MFWvki2HqX5R5ewspkPbHSuEdyB2cfJ6K8PeSKaZVarZlfuf Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM6PR05MB5176.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f49bdac5-9efb-437a-c777-08d81b6d07e4 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jun 2020 14:10:36.9145 (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: Y6J4xNXwqlXRaKf53EjxXUwX7D7aC1hNNeczlkfOtZhwFJgnWpEusfuOKlqe6+xCF0Ritk11FCEWr8RrmJ0otA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB5489 Subject: Re: [dpdk-dev] [EXT] [PATCH v3 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 Guy Kaneti > Sent: Sunday, June 28, 2020 4:45 PM > To: Ori Kam ; Jerin Jacob Kollanukkaran > ; xiang.w.wang@intel.com > Cc: dev@dpdk.org; Pavan Nikhilesh Bhagavatula > ; 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 > > Subject: Re: [dpdk-dev] [EXT] [PATCH v3 4/4] regexdev: implement regex rt= e > level functions >=20 >=20 > > +int > > +rte_regexdev_rule_db_export(uint8_t dev_id, char *rule_db) { > > + struct rte_regexdev *dev; > > + > > + RTE_REGEXDEV_VALID_DEV_ID_OR_ERR_RET(dev_id, -EINVAL); > > + dev =3D &rte_regex_devices[dev_id]; > > + RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_db_export, > > + -ENOTSUP); > > + if (rule_db =3D=3D NULL) { > > + RTE_REGEXDEV_LOG(ERR, "Dev %d rules can't be NULL\n", > > + dev_id); > > + return -EINVAL; > > + } > > + return (*dev->dev_ops->dev_db_export)(dev, rule_db); } >=20 > The test if (rule_db =3D=3D NULL) is not according to the description of = the API > It is needed to be NULL in order to retrieve rule_db length >=20 Correct will fix. > * @param[out] rule_db > * Block of memory to insert the rule database. Must be at least size i= n > * capacity. If set to NULL, function returns required capacity.