From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f53.google.com (mail-pg0-f53.google.com [74.125.83.53]) by dpdk.org (Postfix) with ESMTP id D9F3258F6 for ; Sun, 3 Sep 2017 18:12:02 +0200 (CEST) Received: by mail-pg0-f53.google.com with SMTP id 83so12620670pgb.4 for ; Sun, 03 Sep 2017 09:12:02 -0700 (PDT) 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=K10cSTU9oRkIxIasERBKB8oA8HUoQXKcm0DqKyPzFyk=; b=pe1KmNcCACRONkmbUz7iSpdPGP3Vs3i44ysxew5b828tiVjUxzZ2A9bZ31G3t+8TOS NzhdmzVwS+VsN8rt4fNCLgMwa3uyHkYijfB/sKhSkbWwpO5mQDh8Tuh7D8HA8NjakZqB fJG0sDWCQgsDoJpWMrvAVv9hpN5K6xvTGaAjw1kKPW2S0IJ4dW5N7fSYnWJTenKsxmT/ 1sDrXcmUTaP1jnEeZmWVGJi215gVvfEeeoSE9buVRJc/W/eFZlV6Qsl3J++uBtvgZ78K RrkvpGOLnOhKwqpAhq9tRfGjzzYDR2dgA7Ot0/kSw0yJgdE8KOCHZ4oetKKTpzHI5H7v CjYw== 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=K10cSTU9oRkIxIasERBKB8oA8HUoQXKcm0DqKyPzFyk=; b=mluqwphnWFdSsW08qxqSPpmpc6h0tVgwM+l2H2mZCXn4n1c1gxUgo0VQIZX6ST5sIf Qxg6FhXywKQSl2uh4DgYRnjLuopNko1rh5Sz5IE8F2BNPeDJYWRhRf+dnl260bREM2cb g+LPOw/wOG4eA2ZDm8cR7iX7jrYyivMpv3sq9F0biFY+NYUGJCpbGhQiL3tr7Gcufnnh QzhvBAW6ylzygts/FCcXyHGQnpoi1QqTgOebk/R+n9DatvBmS5aPKGYmeMnmAfn/+8jO uyyMYcahcXsyOGncEQBJR7ujfBuk7o6Ng/LQtJjS0YUt4NmsRLERyBTYinje65mOofjq j+tg== X-Gm-Message-State: AHPjjUgbfqmvNe1buJuXuz+pwq0agrtSOWpE5KyVJ1HyXenZKZWd9oj9 ZI/7RdjhoAt2to1+ X-Google-Smtp-Source: ADKCNb6lexSZDMQOHLV/BBRYHogQ11sTMtgzx83YMLapmKdcFVMOdCf5GUdIccU4ThrB1X9MtEOz9g== X-Received: by 10.84.176.3 with SMTP id u3mr9744408plb.388.1504455122020; Sun, 03 Sep 2017 09:12:02 -0700 (PDT) Received: from xeon-e3 (76-14-207-240.or.wavecable.com. [76.14.207.240]) by smtp.gmail.com with ESMTPSA id e90sm8167504pfb.172.2017.09.03.09.12.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 03 Sep 2017 09:12:01 -0700 (PDT) Date: Sun, 3 Sep 2017 09:12:00 -0700 From: Stephen Hemminger To: Jeff Guo Cc: bruce.richardson@intel.com, dev@dpdk.org, gaetan.rivet@6wind.com, shreyansh.jain@nxp.com, jblunck@infradead.org, helin.zhang@intel.com, ferruh.yigit@intel.com, konstantin.ananyev@intel.com, thomas@monjalon.net, jingjing.wu@intel.com Message-ID: <20170903091200.206bb549@xeon-e3> In-Reply-To: <1504453785-15735-2-git-send-email-jia.guo@intel.com> References: <1498712510-44217-2-git-send-email-jia.guo@intel.com> <1504453785-15735-1-git-send-email-jia.guo@intel.com> <1504453785-15735-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 v4 1/2] eal: add uevent monitor for hot plug 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: Sun, 03 Sep 2017 16:12:03 -0000 On Sun, 3 Sep 2017 23:49:44 +0800 Jeff Guo 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.