From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D709DA054F; Mon, 15 Mar 2021 08:54:46 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C051116082C; Mon, 15 Mar 2021 08:54:46 +0100 (CET) Received: from new2-smtp.messagingengine.com (new2-smtp.messagingengine.com [66.111.4.224]) by mails.dpdk.org (Postfix) with ESMTP id 45DB14003C for ; Mon, 15 Mar 2021 08:54:45 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id 99140580918; Mon, 15 Mar 2021 03:54:44 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 15 Mar 2021 03:54:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm3; bh= iXermhu+G8u7/StlC71b7mdGxfNF/lcNLqrbgod65JE=; b=uUeKkdLQ0YdEF/0X j1z2ex15tVn7R3TfSZp9w0RrYw5DqcYaevfcsQpAd2Um/V/bkc0RgC43u5C5PHBx f0ZhNcw1DjMQIqScaWbmqEHE4syrO1lPBISqgKQ5nWXlD2RIuUTrr62D/yUHUh4Q kvDjX/2eVgOWK/QEUfEbmj+M1r1vnLeHbVZHCTldZBGHXdeQnWo+OfMEP4EAgEDs R4nMBQtZg8oBbV85nXIs2ZcblTeUqfV+iV+h8T0nN4drPmipfqFO+yUwSNfL6llF G/YtaPobmU8RUu88Wwv+pgd8ixKpU7KOpNtuf5x6TJNidqymc1Qt5//xcYfalQnm FeIJ5Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=iXermhu+G8u7/StlC71b7mdGxfNF/lcNLqrbgod65 JE=; b=p2wsI2HoIC6+Jb4eYPYlvcL63O0+fsS4coX70d8DL1088MaSSikxHneyk YxA3nmXi1EXIV+YUT8yw4GQi2k8BjnGzot6ZvqyvRtr0W3sp0V1PkQ4zNYS5kPex pjAxc8u4NhG/lC6tY4rQL6Jrc1sQb8gto3xcU1iHUwmk9VmqcnndVYUXATNVwRUj rP87K8+egCg34OKnACLZZP/qwtf7gZH06jumaCJ5WWAPmWOoqSCknloQ43GDParf HBJRASQrpSUOhguc4cDXVhFNPalVOYJj3pOdo4JgHNZdvMYLcJQW4R9i5e2PKzdQ I3hqGz0TOlroD937oR1Py+4oCtk1Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledruddvkedgudduhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdej ueeiiedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgr lhhonhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id D014F240057; Mon, 15 Mar 2021 03:54:38 -0400 (EDT) From: Thomas Monjalon To: Andrew Rybchenko Cc: dev@dpdk.org, Ori Kam , Ajit Khaparde , Somnath Kotur , Chas Williams , "Min Hu (Connor)" , Rahul Lakkireddy , Hemant Agrawal , Sachin Saxena , Jeff Guo , Haiyue Wang , John Daley , Hyong Youb Kim , Gaetan Rivet , Ziyang Xuan , Xiaoyun Wang , Guoyang Zhou , Yisen Zhuang , Lijun Ou , Beilei Xing , Jingjing Wu , Qiming Yang , Qi Zhang , Rosen Xu , Matan Azrad , Shahaf Shuler , Viacheslav Ovsiienko , Liron Himi , Jerin Jacob , Nithin Dabilpuram , Kiran Kumar K , Rasesh Mody , Shahed Shaikh , Jasvinder Singh , Cristian Dumitrescu , Keith Wiles , Jiawen Wu , Jian Wang , Ferruh Yigit Date: Mon, 15 Mar 2021 08:54:37 +0100 Message-ID: <1656619.R5YYQy59bT@thomas> In-Reply-To: References: <20210311221742.3750589-1-thomas@monjalon.net> <20210312174645.162801-2-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2 1/2] ethdev: replace callback getting filter operations X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" 15/03/2021 08:18, Andrew Rybchenko: > On 3/12/21 8:46 PM, Thomas Monjalon wrote: > > --- a/lib/librte_ethdev/rte_flow.c > > +++ b/lib/librte_ethdev/rte_flow.c > > @@ -255,18 +255,19 @@ rte_flow_ops_get(uint16_t port_id, struct rte_flow_error *error) > > > > if (unlikely(!rte_eth_dev_is_valid_port(port_id))) > > code = ENODEV; > > - else if (unlikely(!dev->dev_ops->filter_ctrl || > > - dev->dev_ops->filter_ctrl(dev, > > - RTE_ETH_FILTER_GENERIC, > > - RTE_ETH_FILTER_GET, > > - &ops) || > > - !ops)) > > - code = ENOSYS; > > + else if (unlikely(dev->dev_ops->flow_ops_get == NULL)) > > + code = ENOTSUP; > > else > > - return ops; > > - rte_flow_error_set(error, code, RTE_FLOW_ERROR_TYPE_UNSPECIFIED, > > - NULL, rte_strerror(code)); > > - return NULL; > > + code = dev->dev_ops->flow_ops_get(dev, &ops); > > + if (code == 0 && ops == NULL) > > + code = EACCES; > > It looks something new. I think it should be mentioned in flow_ops_get > type documentation (similar to eth_promiscuous_enable_t) and > rte_flow_validate() etc functions > return values description. It is an internal function used only in rte_flow.c. The real consequence is to set rte_errno in a lot of rte_flow API. Not sure there is a good way to document the code details. Other codes are not documented in rte_flow.h