get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 86858,
    "url": "http://patches.dpdk.org/api/patches/86858/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1611040501-11666-4-git-send-email-xuemingl@nvidia.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": "<1611040501-11666-4-git-send-email-xuemingl@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1611040501-11666-4-git-send-email-xuemingl@nvidia.com",
    "date": "2021-01-19T07:14:56",
    "name": "[v5,4/9] ethdev: support sub function representor",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "c25c331677e6fea129406496652d009033b737f1",
    "submitter": {
        "id": 1904,
        "url": "http://patches.dpdk.org/api/people/1904/?format=api",
        "name": "Xueming Li",
        "email": "xuemingl@nvidia.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/1611040501-11666-4-git-send-email-xuemingl@nvidia.com/mbox/",
    "series": [
        {
            "id": 14834,
            "url": "http://patches.dpdk.org/api/series/14834/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=14834",
            "date": "2021-01-19T07:14:53",
            "name": "[v5,1/9] ethdev: introduce representor type",
            "version": 5,
            "mbox": "http://patches.dpdk.org/series/14834/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/86858/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/86858/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 A4C16A0A03;\n\tTue, 19 Jan 2021 08:16:06 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id A80EB140D6C;\n\tTue, 19 Jan 2021 08:15:51 +0100 (CET)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by mails.dpdk.org (Postfix) with ESMTP id E6D2F140D5B\n for <dev@dpdk.org>; Tue, 19 Jan 2021 08:15:46 +0100 (CET)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n xuemingl@nvidia.com) with SMTP; 19 Jan 2021 09:15:42 +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 10J7FfYd003537;\n Tue, 19 Jan 2021 09:15:42 +0200"
        ],
        "From": "Xueming Li <xuemingl@nvidia.com>",
        "To": "",
        "Cc": "dev@dpdk.org, Viacheslav Ovsiienko <viacheslavo@nvidia.com>,\n xuemingl@nvidia.com, Asaf Penso <asafp@nvidia.com>,\n Thomas Monjalon <thomas@monjalon.net>,\n Ferruh Yigit <ferruh.yigit@intel.com>,\n Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>",
        "Date": "Tue, 19 Jan 2021 07:14:56 +0000",
        "Message-Id": "<1611040501-11666-4-git-send-email-xuemingl@nvidia.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": [
            "<1611040501-11666-1-git-send-email-xuemingl@nvidia.com>",
            "<1608303356-13089-2-git-send-email-xuemingl@nvidia.com>"
        ],
        "References": [
            "<1611040501-11666-1-git-send-email-xuemingl@nvidia.com>",
            "<1608303356-13089-2-git-send-email-xuemingl@nvidia.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH v5 4/9] ethdev: support sub function 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": "SubFunction is a portion of the PCI device, created on demand, a SF\nnetdev has its own dedicated queues(txq, rxq). A SF netdev supports\neswitch representation offload similar to existing PF and VF\nrepresentors.\n\nTo support SF representor, this patch introduces new devargs syntax,\nexamples:\n representor=sf0               - single SubFunction representor\n representor=sf[1,3,5]         - single list\n representor=sf[0-3],          - single range\n representor=sf[0,2-6,8,10-12] - list with singles and ranges\n\nSigned-off-by: Xueming Li <xuemingl@nvidia.com>\nAcked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>\nAcked-by: Thomas Monjalon <thomas@monjalon.net>\n---\n doc/guides/prog_guide/poll_mode_drv.rst       |  4 +++\n .../prog_guide/switch_representation.rst      | 35 +++++++++++++------\n lib/librte_ethdev/ethdev_private.c            | 11 ++++--\n 3 files changed, 38 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/doc/guides/prog_guide/poll_mode_drv.rst b/doc/guides/prog_guide/poll_mode_drv.rst\nindex 0117c2af07..86e5867f1b 100644\n--- a/doc/guides/prog_guide/poll_mode_drv.rst\n+++ b/doc/guides/prog_guide/poll_mode_drv.rst\n@@ -378,6 +378,10 @@ parameters to those ports.\n    -a DBDF,representor=vf[0,4,6,9]\n    -a DBDF,representor=vf[0-31]\n    -a DBDF,representor=vf[0,2-4,7,9-11]\n+   -a DBDF,representor=sf0\n+   -a DBDF,representor=sf[1,3,5]\n+   -a DBDF,representor=sf[0-1023]\n+   -a DBDF,representor=sf[0,2-4,7,9-11]\n \n Note: PMDs are not required to support the standard device arguments and users\n should consult the relevant PMD documentation to see support devargs.\ndiff --git a/doc/guides/prog_guide/switch_representation.rst b/doc/guides/prog_guide/switch_representation.rst\nindex 07ba12bea6..ff6aa91c80 100644\n--- a/doc/guides/prog_guide/switch_representation.rst\n+++ b/doc/guides/prog_guide/switch_representation.rst\n@@ -13,7 +13,7 @@ Introduction\n \n Network adapters with multiple physical ports and/or SR-IOV capabilities\n usually support the offload of traffic steering rules between their virtual\n-functions (VFs), physical functions (PFs) and ports.\n+functions (VFs), sub functions (SFs), physical functions (PFs) and ports.\n \n Like for standard Ethernet switches, this involves a combination of\n automatic MAC learning and manual configuration. For most purposes it is\n@@ -24,7 +24,7 @@ layer 2 (L2) traffic (such as OVS) need to steer traffic themselves\n according on their own criteria.\n \n Without a standard software interface to manage traffic steering rules\n-between VFs, PFs and the various physical ports of a given device,\n+between VFs, SFs, PFs and the various physical ports of a given device,\n applications cannot take advantage of these offloads; software processing is\n mandatory even for traffic which ends up re-injected into the device it\n originates from.\n@@ -34,6 +34,17 @@ the DPDK flow API (**rte_flow**), with emphasis on the SR-IOV use case\n (PF/VF steering) using a single physical port for clarity, however the same\n logic applies to any number of ports without necessarily involving SR-IOV.\n \n+Sub Function\n+------------\n+Besides SR-IOV, Sub function is a portion of the PCI device, a SF netdev\n+has its own dedicated queues(txq, rxq). A SF netdev supports E-Switch\n+representation offload similar to existing PF and VF representors.\n+A SF shares PCI level resources with other SFs and/or with its parent PCI\n+function.\n+\n+Sub function is created on-demand, coexists with VFs. Number of SFs is\n+limited by hardware resources.\n+\n Port Representors\n -----------------\n \n@@ -42,15 +53,16 @@ applications usually have to process a bit of traffic in software before\n thinking about offloading specific flows to hardware.\n \n Applications therefore need the ability to receive and inject traffic to\n-various device endpoints (other VFs, PFs or physical ports) before\n+various device endpoints (other VFs, SFs, PFs or physical ports) before\n connecting them together. Device drivers must provide means to hook the\n \"other end\" of these endpoints and to refer them when configuring flow\n rules.\n \n This role is left to so-called \"port representors\" (also known as \"VF\n-representors\" in the specific context of VFs), which are to DPDK what the\n-Ethernet switch device driver model (**switchdev**) [1]_ is to Linux, and\n-which can be thought as a software \"patch panel\" front-end for applications.\n+representors\" in the specific context of VFs, \"SF representors\" in the\n+specific context of SFs), which are to DPDK what the Ethernet switch\n+device driver model (**switchdev**) [1]_ is to Linux, and which can be\n+thought as a software \"patch panel\" front-end for applications.\n \n - DPDK port representors are implemented as additional virtual Ethernet\n   device (**ethdev**) instances, spawned on an as needed basis through\n@@ -59,9 +71,12 @@ which can be thought as a software \"patch panel\" front-end for applications.\n \n ::\n \n-   -a pci:dbdf,representor=0\n-   -a pci:dbdf,representor=[0-3]\n-   -a pci:dbdf,representor=[0,5-11]\n+   -a pci:dbdf,representor=vf0\n+   -a pci:dbdf,representor=vf[0-3]\n+   -a pci:dbdf,representor=vf[0,5-11]\n+   -a pci:dbdf,representor=sf1\n+   -a pci:dbdf,representor=sf[0-1023]\n+   -a pci:dbdf,representor=sf[0,2-1023]\n \n - As virtual devices, they may be more limited than their physical\n   counterparts, for instance by exposing only a subset of device\n@@ -360,7 +375,7 @@ Compared to creating a brand new dedicated interface, **rte_flow** was\n deemed flexible enough to manage representor traffic only with minor\n extensions:\n \n-- Using physical ports, PF, VF or port representors as targets.\n+- Using physical ports, PF, SF, VF or port representors as targets.\n \n - Affecting traffic that is not necessarily addressed to the DPDK port ID a\n   flow rule is associated with (e.g. forcing VF traffic redirection to PF).\ndiff --git a/lib/librte_ethdev/ethdev_private.c b/lib/librte_ethdev/ethdev_private.c\nindex 20e48a48be..d513f035d0 100644\n--- a/lib/librte_ethdev/ethdev_private.c\n+++ b/lib/librte_ethdev/ethdev_private.c\n@@ -121,6 +121,7 @@ rte_eth_devargs_process_list(char *str, uint16_t *list, uint16_t *len_list,\n  * Representor format:\n  *   #: range or single number of VF representor - legacy\n  *   vf#: VF port representor/s\n+ *   sf#: SF port representor/s\n  *\n  * Examples of #:\n  *  2               - single\n@@ -132,9 +133,15 @@ rte_eth_devargs_parse_representor_ports(char *str, void *data)\n {\n \tstruct rte_eth_devargs *eth_da = data;\n \n-\teth_da->type = RTE_ETH_REPRESENTOR_VF;\n-\tif (str[0] == 'v' && str[1] == 'f')\n+\tif (str[0] == 'v' && str[1] == 'f') {\n+\t\teth_da->type = RTE_ETH_REPRESENTOR_VF;\n \t\tstr += 2;\n+\t} else if (str[0] == 's' && str[1] == 'f') {\n+\t\teth_da->type = RTE_ETH_REPRESENTOR_SF;\n+\t\tstr += 2;\n+\t} else {\n+\t\teth_da->type = RTE_ETH_REPRESENTOR_VF;\n+\t}\n \tstr = rte_eth_devargs_process_list(str, eth_da->representor_ports,\n \t\t&eth_da->nb_representor_ports, RTE_MAX_ETHPORTS);\n \tif (str == NULL)\n",
    "prefixes": [
        "v5",
        "4/9"
    ]
}