Re: [dpdk-dev] [PATCH V9 1/5] eal: add uevent monitor api and callback func

2018-01-11 Thread Guo, Jia
On 1/11/2018 9:43 AM, Thomas Monjalon wrote: Hi, Thanks for splitting the patches. I will review the first one today. Please see below. 10/01/2018 10:12, Jeff Guo: --- /dev/null +++ b/lib/librte_eal/bsdapp/eal/eal_dev.c +int +rte_dev_monitor_start(void) +{ + return -1; +} + +int +rte_d

Re: [dpdk-dev] [PATCH V9 1/5] eal: add uevent monitor api and callback func

2018-01-10 Thread Thomas Monjalon
Hi, Thanks for splitting the patches. I will review the first one today. Please see below. 10/01/2018 10:12, Jeff Guo: > --- /dev/null > +++ b/lib/librte_eal/bsdapp/eal/eal_dev.c > +int > +rte_dev_monitor_start(void) > +{ > + return -1; > +} > + > +int > +rte_dev_monitor_stop(void) > +{ > +

Re: [dpdk-dev] [PATCH V9 1/5] eal: add uevent monitor api and callback func

2018-01-10 Thread Stephen Hemminger
On Wed, 10 Jan 2018 17:12:20 +0800 Jeff Guo wrote: > +static int > +dev_monitor_fd_new(void) > +{ > + > + int uevent_fd; > + > + uevent_fd = socket(PF_NETLINK, SOCK_RAW | SOCK_CLOEXEC | > + SOCK_NONBLOCK, > + NETLINK_KOBJECT_UEVENT); > + if (uev

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

2018-01-10 Thread Jeff Guo
This patch aim to add a general uevent mechanism in eal device layer, to enable all linux kernel object uevent monitoring, user could use these APIs to monitor and read out the device status info that sent from the kernel side, then corresponding to handle it, such as when detect hotplug uevent typ