On Sun, 3 Sep 2017 23:49:44 +0800 Jeff Guo <jia....@intel.com> wrote:
> + char buf[RTE_EAL_UEVENT_MSG_LEN]; > + > + memset(uevent, 0, sizeof(struct rte_eal_uevent)); > + memset(buf, 0, RTE_EAL_UEVENT_MSG_LEN); Please don't initialize everything all the time; you are even initializing receive data. > + ret = recv(fd, buf, RTE_EAL_UEVENT_MSG_LEN - 1, MSG_DONTWAIT); > + if (ret > 0) > + return rte_eal_uev_parse(buf, uevent); > + else if (ret < 0) { else is unnecessary after return. Checkpatch would have told you that if you ran it. > + RTE_LOG(ERR, EAL, > + "Socket read error(%d): %s\n", > + errno, strerror(er Please indent arguements to match the first line: RTE_LOG(ERR, EAL, "Socket read error ...