[dpdk-dev] Survey for final decision about per-port offload API

Shahaf Shuler shahafs at mellanox.com
Tue Apr 3 07:19:35 CEST 2018


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, and
> 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.
> 
> 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 by 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. 

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 offload (maybe there is some unreasonable limitation to some PMD to do so). 

> 
> Rewording from application point of view:
> 
> 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.
> 
> Is it OK?

I think all we need is statements 1 and 2 above. However, I will not insist about this one too much. 

As a general statement, for any API that we will do, we should have a clear distinction between "API definition" and "PMD guidelines for implementation" 
The API definition should have the most exact rules for the **application** to understand how to work. 

On the example above, the application doesn't care every port offload is queue offload (this is PMD guideline). It only cares about 1 and 2. This is what defines to it how to use the offloads API. 


> 



More information about the dev mailing list