get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 86790,
    "url": "https://patches.dpdk.org/api/patches/86790/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1610968623-31345-7-git-send-email-xuemingl@nvidia.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": "<1610968623-31345-7-git-send-email-xuemingl@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1610968623-31345-7-git-send-email-xuemingl@nvidia.com",
    "date": "2021-01-18T11:17:00",
    "name": "[v4,6/9] ethdev: support multi-host in representor",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "ba3b8c52029f3633ec41fa564fdc18f535c295ad",
    "submitter": {
        "id": 1904,
        "url": "https://patches.dpdk.org/api/people/1904/?format=api",
        "name": "Xueming Li",
        "email": "xuemingl@nvidia.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/1610968623-31345-7-git-send-email-xuemingl@nvidia.com/mbox/",
    "series": [
        {
            "id": 14809,
            "url": "https://patches.dpdk.org/api/series/14809/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=14809",
            "date": "2021-01-18T11:16:55",
            "name": "ethdev: support SubFunction representor",
            "version": 4,
            "mbox": "https://patches.dpdk.org/series/14809/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/86790/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/86790/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 2EE1CA0A03;\n\tMon, 18 Jan 2021 12:18:20 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id EE278140D96;\n\tMon, 18 Jan 2021 12:17:26 +0100 (CET)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by mails.dpdk.org (Postfix) with ESMTP id 26A28140D21\n for <dev@dpdk.org>; Mon, 18 Jan 2021 12:17:16 +0100 (CET)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n xuemingl@nvidia.com) with SMTP; 18 Jan 2021 13:17:12 +0200",
            "from nvidia.com (pegasus05.mtr.labs.mlnx [10.210.16.100])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 10IBHBTt021675;\n Mon, 18 Jan 2021 13:17:12 +0200"
        ],
        "From": "Xueming Li <xuemingl@nvidia.com>",
        "To": "Thomas Monjalon <thomas@monjalon.net>,\n Ferruh Yigit <ferruh.yigit@intel.com>,\n Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,\n Olivier Matz <olivier.matz@6wind.com>",
        "Cc": "dev@dpdk.org, Viacheslav Ovsiienko <viacheslavo@nvidia.com>,\n xuemingl@nvidia.com, Asaf Penso <asafp@nvidia.com>",
        "Date": "Mon, 18 Jan 2021 11:17:00 +0000",
        "Message-Id": "<1610968623-31345-7-git-send-email-xuemingl@nvidia.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": [
            "<1610968623-31345-1-git-send-email-xuemingl@nvidia.com>",
            "<1608303356-13089-2-git-send-email-xuemingl@nvidia.com>"
        ],
        "References": [
            "<1610968623-31345-1-git-send-email-xuemingl@nvidia.com>",
            "<1608303356-13089-2-git-send-email-xuemingl@nvidia.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH v4 6/9] ethdev: support multi-host in representor",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "The NIC can have multiple PCIe links and can be attached to the multiple\nhosts, for example the same single NIC can be shared for multiple server\nunits in the rack. On each PCIe link NIC can provide multiple PFs and\nVFs/SFs based on these ones. To provide the unambiguous identification\nof the PCIe function the controller index is added. The full representor\nidentifier consists of three indices - controller index, PF index, and\nVF or SF index (if any).\n\nThis patch introduces controller index to ethdev representor syntax,\nexamples:\n\n[[c#]pf#]vf#: VF port representor/s, example: pf0vf1\n[[c#]pf#]sf#: SF port representor/s, example: c1pf1sf[0-3]\n\nc# is controller(host) ID/range in case of multi-host, optional.\n\nFor user application (e.g. OVS), PMD is responsible to interpret and\nlocate representor device based on controller ID, PF ID and VF/SF ID in\nrepresentor syntax.\n\nSigned-off-by: Xueming Li <xuemingl@nvidia.com>\nAcked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>\n---\n config/rte_config.h                   |  1 +\n lib/librte_ethdev/ethdev_private.c    | 12 ++++++++++--\n lib/librte_ethdev/rte_ethdev_driver.h |  4 ++++\n 3 files changed, 15 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/config/rte_config.h b/config/rte_config.h\nindex a0b5160ff2..23d02d51ef 100644\n--- a/config/rte_config.h\n+++ b/config/rte_config.h\n@@ -58,6 +58,7 @@\n #define RTE_MAX_QUEUES_PER_PORT 1024\n #define RTE_ETHDEV_QUEUE_STAT_CNTRS 16 /* max 256 */\n #define RTE_ETHDEV_RXTX_CALLBACKS 1\n+#define RTE_MAX_MULTI_HOST_CTRLS 4\n \n /* cryptodev defines */\n #define RTE_CRYPTO_MAX_DEVS 64\ndiff --git a/lib/librte_ethdev/ethdev_private.c b/lib/librte_ethdev/ethdev_private.c\nindex f81423ceb8..57473b5a39 100644\n--- a/lib/librte_ethdev/ethdev_private.c\n+++ b/lib/librte_ethdev/ethdev_private.c\n@@ -108,14 +108,22 @@ rte_eth_devargs_process_list(char *str, uint16_t *list, uint16_t *len_list,\n /*\n  * representor format:\n  *   #: range or single number of VF representor - legacy\n- *   [pf#]vf#: VF port representor/s\n- *   [pf#]sf#: SF port representor/s\n+ *   [[c#]pf#]vf#: VF port representor/s\n+ *   [[c#]pf#]sf#: SF port representor/s\n  */\n int\n rte_eth_devargs_parse_representor_ports(char *str, void *data)\n {\n \tstruct rte_eth_devargs *eth_da = data;\n \n+\tif (str[0] == 'c') {\n+\t\tstr += 1;\n+\t\tstr = rte_eth_devargs_process_list(str, eth_da->mh_controllers,\n+\t\t\t\t&eth_da->nb_mh_controllers,\n+\t\t\t\tRTE_DIM(eth_da->mh_controllers));\n+\t\tif (str == NULL)\n+\t\t\tgoto err;\n+\t}\n \tif (str[0] == 'p' && str[1] == 'f') {\n \t\teth_da->type = RTE_ETH_REPRESENTOR_PF;\n \t\tstr += 2;\ndiff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h\nindex 3bc5c5bbbb..8e04634660 100644\n--- a/lib/librte_ethdev/rte_ethdev_driver.h\n+++ b/lib/librte_ethdev/rte_ethdev_driver.h\n@@ -1203,6 +1203,10 @@ enum rte_eth_representor_type {\n \n /** Generic Ethernet device arguments  */\n struct rte_eth_devargs {\n+\tuint16_t mh_controllers[RTE_MAX_MULTI_HOST_CTRLS];\n+\t/** controller/s number in case of multi-host */\n+\tuint16_t nb_mh_controllers;\n+\t/** number of controllers in multi-host controllers field */\n \tuint16_t ports[RTE_MAX_ETHPORTS];\n \t/** port/s number to enable on a multi-port single function */\n \tuint16_t nb_ports;\n",
    "prefixes": [
        "v4",
        "6/9"
    ]
}