[dpdk-dev] [PATCH V19 0/4] add hot plug failure and auto bind handler

Jeff Guo jia.guo at intel.com
Fri Apr 6 12:56:53 CEST 2018


At the prior, device event monitor machenism have been introduced.
But for device hot unplug, if we want data path would not be break when
device hot plug in or out, we still need some preparatory measures to do
some preparation work for the device detach and attach, so that we will
not encounter memory fault after device have been plug out of the system,
and also let user directly attach device which have been auto bind onto
the specific kernel driver.

This patch set will introduces two APIs to do that failure and auto bind
handle for hot plug feature, and also use testpmd to show example how to
use these 2 APIs for process hot plug event, let the process could be
smoothly like below case:

1)hot plug removal:
plugout->failure handle->stop forward->stop port->close port->detach port

2)hot plug insertion:
plugin->kernel driver auto bind->attach port->start port

with this machenism, every user such as fail-safe driver or testpmd, if
enable device event monitor they will be able to develop their own
hotplug application.

patchset history:
v19->18:
note for limitation of multiple hotplug,fix some typo, sqeeze patch.

v18->v15:
add document, add signal bus handler, refine the code to be more clear.

the prior patch history please check the patch set
"add device event monitor framework"

Jeff Guo (4):
  bus/pci: introduce device hot unplug handle
  eal: add failure handler mechanism for hot plug
  eal: add driver auto bind for hot insertion
  app/testpmd: use auto handle for hotplug

 app/test-pmd/testpmd.c                  | 199 ++++++++++++++++++++++++++++----
 app/test-pmd/testpmd.h                  |   9 ++
 doc/guides/rel_notes/release_18_05.rst  |   8 ++
 drivers/bus/pci/pci_common.c            |  42 +++++++
 drivers/bus/pci/pci_common_uio.c        |  32 +++++
 drivers/bus/pci/private.h               |  12 ++
 kernel/linux/igb_uio/igb_uio.c          |   4 +
 lib/librte_eal/bsdapp/eal/eal_dev.c     |   7 ++
 lib/librte_eal/common/include/rte_bus.h |  15 +++
 lib/librte_eal/common/include/rte_dev.h |  35 ++++++
 lib/librte_eal/linuxapp/eal/eal_dev.c   | 194 ++++++++++++++++++++++++++++++-
 lib/librte_eal/rte_eal_version.map      |   2 +
 12 files changed, 534 insertions(+), 25 deletions(-)

-- 
2.7.4



More information about the dev mailing list