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 4D511A0350; Sun, 28 Jun 2020 15:45:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6DB131C2A9; Sun, 28 Jun 2020 15:45:29 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 96C1E1C23C for ; Sun, 28 Jun 2020 15:45:28 +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 05SDjE8D014132; Sun, 28 Jun 2020 06:45:14 -0700 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-0016f401.pphosted.com with ESMTP id 31x3fpuvta-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 28 Jun 2020 06:45:14 -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 05SDjE6h014092; Sun, 28 Jun 2020 06:45:14 -0700 Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 31x3fpuvt0-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 28 Jun 2020 06:45:14 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 28 Jun 2020 06:45:13 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.176) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Sun, 28 Jun 2020 06:45:13 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HC/3C9C8VbdsH5cTvOz4yM5m2S/90HiXAwYIa5bKPqTV2RRjYfvjha9eUTxrLfjPnpvfDjrLe48YiLTy0hcTxHeCJ9cCDma+ML/yAULi23l8fo0ySE7V97xMd0SjMKHQbJ8Dh7HcP1SR/fbbmjsoqXinCme/iXYEnwHkbJgVwUpxhOC7kqW67nRcr9lZ2bpBn+iWrGUEkCXMa8LUICB7yhGtFfyy0OJfQQw2VlSA4wR/3nCka4fN8eok9BcxaIRSy+KM+SXpHAfihe0bZLzL7hjV5f188u5gdrS5fc3IVg9qufHRSLJln8JAYR/KARXqBlTHKwatXjVdxkwrpDjm1w== 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=ccA7IuLQ226n3Rt5EbhBJAwFBW/9gf1zrlR8f6l9rMA=; b=nLTgFCNfBnleFs91d5Jwdo6BKJvt103miKMXlXhxlnm/m8ZxxDbtoJTkNqF15yfiCnmputH3+TMehFEce9DkYou0RKU51BjMvNNKgdxbblO4Gw7eMsfNqA0zBmlO4aYf+XEJyLHxRUZ53ReY0f5lY5Xk/RLVOvWDbJtAZRnRbuEh9CTZlzwxv7j1jVY5lQzvt6BGFBuHuYOizl+i8JYcZhrMKTvzSmA3kebwrrUaa+Wy2pgxNT424lgr5mkWC8nwEjaN3VJRZ1TrM0egHfmlzvFwQW2feU4rSaLELZksWzs8HcMICRO50bNLDEHZpsDrnxAaD46bgqXJmV2oeRcXZQ== 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=ccA7IuLQ226n3Rt5EbhBJAwFBW/9gf1zrlR8f6l9rMA=; b=Gc7+jXgQtcMqOTEi4cGgKwCOLEdBgF7LsfUDyGNB25pV2Vg6uJ9zRdmDS/EcGBNRmlYCj33FKaaXd6YjwoSFxE/lqYGSNFUl0fHp3S0aGEEnglWEEgTqKWdflZs3QMgx1IEzWa1st0e6WyaWcbYYWxAf/B2Vi7MC6g7rK8tVy4Q= Received: from DM6PR18MB2410.namprd18.prod.outlook.com (2603:10b6:5:187::16) by DM6PR18MB2700.namprd18.prod.outlook.com (2603:10b6:5:172::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.26; Sun, 28 Jun 2020 13:45:12 +0000 Received: from DM6PR18MB2410.namprd18.prod.outlook.com ([fe80::5401:d609:2cb8:395]) by DM6PR18MB2410.namprd18.prod.outlook.com ([fe80::5401:d609:2cb8:395%5]) with mapi id 15.20.3131.026; Sun, 28 Jun 2020 13:45:12 +0000 From: Guy Kaneti To: Ori Kam , Jerin Jacob Kollanukkaran , "xiang.w.wang@intel.com" CC: "dev@dpdk.org" , Pavan Nikhilesh Bhagavatula , "shahafs@mellanox.com" , "hemant.agrawal@nxp.com" , "opher@mellanox.com" , "alexr@mellanox.com" , "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.net" Thread-Topic: [EXT] [PATCH v3 4/4] regexdev: implement regex rte level functions Thread-Index: AQHWJFRm4CnDtzOwpUqKcpBjk+65+qjuWnZQ Date: Sun, 28 Jun 2020 13:45:12 +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: <1588844756-10086-5-git-send-email-orika@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: mellanox.com; dkim=none (message not signed) header.d=none;mellanox.com; dmarc=none action=none header.from=marvell.com; x-originating-ip: [176.231.71.112] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2a545571-e0ee-4dbd-ba15-08d81b697b0f x-ms-traffictypediagnostic: DM6PR18MB2700: 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: bStqEM9U3U8ywttKxZy+ggm6/MZQTwMJcNH4Kss8WYN9x5mD3aucJ5BYAwrEstDxXVe0/BP1sNWAiD/apWsgvXY812/IlERQo0EqRkXO6qi4hbYlmFH+SJLSFcs3jdpY3NfYuHNr7dbXwxOV1cm+6x1G3/4Vf7/yud0lCjMU0KB7eKSdlHnxFxNDEQzwpD3HfvALgBDVad3qqsYc5OQ+wIHO+9p6137sQy5tiSFByJDgdRbdodK3P+BlKGKC7+yJig279UW0a11tElnh57DXyf4E6QQwy8s8VosTRStZLTM9N9rbuuNmbhwxTvbwlzNY x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR18MB2410.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(376002)(366004)(136003)(346002)(39850400004)(396003)(66446008)(64756008)(66476007)(8936002)(66946007)(76116006)(55016002)(2906002)(5660300002)(4744005)(33656002)(110136005)(7696005)(52536014)(54906003)(9686003)(186003)(4326008)(316002)(26005)(66556008)(86362001)(6506007)(83380400001)(8676002)(71200400001)(478600001)(7416002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: UyT4suTGtubKk2brF3BbFQglH8gTDLyd1KYT4jkXdsWwHJ9y+80ZIDKHHOzP0mIteaSAuFf29+srzCODFYo91xQJYp1UrfwERVikCYeulw0nKQlO60a6GarcAziWU+ScAJl4pv/UHH6UmaffCHFEL0dZHSLtb11HyeqpwWyCnQodNh1Uwp2LefKVf8/ZknVrpboiRN8LpiG8W6ka/hr/5FpjOrHocVVRG2q+A9khDuM9gKyhuSua2973hmra1BRKSL8SSoqNpaMGh/oWTJsstQvD7FG/7vvrR2gVc0nOapNZJ2HYOZsEMDyipi4gja/9JnMBpagocnvTj0VUF3air8kYWJI46REobjWEod6KbH+xL/mwtojqxPlh44o0y4zARL7lB2qxC6kmXP08eOPIxXdGTnSk4kGnJRIKEQphn7yZB0bT38F/N5xlSyZSN13BRIgoOxZqRmdD7OtPKUJEeYz9d2EQD1bUzMW1ISilmWkYbY96sz5kr+5TQfSBzA8y Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR18MB2410.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2a545571-e0ee-4dbd-ba15-08d81b697b0f X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jun 2020 13:45:12.0880 (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: c04e08bIU/zD70fsQWx95Z4XRVPxmHziha0EspGLnFOw57uljhohHRZs2LV+9kvMKqvzhNuDVpgw6jrtSqJwUQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR18MB2700 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.687 definitions=2020-06-28_11:2020-06-26, 2020-06-28 signatures=0 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" > +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); } The test if (rule_db =3D=3D NULL) is not according to the description of th= e API It is needed to be NULL in order to retrieve rule_db length=20 * @param[out] rule_db * Block of memory to insert the rule database. Must be at least size in * capacity. If set to NULL, function returns required capacity.