get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 42879,
    "url": "http://patches.dpdk.org/api/patches/42879/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1531318450-3942-2-git-send-email-arybchenko@solarflare.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": "<1531318450-3942-2-git-send-email-arybchenko@solarflare.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1531318450-3942-2-git-send-email-arybchenko@solarflare.com",
    "date": "2018-07-11T14:14:08",
    "name": "[1/3] app/pdump: use hotplug add instead of attach",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "13dcfc8adc5332282a77bb764467303e416e5dd6",
    "submitter": {
        "id": 607,
        "url": "http://patches.dpdk.org/api/people/607/?format=api",
        "name": "Andrew Rybchenko",
        "email": "arybchenko@solarflare.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/1531318450-3942-2-git-send-email-arybchenko@solarflare.com/mbox/",
    "series": [
        {
            "id": 525,
            "url": "http://patches.dpdk.org/api/series/525/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=525",
            "date": "2018-07-11T14:14:10",
            "name": "deprecate attach and detach functions",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/525/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/42879/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/42879/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 382CB1B5C1;\n\tWed, 11 Jul 2018 16:14:34 +0200 (CEST)",
            "from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com\n\t[148.163.129.52]) by dpdk.org (Postfix) with ESMTP id AD77F1B5AA\n\tfor <dev@dpdk.org>; Wed, 11 Jul 2018 16:14:27 +0200 (CEST)",
            "from webmail.solarflare.com (webmail.solarflare.com\n\t[12.187.104.26])\n\t(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1-us3.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with\n\tESMTPS id 4FA83600070; Wed, 11 Jul 2018 14:14:26 +0000 (UTC)",
            "from ocex03.SolarFlarecom.com (10.20.40.36) by\n\tocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server\n\t(TLS) id 15.0.1044.25; Wed, 11 Jul 2018 07:14:23 -0700",
            "from opal.uk.solarflarecom.com (10.17.10.1) by\n\tocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server\n\t(TLS) id\n\t15.0.1044.25 via Frontend Transport; Wed, 11 Jul 2018 07:14:23 -0700",
            "from ukv-loginhost.uk.solarflarecom.com\n\t(ukv-loginhost.uk.solarflarecom.com [10.17.10.39])\n\tby opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id\n\tw6BEEMfh021497; Wed, 11 Jul 2018 15:14:22 +0100",
            "from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1])\n\tby ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id\n\t5F0AA16546B; Wed, 11 Jul 2018 15:14:22 +0100 (BST)"
        ],
        "X-Virus-Scanned": "Proofpoint Essentials engine",
        "From": "Andrew Rybchenko <arybchenko@solarflare.com>",
        "To": "<dev@dpdk.org>",
        "CC": "Thomas Monjalon <thomas@monjalon.net>",
        "Date": "Wed, 11 Jul 2018 15:14:08 +0100",
        "Message-ID": "<1531318450-3942-2-git-send-email-arybchenko@solarflare.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1531318450-3942-1-git-send-email-arybchenko@solarflare.com>",
        "References": "<1531318450-3942-1-git-send-email-arybchenko@solarflare.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-MDID": "1531318467-w7Ydlc_IEaUO",
        "Subject": "[dpdk-dev] [PATCH 1/3] app/pdump: use hotplug add instead of attach",
        "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_attach() is to be deprecated.\n\nSigned-off-by: Andrew Rybchenko <arybchenko@solarflare.com>\n---\n app/pdump/main.c | 94 +++++++++++++++++++++++++++++++++++-------------\n 1 file changed, 70 insertions(+), 24 deletions(-)",
    "diff": "diff --git a/app/pdump/main.c b/app/pdump/main.c\nindex 6bcf8c498..ac2287124 100644\n--- a/app/pdump/main.c\n+++ b/app/pdump/main.c\n@@ -38,8 +38,9 @@\n #define PDUMP_MSIZE_ARG \"mbuf-size\"\n #define PDUMP_NUM_MBUFS_ARG \"total-num-mbufs\"\n \n-#define VDEV_PCAP \"net_pcap_%s_%d,tx_pcap=%s\"\n-#define VDEV_IFACE \"net_pcap_%s_%d,tx_iface=%s\"\n+#define VDEV_NAME_FMT \"net_pcap_%s_%d\"\n+#define VDEV_PCAP_ARGS_FMT \"tx_pcap=%s\"\n+#define VDEV_IFACE_ARGS_FMT \"tx_iface=%s\"\n #define TX_STREAM_SIZE 64\n \n #define MP_NAME \"pdump_pool_%d\"\n@@ -570,6 +571,7 @@ create_mp_ring_vdev(void)\n \tuint16_t portid;\n \tstruct pdump_tuples *pt = NULL;\n \tstruct rte_mempool *mbuf_pool = NULL;\n+\tchar vdev_name[SIZE];\n \tchar vdev_args[SIZE];\n \tchar ring_name[SIZE];\n \tchar mempool_name[SIZE];\n@@ -619,17 +621,28 @@ create_mp_ring_vdev(void)\n \t\t\t}\n \n \t\t\t/* create vdevs */\n+\t\t\tsnprintf(vdev_name, sizeof(vdev_name),\n+\t\t\t\t VDEV_NAME_FMT, RX_STR, i);\n \t\t\t(pt->rx_vdev_stream_type == IFACE) ?\n-\t\t\tsnprintf(vdev_args, SIZE, VDEV_IFACE, RX_STR, i,\n-\t\t\tpt->rx_dev) :\n-\t\t\tsnprintf(vdev_args, SIZE, VDEV_PCAP, RX_STR, i,\n-\t\t\tpt->rx_dev);\n-\t\t\tif (rte_eth_dev_attach(vdev_args, &portid) < 0) {\n+\t\t\tsnprintf(vdev_args, sizeof(vdev_args),\n+\t\t\t\t VDEV_IFACE_ARGS_FMT, pt->rx_dev) :\n+\t\t\tsnprintf(vdev_args, sizeof(vdev_args),\n+\t\t\t\t VDEV_PCAP_ARGS_FMT, pt->rx_dev);\n+\t\t\tif (rte_eal_hotplug_add(\"vdev\", vdev_name,\n+\t\t\t\t\t\tvdev_args) < 0) {\n \t\t\t\tcleanup_rings();\n \t\t\t\trte_exit(EXIT_FAILURE,\n \t\t\t\t\t\"vdev creation failed:%s:%d\\n\",\n \t\t\t\t\t__func__, __LINE__);\n \t\t\t}\n+\t\t\tif (rte_eth_dev_get_port_by_name(vdev_name,\n+\t\t\t\t\t\t\t &portid) != 0) {\n+\t\t\t\trte_eal_hotplug_remove(\"vdev\", vdev_name);\n+\t\t\t\tcleanup_rings();\n+\t\t\t\trte_exit(EXIT_FAILURE,\n+\t\t\t\t\t\"cannot find added vdev %s:%s:%d\\n\",\n+\t\t\t\t\tvdev_name, __func__, __LINE__);\n+\t\t\t}\n \t\t\tpt->rx_vdev_id = portid;\n \n \t\t\t/* configure vdev */\n@@ -638,18 +651,29 @@ create_mp_ring_vdev(void)\n \t\t\tif (pt->single_pdump_dev)\n \t\t\t\tpt->tx_vdev_id = portid;\n \t\t\telse {\n-\t\t\t\t(pt->tx_vdev_stream_type == IFACE) ?\n-\t\t\t\tsnprintf(vdev_args, SIZE, VDEV_IFACE, TX_STR, i,\n-\t\t\t\tpt->tx_dev) :\n-\t\t\t\tsnprintf(vdev_args, SIZE, VDEV_PCAP, TX_STR, i,\n-\t\t\t\tpt->tx_dev);\n-\t\t\t\tif (rte_eth_dev_attach(vdev_args,\n-\t\t\t\t\t\t\t&portid) < 0) {\n+\t\t\t\tsnprintf(vdev_name, sizeof(vdev_name),\n+\t\t\t\t\t VDEV_NAME_FMT, TX_STR, i);\n+\t\t\t\t(pt->rx_vdev_stream_type == IFACE) ?\n+\t\t\t\tsnprintf(vdev_args, sizeof(vdev_args),\n+\t\t\t\t\t VDEV_IFACE_ARGS_FMT, pt->tx_dev) :\n+\t\t\t\tsnprintf(vdev_args, sizeof(vdev_args),\n+\t\t\t\t\t VDEV_PCAP_ARGS_FMT, pt->tx_dev);\n+\t\t\t\tif (rte_eal_hotplug_add(\"vdev\", vdev_name,\n+\t\t\t\t\t\t\tvdev_args) < 0) {\n \t\t\t\t\tcleanup_rings();\n \t\t\t\t\trte_exit(EXIT_FAILURE,\n \t\t\t\t\t\t\"vdev creation failed:\"\n \t\t\t\t\t\t\"%s:%d\\n\", __func__, __LINE__);\n \t\t\t\t}\n+\t\t\t\tif (rte_eth_dev_get_port_by_name(vdev_name,\n+\t\t\t\t\t\t&portid) != 0) {\n+\t\t\t\t\trte_eal_hotplug_remove(\"vdev\",\n+\t\t\t\t\t\t\t       vdev_name);\n+\t\t\t\t\tcleanup_rings();\n+\t\t\t\t\trte_exit(EXIT_FAILURE,\n+\t\t\t\t\t\t\"cannot find added vdev %s:%s:%d\\n\",\n+\t\t\t\t\t\tvdev_name, __func__, __LINE__);\n+\t\t\t\t}\n \t\t\t\tpt->tx_vdev_id = portid;\n \n \t\t\t\t/* configure vdev */\n@@ -667,17 +691,28 @@ create_mp_ring_vdev(void)\n \t\t\t\t\trte_strerror(rte_errno));\n \t\t\t}\n \n+\t\t\tsnprintf(vdev_name, sizeof(vdev_name),\n+\t\t\t\t VDEV_NAME_FMT, RX_STR, i);\n \t\t\t(pt->rx_vdev_stream_type == IFACE) ?\n-\t\t\tsnprintf(vdev_args, SIZE, VDEV_IFACE, RX_STR, i,\n-\t\t\t\tpt->rx_dev) :\n-\t\t\tsnprintf(vdev_args, SIZE, VDEV_PCAP, RX_STR, i,\n-\t\t\t\tpt->rx_dev);\n-\t\t\tif (rte_eth_dev_attach(vdev_args, &portid) < 0) {\n+\t\t\tsnprintf(vdev_args, sizeof(vdev_args),\n+\t\t\t\t VDEV_IFACE_ARGS_FMT, pt->rx_dev) :\n+\t\t\tsnprintf(vdev_args, sizeof(vdev_args),\n+\t\t\t\t VDEV_PCAP_ARGS_FMT, pt->rx_dev);\n+\t\t\tif (rte_eal_hotplug_add(\"vdev\", vdev_name,\n+\t\t\t\t\t\tvdev_args) < 0) {\n \t\t\t\tcleanup_rings();\n \t\t\t\trte_exit(EXIT_FAILURE,\n \t\t\t\t\t\"vdev creation failed:%s:%d\\n\",\n \t\t\t\t\t__func__, __LINE__);\n \t\t\t}\n+\t\t\tif (rte_eth_dev_get_port_by_name(vdev_name,\n+\t\t\t\t\t\t\t &portid) != 0) {\n+\t\t\t\trte_eal_hotplug_remove(\"vdev\", vdev_name);\n+\t\t\t\tcleanup_rings();\n+\t\t\t\trte_exit(EXIT_FAILURE,\n+\t\t\t\t\t\"cannot find added vdev %s:%s:%d\\n\",\n+\t\t\t\t\tvdev_name, __func__, __LINE__);\n+\t\t\t}\n \t\t\tpt->rx_vdev_id = portid;\n \t\t\t/* configure vdev */\n \t\t\tconfigure_vdev(pt->rx_vdev_id);\n@@ -693,16 +728,27 @@ create_mp_ring_vdev(void)\n \t\t\t\t\trte_strerror(rte_errno));\n \t\t\t}\n \n+\t\t\tsnprintf(vdev_name, sizeof(vdev_name),\n+\t\t\t\t VDEV_NAME_FMT, TX_STR, i);\n \t\t\t(pt->tx_vdev_stream_type == IFACE) ?\n-\t\t\tsnprintf(vdev_args, SIZE, VDEV_IFACE, TX_STR, i,\n-\t\t\t\tpt->tx_dev) :\n-\t\t\tsnprintf(vdev_args, SIZE, VDEV_PCAP, TX_STR, i,\n-\t\t\t\tpt->tx_dev);\n-\t\t\tif (rte_eth_dev_attach(vdev_args, &portid) < 0) {\n+\t\t\tsnprintf(vdev_args, sizeof(vdev_args),\n+\t\t\t\t VDEV_IFACE_ARGS_FMT, pt->tx_dev) :\n+\t\t\tsnprintf(vdev_args, sizeof(vdev_args),\n+\t\t\t\t VDEV_PCAP_ARGS_FMT, pt->tx_dev);\n+\t\t\tif (rte_eal_hotplug_add(\"vdev\", vdev_name,\n+\t\t\t\t\t\tvdev_args) < 0) {\n \t\t\t\tcleanup_rings();\n \t\t\t\trte_exit(EXIT_FAILURE,\n \t\t\t\t\t\"vdev creation failed\\n\");\n \t\t\t}\n+\t\t\tif (rte_eth_dev_get_port_by_name(vdev_name,\n+\t\t\t\t\t\t\t &portid) != 0) {\n+\t\t\t\trte_eal_hotplug_remove(\"vdev\", vdev_name);\n+\t\t\t\tcleanup_rings();\n+\t\t\t\trte_exit(EXIT_FAILURE,\n+\t\t\t\t\t\"cannot find added vdev %s:%s:%d\\n\",\n+\t\t\t\t\tvdev_name, __func__, __LINE__);\n+\t\t\t}\n \t\t\tpt->tx_vdev_id = portid;\n \n \t\t\t/* configure vdev */\n",
    "prefixes": [
        "1/3"
    ]
}