get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 85725,
    "url": "https://patches.dpdk.org/api/patches/85725/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1608808729-3768-1-git-send-email-rahul.lakkireddy@chelsio.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": "<1608808729-3768-1-git-send-email-rahul.lakkireddy@chelsio.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1608808729-3768-1-git-send-email-rahul.lakkireddy@chelsio.com",
    "date": "2020-12-24T11:18:49",
    "name": "[v3] app/testpmd: increase array for fetching supported FEC caps",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "d1244df36af4e2cb78151e95c57e220fa350dbd6",
    "submitter": {
        "id": 241,
        "url": "https://patches.dpdk.org/api/people/241/?format=api",
        "name": "Rahul Lakkireddy",
        "email": "rahul.lakkireddy@chelsio.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/1608808729-3768-1-git-send-email-rahul.lakkireddy@chelsio.com/mbox/",
    "series": [
        {
            "id": 14459,
            "url": "https://patches.dpdk.org/api/series/14459/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=14459",
            "date": "2020-12-24T11:18:49",
            "name": "[v3] app/testpmd: increase array for fetching supported FEC caps",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/14459/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/85725/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/85725/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 7D95BA09FF;\n\tThu, 24 Dec 2020 12:35:19 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 14963CA35;\n\tThu, 24 Dec 2020 12:35:18 +0100 (CET)",
            "from stargate.chelsio.com (stargate.chelsio.com [12.32.117.8])\n by dpdk.org (Postfix) with ESMTP id 64C96CA16\n for <dev@dpdk.org>; Thu, 24 Dec 2020 12:35:15 +0100 (CET)",
            "from localhost (scalar.blr.asicdesigners.com [10.193.185.94])\n by stargate.chelsio.com (8.13.8/8.13.8) with ESMTP id 0BOBZ6vJ028414;\n Thu, 24 Dec 2020 03:35:07 -0800"
        ],
        "From": "Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>",
        "To": "dev@dpdk.org",
        "Cc": "kaara.satwik@chelsio.com, xiaoyun.li@intel.com, humin29@huawei.com",
        "Date": "Thu, 24 Dec 2020 16:48:49 +0530",
        "Message-Id": "<1608808729-3768-1-git-send-email-rahul.lakkireddy@chelsio.com>",
        "X-Mailer": "git-send-email 2.5.3",
        "In-Reply-To": "<1608726345-1734-1-git-send-email-rahul.lakkireddy@chelsio.com>",
        "References": "<1608726345-1734-1-git-send-email-rahul.lakkireddy@chelsio.com>",
        "Subject": "[dpdk-dev] [PATCH v3] app/testpmd: increase array for fetching\n\tsupported FEC caps",
        "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 <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Karra Satwik <kaara.satwik@chelsio.com>\n\nRequest the driver for number of entries in the FEC caps\narray and then dynamically allocate the array.\n\nSigned-off-by: Karra Satwik <kaara.satwik@chelsio.com>\nSigned-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>\nAcked-by: Xiaoyun Li <xiaoyun.li@intel.com>\n---\nv3:\n- Use unsigned int num, instead of int num\n\nv2:\n- Replace if (!speed_fec_capa) with if (speed_fec_capa == NULL)\n\n app/test-pmd/cmdline.c | 28 ++++++++++++++++++++--------\n 1 file changed, 20 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 2ccbaa039..1dfad5df4 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -16263,11 +16263,9 @@ cmd_show_fec_capability_parsed(void *parsed_result,\n \t\t__rte_unused struct cmdline *cl,\n \t\t__rte_unused void *data)\n {\n-#define FEC_CAP_NUM 2\n \tstruct cmd_show_fec_capability_result *res = parsed_result;\n-\tstruct rte_eth_fec_capa speed_fec_capa[FEC_CAP_NUM];\n-\tunsigned int num = FEC_CAP_NUM;\n-\tunsigned int ret_num;\n+\tstruct rte_eth_fec_capa *speed_fec_capa;\n+\tunsigned int num;\n \tint ret;\n \n \tif (!rte_eth_dev_is_valid_port(res->cmd_pid)) {\n@@ -16275,17 +16273,31 @@ cmd_show_fec_capability_parsed(void *parsed_result,\n \t\treturn;\n \t}\n \n-\tret = rte_eth_fec_get_capability(res->cmd_pid, speed_fec_capa, num);\n+\tret = rte_eth_fec_get_capability(res->cmd_pid, NULL, 0);\n \tif (ret == -ENOTSUP) {\n \t\tprintf(\"Function not implemented\\n\");\n \t\treturn;\n \t} else if (ret < 0) {\n-\t\tprintf(\"Get FEC capability failed\\n\");\n+\t\tprintf(\"Get FEC capability failed: %d\\n\", ret);\n+\t\treturn;\n+\t}\n+\n+\tnum = (unsigned int)ret;\n+\tspeed_fec_capa = calloc(num, sizeof(*speed_fec_capa));\n+\tif (speed_fec_capa == NULL) {\n+\t\tprintf(\"Failed to alloc FEC capability buffer\\n\");\n \t\treturn;\n \t}\n \n-\tret_num = (unsigned int)ret;\n-\tshow_fec_capability(ret_num, speed_fec_capa);\n+\tret = rte_eth_fec_get_capability(res->cmd_pid, speed_fec_capa, num);\n+\tif (ret < 0) {\n+\t\tprintf(\"Error getting FEC capability: %d\\n\", ret);\n+\t\tgoto out;\n+\t}\n+\n+\tshow_fec_capability(num, speed_fec_capa);\n+out:\n+\tfree(speed_fec_capa);\n }\n \n cmdline_parse_token_string_t cmd_show_fec_capability_show =\n",
    "prefixes": [
        "v3"
    ]
}