From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas@monjalon.net>
Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com
 [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 104201C694
 for <dev@dpdk.org>; Fri, 13 Apr 2018 18:31:28 +0200 (CEST)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.nyi.internal (Postfix) with ESMTP id 961B7213DD;
 Fri, 13 Apr 2018 12:31:24 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute1.internal (MEProxy); Fri, 13 Apr 2018 12:31:24 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 cc:content-transfer-encoding:content-type:date:from:message-id
 :mime-version:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=
 mesmtp; bh=LW4z+qodHv9gHBHsd1Bk1ipW5tDMIqiF/9MzcG3VYIU=; b=ZwI6m
 QlYT1eS6k+aSAOnWwUOd8a2Vpu2P361Ds8ODESfdQ18mW8+alzmHF2JcWJ2XmOAc
 LBmU2687rg+KX8VxNUNlqQxaDMaYOURW4UbF1h50usWyUr7sFjoOuMYb027Kmcgq
 Rg75ET6wuL6sNC7ZWAdS4Pm+1uYI3y5sJuICkA=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :date:from:message-id:mime-version:subject:to:x-me-sender
 :x-me-sender:x-sasl-enc; s=fm2; bh=LW4z+qodHv9gHBHsd1Bk1ipW5tDMI
 qiF/9MzcG3VYIU=; b=h7EZmaL4yxLy9q6sj/4QHazf7OCmWyH3sN//6/2q49hzs
 8nyw91TaSEWnOgsbD0FDRkJY1q1QG12aA6uL5Vg8jEud3jtXjAOvXnL4E9OIOg2z
 MdgnbbLLAcRhK6dF+r9P5S7prPUi2qwgrMTO34zef1t1y/OGAxHvDAsVLd//c3Sf
 LcRKarjceNcw2B+ngUznoj7RLPyMZrrjfknWK/GEhB9wWKh/xtYHlfzE0Qek3a7t
 gIpDWyW73TplBrlJ3xe+XTSRLkgHBEoftIOA3VMCJtHL43PlwsZTDQlJdzRlNuP6
 ehdUO+RAxcrGD5GoyHXJSRtDkmqonJRCkn+10BpuQ==
X-ME-Sender: <xms:XNvQWpBM1rD0_tuRs5k_O0Ly2Azw3msh6pt1M5dextjkcE3rQY_asg>
Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184])
 by mail.messagingengine.com (Postfix) with ESMTPA id 26BA8E4925;
 Fri, 13 Apr 2018 12:31:23 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: bruce.richardson@intel.com, anatoly.burakov@intel.com, pmatilai@redhat.com,
 david.marchand@6wind.com, jia.guo@intel.com, matan@mellanox.com,
 konstantin.ananyev@intel.com, stephen@networkplumber.org, fbl@redhat.com
Date: Fri, 13 Apr 2018 18:31:21 +0200
Message-ID: <2407757.yEAnF6RcS7@xps>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Subject: [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 <dev.dpdk.org>
List-Unsubscribe: <https://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 13 Apr 2018 16:31:29 -0000

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!

Please find more details in the references below.

Announce of driverctl:
	http://dpdk.org/ml/archives/dev/2015-December/029500.html
Repository of driverctl:
	https://gitlab.com/driverctl/driverctl

Discussion about binding script and driverctl:
	http://dpdk.org/ml/archives/dev/2018-April/095687.html

Patch to implement binding in DPDK (for hotplug):
	http://dpdk.org/ml/archives/dev/2018-April/095714.html

Discussion in the same hotplug series:
	http://dpdk.org/ml/archives/dev/2018-April/097058.html