get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 42357,
    "url": "http://patches.dpdk.org/api/patches/42357/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/91715e428e019756b945f665cfade4eee6749960.1530791217.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": "<91715e428e019756b945f665cfade4eee6749960.1530791217.git.gaetan.rivet@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/91715e428e019756b945f665cfade4eee6749960.1530791217.git.gaetan.rivet@6wind.com",
    "date": "2018-07-05T11:48:29",
    "name": "[v10,22/27] app/testpmd: add show device command",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "137a1c03f568ffef7fe6da7027e5ebe844f3beee",
    "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/91715e428e019756b945f665cfade4eee6749960.1530791217.git.gaetan.rivet@6wind.com/mbox/",
    "series": [
        {
            "id": 419,
            "url": "http://patches.dpdk.org/api/series/419/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=419",
            "date": "2018-07-05T11:48:07",
            "name": "Device querying",
            "version": 10,
            "mbox": "http://patches.dpdk.org/series/419/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/42357/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/42357/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 DA6B51BFAB;\n\tThu,  5 Jul 2018 13:49:48 +0200 (CEST)",
            "from mail-wr1-f66.google.com (mail-wr1-f66.google.com\n\t[209.85.221.66]) by dpdk.org (Postfix) with ESMTP id E1B261BF14\n\tfor <dev@dpdk.org>; Thu,  5 Jul 2018 13:49:25 +0200 (CEST)",
            "by mail-wr1-f66.google.com with SMTP id h10-v6so1013036wrq.8\n\tfor <dev@dpdk.org>; Thu, 05 Jul 2018 04:49:25 -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\to42-v6sm15809183wrc.50.2018.07.05.04.49.23\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 05 Jul 2018 04:49:24 -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\tbh=MKCaEwk6ax4O2l48ApzI45MsG9rXLI/D7ra/rp3m5hA=;\n\tb=aEKuPMKiNdj546ZMh6oEuYRKTJ5noqLyxgES69qN9yVTEOWfh8wn5tmF3S/1acwEpj\n\tA+W6MEGmcPjFTtzFj1X+dGlEb0JJhW/H5xSuc7iDiyZ4AeLfo0yR0HeIIAgBNYh+ZaH8\n\tgd0hdhWwrsS0CZwpUnUNvpGqvqA5FY9/qtUC1f/fHqHSoEoOPbH1b+FdJgjtbisi5xl8\n\tH0T92ugP+m9CgXkkXNN9DCL36akLVPit0Rxulrphu0Q8J2e/jwym/oxp3vD9Jx4/am04\n\tG+RTdaacEAI+01f27Xi+6Oj4JBmXrLwHDYlwCgaAve+MskgS67rjK2OhqU0Fbph0u8/g\n\tsBsw==",
        "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;\n\tbh=MKCaEwk6ax4O2l48ApzI45MsG9rXLI/D7ra/rp3m5hA=;\n\tb=WAU41ceUkWYUR8E9Ib/DFeoUt7W0KdOlmLDsvPQ1gd/CSEWmBBt3bDTqR1L+yY2suZ\n\tPNw843rwWo19jCTkRFjmHnzAb7GWmt5Cgk5W6qEF5o92bsc1lcs4A6kizrteBbZYI5ZK\n\tgRbU+t9t3M1y94shpOPBuYMMUJdEo5Rp40dLnsFid5cBwOKcPKtuB3i0ZpuhngwpUE2b\n\tyVe5yeztWeT7iDY7cu7gMPOFYZTECC5iw+uWB366yEcq1cc9mBHA3K5X64efle+aID5N\n\tpxCahZqv1IW8bNVuR1KOGZuyhpMSzXJXKgcgGb7qneZVYV6OP5B/fnXG1vyJxKYQxVkL\n\tSTig==",
        "X-Gm-Message-State": "APt69E3Yu3zLg4UhCtLEMaWjplYjjj1o1N3H56lXN3Bjal9oxfx5hKh2\n\tRCWifaRjHt7FKzqvMkEbiY6zohxU",
        "X-Google-Smtp-Source": "AAOMgpftoWJy89sIrvY+/eEW6nrga09pL8zv7JcsFRzRrmw4XNXVL19E82BUCrjmsUyumNLqzA2/1Q==",
        "X-Received": "by 2002:adf:a197:: with SMTP id\n\tu23-v6mr4671878wru.50.1530791365265; \n\tThu, 05 Jul 2018 04:49:25 -0700 (PDT)",
        "From": "Gaetan Rivet <gaetan.rivet@6wind.com>",
        "To": "dev@dpdk.org",
        "Cc": "Gaetan Rivet <gaetan.rivet@6wind.com>",
        "Date": "Thu,  5 Jul 2018 13:48:29 +0200",
        "Message-Id": "<91715e428e019756b945f665cfade4eee6749960.1530791217.git.gaetan.rivet@6wind.com>",
        "X-Mailer": "git-send-email 2.18.0",
        "In-Reply-To": "<cover.1530791217.git.gaetan.rivet@6wind.com>",
        "References": "<cover.1530791217.git.gaetan.rivet@6wind.com>",
        "Subject": "[dpdk-dev] [PATCH v10 22/27] 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                      | 54 +++++++++++++++++++++\n doc/guides/testpmd_app_ug/testpmd_funcs.rst | 24 +++++++++\n 2 files changed, 78 insertions(+)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 27e2aa8c8..3b86bfe48 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -228,6 +228,9 @@ static void cmd_help_long_parsed(void *parsed_result,\n                         \"show port tm node stats (port_id) (node_id) (clear)\\n\"\n                         \"       Display the port TM node stats.\\n\\n\"\n \n+\t\t\t\"show device (device_string)\\n\"\n+\t\t\t\"       Display devices matching the device string.\\n\\n\"\n+\n \t\t);\n \t}\n \n@@ -7083,6 +7086,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 +17315,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": [
        "v10",
        "22/27"
    ]
}