get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 44823,
    "url": "https://patches.dpdk.org/api/patches/44823/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/01e0e0ffd6a796a73150588823cf3434aafa7c50.1537261084.git.gaetan.rivet@6wind.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": "<01e0e0ffd6a796a73150588823cf3434aafa7c50.1537261084.git.gaetan.rivet@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/01e0e0ffd6a796a73150588823cf3434aafa7c50.1537261084.git.gaetan.rivet@6wind.com",
    "date": "2018-09-18T08:59:46",
    "name": "[v1] testpmd: eeprom display",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "ffabb49ead1fedcd9562561ef3fc6e1e2dc808be",
    "submitter": {
        "id": 269,
        "url": "https://patches.dpdk.org/api/people/269/?format=api",
        "name": "Gaëtan Rivet",
        "email": "gaetan.rivet@6wind.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/01e0e0ffd6a796a73150588823cf3434aafa7c50.1537261084.git.gaetan.rivet@6wind.com/mbox/",
    "series": [
        {
            "id": 1364,
            "url": "https://patches.dpdk.org/api/series/1364/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=1364",
            "date": "2018-09-18T08:59:46",
            "name": "[v1] testpmd: eeprom display",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/1364/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/44823/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/44823/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 D8A044CA5;\n\tTue, 18 Sep 2018 11:00:11 +0200 (CEST)",
            "from mail-wr1-f65.google.com (mail-wr1-f65.google.com\n\t[209.85.221.65]) by dpdk.org (Postfix) with ESMTP id 8C6E74CA2\n\tfor <dev@dpdk.org>; Tue, 18 Sep 2018 11:00:10 +0200 (CEST)",
            "by mail-wr1-f65.google.com with SMTP id w11-v6so1190963wrc.5\n\tfor <dev@dpdk.org>; Tue, 18 Sep 2018 02:00:10 -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\tr6-v6sm15059629wrt.92.2018.09.18.02.00.08\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 18 Sep 2018 02:00:08 -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;\n\tbh=FthOnb3/DGgrmjStDr4E/FvDP0BEJGLzqcpYXURtqts=;\n\tb=Amb4bSRgKXVnjbfywyrRjMjnSKnD2LipzBEycWOs9siMdibPEZkfB4+OfvDXk+CbtK\n\tWWEtYATWEuaNDd+9K3m9zFQEFkmvUSIT/mJABflsC/eQy8WZlyo0NMitvb2N3cwoiEJ2\n\tQnX3qIKd9TDvgiNxPXffiCo0yXN4UCTGiXsSo2mc8OSLwR19m/Q6oiCGuFJCag0FK+mE\n\tsq4XQ3kzMOL6hToWASp9EjnbrnNWpxDdAdDwtZE/rEySQEEupH9vSqiaN7Vb7+/7moOw\n\tR+1+k0T1HVCMbd3drPj355NzTB3CjmY7wIk4qJ4V2mrUSiHcOfPXQZfoIR/pmTnBjzyA\n\tMvSA==",
        "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;\n\tbh=FthOnb3/DGgrmjStDr4E/FvDP0BEJGLzqcpYXURtqts=;\n\tb=fb6JUL4cFBl0oJ2DKSIj8RI1Baw+abR7s6INqVJlNwWFNc2do7Ek1nRn8dNPHCwp8L\n\tMqVdTID71tIdKWAf0fcc8Gzz6eQrSp4Wk9u+X2K7nAV+hOA54nYO5B3UKcmEGZLSoaE/\n\tUNlzxPnMNTxLGuJSrFsNBzV0UyR6ds870tX21NpZ29k1YMbCrSYGARnseVGCke1eEnrB\n\tkX9xZX1cOK1mbk+m81jHcKRb1ypKDgfIFieie2t7a2QfBuDmU9mTJ4Mt8F9IJ4duOrKf\n\t+oZjwSXhct0BVgMqnRUWccRDN1EICqAORg9TYp54dOAR5k7KvQsh75eeWPxjcutjzlrY\n\tReyg==",
        "X-Gm-Message-State": "APzg51Dt5/lHFwqTEwfPkqZALVy7p0NMq8elZTYdcpyMxAtgzr4sIkVV\n\tbalvr4mxLXOyWQN1sLVtvaWRhPaUn3E=",
        "X-Google-Smtp-Source": "ANB0VdaxY70ssZzBP7BNGAqDGhSqy0ajw6WAT0NzCzzmW0X5ICt1n2em4ogrOugN/Hg2m/WRCBYDVA==",
        "X-Received": "by 2002:adf:f24e:: with SMTP id\n\tb14-v6mr20466860wrp.184.1537261209789; \n\tTue, 18 Sep 2018 02:00:09 -0700 (PDT)",
        "From": "Gaetan Rivet <gaetan.rivet@6wind.com>",
        "To": "dev@dpdk.org",
        "Cc": "Gaetan Rivet <gaetan.rivet@6wind.com>",
        "Date": "Tue, 18 Sep 2018 10:59:46 +0200",
        "Message-Id": "<01e0e0ffd6a796a73150588823cf3434aafa7c50.1537261084.git.gaetan.rivet@6wind.com>",
        "X-Mailer": "git-send-email 2.18.0",
        "Subject": "[dpdk-dev] [PATCH v1] testpmd: eeprom display",
        "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": "The interactive command\n\n  show port eeprom <id>\n\nwill dump the content of the EEPROM for the selected port.\nDumping eeprom of all ports at once is not supported.\n\nSigned-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>\n---\n app/test-pmd/cmdline.c |  9 +++++++--\n app/test-pmd/config.c  | 32 ++++++++++++++++++++++++++++++++\n app/test-pmd/testpmd.h |  1 +\n 3 files changed, 40 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex a7c0e622a..0801e7e74 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -170,6 +170,9 @@ static void cmd_help_long_parsed(void *parsed_result,\n \t\t\t\"show port (info|stats|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 eeprom (port_id)\\n\"\n+\t\t\t\"    Display port EEPROM for port_id.\\n\\n\"\n+\n \t\t\t\"show port X rss reta (size) (mask0,mask1,...)\\n\"\n \t\t\t\"    Display the rss redirection table entry indicated\"\n \t\t\t\" by masks on port X. size is used to indicate the\"\n@@ -7202,6 +7205,8 @@ static void cmd_showport_parsed(void *parsed_result,\n \t\tport_dcb_info_display(res->portnum);\n \telse if (!strcmp(res->what, \"cap\"))\n \t\tport_offload_cap_display(res->portnum);\n+\telse if (!strcmp(res->what, \"eeprom\"))\n+\t\tport_eeprom_display(res->portnum);\n }\n \n cmdline_parse_token_string_t cmd_showport_show =\n@@ -7211,7 +7216,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#stats#xstats#fdir#stat_qmap#dcb_tc#cap#eeprom\");\n cmdline_parse_token_num_t cmd_showport_portnum =\n \tTOKEN_NUM_INITIALIZER(struct cmd_showport_result, portnum, UINT16);\n \n@@ -7219,7 +7224,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|stats|xstats|fdir|stat_qmap|dcb_tc|cap|eeprom \"\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 14ccd6864..af1a7d37a 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -49,6 +49,7 @@\n #include <rte_pmd_bnxt.h>\n #endif\n #include <rte_gro.h>\n+#include <rte_hexdump.h>\n #include <cmdline_parse_etheraddr.h>\n \n #include \"testpmd.h\"\n@@ -739,6 +740,37 @@ port_offload_cap_display(portid_t port_id)\n \t}\n }\n \n+void\n+port_eeprom_display(portid_t port_id)\n+{\n+\tstruct rte_eth_dev_module_info minfo;\n+\tstruct rte_dev_eeprom_info einfo;\n+\tchar buf[1024];\n+\tint ret;\n+\n+\tif (port_id == (portid_t)RTE_PORT_ALL)\n+\t\treturn;\n+\n+\tret = rte_eth_dev_get_module_info(port_id, &minfo);\n+\tif (ret) {\n+\t\tprintf(\"Unable to get module info: %d\\n\", ret);\n+\t\treturn;\n+\t}\n+\n+\teinfo.offset = 0;\n+\teinfo.length = minfo.eeprom_len;\n+\teinfo.data = buf;\n+\n+\tret = rte_eth_dev_get_module_eeprom(port_id, &einfo);\n+\tif (ret) {\n+\t\tprintf(\"Unable to get module EEPROM: %d\\n\", ret);\n+\t\treturn;\n+\t}\n+\n+\tprintf(\"Port %hhu EEPROM:\\n\", port_id);\n+\trte_hexdump(stdout, \"hexdump\", einfo.data, einfo.length);\n+}\n+\n int\n port_id_is_invalid(portid_t port_id, enum print_warning warning)\n {\ndiff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h\nindex a1f661472..bf817bdcf 100644\n--- a/app/test-pmd/testpmd.h\n+++ b/app/test-pmd/testpmd.h\n@@ -595,6 +595,7 @@ 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_offload_cap_display(portid_t port_id);\n+void port_eeprom_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);\n void fwd_lcores_config_display(void);\n",
    "prefixes": [
        "v1"
    ]
}