Show a cover letter.

GET /api/covers/43761/?format=api
Content-Type: application/json
Vary: Accept

    "id": 43761,
    "url": "",
    "web_url": "",
    "project": {
        "id": 1,
        "url": "",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "",
        "list_email": "",
        "web_url": "",
        "scm_url": "git://",
        "webscm_url": ""
    "msgid": "<>",
    "date": "2018-08-17T10:48:27",
    "name": "[v10,0/8] hotplug failure handle mechanism",
    "submitter": {
        "id": 507,
        "url": "",
        "name": "Guo, Jia",
        "email": ""
    "mbox": "",
    "series": [
            "id": 1007,
            "url": "",
            "web_url": "",
            "date": "2018-08-17T10:48:27",
            "name": "hotplug failure handle mechanism",
            "version": 10,
            "mbox": ""
    "comments": "",
    "headers": {
        "Return-Path": "<>",
        "References": "<>",
        "X-Mailman-Version": "2.1.15",
        "X-IronPort-AV": "E=Sophos;i=\"5.53,250,1531810800\"; d=\"scan'208\";a=\"63131811\"",
        "From": "Jeff Guo <>",
        "List-Post": "<>",
        "Content-Type": "text/plain; charset=UTF-8",
        "X-ExtLoop1": "1",
        "X-BeenThere": "",
        "Message-Id": "<>",
        "X-Original-To": "",
        "Received": [
            "from [] (localhost [])\n\tby (Postfix) with ESMTP id DFD99FEB;\n\tFri, 17 Aug 2018 12:51:22 +0200 (CEST)",
            "from ( [])\n\tby (Postfix) with ESMTP id 100EF98\n\tfor <>; Fri, 17 Aug 2018 12:51:20 +0200 (CEST)",
            "from ([])\n\tby with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t17 Aug 2018 03:51:20 -0700",
            "from (HELO localhost.localdomain)\n\t([])\n\tby with ESMTP; 17 Aug 2018 03:51:16 -0700"
        "X-Mailer": "git-send-email 2.7.4",
        "Sender": "\"dev\" <>",
        "Subject": "[dpdk-dev] [PATCH v10 0/8] hotplug failure handle mechanism",
        "Precedence": "list",
        "Date": "Fri, 17 Aug 2018 18:48:27 +0800",
        "List-Archive": "<>",
        "List-Help": "<>",
        "X-Amp-File-Uploaded": "False",
        "List-Subscribe": "<>,\n\t<>",
        "Cc": ",,,\n\,",
        "List-Id": "DPDK patches and discussions <>",
        "Delivered-To": "",
        "In-Reply-To": "<>",
        "List-Unsubscribe": "<>,\n\t<>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "To": ",,\n\,,\n\,,,\n\,,,\n\,,\n\, \n\,",
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "Errors-To": ""
    "content": "Hotplug is an important feature for use-cases like the datacenter device's\nfail-safe and for SRIOV Live Migration in SDN/NFV. It could bring higher\nflexibility and continuality to networking services in multiple use-cases\nin the industry. So let's see how DPDK can help users implement hotplug\nsolutions.\n\nWe already have a general device-event monitor mechanism, failsafe driver,\nand hot plug/unplug API in DPDK. We have already got the solution of\n“ethdev event + kernel PMD hotplug handler + failsafe”, but we still not\ngot “eal event + hotplug handler for pci PMD + failsafe” implement, and we\nneed to considerate 2 different solutions between uio  and vfio.\n \nIn the case of hotplug for igb_uio, when a hardware device be removed\nphysically or disabled in software, the application needs to be notified\nand detach the device out of the bus, and then make the device invalidate.\nThe problem is that, the removal of the device is not instantaneous in\nsoftware. If the application data path tries to read/write to the device\nwhen removal is still in process, it will cause an MMIO error and\napplication will crash.\n\nIn this patch set, we propose a PCIe bus failure handler mechanism for\nhotplug in igb_uio. It aims to guarantee that, when a hot unplug occurs,\nthe system will not crash and the application will not break out. \n\nThe mechanism should work as below:\n\nFirst, the application enables the device event monitor, registers the\nhotplug event’s callback and enable hotplug handling before running the\ndata path. Once the hot unplug occurs, the mechanism will detect the\nremoval event and then accordingly do the failure handling. In order to\ndo that, the below functionality will be required:\n - Add a new bus ops “memory_failure_handler” to handle bus read/write\n   errors.\n - Implement pci bus specific ops “pci_memory_failure_handler”. It will\n   be based on the failure address to remap memory for the corresponding\n   device that unplugged.\n\nFor the data path or other unexpected behaviors from the control path\nwhen a hot unplug occurs:\n - Add a new bus ops “sigbus_handler”, that is responsible for handling\n   the sigbus error which is either an original memory error, or a specific\n   memory error that is caused by a hot unplug. When a sigbus error is\n   captured, it will call this function to handle sigbus error.\n - Implement PCI bus specific ops “pci_sigbus_handler”. It will iterate all\n   device on PCI bus to find which device encounter the failure.\n - Implement a \"rte_bus_sigbus_handler\" to iterate all buses to find a bus\n   to handle the failure.\n - Add a couple of APIs “rte_dev_hotplug_handle_enable” and\n   “rte_dev_hotplug_handle_diable” to enable/disable hotplug handling.\n   It will monitor the sigbus error by a handler which is per-process.\n   Based on the signal event principle, the control path thread and the\n   data path thread will randomly receive the sigbus error, but will call the\n   common sigbus process. When sigbus be captured, it will call the above API\n   to find bus to handle it.\n\nThe mechanism could be used by app or PMDs. For example, the whole process\nof hotplug in testpmd is:\n - Enable device event monitor->Enable hotplug handle->Register event callback\n   ->attach port->start port->start forwarding->Device unplug->failure handle\n   ->stop forwarding->stop port->close port->detach port.\n\nThis patch set would not cover hotplug insert and binding, and it is only\nimplement the igb_uio failure handler, the vfio hotplug failure handler\nwill be in next coming patch set.\n\npatchset history:\nv10->v9:\nmodify the api name and exposure out for public use.\nadd hotplug handle enable/disable APIs\nrefine commit log\n\nv9->v8:\nrefine commit log to be more readable.\n\nv8->v7:\nrefine errno process in sigbus handler.\nrefine igb uio release process\n\nv7->v6:\ndelete some unused part\n\nv6->v5:\nrefine some description about bus ops\nrefine commit log\nadd some entry check.\n\nv5->v4:\nsplit patches to focus on the failure handle, remove the event usage\nby testpmd to another patch.\nchange the hotplug failure handler name.\nrefine the sigbus handle logic.\nadd lock for udev state in igb uio driver.\n\nv4->v3:\nsplit patches to be small and clear.\nchange to use new parameter \"--hotplug-mode\" in testpmd to identify\nthe eal hotplug and ethdev hotplug.\n\nv3->v2:\nchange bus ops name to bus_hotplug_handler.\nadd new API and bus ops of bus_signal_handler distingush handle generic.\nsigbus and hotplug sigbus.\n\nv2->v1(v21):\nrefine some doc and commit log.\nfix igb uio kernel issue for control path failure rebase testpmd code.\n\nSince the hot plug solution be discussed serval around in the public,\nthe scope be changed and the patch set be split into many times. Coming\nto the recently RFC and feature design, it just focus on the hot unplug\nfailure handler at this patch set, so in order let this topic more clear\nand focus, summarize privours patch set in history “v1(v21)”, the v2 here\ngo ahead for further track.\n\n\"v1(21)\" == v21 as below:\nv21->v20:\nsplit function in hot unplug ops.\nsync failure hanlde to fix multiple process issue fix attach port issue for multiple devices case.\ncombind rmv callback function to be only one.\n\nv20->v19:\nclean the code.\nrefine the remap logic for multiple device.\nremove the auto binding.\n\nv19->18:\nnote for limitation of multiple hotplug, fix some typo, sqeeze patch.\n\nv18->v15:\nadd document, add signal bus handler, refine the code to be more clear.\n\nthe prior patch history please check the patch set \"add device event monitor framework\".\n\nJeff Guo (8):\n  bus: add memory failure handler\n  bus/pci: implement memory failure handler ops\n  bus: add sigbus handler\n  bus/pci: implement sigbus handler ops\n  bus: add helper to handle sigbus\n  eal: add failure handle mechanism for hotplug\n  igb_uio: fix unexpected remove issue for hotplug\n  testpmd: use hotplug failure handle mechanism\n\n app/test-pmd/testpmd.c                  |  27 +++++-\n doc/guides/rel_notes/release_18_08.rst  |   5 +\n drivers/bus/pci/pci_common.c            |  81 ++++++++++++++++\n drivers/bus/pci/pci_common_uio.c        |  33 +++++++\n drivers/bus/pci/private.h               |  12 +++\n kernel/linux/igb_uio/igb_uio.c          |  69 +++++++++++---\n lib/librte_eal/bsdapp/eal/eal_dev.c     |  14 +++\n lib/librte_eal/common/eal_common_bus.c  |  43 +++++++++\n lib/librte_eal/common/eal_private.h     |  38 ++++++++\n lib/librte_eal/common/include/rte_bus.h |  34 +++++++\n lib/librte_eal/common/include/rte_dev.h |  26 ++++++\n lib/librte_eal/linuxapp/eal/eal_dev.c   | 159 +++++++++++++++++++++++++++++++-\n lib/librte_eal/      |   2 +\n 13 files changed, 523 insertions(+), 20 deletions(-)"