[dpdk-dev] [PATCH v3 02/24] lib/librte_ethdev: change eth-dev-ops API to return int

Andy Green andy at warmcat.com
Mon May 14 01:10:56 CEST 2018



On 05/13/2018 10:58 PM, Thomas Monjalon wrote:
> 12/05/2018 03:58, Andy Green:
>> Signed-off-by: Andy Green <andy at warmcat.com>
> [...]
>> --- a/lib/librte_ethdev/rte_ethdev_core.h
>> +++ b/lib/librte_ethdev/rte_ethdev_core.h
>> -typedef uint32_t (*eth_rx_queue_count_t)(struct rte_eth_dev *dev,
>> -					 uint16_t rx_queue_id);
>> +typedef int (*eth_rx_queue_count_t)(struct rte_eth_dev *dev,
>> +				    uint16_t rx_queue_id);
>>   /**< @internal Get number of used descriptors on a receive queue. */
> 
> What is the reason of this change?

I thought I wasn't making enough patches, so I randomly started changing 
stuff.

Just kidding.  Again, the original version of this patch just fixed the 
compiler warning, but Stephen Hemminger <stephen at networkplumber.org> 
suggested going one level deeper and having this api return an int, so 
it has a way to signal errors.  It sounded reasonable to me so I did it.

-Andy

> 


More information about the dev mailing list