18/01/2018 05:12, Jeff Guo: > + * It registers the callback for the specific device. > + * Multiple callbacks cal be registered at the same time. > + * > + * @param device_name > + * The device name, that is the param name of the struct rte_device,
Why not using rte_device pointer? > + * null value means for all devices. I don't see any management of NULL value. On the contrary, I see + if (device_name == NULL) + return -EINVAL; > + * @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); > +