get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/43625/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 43625,
    "url": "https://patches.dpdk.org/api/patches/43625/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20180808070045.13334-1-qi.z.zhang@intel.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20180808070045.13334-1-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180808070045.13334-1-qi.z.zhang@intel.com",
    "date": "2018-08-08T07:00:42",
    "name": "[RFC,1/4] ethdev: claim device reset as async",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "cdd108ff7ea1314ebad9d175d48cd36f6d348b77",
    "submitter": {
        "id": 504,
        "url": "https://patches.dpdk.org/api/people/504/?format=api",
        "name": "Qi Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20180808070045.13334-1-qi.z.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 934,
            "url": "https://patches.dpdk.org/api/series/934/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=934",
            "date": "2018-08-08T07:00:43",
            "name": "[RFC,1/4] ethdev: claim device reset as async",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/934/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/43625/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/43625/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 4EC762BAC;\n\tWed,  8 Aug 2018 09:00:10 +0200 (CEST)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby dpdk.org (Postfix) with ESMTP id E130F100C\n\tfor <dev@dpdk.org>; Wed,  8 Aug 2018 09:00:06 +0200 (CEST)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t08 Aug 2018 00:00:02 -0700",
            "from dpdk51.sh.intel.com ([10.67.110.190])\n\tby fmsmga001.fm.intel.com with ESMTP; 08 Aug 2018 00:00:00 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,456,1526367600\"; d=\"scan'208\";a=\"79500573\"",
        "From": "Qi Zhang <qi.z.zhang@intel.com>",
        "To": "thomas@monjalon.net, konstantin.ananyev@intel.com,\n\tdeclan.doherty@intel.com, ferruh.yigit@intel.com",
        "Cc": "dev@dpdk.org, benjamin.h.shelton@intel.com,\n\tnarender.vangati@intel.com, beilei.xing@intel.com,\n\twenzhuo.lu@intel.com, 0000-cover-letter.patch@dpdk.org,\n\tQi Zhang <qi.z.zhang@intel.com>",
        "Date": "Wed,  8 Aug 2018 15:00:42 +0800",
        "Message-Id": "<20180808070045.13334-1-qi.z.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.13.6",
        "Subject": "[dpdk-dev] [RFC 1/4] ethdev: claim device reset as async",
        "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>,\n\t<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>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "rte_eth_dev_reset should be implemented in an async way since it is\npossible be invoked in interrupt thread and sometimes to reset a\ndevice need to wait for some dependency, for example, a VF expects\nfor PF ready, or a NIC function as part of a SOC wait for the whole\nsystem reset complete, all these time consuming task will block the\nthe interrupt thread.\nThe patch claims rte_eth_dev_reset is an async function and introduce\na new event RTE_ETH_EVENT_RESET_COMPLETE. PMD should raise this event\nwhen finish reset in background. The applicaiton should always wait\nfor this event before continue to configure and restart the device.\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n lib/librte_ethdev/rte_ethdev.h | 48 ++++++++++++++++++++++++++----------------\n 1 file changed, 30 insertions(+), 18 deletions(-)",
    "diff": "diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h\nindex 7070e9ab4..541b5161d 100644\n--- a/lib/librte_ethdev/rte_ethdev.h\n+++ b/lib/librte_ethdev/rte_ethdev.h\n@@ -1814,21 +1814,34 @@ void rte_eth_dev_close(uint16_t port_id);\n  * RTE_ETH_EVENT_INTR_RESET event is detected, but can also use it to start\n  * a port reset in other circumstances.\n  *\n- * When this function is called, it first stops the port and then calls the\n- * PMD specific dev_uninit( ) and dev_init( ) to return the port to initial\n- * state, in which no Tx and Rx queues are setup, as if the port has been\n- * reset and not started. The port keeps the port id it had before the\n- * function call.\n- *\n- * After calling rte_eth_dev_reset( ), the application should use\n- * rte_eth_dev_configure( ), rte_eth_rx_queue_setup( ),\n- * rte_eth_tx_queue_setup( ), and rte_eth_dev_start( )\n- * to reconfigure the device as appropriate.\n- *\n- * Note: To avoid unexpected behavior, the application should stop calling\n- * Tx and Rx functions before calling rte_eth_dev_reset( ). For thread\n- * safety, all these controlling functions should be called from the same\n- * thread.\n+ * @note\n+ * Device reset may have the dependency, for example, a VF reset expects\n+ * PF ready, or a NIC function as a part of a SOC need to wait for other\n+ * parts of the system be ready, these are time-consuming tasks and will\n+ * block current thread.\n+ *\n+ * So we claimed rte_eth_dev_reset as an async API, that makes things easy\n+ * for an application that what to reset the device from the interrupt\n+ * thread since typically a RTE_ETH_EVENT_INTR_RESET handler is invoked in\n+ * interrupt thread.\n+ *\n+ * PMD is responsrible to implement ops->dev_reset in an async way, it can\n+ * offload the whole task into a separate thread, or maybe just pending on\n+ * hardware interrupt as reset dependency ready or start a timely alarm\n+ * to poll register status as a background daemon. PMD is also responsible\n+ * to raise the RTE_ETH_EVENT_RESET_COMPLETE event to notify the application\n+ * when reset is complete.\n+ *\n+ * Application should not assume device reset is finished after\n+ * rte_eth_dev_reset return, it should always wait for a\n+ * RTE_ETH_EVENT_RESET_COMPLETE event and check the reset result.\n+ * If reset success, application should call rte_eth_dev_configure( ),\n+ * rte_eth_rx_queue_setup( ), rte_eth_tx_queue_setup( ),\n+ * and rte_eth_dev_start( ) to reconfigure the device as appropriate.\n+ *\n+ * @Note\n+ * To avoid unexpected behavior, the application should stop calling\n+ * Tx and Rx functions before calling rte_eth_dev_reset( ).\n  *\n  * @param port_id\n  *   The port identifier of the Ethernet device.\n@@ -1838,9 +1851,6 @@ void rte_eth_dev_close(uint16_t port_id);\n  *   - (-EINVAL) if port identifier is invalid.\n  *   - (-ENOTSUP) if hardware doesn't support this function.\n  *   - (-EPERM) if not ran from the primary process.\n- *   - (-EIO) if re-initialisation failed or device is removed.\n- *   - (-ENOMEM) if the reset failed due to OOM.\n- *   - (-EAGAIN) if the reset temporarily failed and should be retried later.\n  */\n int rte_eth_dev_reset(uint16_t port_id);\n \n@@ -2574,6 +2584,8 @@ enum rte_eth_event_type {\n \t\t\t\t/**< queue state event (enabled/disabled) */\n \tRTE_ETH_EVENT_INTR_RESET,\n \t\t\t/**< reset interrupt event, sent to VF on PF reset */\n+\tRTE_ETH_EVENT_RESET_COMPLETE,\n+\t\t\t/**< inform application that reset is completed */\n \tRTE_ETH_EVENT_VF_MBOX,  /**< message from the VF received by PF */\n \tRTE_ETH_EVENT_MACSEC,   /**< MACsec offload related event */\n \tRTE_ETH_EVENT_INTR_RMV, /**< device removal event */\n",
    "prefixes": [
        "RFC",
        "1/4"
    ]
}