[dpdk-dev] [PATCH] ethdev: force offloading API rules

Shahaf Shuler shahafs at mellanox.com
Sat Jun 9 20:43:20 CEST 2018


Friday, June 8, 2018 11:02 PM, Stephen Hemminger:
> Subject: Re: [dpdk-dev] [PATCH] ethdev: force offloading API rules
> 
> On Thu, 31 May 2018 13:44:30 +0100
> Ferruh Yigit <ferruh.yigit at intel.com> wrote:
> 
> > The error path was disabled in previous release to let apps to be more
> > flexible.
> >
> > But this release they are enabled, applications have to obey offload
> > API rules otherwise they will get errors from following APIs:
> > rte_eth_dev_configure
> > rte_eth_rx_queue_setup
> > rte_eth_tx_queue_setup
> >
> > Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>

I am OK with returning EINVAL in case of configuration error.

> 
> Rather than always returning -EINVAL, why not propagate error code that
> the driver returns. This would allow driver to give a more detailed error
> return.
> 
> The problem with that is you probably need to do a review of each drivers
> configure and setup routines to see what they return on error (if any).

Per my understanding the error is in-depended on driver specific implementation, it is rather to enforce the offloading API rules of ethdev layer, which are:
1. PMD reports offloads capabilities
2. application sets it's offloads based on the supported capabilities.   

When the configuration fail, no need to dig into driver, just to look on the error log and see which unsupported offloads were set. 





More information about the dev mailing list