[dpdk-dev] [PATCH V11 1/3] eal: add uevent monitor api and callback func

Thomas Monjalon thomas at monjalon.net
Fri Jan 19 02:10:43 CET 2018


18/01/2018 05:23, Guo, Jia:
> 
> On 1/18/2018 5:59 AM, Thomas Monjalon wrote:
> > 15/01/2018 11:48, Jeff Guo:
> >> + * It registers the callback for the specific event. Multiple
> >> + * callbacks cal be registered at the same time.
> >> + *
> >> + * @param device_name
> >> + *  The device name.
> >> + * @param cb_fn
> >> + *  callback address.
> >> + * @param cb_arg
> >> + *  address of parameter for callback.
> >> + *
> >> + * @return
> >> + *  - On success, zero.
> >> + *  - On failure, a negative value.
> >> + */
> >> +int rte_dev_callback_register(char *device_name, rte_dev_event_cb_fn cb_fn,
> >> +                                       void *cb_arg);
> > What is the device name?
> >
> > I think we should register a callback for a rte_device or NULL (all devices).
> please see my v12 patch, the device name have been info to user.
> i think a device name for a callback might be fulfill , since if use 
> NULL for all device, a callback could not belong to a NULL point. if 
> there are any advantage by callback for a rte_device, please explicit 
> outline it. and i think it must be a improvement  and anyway if need i 
> will try to make it better.
> and what ever a callback for a rte_device or a device name for a 
> callback, i think that is not our gap, i guess what you care about is 
> that the new and firstly hot plug in device monitor , so i would add 
> null check for identify these new device callback. am i right?

Yes I am looking for new device event.





More information about the dev mailing list