From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shahaf Shuler Subject: Re: Survey for final decision about per-port offload API Date: Tue, 3 Apr 2018 05:19:35 +0000 Message-ID: References: <2759953.P7QpFFSjiU@xps> <3164302.jtqUZe9MAY@xps> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" , Ajit Khaparde , Jerin Jacob , Shijith Thotton , Santosh Shukla , Rahul Lakkireddy , John Daley , Wenzhuo Lu , Konstantin Ananyev , Beilei Xing , Qi Zhang , Jingjing Wu , Adrien Mazarguil , =?iso-8859-1?Q?N=E9lio_Laranjeiro?= , Yongseok Koh , "Tomasz Duszynski" , Jianbo Liu , "Alejandro Lucero" , Hemant Agrawal , Shreyansh Jain , "Harish Patil" Return-path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50061.outbound.protection.outlook.com [40.107.5.61]) by dpdk.org (Postfix) with ESMTP id E23AC1B61D for ; Tue, 3 Apr 2018 07:19:40 +0200 (CEST) In-Reply-To: <3164302.jtqUZe9MAY@xps> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Monday, April 2, 2018 6:54 PM, Thomas Monjalon: > 01/04/2018 06:44, Shahaf Shuler: > > > There is the same kind of confusion in the offload capabilities: > > > rte_eth_dev_info.[rt]x_offload_capa > > > rte_eth_dev_info.[rt]x_queue_offload_capa > > > The queue capabilities must be a subset of port capabilities, i.e. > > > every queue capabilities must be reported as port capabilities. > > > But the port capabilities should be reported at queue level only if > > > it can be applied to a specific queue. > > > > > > 4/ Do you agree with above statement (to be added in the doc)? > > > > No. > > > > The documentation should describe the API from the application side, an= d > not provide guidelines for the PMDs implementation. > > If missing, we should clarify more about what queue and port offload > means. Something like: > > "When port offload is enabled, the offload applies on the port along > > with all of its associated queues" and "When queue offload is enabled = the > offload, the offload applies only on the specific queue." > > > > The PMDs then will decide how they report the different offloads they > offer. >=20 > I don't understand why you want to be free in capabilities implementation= . > If the capabilities are not strictly standardized, how can they be used b= y the > application? They are standardize, according to the API. the rules of the APIs are: 1. port offload is applied to the port and all of its queues. 2. queue offload is applied only to the specific queue.=20 The two above are enough for the PMDs to understand how they should set the= offloads. We don't need to describe in the API that every queue offload is a port off= load (maybe there is some unreasonable limitation to some PMD to do so).=20 >=20 > Rewording from application point of view: >=20 > All the offload capabilities (port-level and queue-level) are reported in > rte_eth_dev_info.[rt]x_offload_capa. > The offloads reported in rte_eth_dev_info.[rt]x_queue_offload_capa can > be applied to a specific queue. >=20 > Is it OK? I think all we need is statements 1 and 2 above. However, I will not insist= about this one too much.=20 As a general statement, for any API that we will do, we should have a clear= distinction between "API definition" and "PMD guidelines for implementatio= n"=20 The API definition should have the most exact rules for the **application**= to understand how to work.=20 On the example above, the application doesn't care every port offload is qu= eue offload (this is PMD guideline). It only cares about 1 and 2. This is w= hat defines to it how to use the offloads API.=20 >=20