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

2018-02-02 Thread Guo, Jia
On 1/31/2018 8:44 AM, Stephen Hemminger wrote: On Tue, 30 Jan 2018 20:20:58 +0800 Jeff Guo wrote: + memset(&ep_kernel, 0, sizeof(struct epoll_event)); + ep_kernel.events = EPOLLIN | EPOLLPRI | EPOLLRDHUP | EPOLLHUP; + ep_kernel.data.fd = netlink_fd; + if (epoll_ctl(fd

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

2018-01-30 Thread Stephen Hemminger
On Tue, 30 Jan 2018 20:20:58 +0800 Jeff Guo wrote: > + memset(&ep_kernel, 0, sizeof(struct epoll_event)); > + ep_kernel.events = EPOLLIN | EPOLLPRI | EPOLLRDHUP | EPOLLHUP; > + ep_kernel.data.fd = netlink_fd; > + if (epoll_ctl(fd_ep, EPOLL_CTL_ADD, netlink_fd, > + &ep_

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

2018-01-30 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