Thanks Stephen for your review and suggestion, I will involve them in next version.
Best regards, Jeff Guo -----Original Message----- From: Stephen Hemminger [mailto:[email protected]] Sent: Monday, September 4, 2017 12:12 AM To: Guo, Jia <[email protected]> Cc: Richardson, Bruce <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; Zhang, Helin <[email protected]>; Yigit, Ferruh <[email protected]>; Ananyev, Konstantin <[email protected]>; [email protected]; Wu, Jingjing <[email protected]> Subject: Re: [PATCH v4 1/2] eal: add uevent monitor for hot plug On Sun, 3 Sep 2017 23:49:44 +0800 Jeff Guo <[email protected]> wrote: > +int > +rte_eal_uev_enable(int netlink_fd) > +{ > + struct sockaddr_nl addr; > + int ret; > + int size = 64 * 1024; > + int nonblock = 1; > + memset(&addr, 0, sizeof(addr)); Blank line between declarations and code. Also use C99 style intializations not memset. > + addr.nl_family = AF_NETLINK; > + addr.nl_pid = 0; > + addr.nl_groups = 0xffffffff; You don't need or want all events. specify which group you want. > + > + setsockopt(netlink_fd, SOL_SOCKET, SO_RCVBUFFORCE, &size, sizeof(size)); Don't user BUFFORCE, that is only available as root. Just doing SO_RCVBUF is enough.

