From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <bruce.richardson@intel.com>
Received: from mga17.intel.com (mga17.intel.com [192.55.52.151])
 by dpdk.org (Postfix) with ESMTP id B01432B94
 for <dev@dpdk.org>; Fri, 16 Nov 2018 17:08:50 +0100 (CET)
X-Amp-Result: UNKNOWN
X-Amp-Original-Verdict: FILE UNKNOWN
X-Amp-File-Uploaded: False
Received: from fmsmga008.fm.intel.com ([10.253.24.58])
 by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 16 Nov 2018 08:08:49 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.56,240,1539673200"; d="scan'208";a="87021493"
Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.107])
 by fmsmga008.fm.intel.com with SMTP; 16 Nov 2018 08:08:46 -0800
Received: by  (sSMTP sendmail emulation); Fri, 16 Nov 2018 16:08:46 +0000
Date: Fri, 16 Nov 2018 16:08:45 +0000
From: Bruce Richardson <bruce.richardson@intel.com>
To: "Burakov, Anatoly" <anatoly.burakov@intel.com>
Cc: Thomas Monjalon <thomas@monjalon.net>,
 "Wiles, Keith" <keith.wiles@intel.com>,
 Stephen Hemminger <stephen@networkplumber.org>, dev <dev@dpdk.org>,
 "Mcnamara, John" <john.mcnamara@intel.com>,
 "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>,
 "Hunt, David" <david.hunt@intel.com>,
 "Awal, Mohammad Abdul" <mohammad.abdul.awal@intel.com>,
 "Yigit, Ferruh" <ferruh.yigit@intel.com>
Message-ID: <20181116160845.GA17164@bricha3-MOBL.ger.corp.intel.com>
References: <cover.1542291869.git.anatoly.burakov@intel.com>
 <59AF69C657FD0841A61C55336867B5B0726E11E8@IRSMSX103.ger.corp.intel.com>
 <c45d2313-6ea4-28a1-f7c5-6892a685eefb@intel.com>
 <2017620.fyvpj9GtK5@xps>
 <31bc1c07-0c41-1a53-445b-3f56302e35a9@intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <31bc1c07-0c41-1a53-445b-3f56302e35a9@intel.com>
Organization: Intel Research and Development Ireland Ltd.
User-Agent: Mutt/1.10.1 (2018-07-13)
Subject: Re: [dpdk-dev] [RFC v2 1/9] usertools: add DPDK config lib python
 library
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 16 Nov 2018 16:08:51 -0000

On Fri, Nov 16, 2018 at 03:43:57PM +0000, Burakov, Anatoly wrote:
> On 16-Nov-18 2:55 PM, Thomas Monjalon wrote:
> > 16/11/2018 15:37, Burakov, Anatoly:
> > > On 16-Nov-18 2:13 PM, Richardson, Bruce wrote:
> > > > From: Wiles, Keith
> > > > > > On Nov 16, 2018, at 5:49 AM, Burakov, Anatoly
> > > > > > On 16-Nov-18 12:45 AM, Stephen Hemminger wrote:
> > > > > > > Anatoly Burakov <anatoly.burakov@intel.com> wrote:
> > > > > > > > This is a placeholder for Python library abstracting away many of
> > > > > > > > mundane details DPDK configuration scripts have to deal with. We
> > > > > > > > need __init__.py file to make the subdirectory a package so that
> > > > > > > > Python scripts in usertools/ can find their dependencies.
> > > > > > > > 
> > > > > > > > Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> > > > > > > 
> > > > > > > Doing this a better than current code, but can we go farther?
> > > > > > > I would like DPDK to get out of doing binds directly and switch to
> > > > > > > using driverctl which also handles persistent rebind on reboot.
> > > > > > 
> > > > > > Wasn't the objection that it's not available everywhere? (for the
> > > > > > record, i have no horse in the race - i don't much care exactly how
> > > > > > it's done)
> > > > > 
> > > > > If it works on FreeBSD and Linux then I am all for it. On windows does it
> > > > > support this method too?
> > > > 
> > > > Binding and unbinding is completely different on each OS. FreeBSD has no overlap
> > > > of scripts with Linux, so replacing some of our tools with driverctl won't affect
> > > > that OS.
> > > > 
> > > > /Bruce
> > > 
> > > ...however, we could abstract that away in our tools, and use
> > > OS-appropriate tools independently of what we're running on. There could
> > > still be value in fixing devbind everyone knows and love to work on all
> > > OS's without too much hassle :)
> > 
> > Yes, easier script is always better.
> > 
> > Another thought, I would like we think about integrating binding/unbinding
> > code inside EAL and bus drivers, and manage it via the PMDs.
> > There could be an option to bind on scan and unbind on rte_dev_remove.
> > 
> 
> I didn't like it back when it was a thing, and i don't particularly like
> this idea now, to be honest. Port binding should not be under purview of the
> application, but is firmly in the domain of system administrator IMO. I
> don't think it's our place to change system configuration while we're
> running.
> 
I tend to agree. I think driverctl is the way to go here.