[dpdk-dev] [PATCH v2 1/4] ethdev: modify callback process API

Iremonger, Bernard bernard.iremonger at intel.com
Wed Jun 21 11:22:58 CEST 2017


Hi Stephen,

> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen at networkplumber.org]
> Sent: Thursday, June 15, 2017 4:43 PM
> To: Iremonger, Bernard <bernard.iremonger at intel.com>
> Cc: dev at dpdk.org; thomas at monjalon.net
> Subject: Re: [dpdk-dev] [PATCH v2 1/4] ethdev: modify callback process API
> 
> On Mon, 12 Jun 2017 16:18:08 +0100
> Bernard Iremonger <bernard.iremonger at intel.com> wrote:
> 
> > From: "Bernard.Iremonger" <Bernard.iremonger at intel.com>
> >
> > Change the rte_eth_dev_callback_process function to return int, and
> > add a void *ret_param parameter.
> 
> What is the motivation for this? What is return value used for?

Since DPDK 16.11 the i40e and ixgbe PMD's have been returning data to the calling process using the "void *cb_arg"  parameter of the callback_process API

void _rte_eth_dev_callback_process(struct rte_eth_dev *dev, enum rte_eth_event_type event, void *cb_arg);

This was not considered to be ideal by Thomas who suggested adding a "void *ret_param"   parameter to API to return data to the calling process and at the same time to change the return value from void to int to allow returning an error code if required.  

Regards,

Bernard.




More information about the dev mailing list