get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 45308,
    "url": "https://patches.dpdk.org/api/patches/45308/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20180925103245.7598-1-marko.kovacevic@intel.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<20180925103245.7598-1-marko.kovacevic@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180925103245.7598-1-marko.kovacevic@intel.com",
    "date": "2018-09-25T10:32:45",
    "name": "[v6] app/testpmd: add new command for show port info",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "04d7a9acf3eed11658001fb9027c6832a0ec6e92",
    "submitter": {
        "id": 853,
        "url": "https://patches.dpdk.org/api/people/853/?format=api",
        "name": "Kovacevic, Marko",
        "email": "marko.kovacevic@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20180925103245.7598-1-marko.kovacevic@intel.com/mbox/",
    "series": [
        {
            "id": 1488,
            "url": "https://patches.dpdk.org/api/series/1488/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=1488",
            "date": "2018-09-25T10:32:45",
            "name": "[v6] app/testpmd: add new command for show port info",
            "version": 6,
            "mbox": "https://patches.dpdk.org/series/1488/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/45308/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/45308/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 205EB5F25;\n\tTue, 25 Sep 2018 12:36:40 +0200 (CEST)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id 9A2B658FE\n\tfor <dev@dpdk.org>; Tue, 25 Sep 2018 12:36:37 +0200 (CEST)",
            "from fmsmga008.fm.intel.com ([10.253.24.58])\n\tby orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t25 Sep 2018 03:36:36 -0700",
            "from silpixa00399502.ir.intel.com (HELO\n\tsilpixa00399502.ger.corp.intel.com) ([10.237.223.218])\n\tby fmsmga008.fm.intel.com with ESMTP; 25 Sep 2018 03:34:51 -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,301,1534834800\"; d=\"scan'208\";a=\"73523026\"",
        "From": "Marko Kovacevic <marko.kovacevic@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "ferruh.yigit@intel.com, bernard.iremonger@intel.com,\n\tEmma Finn <emma.finn@intel.com>",
        "Date": "Tue, 25 Sep 2018 11:32:45 +0100",
        "Message-Id": "<20180925103245.7598-1-marko.kovacevic@intel.com>",
        "X-Mailer": "git-send-email 2.9.5",
        "In-Reply-To": "<1535634741-125515-1-git-send-email-emma.finn@intel.com>",
        "References": "<1535634741-125515-1-git-send-email-emma.finn@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v6] app/testpmd: add new command for show port\n\tinfo",
        "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": "From: Emma Finn <emma.finn@intel.com>\n\nexisting testpmd command \"show port info\" is too verbose.\nAdded a new summary command to print brief information on ports.\n\nconsole output:\n\ttestpmd> show port summary all\n\tNumber of available ports: 2\n\tPort MAC Address       Name          Driver   Status Link\n\t0    11:22:33:44:55:66 0000:07:00.0  net_i40e  up    40000Mbps\n\t1    66:55:44:33:22:11 0000:07:00.1  net_i40e  up    40000Mbps\n\nSigned-off-by: Emma Finn <emma.finn@intel.com>\nReviewed-by: Stephen Hemminger <stephen@networkplumber.org>\nReviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>\n\n---\n\nv2: droped off redundant information added\n    a single header line. (Stephen Hemminger)\n\nv3: removed deprecated function and refactored code.\n\nv4: fixed unsigned checkpatch warning and removed commas.\n\nv5: fixed commit message console output.\n\nV6: changed the fields to me a bit wider to allow for longer\n    driver names\n---\n app/test-pmd/cmdline.c                      | 19 +++++++++++----\n app/test-pmd/config.c                       | 37 +++++++++++++++++++++++++++++\n app/test-pmd/testpmd.h                      |  2 ++\n doc/guides/testpmd_app_ug/testpmd_funcs.rst |  4 +++-\n 4 files changed, 56 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 0cbd340..cb0d9ef 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -167,7 +167,7 @@ static void cmd_help_long_parsed(void *parsed_result,\n \t\t\t\"Display:\\n\"\n \t\t\t\"--------\\n\\n\"\n \n-\t\t\t\"show port (info|stats|xstats|fdir|stat_qmap|dcb_tc|cap) (port_id|all)\\n\"\n+\t\t\t\"show port (info|stats|summary|xstats|fdir|stat_qmap|dcb_tc|cap) (port_id|all)\\n\"\n \t\t\t\"    Display information for port_id, or all.\\n\\n\"\n \n \t\t\t\"show port X rss reta (size) (mask0,mask1,...)\\n\"\n@@ -7071,6 +7071,11 @@ static void cmd_showportall_parsed(void *parsed_result,\n \t} else if (!strcmp(res->what, \"info\"))\n \t\tRTE_ETH_FOREACH_DEV(i)\n \t\t\tport_infos_display(i);\n+\telse if (!strcmp(res->what, \"summary\")) {\n+\t\tport_summary_header_display();\n+\t\tRTE_ETH_FOREACH_DEV(i)\n+\t\t\tport_summary_display(i);\n+\t}\n \telse if (!strcmp(res->what, \"stats\"))\n \t\tRTE_ETH_FOREACH_DEV(i)\n \t\t\tnic_stats_display(i);\n@@ -7098,14 +7103,14 @@ cmdline_parse_token_string_t cmd_showportall_port =\n \tTOKEN_STRING_INITIALIZER(struct cmd_showportall_result, port, \"port\");\n cmdline_parse_token_string_t cmd_showportall_what =\n \tTOKEN_STRING_INITIALIZER(struct cmd_showportall_result, what,\n-\t\t\t\t \"info#stats#xstats#fdir#stat_qmap#dcb_tc#cap\");\n+\t\t\t\t \"info#summary#stats#xstats#fdir#stat_qmap#dcb_tc#cap\");\n cmdline_parse_token_string_t cmd_showportall_all =\n \tTOKEN_STRING_INITIALIZER(struct cmd_showportall_result, all, \"all\");\n cmdline_parse_inst_t cmd_showportall = {\n \t.f = cmd_showportall_parsed,\n \t.data = NULL,\n \t.help_str = \"show|clear port \"\n-\t\t\"info|stats|xstats|fdir|stat_qmap|dcb_tc|cap all\",\n+\t\t\"info|summary|stats|xstats|fdir|stat_qmap|dcb_tc|cap all\",\n \t.tokens = {\n \t\t(void *)&cmd_showportall_show,\n \t\t(void *)&cmd_showportall_port,\n@@ -7135,6 +7140,10 @@ static void cmd_showport_parsed(void *parsed_result,\n \t\t\tnic_xstats_clear(res->portnum);\n \t} else if (!strcmp(res->what, \"info\"))\n \t\tport_infos_display(res->portnum);\n+\telse if (!strcmp(res->what, \"summary\")) {\n+\t\tport_summary_header_display();\n+\t\tport_summary_display(res->portnum);\n+\t}\n \telse if (!strcmp(res->what, \"stats\"))\n \t\tnic_stats_display(res->portnum);\n \telse if (!strcmp(res->what, \"xstats\"))\n@@ -7156,7 +7165,7 @@ cmdline_parse_token_string_t cmd_showport_port =\n \tTOKEN_STRING_INITIALIZER(struct cmd_showport_result, port, \"port\");\n cmdline_parse_token_string_t cmd_showport_what =\n \tTOKEN_STRING_INITIALIZER(struct cmd_showport_result, what,\n-\t\t\t\t \"info#stats#xstats#fdir#stat_qmap#dcb_tc#cap\");\n+\t\t\t\t \"info#summary#stats#xstats#fdir#stat_qmap#dcb_tc#cap\");\n cmdline_parse_token_num_t cmd_showport_portnum =\n \tTOKEN_NUM_INITIALIZER(struct cmd_showport_result, portnum, UINT16);\n \n@@ -7164,7 +7173,7 @@ cmdline_parse_inst_t cmd_showport = {\n \t.f = cmd_showport_parsed,\n \t.data = NULL,\n \t.help_str = \"show|clear port \"\n-\t\t\"info|stats|xstats|fdir|stat_qmap|dcb_tc|cap \"\n+\t\t\"info|summary|stats|xstats|fdir|stat_qmap|dcb_tc|cap \"\n \t\t\"<port_id>\",\n \t.tokens = {\n \t\t(void *)&cmd_showport_show,\ndiff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex a0f9349..d53723c 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -518,6 +518,43 @@ port_infos_display(portid_t port_id)\n }\n \n void\n+port_summary_header_display(void)\n+{\n+\tuint16_t port_number;\n+\n+\tport_number = rte_eth_dev_count_avail();\n+\tprintf(\"Number of available ports: %i\\n\", port_number);\n+\tprintf(\"%-4s %-17s %-12s %-14s %-8s %s\\n\", \"Port\", \"MAC Address\", \"Name\",\n+\t\t\t\"Driver\", \"Status\", \"Link\");\n+}\n+\n+void\n+port_summary_display(portid_t port_id)\n+{\n+\tstruct ether_addr mac_addr;\n+\tstruct rte_eth_link link;\n+\tstruct rte_eth_dev_info dev_info;\n+\tchar name[RTE_ETH_NAME_MAX_LEN];\n+\n+\tif (port_id_is_invalid(port_id, ENABLED_WARN)) {\n+\t\tprint_valid_ports();\n+\t\treturn;\n+\t}\n+\n+\trte_eth_link_get_nowait(port_id, &link);\n+\trte_eth_dev_info_get(port_id, &dev_info);\n+\trte_eth_dev_get_name_by_port(port_id, name);\n+\trte_eth_macaddr_get(port_id, &mac_addr);\n+\n+\tprintf(\"%-4d %02X:%02X:%02X:%02X:%02X:%02X %-12s %-14s %-8s %uMbps\\n\",\n+\t\tport_id, mac_addr.addr_bytes[0], mac_addr.addr_bytes[1],\n+\t\tmac_addr.addr_bytes[2], mac_addr.addr_bytes[3],\n+\t\tmac_addr.addr_bytes[4], mac_addr.addr_bytes[5], name,\n+\t\tdev_info.driver_name, (link.link_status) ? (\"up\") : (\"down\"),\n+\t\t(unsigned int) link.link_speed);\n+}\n+\n+void\n port_offload_cap_display(portid_t port_id)\n {\n \tstruct rte_eth_dev_info dev_info;\ndiff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h\nindex a1f6614..f0bc716 100644\n--- a/app/test-pmd/testpmd.h\n+++ b/app/test-pmd/testpmd.h\n@@ -594,6 +594,8 @@ void nic_xstats_display(portid_t port_id);\n void nic_xstats_clear(portid_t port_id);\n void nic_stats_mapping_display(portid_t port_id);\n void port_infos_display(portid_t port_id);\n+void port_summary_display(portid_t port_id);\n+void port_summary_header_display(void);\n void port_offload_cap_display(portid_t port_id);\n void rx_queue_infos_display(portid_t port_idi, uint16_t queue_id);\n void tx_queue_infos_display(portid_t port_idi, uint16_t queue_id);\ndiff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex dde205a..23c4feb 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -159,12 +159,14 @@ show port\n \n Display information for a given port or all ports::\n \n-   testpmd> show port (info|stats|xstats|fdir|stat_qmap|dcb_tc|cap) (port_id|all)\n+   testpmd> show port (info|summary|stats|xstats|fdir|stat_qmap|dcb_tc|cap) (port_id|all)\n \n The available information categories are:\n \n * ``info``: General port information such as MAC address.\n \n+* ``summary``: Brief port summary such as Device Name, Driver Name etc.\n+\n * ``stats``: RX/TX statistics.\n \n * ``xstats``: RX/TX extended NIC statistics.\n",
    "prefixes": [
        "v6"
    ]
}