From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f65.google.com (mail-pg0-f65.google.com [74.125.83.65]) by dpdk.org (Postfix) with ESMTP id B0BF61B21B for ; Wed, 10 Jan 2018 17:34:48 +0100 (CET) Received: by mail-pg0-f65.google.com with SMTP id j2so10011980pgv.3 for ; Wed, 10 Jan 2018 08:34:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=majhlrqmcQtOuhM4Z8TRH8RPt3jDHUWs2CxjnVj3AUI=; b=vhdR/gn0DcWbOQ1nDhnO54kgEQBH2TqRh4Miqu7Yx6q/FXSFb10gnCxMLLPH3dX9CI cDs/GWF0RM2JZ1C0AewNXGsCB1M+Sp6q5ugK0p2CnlanwAXpAm2HfT68xyR5MQ6vwtXT xXU/CQNPdMdwhc4wUHYDMQ2DcMrvaDhFM74Dc8lvFuY0lDvYRhCQ6aGJwcN/vPiHHqBk jU+vciYoyT1s7q2W1qPm6alUSVqO1wKGqFrtPseOPX9fa5y/+OGd2/r3VRKXfunVI4Ar jrrnwRmnjX15XiscECBNUmhRwWkMff3B5PaoBXimVaI03hgb8uhrvPKQryuwNz82gvUD dKyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=majhlrqmcQtOuhM4Z8TRH8RPt3jDHUWs2CxjnVj3AUI=; b=rHfcEfFioyOtECYq+/Cfig61u1G5DwGq9qxAGhrrowS5raki3oRriK9Drq8CA/Eb7r RglYwItyL7F2JgKCwGCCaCRJbe7W8CvHxmyDaeA/vDk7CHnmAyP3dOvRqJlHr1DiDOE/ aYrHPfwv4Bwx0At+u+yc+6kFUAL6OkfBaIEPh8gC3v86Ov615/+q+f8lWJ6uu2kcOxgT inaSVmT6rXkg4aRZlbT9lKwf1gu7NExMGd3idp2YWpUYfM2T39Dv0rmSgofQ59wZTzvQ LgFjogJzCSxelhiLjnkLWB5y3XO8hG1q1l6WOOyovdlIYc8U8TCCtOCn4qKQAq+kSnRR lM8A== X-Gm-Message-State: AKwxyteZP7rxpEDrLPo4jDosLVS0NWZRG6IZrs0Iwj8Qoo3E6rwT9LpF IzXcC9haef6haDtxvD/LBulFZw== X-Google-Smtp-Source: ACJfBosfWNzEUK5G19IHnRsmxTgjDHdx6c/j5wcRpUXU5iNl3ViWNZhucnJpjWvhFhUMJItRuQdGvw== X-Received: by 10.99.170.4 with SMTP id e4mr729377pgf.59.1515602087565; Wed, 10 Jan 2018 08:34:47 -0800 (PST) Received: from xeon-e3 (204-195-18-133.wavecable.com. [204.195.18.133]) by smtp.gmail.com with ESMTPSA id 28sm15691516pfn.34.2018.01.10.08.34.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Jan 2018 08:34:47 -0800 (PST) Date: Wed, 10 Jan 2018 08:34:39 -0800 From: Stephen Hemminger To: Jeff Guo Cc: bruce.richardson@intel.com, ferruh.yigit@intel.com, gaetan.rivet@6wind.com, konstantin.ananyev@intel.com, jblunck@infradead.org, shreyansh.jain@nxp.com, jingjing.wu@intel.com, dev@dpdk.org, thomas@monjalon.net, helin.zhang@intel.com, motih@mellanox.com Message-ID: <20180110083439.0a9f4fe8@xeon-e3> In-Reply-To: <1515575544-2141-2-git-send-email-jia.guo@intel.com> References: <1515555037-9419-4-git-send-email-jia.guo@intel.com> <1515575544-2141-1-git-send-email-jia.guo@intel.com> <1515575544-2141-2-git-send-email-jia.guo@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH V9 1/5] eal: add uevent monitor api and callback func X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jan 2018 16:34:49 -0000 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 (uevent_fd < 0) { If you used a blocking socket, then epoll would not be necessary. There is one netlink socket for whole system, and the thread is only reading from one fd.