get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 136254,
    "url": "http://patches.dpdk.org/api/patches/136254/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240201100219.26677-3-hkalra@marvell.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": "<20240201100219.26677-3-hkalra@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240201100219.26677-3-hkalra@marvell.com",
    "date": "2024-02-01T10:02:19",
    "name": "[v5,2/2] test/devargs: add eth devargs parse cases",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "356f1fcd7df07d28e7c875977c6e2d1c477c112d",
    "submitter": {
        "id": 1182,
        "url": "http://patches.dpdk.org/api/people/1182/?format=api",
        "name": "Harman Kalra",
        "email": "hkalra@marvell.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20240201100219.26677-3-hkalra@marvell.com/mbox/",
    "series": [
        {
            "id": 30963,
            "url": "http://patches.dpdk.org/api/series/30963/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30963",
            "date": "2024-02-01T10:02:17",
            "name": "multiple representors in one device",
            "version": 5,
            "mbox": "http://patches.dpdk.org/series/30963/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/136254/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/136254/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id E372843A35;\n\tThu,  1 Feb 2024 11:02:39 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D4D2042DED;\n\tThu,  1 Feb 2024 11:02:39 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 0456F42DEC\n for <dev@dpdk.org>; Thu,  1 Feb 2024 11:02:38 +0100 (CET)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id\n 4117LFl0027003 for <dev@dpdk.org>; Thu, 1 Feb 2024 02:02:38 -0800",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3w06u8gf2r-2\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Thu, 01 Feb 2024 02:02:38 -0800 (PST)",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48;\n Thu, 1 Feb 2024 02:02:35 -0800",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend\n Transport; Thu, 1 Feb 2024 02:02:35 -0800",
            "from localhost.localdomain (unknown [10.29.52.211])\n by maili.marvell.com (Postfix) with ESMTP id BFDD23F7044;\n Thu,  1 Feb 2024 02:02:34 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=\n from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-type; s=pfpt0220; bh=YvV5PGqsmVJ7UO7Ed00VS\n W9ZPTNyEyrnq8a/MnrLb6Y=; b=gA1JoPfTioDzAUZ/XC+AI7gmfMWksLUCIanDa\n 7NzdOJDCn2sHJYJZvsgyjtd+19+mYjrUXt39bfSiPThJeBWwigFA2Ut5v00mxJUg\n 29YgwiUBkkROrLjKk7jX1ky7b97jFcdysA+xUgOgJJcI0bSGZB6t6Q+oOuzVeHUz\n wDTdTQDlvGXktt0ztYtZa50f7YVYJeXbV7gSSzVxfMGMSW/3oSFnRB+PmS/Ofhwf\n C8A5u387m1Zs+E1iI53AXUWJIcM+GvPyiGM/u+EP+IiI4OIBMRaOZ0tcAbq6G1do\n bEwyNEfzn48Lb9TLVRczkQXFd1U9y0Z7kqzY5y7+LFW6nkXZQ==",
        "From": "Harman Kalra <hkalra@marvell.com>",
        "To": "",
        "CC": "<dev@dpdk.org>, Harman Kalra <hkalra@marvell.com>",
        "Subject": "[PATCH v5 2/2] test/devargs: add eth devargs parse cases",
        "Date": "Thu, 1 Feb 2024 15:32:19 +0530",
        "Message-ID": "<20240201100219.26677-3-hkalra@marvell.com>",
        "X-Mailer": "git-send-email 2.18.0",
        "In-Reply-To": "<20240201100219.26677-1-hkalra@marvell.com>",
        "References": "<20240111064432.193119-1-hkalra@marvell.com>\n <20240201100219.26677-1-hkalra@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "TIQaDdfYb9-LTjkLOadOD_AGYKFuo7xp",
        "X-Proofpoint-ORIG-GUID": "TIQaDdfYb9-LTjkLOadOD_AGYKFuo7xp",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26\n definitions=2024-01-31_10,2024-01-31_01,2023-05-22_02",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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"
    },
    "content": "Adding new eth devargs parsing test cases which can demonstrate\nvalid and invalid usage of devargs patterns.\n\nSigned-off-by: Harman Kalra <hkalra@marvell.com>\n---\n app/test/test_devargs.c | 107 ++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 107 insertions(+)",
    "diff": "diff --git a/app/test/test_devargs.c b/app/test/test_devargs.c\nindex f977d44448..4166b2bea2 100644\n--- a/app/test/test_devargs.c\n+++ b/app/test/test_devargs.c\n@@ -6,6 +6,7 @@\n #include <stdio.h>\n #include <string.h>\n \n+#include <ethdev_driver.h>\n #include <rte_common.h>\n #include <rte_devargs.h>\n #include <rte_kvargs.h>\n@@ -201,6 +202,106 @@ test_invalid_devargs(void)\n \treturn fail;\n }\n \n+struct devargs_parse_case {\n+\tconst char *devargs;\n+\tuint8_t devargs_count;\n+};\n+\n+static int\n+test_valid_devargs_parsing(void)\n+{\n+\tstatic const struct devargs_parse_case list[] = {\n+\t\t/* Single representors patterns */\n+\t\t{\"representor=1\", 1},\n+\t\t{\"representor=[1,2,3]\", 1},\n+\t\t{\"representor=[0-3,5,7]\", 1},\n+\t\t{\"representor=vf[0-1]\", 1},\n+\t\t{\"representor=sf[0-1]\", 1},\n+\t\t{\"representor=pf1vf[0-1]\", 1},\n+\t\t{\"representor=pf[0-1]vf[1-2]\", 1},\n+\t\t{\"representor=pf[0-1]sf[1-2]\", 1},\n+\t\t{\"representor=c0pf[0-1]\", 1},\n+\t\t{\"representor=sf[1,2]vf[2]\", 1},  /* Only SF ports will be represented */\n+\t\t{\"representor=vf2sf[1-2]\", 1},    /* Only VF ports will be represented */\n+\t\t{\"representor=c[0-1]pf[0-1]vf[1-2]\", 1},\n+\t\t/* Single devarg inside multiple representor pattern */\n+\t\t{\"representor=[c[0-1]pf[0-1]vf[1-2]]\", 1},\n+\t\t/* Multiple representors patterns */\n+\t\t{\"representor=[vf0,3]\", 2},\n+\t\t{\"representor=[vf0,vf1]\", 2},\n+\t\t{\"representor=[vf[0],vf[1]]\", 2},\n+\t\t{\"representor=[vf[0,1],3]\", 2},\n+\t\t{\"representor=[vf[0,1],[3]]\", 2},\n+\t\t{\"representor=[pf1vf[0-1],3]\", 2},\n+\t\t{\"representor=[pf1vf[0-1],pf[0-1]]\", 2},\n+\t\t{\"representor=[pf1,pf3,pf1vf[0-1],vf[0],vf[1],vf0,vf1,vf2]\", 8},\n+\t\t{\"representor=[1,3,5,pf1,pf2,pf3,pf1vf[0-1],vf[0],vf[1],vf0,vf1,vf2]\", 12},\n+\t\t{\"representor=[[1,3,5],pf1,pf2,pf3,pf1vf[0-1],vf[0],vf[1],vf0,vf1,vf2]\", 10},\n+\t\t{\"representor=[c[0,2-4]pf[1,6]vf[0-1],vf[0],vf4,[3-5,7],pf1vf[0-1,6],pf[2,4,6]]\", 6}\n+\t};\n+\tstruct rte_eth_devargs eth_da[RTE_MAX_ETHPORTS];\n+\tuint32_t i;\n+\tint ret;\n+\tint fail = 0;\n+\n+\tfor (i = 0; i < RTE_DIM(list); i++) {\n+\t\tmemset(eth_da, 0, RTE_MAX_ETHPORTS * sizeof(*eth_da));\n+\t\tret = rte_eth_devargs_parse(list[i].devargs, eth_da, RTE_MAX_ETHPORTS);\n+\t\tif (ret <= 0) {\n+\t\t\tprintf(\"rte_devargs_parse(%s) returned %d (but should not)\\n\",\n+\t\t\t       list[i].devargs, ret);\n+\t\t\tfail = ret;\n+\t\t\tbreak;\n+\t\t}\n+\n+\t\t/* Check the return value, count should be equivalent to no of devargs. */\n+\t\tif (ret != list[i].devargs_count) {\n+\t\t\tprintf(\"Devargs returned count %d != expected count %d\\n\", ret,\n+\t\t\t       list[i].devargs_count);\n+\t\t\tfail = -1;\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\treturn fail;\n+}\n+\n+static int\n+test_invalid_devargs_parsing(void)\n+{\n+\tstatic const char * const list[] = {\n+\t\t\"representor=1,2,3,4\",\t\t\t/* Out [] missing */\n+\t\t\"representor=[1 2 3]\",\t\t\t/* , missing */\n+\t\t\"representor=c[1,2]\",\t\t\t/* Only controller no valid */\n+\t\t\"representor=c0vf[0-1]\",\t\t/* Controller with vf alone not valid */\n+\t\t\"representor=c0sf[0-1]\",\t\t/* Controller with sf alone not valid */\n+\t\t\"representor=vf[0-1],vf3\",\t\t/* Out [] missing */\n+\t\t\"representor=[[vf0,3]]\",\t\t/* Double [] is invalid */\n+\t\t\"representor=pfvf[1-2]\",\t\t/* No PF index provided */\n+\t\t\"representor=pf1[vf[1-2]]\",\t\t/* Additional [] across vf */\n+\t\t\"representor=c0[pf1vf[1-2]]\",\t\t/* Additional [] across pfvf */\n+\t\t\"representor=c0[pf1[vf[1-2]]]\",\t\t/* Additional [] across pfvf */\n+\t\t\"representor=[pf1vf[0-1], pf[0-1]]\",\t/* Space between two devargs is invalid */\n+\t\t\"representor=[pf1vf[0-1], 3]\",\t\t/* Space between two devargs is invalid */\n+\t\t\"representor=pf1vf[1-2],representor=1\", /* Multiple representor keys */\n+\t};\n+\tstruct rte_eth_devargs eth_da[RTE_MAX_ETHPORTS];\n+\tuint32_t i;\n+\tint ret;\n+\tint fail = 0;\n+\n+\tfor (i = 0; i < RTE_DIM(list); i++) {\n+\t\tmemset(eth_da, 0, RTE_MAX_ETHPORTS * sizeof(*eth_da));\n+\t\tret = rte_eth_devargs_parse(list[i], eth_da, RTE_MAX_ETHPORTS);\n+\t\tif (ret > 0) {\n+\t\t\tprintf(\"rte_devargs_parse(%s) returned %d (but should not)\\n\",\n+\t\t\t       list[i], ret);\n+\t\t\tfail = ret;\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\treturn fail;\n+}\n+\n static int\n test_devargs(void)\n {\n@@ -210,6 +311,12 @@ test_devargs(void)\n \tprintf(\"== test invalid case ==\\n\");\n \tif (test_invalid_devargs() < 0)\n \t\treturn -1;\n+\tprintf(\"== test devargs parsing valid case ==\\n\");\n+\tif (test_valid_devargs_parsing() < 0)\n+\t\treturn -1;\n+\tprintf(\"== test devargs parsing invalid case ==\\n\");\n+\tif (test_invalid_devargs_parsing() < 0)\n+\t\treturn -1;\n \treturn 0;\n }\n \n",
    "prefixes": [
        "v5",
        "2/2"
    ]
}