From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2 1/2] eal: add uevent api for hot plug Date: Wed, 05 Jul 2017 01:45:09 +0200 Message-ID: <1643564.1KfnGSoeuV@xps> References: <1495986280-26207-1-git-send-email-jia.guo@intel.com> <1498648044-57541-1-git-send-email-jia.guo@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, helin.zhang@intel.com, jingjing.wu@intel.com To: Jeff Guo Return-path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 1384D1094 for ; Wed, 5 Jul 2017 01:45:11 +0200 (CEST) In-Reply-To: <1498648044-57541-1-git-send-email-jia.guo@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, This is an interesting step for hotplug in DPDK. 28/06/2017 13:07, Jeff Guo: > + netlink_fd = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT); It is monitoring the whole system... > +int > +rte_uevent_get(int fd, struct rte_uevent *uevent) > +{ > + int ret; > + char buf[RTE_UEVENT_MSG_LEN]; > + > + memset(uevent, 0, sizeof(struct rte_uevent)); > + memset(buf, 0, RTE_UEVENT_MSG_LEN); > + > + ret = recv(fd, buf, RTE_UEVENT_MSG_LEN - 1, MSG_DONTWAIT); ... and it is read from this function called by one driver. It cannot work without a global dispatch. It must be a global mechanism, probably a service core. The question is also to know whether it should be a mandatory service in DPDK or an optional helper?