Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/42913/?format=api
http://patches.dpdk.org/api/patches/42913/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/9f7a7087b34d5db728a9929f068dbd11ea496384.1531345404.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": "<9f7a7087b34d5db728a9929f068dbd11ea496384.1531345404.git.gaetan.rivet@6wind.com>", "list_archive_url": "https://inbox.dpdk.org/dev/9f7a7087b34d5db728a9929f068dbd11ea496384.1531345404.git.gaetan.rivet@6wind.com", "date": "2018-07-11T21:45:10", "name": "[v11,20/25] 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/9f7a7087b34d5db728a9929f068dbd11ea496384.1531345404.git.gaetan.rivet@6wind.com/mbox/", "series": [ { "id": 533, "url": "http://patches.dpdk.org/api/series/533/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=533", "date": "2018-07-11T21:44:50", "name": "Device querying", "version": 11, "mbox": "http://patches.dpdk.org/series/533/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/42913/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/42913/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 1A7D41B613;\n\tWed, 11 Jul 2018 23:46:32 +0200 (CEST)", "from mail-wr1-f67.google.com (mail-wr1-f67.google.com\n\t[209.85.221.67]) by dpdk.org (Postfix) with ESMTP id 786C21B5D3\n\tfor <dev@dpdk.org>; Wed, 11 Jul 2018 23:46:04 +0200 (CEST)", "by mail-wr1-f67.google.com with SMTP id b15-v6so19623145wrv.10\n\tfor <dev@dpdk.org>; Wed, 11 Jul 2018 14:46:04 -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\th5-v6sm10550936wrr.19.2018.07.11.14.46.01\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 11 Jul 2018 14:46:01 -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=sfROBCkcKSu7MugYwnSCnG2pjnchuWrpPxXKAiJhTgg=;\n\tb=c3ZerGzrSuilRLaL1l02dEkPzNLnWcis5CH+iztbRDsZwXukQwRFBUn10IiXM8/95x\n\tbBLtLfUmscPmHyI54Z3UzQoi4qOybPycaY6bbYUsnhmqTA5xTv7o1Czw4uUh+UUSwo1o\n\t2lWFFHLDuqLQLFmhrEctjcPwURnOm6bhY9mO5EIc3wNSEainrAgndXIPkHWZXKqCeUn4\n\t5FstpYHMG2GixAjHcHRRNJGs3D1GeJOmTVPe9yQBgFQvGhVKLypxhzJ2Zb9B3QY8Uj40\n\tubKOXPtd5WX9X3jnxSpuH32hIBv1U1ZEwfmRO5oC6Fnv7fHO/rSjdzb6MIWpQ6UZ7b+7\n\tEhOQ==", "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=sfROBCkcKSu7MugYwnSCnG2pjnchuWrpPxXKAiJhTgg=;\n\tb=FbjUMSdzZAjd9Zaxs0ntlayNppmLNtAWAHr5XeGjR3OvX45MrinwCmNOozFLsu4A8f\n\tNGbO8361yGaAs26L30LILzxUYVy2gseg1+wwsERd4Co4yQmdEKPccy17Z9Q0K8auGeod\n\tSj/jWaWzW7aT5vcItXX8mu1FVbljVzOUzkbzTofl7gcCpGRYSIflAoWmNNPYfrr4ZeiQ\n\tzPOT4K7gcoT4wMsNkp7ITF7uRFsLzzN05/b2jsrPRJbaSFwErj0CeIrKZ+JGORK5zBBp\n\twgrIVXdUtllJv877fkvMlmmr036p7pkSdbfyNEnPY7za/kAVn84Yd9W87fbfyQQI7k9x\n\tcSzA==", "X-Gm-Message-State": "AOUpUlHnct1XJ+uDWwHM/y54ADMGVHOTLq2QKmIjPSSAio7pBySnVvJh\n\tSX6m1FsGtd3JAp7Wn2HYvbcTfg5L", "X-Google-Smtp-Source": "AAOMgpdbEIjceH8M2QsbcxuoJzk0YxS9uHsMqMlRUg87da8D1AD4ITK3rjXihZ+lm4Z6U1fQVE2Pfg==", "X-Received": "by 2002:a5d:5088:: with SMTP id\n\ta8-v6mr221976wrt.37.1531345562804; \n\tWed, 11 Jul 2018 14:46:02 -0700 (PDT)", "From": "Gaetan Rivet <gaetan.rivet@6wind.com>", "To": "dev@dpdk.org", "Cc": "Gaetan Rivet <gaetan.rivet@6wind.com>", "Date": "Wed, 11 Jul 2018 23:45:10 +0200", "Message-Id": "<9f7a7087b34d5db728a9929f068dbd11ea496384.1531345404.git.gaetan.rivet@6wind.com>", "X-Mailer": "git-send-email 2.18.0", "In-Reply-To": "<cover.1531345404.git.gaetan.rivet@6wind.com>", "References": "<cover.1531345404.git.gaetan.rivet@6wind.com>", "Subject": "[dpdk-dev] [PATCH v11 20/25] 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>\nAcked-by: Bernard Iremonger <bernard.iremonger@intel.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 74a8cd99e..238ecfc56 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@@ -7093,6 +7096,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@@ -17272,6 +17325,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": [ "v11", "20/25" ] }{ "id": 42913, "url": "