From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 0E7928D96 for ; Wed, 11 Nov 2015 17:29:01 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 11 Nov 2015 08:29:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,276,1444719600"; d="scan'208";a="598368831" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.208.62]) by FMSMGA003.fm.intel.com with SMTP; 11 Nov 2015 08:28:55 -0800 Received: by (sSMTP sendmail emulation); Wed, 11 Nov 2015 16:28:54 +0025 Date: Wed, 11 Nov 2015 16:28:54 +0000 From: Bruce Richardson To: "Montorsi, Francesco" Message-ID: <20151111162853.GA38496@bricha3-MOBL3> References: <964049bfb9054699a2e4520c6758a7ee@bilemail1.empirix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <964049bfb9054699a2e4520c6758a7ee@bilemail1.empirix.com> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] Permanently binding NIC ports with DPDK drivers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2015 16:29:02 -0000 On Wed, Nov 11, 2015 at 04:13:01PM +0000, Montorsi, Francesco wrote: > Hi, > Is there a way to permanently (i.e., have the configuration automatically applied after reboot) bind a NIC port to DPDK? > > In case there's none, I'm thinking to save in my software a list of the NIC ports chosen by the user for use with DPDK and then, upon software startup to just do > for (int i=0; i < ...; i++) > system("dpdk_nic_bind.py --bind=igb_uio " + PCI_device_chosen[i]); > Do you see any problem with that? > > Thanks! > Francesco Montorsi > Hi Francesco, I'm not aware of any way to make the bindings permanent across reboots. What you have suggested will work, but there are probably better ways to do the same thing. For example, a couple of lines in an rc.local script can reapply the bindings at boot for you. I'm sure others can suggest other ways of having the same effect, for example, there may be a way to automatically do this using udev or systemd or some such package. /Bruce