get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 45717,
    "url": "http://patches.dpdk.org/api/patches/45717/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1538316988-128382-3-git-send-email-jia.guo@intel.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<1538316988-128382-3-git-send-email-jia.guo@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1538316988-128382-3-git-send-email-jia.guo@intel.com",
    "date": "2018-09-30T14:16:26",
    "name": "[v2,2/4] eal: modify device event callback process func",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "e92cbbe4f7420069cd1613f4740f5b09cd822ed5",
    "submitter": {
        "id": 507,
        "url": "http://patches.dpdk.org/api/people/507/?format=api",
        "name": "Guo, Jia",
        "email": "jia.guo@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1538316988-128382-3-git-send-email-jia.guo@intel.com/mbox/",
    "series": [
        {
            "id": 1607,
            "url": "http://patches.dpdk.org/api/series/1607/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1607",
            "date": "2018-09-30T14:16:24",
            "name": "Enable hotplug in vfio",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/1607/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/45717/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/45717/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 1C14C5F34;\n\tSun, 30 Sep 2018 16:12:50 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n\tby dpdk.org (Postfix) with ESMTP id 3B6AB5F2E\n\tfor <dev@dpdk.org>; Sun, 30 Sep 2018 16:12:48 +0200 (CEST)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t30 Sep 2018 07:12:47 -0700",
            "from jeffguo-s2600wt2.sh.intel.com (HELO localhost.localdomain)\n\t([10.67.110.10])\n\tby orsmga005.jf.intel.com with ESMTP; 30 Sep 2018 07:12:44 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.54,324,1534834800\"; d=\"scan'208\";a=\"261661884\"",
        "From": "Jeff Guo <jia.guo@intel.com>",
        "To": "stephen@networkplumber.org, bruce.richardson@intel.com,\n\tferruh.yigit@intel.com, konstantin.ananyev@intel.com,\n\tgaetan.rivet@6wind.com, jingjing.wu@intel.com, thomas@monjalon.net,\n\tmotih@mellanox.com, matan@mellanox.com, harry.van.haaren@intel.com,\n\tqi.z.zhang@intel.com, shaopeng.he@intel.com,\n\tbernard.iremonger@intel.com, \n\tarybchenko@solarflare.com, anatoly.burakov@intel.com",
        "Cc": "jblunck@infradead.org, shreyansh.jain@nxp.com, dev@dpdk.org,\n\tjia.guo@intel.com, helin.zhang@intel.com",
        "Date": "Sun, 30 Sep 2018 22:16:26 +0800",
        "Message-Id": "<1538316988-128382-3-git-send-email-jia.guo@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1538316988-128382-1-git-send-email-jia.guo@intel.com>",
        "References": "<1534503091-31910-1-git-send-email-jia.guo@intel.com>\n\t<1538316988-128382-1-git-send-email-jia.guo@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 2/4] eal: modify device event callback process\n\tfunc",
        "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": "This patch modify the device event callback process function name to be\nmore explicit, change the variable to be const and exposure the API out\nfrom private eal. The bus drivers and eal device would directly use this\nAPI to process device event callback.\n\nSigned-off-by: Jeff Guo <jia.guo@intel.com>\n---\nv2->v1:\nchange the rte_dev_event_callback_prcess from internal to external api\nfor bus or app usage.\n---\n app/test-pmd/testpmd.c                  |  4 ++--\n lib/librte_eal/bsdapp/eal/eal_dev.c     |  8 ++++++++\n lib/librte_eal/common/eal_common_dev.c  |  5 +++--\n lib/librte_eal/common/eal_private.h     | 12 ------------\n lib/librte_eal/common/include/rte_dev.h | 18 +++++++++++++++++-\n lib/librte_eal/linuxapp/eal/eal_dev.c   |  2 +-\n lib/librte_eal/rte_eal_version.map      |  1 +\n 7 files changed, 32 insertions(+), 18 deletions(-)",
    "diff": "diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c\nindex bfef483..1313100 100644\n--- a/app/test-pmd/testpmd.c\n+++ b/app/test-pmd/testpmd.c\n@@ -431,7 +431,7 @@ static void check_all_ports_link_status(uint32_t port_mask);\n static int eth_event_callback(portid_t port_id,\n \t\t\t      enum rte_eth_event_type type,\n \t\t\t      void *param, void *ret_param);\n-static void eth_dev_event_callback(char *device_name,\n+static void eth_dev_event_callback(const char *device_name,\n \t\t\t\tenum rte_dev_event_type type,\n \t\t\t\tvoid *param);\n static int eth_dev_event_callback_register(void);\n@@ -2249,7 +2249,7 @@ eth_event_callback(portid_t port_id, enum rte_eth_event_type type, void *param,\n \n /* This function is used by the interrupt thread */\n static void\n-eth_dev_event_callback(char *device_name, enum rte_dev_event_type type,\n+eth_dev_event_callback(const char *device_name, enum rte_dev_event_type type,\n \t\t\t     __rte_unused void *arg)\n {\n \tuint16_t port_id;\ndiff --git a/lib/librte_eal/bsdapp/eal/eal_dev.c b/lib/librte_eal/bsdapp/eal/eal_dev.c\nindex ae1c558..374e737 100644\n--- a/lib/librte_eal/bsdapp/eal/eal_dev.c\n+++ b/lib/librte_eal/bsdapp/eal/eal_dev.c\n@@ -33,3 +33,11 @@ rte_dev_hotplug_handle_disable(void)\n \tRTE_LOG(ERR, EAL, \"Device event is not supported for FreeBSD\\n\");\n \treturn -1;\n }\n+\n+void  __rte_experimental\n+rte_dev_event_callback_process(const char *device_name,\n+\t\t\t       enum rte_dev_event_type event)\n+{\n+\tRTE_LOG(ERR, EAL, \"Device event callback process is not supported \"\n+\t\t\"for FreeBSD\\n\");\n+}\ndiff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c\nindex 678dbca..2d610a4 100644\n--- a/lib/librte_eal/common/eal_common_dev.c\n+++ b/lib/librte_eal/common/eal_common_dev.c\n@@ -342,8 +342,9 @@ rte_dev_event_callback_unregister(const char *device_name,\n \treturn ret;\n }\n \n-void\n-dev_callback_process(char *device_name, enum rte_dev_event_type event)\n+void __rte_experimental\n+rte_dev_event_callback_process(const char *device_name,\n+\t\t\t       enum rte_dev_event_type event)\n {\n \tstruct dev_event_callback *cb_lst;\n \ndiff --git a/lib/librte_eal/common/eal_private.h b/lib/librte_eal/common/eal_private.h\nindex 637f20d..47e8a33 100644\n--- a/lib/librte_eal/common/eal_private.h\n+++ b/lib/librte_eal/common/eal_private.h\n@@ -259,18 +259,6 @@ struct rte_bus *rte_bus_find_by_device_name(const char *str);\n int rte_mp_channel_init(void);\n \n /**\n- * Internal Executes all the user application registered callbacks for\n- * the specific device. It is for DPDK internal user only. User\n- * application should not call it directly.\n- *\n- * @param device_name\n- *  The device name.\n- * @param event\n- *  the device event type.\n- */\n-void dev_callback_process(char *device_name, enum rte_dev_event_type event);\n-\n-/**\n  * @internal\n  * Parse a device string and store its information in an\n  * rte_devargs structure.\ndiff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h\nindex ff580a0..58fab43 100644\n--- a/lib/librte_eal/common/include/rte_dev.h\n+++ b/lib/librte_eal/common/include/rte_dev.h\n@@ -39,7 +39,7 @@ struct rte_dev_event {\n \tchar *devname;\t\t\t/**< device name */\n };\n \n-typedef void (*rte_dev_event_cb_fn)(char *device_name,\n+typedef void (*rte_dev_event_cb_fn)(const char *device_name,\n \t\t\t\t\tenum rte_dev_event_type event,\n \t\t\t\t\tvoid *cb_arg);\n \n@@ -438,6 +438,22 @@ rte_dev_event_callback_unregister(const char *device_name,\n  * @warning\n  * @b EXPERIMENTAL: this API may change without prior notice\n  *\n+ * Executes all the user application registered callbacks for\n+ * the specific device.\n+ *\n+ * @param device_name\n+ *  The device name.\n+ * @param event\n+ *  the device event type.\n+ */\n+void  __rte_experimental\n+rte_dev_event_callback_process(const char *device_name,\n+\t\t\t       enum rte_dev_event_type event);\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice\n+ *\n  * Start the device event monitoring.\n  *\n  * @return\ndiff --git a/lib/librte_eal/linuxapp/eal/eal_dev.c b/lib/librte_eal/linuxapp/eal/eal_dev.c\nindex 9f9e1cf..01e3a04 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_dev.c\n+++ b/lib/librte_eal/linuxapp/eal/eal_dev.c\n@@ -271,7 +271,7 @@ dev_uev_handler(__rte_unused void *param)\n \t\t\t\treturn;\n \t\t\t}\n \t\t}\n-\t\tdev_callback_process(uevent.devname, uevent.type);\n+\t\trte_dev_event_callback_process(uevent.devname, uevent.type);\n \t}\n }\n \ndiff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map\nindex a3255aa..b96da50 100644\n--- a/lib/librte_eal/rte_eal_version.map\n+++ b/lib/librte_eal/rte_eal_version.map\n@@ -277,6 +277,7 @@ EXPERIMENTAL {\n \trte_class_register;\n \trte_class_unregister;\n \trte_ctrl_thread_create;\n+\trte_dev_event_callback_process;\n \trte_dev_event_callback_register;\n \trte_dev_event_callback_unregister;\n \trte_dev_event_monitor_start;\n",
    "prefixes": [
        "v2",
        "2/4"
    ]
}