get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 41607,
    "url": "http://patches.dpdk.org/api/patches/41607/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/b130b9803e6dc894b330cac2a3fb1383aa162b9f.1530031921.git.gaetan.rivet@6wind.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": "<b130b9803e6dc894b330cac2a3fb1383aa162b9f.1530031921.git.gaetan.rivet@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/b130b9803e6dc894b330cac2a3fb1383aa162b9f.1530031921.git.gaetan.rivet@6wind.com",
    "date": "2018-06-26T16:56:24",
    "name": "[v8,21/21] app/testpmd: add show device command",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "0e75f7ecc89921038ad02e7d3aaf5d12d301bb68",
    "submitter": {
        "id": 269,
        "url": "http://patches.dpdk.org/api/people/269/?format=api",
        "name": "Gaëtan Rivet",
        "email": "gaetan.rivet@6wind.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/b130b9803e6dc894b330cac2a3fb1383aa162b9f.1530031921.git.gaetan.rivet@6wind.com/mbox/",
    "series": [
        {
            "id": 249,
            "url": "http://patches.dpdk.org/api/series/249/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=249",
            "date": "2018-06-26T16:56:03",
            "name": "Device querying",
            "version": 8,
            "mbox": "http://patches.dpdk.org/series/249/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/41607/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/41607/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 F23CA1BE39;\n\tTue, 26 Jun 2018 18:57:42 +0200 (CEST)",
            "from mail-wr0-f195.google.com (mail-wr0-f195.google.com\n\t[209.85.128.195]) by dpdk.org (Postfix) with ESMTP id 543E31BE06\n\tfor <dev@dpdk.org>; Tue, 26 Jun 2018 18:57:21 +0200 (CEST)",
            "by mail-wr0-f195.google.com with SMTP id g18-v6so17971845wro.7\n\tfor <dev@dpdk.org>; Tue, 26 Jun 2018 09:57:21 -0700 (PDT)",
            "from bidouze.dev.6wind.com. (host.78.145.23.62.rev.coltfrance.com.\n\t[62.23.145.78]) by smtp.gmail.com with ESMTPSA id\n\tp5-v6sm2680880wre.83.2018.06.26.09.57.18\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 26 Jun 2018 09:57:19 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:in-reply-to:references;\n\tbh=6Va4VvRZm1pXP5GZA+tCZs8WXVQWe4r8P0STi+lICn0=;\n\tb=a1jUwuvDOVvwLw0RADX2OYvMhtTxEIa4bKW2dx+PoJP/ymrzuJjsA5UdyQHXbcjUJU\n\t/1VeMfQYk4C+Imdi1HGaJEUPT8juRNMD51j4nFZfuj3y/qZMqFcOosisMEuIzFUB5kyY\n\tRz9BvJsoW4VnNMD7UHtmAX9QIoAQIzPADwX3gXJlBEVT0iPUewh3rbUrh8bA8IhYDDII\n\tS3i5ZCMUIhganL1XQGLIPSiCc11x0QtbDnW4bKxRGrreDWGP1EDKIjcoMcH8+sExQJwg\n\t6sY8oCxsD9kTGB+tPCvAduAnS5LNP+0B4wiNGEct0IfEqOrsWyU1wRIz+Yrfw5LG7CFi\n\tTDCg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:in-reply-to:references;\n\tbh=6Va4VvRZm1pXP5GZA+tCZs8WXVQWe4r8P0STi+lICn0=;\n\tb=Yx4NAE1ivYsbyK7y+gmC+KZaN9ozGU9RQ5yrMx3PMbLOljWw42yTb1ZJxbdLEGFOIu\n\tUxO2nxho27grd89HG37ldZllhI0/P5/PI4oPGqxDGs66G8TPoqVjqhAArTEpqOBNT3Cp\n\t7goVDG+cKFb/qkyyzZba5n0oEwqwfPuE+NmskGEW7WCx2hip7zZPc4roDyYTItrhLvQx\n\tm2xerZ/wrvyzDFS60DS84I9X8UFSFnbY7fwOzIJVsic45U1fI7Xep0E/an83owvPcv8+\n\t2WTfaDkqqxMDPWT4k31RzaZW2XMdmrAbchArSzUzt68vbmJ2l9QPg8PtOHa0NayjkfgT\n\tBxyg==",
        "X-Gm-Message-State": "APt69E0MsguyNe2u4IBD5uSqSH8h6wcrXU+kT7xBtam3Epb6AvCK1l6t\n\teT4vf8PF/8uzjBYkCAYwye9cna8z",
        "X-Google-Smtp-Source": "AAOMgpfeSc6j3dFgf4EnFdqOc7wxvTO/9XCE7zkUTQ6Ic71ua3Ol0I0Mqt2fViCGXYHmqtZRKFDv2w==",
        "X-Received": "by 2002:adf:f783:: with SMTP id\n\tq3-v6mr1365937wrp.108.1530032240588; \n\tTue, 26 Jun 2018 09:57:20 -0700 (PDT)",
        "From": "Gaetan Rivet <gaetan.rivet@6wind.com>",
        "To": "dev@dpdk.org",
        "Cc": "Gaetan Rivet <gaetan.rivet@6wind.com>",
        "Date": "Tue, 26 Jun 2018 18:56:24 +0200",
        "Message-Id": "<b130b9803e6dc894b330cac2a3fb1383aa162b9f.1530031921.git.gaetan.rivet@6wind.com>",
        "X-Mailer": "git-send-email 2.11.0",
        "In-Reply-To": [
            "<cover.1530031921.git.gaetan.rivet@6wind.com>",
            "<cover.1530031921.git.gaetan.rivet@6wind.com>"
        ],
        "References": [
            "<cover.1521124599.git.gaetan.rivet@6wind.com>\n\t<cover.1530031921.git.gaetan.rivet@6wind.com>",
            "<cover.1530031921.git.gaetan.rivet@6wind.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH v8 21/21] app/testpmd: add show device command",
        "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": "A new interactive command is offered:\n\n   show device <device description>\n\nThis commands lists all rte_device element matching the device\ndescription. e.g.:\n\n   show device bus=pci\n   show device bus=vdev\n   show device bus=vdev/class=eth\n   show device bus=vdev,driver=net_ring/class=eth\n   show device bus=vdev/class=eth,name=net_ring0\n\nThese devices may not be otherwise useful, some buses will spawn devices\nto keep track of their assets without having a driver to use them.\n\nSigned-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>\n---\n app/test-pmd/cmdline.c                      | 51 +++++++++++++++++++++++++++++\n doc/guides/testpmd_app_ug/testpmd_funcs.rst | 24 ++++++++++++++\n 2 files changed, 75 insertions(+)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 27e2aa8c8..872492b88 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -7083,6 +7083,56 @@ cmdline_parse_inst_t cmd_showportall = {\n \t},\n };\n \n+/* *** SHOW DEVICE INFO *** */\n+struct cmd_showdevice_result {\n+\tcmdline_fixed_string_t show;\n+\tcmdline_fixed_string_t device;\n+\tcmdline_fixed_string_t filter;\n+};\n+\n+static void\n+cmd_showdevice_dump_device(const struct rte_device *dev)\n+{\n+\tconst struct rte_driver *drv = dev->driver;\n+\n+\tprintf(\"0x%p: %s:%s\\n\", (const void *)dev, dev->name,\n+\t\tdrv ? drv->name : \"<nil>\");\n+}\n+\n+static void cmd_showdevice_parsed(void *parsed_result,\n+\t\t\t\t__attribute__((unused)) struct cmdline *cl,\n+\t\t\t\t__attribute__((unused)) void *data)\n+{\n+\tstruct cmd_showdevice_result *res = parsed_result;\n+\tstruct rte_dev_iterator it;\n+\tconst struct rte_device *dev;\n+\n+\tRTE_DEV_FOREACH(dev, res->filter, &it)\n+\t\tcmd_showdevice_dump_device(dev);\n+}\n+\n+cmdline_parse_token_string_t cmd_showdevice_show =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_showdevice_result,\n+\t\t\t\tshow, \"show\");\n+cmdline_parse_token_string_t cmd_showdevice_device =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_showdevice_result,\n+\t\t\t\tdevice, \"device\");\n+cmdline_parse_token_string_t cmd_showdevice_filter =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_showdevice_result,\n+\t\t\tfilter, NULL);\n+\n+cmdline_parse_inst_t cmd_showdevice = {\n+\t.f = cmd_showdevice_parsed,\n+\t.data = NULL,\n+\t.help_str = \"show device <device string>\",\n+\t.tokens = {\n+\t\t(void *)&cmd_showdevice_show,\n+\t\t(void *)&cmd_showdevice_device,\n+\t\t(void *)&cmd_showdevice_filter,\n+\t\tNULL,\n+\t},\n+};\n+\n /* *** SHOW PORT INFO *** */\n struct cmd_showport_result {\n \tcmdline_fixed_string_t show;\n@@ -17262,6 +17312,7 @@ cmdline_parse_ctx_t main_ctx[] = {\n \t(cmdline_parse_inst_t *)&cmd_help_long,\n \t(cmdline_parse_inst_t *)&cmd_quit,\n \t(cmdline_parse_inst_t *)&cmd_load_from_file,\n+\t(cmdline_parse_inst_t *)&cmd_showdevice,\n \t(cmdline_parse_inst_t *)&cmd_showport,\n \t(cmdline_parse_inst_t *)&cmd_showqueue,\n \t(cmdline_parse_inst_t *)&cmd_showportall,\ndiff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex 0d6fd50ca..4f1009a3a 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -2628,6 +2628,30 @@ set the traffic management default hierarchy on the port::\n \n    testpmd> set port tm hierarchy default (port_id)\n \n+Device functions\n+----------------\n+\n+Show devices\n+~~~~~~~~~~~~\n+\n+Display any registered devices::\n+\n+   testpmd> show device <device_string>\n+\n+where:\n+\n+* ``device_string``: Device description string, of the format\n+\n+  layer[/layer[/layer]]\n+\n+  where one layer is in the form\n+\n+  layer_key=layer_name[,key1=value1[,...]]\n+\n+  Valid layer keys are ``bus`` and ``class``.\n+  Their respective values is defined by registered ``bus`` and ``class``\n+  drivers.\n+\n Filter Functions\n ----------------\n \n",
    "prefixes": [
        "v8",
        "21/21"
    ]
}