From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 2EC981C6E8 for ; Fri, 13 Apr 2018 19:40:52 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Apr 2018 10:40:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,446,1517904000"; d="scan'208";a="43123874" Received: from njshah2-mobl2.amr.corp.intel.com (HELO [10.252.4.7]) ([10.252.4.7]) by orsmga003.jf.intel.com with ESMTP; 13 Apr 2018 10:40:48 -0700 To: Bruce Richardson , Thomas Monjalon Cc: dev@dpdk.org, pmatilai@redhat.com, david.marchand@6wind.com, jia.guo@intel.com, matan@mellanox.com, konstantin.ananyev@intel.com, stephen@networkplumber.org, fbl@redhat.com References: <2407757.yEAnF6RcS7@xps> <20180413164046.GD37024@bricha3-MOBL.ger.corp.intel.com> From: "Burakov, Anatoly" Message-ID: Date: Fri, 13 Apr 2018 18:40:46 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180413164046.GD37024@bricha3-MOBL.ger.corp.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] kernel binding of devices + hotplug 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: Fri, 13 Apr 2018 17:40:53 -0000 On 13-Apr-18 5:40 PM, Bruce Richardson wrote: > On Fri, Apr 13, 2018 at 06:31:21PM +0200, Thomas Monjalon wrote: >> It's time to think (again) how we bind devices with kernel modules. >> We need to decide how we want to manage hotplugged devices with DPDK. >> >> A bit of history first. >> There was some code in DPDK for bind/unbind, but it has been removed >> in DPDK 1.7 - http://dpdk.org/commit/5d8751b83 >> Copy of the commit message (in 2014): >> " >> The bind/unbind operations should not be handled by the eal. >> These operations should be either done outside of dpdk or >> inside the PMDs themselves as these are their problems. >> " >> >> The question raised at this time (4 years ago) is still under discussion. >> Should we manage binding inside or outside DPDK? >> Should it be controlled in the application or in the OS base? >> >> As you know, we use dpdk-devbind.py. >> This tool lacks two major features: >> - persistent configuration >> - hotplug >> >> If we consider that the DPDK applications should be able to apply its own >> policy to choose the devices to bind, then we need to implement binding >> in the PMD (with EAL helpers). >> >> On the other hand, if we consider that it is the system responsibility, >> then we could choose systemd/udev and driverctl. >> >> The debate is launched! >> > > Allow me to nail my colours to the mast early! :-) > > I believe it's system not application responsibility. > I also believe I have previously explained my reasons for that choice in > some of the previous email threads. For what it's worth, I tend to agree, if only because writing code for what is essentially a bunch of read/write/filesystem enumeration in C is extremely fiddly and error prone :) IMO things like this are better handled either by scripts, or by tools whose sole purpose is doing exactly that (or both). I like having scripts like devbind in DPDK because we can tailor them to our use cases better, and having them is amenable to automation, but while I wouldn't be opposed to removing them altogether in favor of some external tool (systemd/udev/driverctl/whatever), in my humble opinion moving them back into EAL or even PMD's would be a mistake. -- Thanks, Anatoly