get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 102759,
    "url": "http://patches.dpdk.org/api/patches/102759/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20211025110415.20683-1-ivan.malov@oktetlabs.ru/",
    "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": "<20211025110415.20683-1-ivan.malov@oktetlabs.ru>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211025110415.20683-1-ivan.malov@oktetlabs.ru",
    "date": "2021-10-25T11:04:09",
    "name": "[1/7] net/sfc: do not allow flow rules to refer to VF representors",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "9efd6e5ce0b52abbeb363fc91981cd23ea10f43b",
    "submitter": {
        "id": 869,
        "url": "http://patches.dpdk.org/api/people/869/?format=api",
        "name": "Ivan Malov",
        "email": "Ivan.Malov@oktetlabs.ru"
    },
    "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/20211025110415.20683-1-ivan.malov@oktetlabs.ru/mbox/",
    "series": [
        {
            "id": 19954,
            "url": "http://patches.dpdk.org/api/series/19954/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=19954",
            "date": "2021-10-25T11:04:09",
            "name": "[1/7] net/sfc: do not allow flow rules to refer to VF representors",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/19954/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/102759/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/102759/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 45BF7A0C52;\n\tMon, 25 Oct 2021 13:04:24 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id AF3EA40E3C;\n\tMon, 25 Oct 2021 13:04:23 +0200 (CEST)",
            "from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113])\n by mails.dpdk.org (Postfix) with ESMTP id 15B6F407FF\n for <dev@dpdk.org>; Mon, 25 Oct 2021 13:04:23 +0200 (CEST)",
            "from localhost.localdomain (unknown [5.144.121.149])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 7336E7F66F;\n Mon, 25 Oct 2021 14:04:22 +0300 (MSK)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 7336E7F66F",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru;\n s=default; t=1635159862;\n bh=YtE4599NJw5gaLqYVOEDM4tjRFAiojMkBveDN7L7fjk=;\n h=From:To:Cc:Subject:Date;\n b=YdEWyPmjjMHBF/TzeNRz2j+d3FQbJlyBco19R6u4oZ/SHOv9+XPsneNGfN/IiEc7d\n PRnUnmTC0BFDQDu0CtyaEolOmyrO2K5gAYM2r1G7nXlCdyeWdq1KWLXMVLbyPLZRYV\n ucc3Obl+UqphgLJJadJ2oL2BBpFjtUUEb1Lf9ALk=",
        "From": "Ivan Malov <ivan.malov@oktetlabs.ru>",
        "To": "dev@dpdk.org",
        "Cc": "Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,\n Andy Moreton <amoreton@xilinx.com>,\n Igor Romanov <igor.romanov@oktetlabs.ru>",
        "Date": "Mon, 25 Oct 2021 14:04:09 +0300",
        "Message-Id": "<20211025110415.20683-1-ivan.malov@oktetlabs.ru>",
        "X-Mailer": "git-send-email 2.20.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 1/7] net/sfc: do not allow flow rules to refer to\n VF representors",
        "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": "VF representors do not own dedicated m-ports and thus cannot\nbe referred to as traffic endpoints in flow items or actions.\n\nFixes: a62ec90522a6 (\"net/sfc: add port representors infrastructure\")\nFixes: f55b61cec94a (\"net/sfc: support port representor flow item\")\n\nSigned-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>\nReviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>\n---\n drivers/net/sfc/sfc_switch.c | 22 +++++++++++++++++++---\n 1 file changed, 19 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/drivers/net/sfc/sfc_switch.c b/drivers/net/sfc/sfc_switch.c\nindex a28e861de5..265a17f4c4 100644\n--- a/drivers/net/sfc/sfc_switch.c\n+++ b/drivers/net/sfc/sfc_switch.c\n@@ -512,7 +512,7 @@ sfc_mae_clear_switch_port(uint16_t switch_domain_id,\n static int\n sfc_mae_find_switch_port_by_ethdev(uint16_t switch_domain_id,\n \t\t\t\t   uint16_t ethdev_port_id,\n-\t\t\t\t   efx_mport_sel_t *mport_sel)\n+\t\t\t\t   struct sfc_mae_switch_port **switch_port)\n {\n \tstruct sfc_mae_switch_domain *domain;\n \tstruct sfc_mae_switch_port *port;\n@@ -528,7 +528,7 @@ sfc_mae_find_switch_port_by_ethdev(uint16_t switch_domain_id,\n \n \tTAILQ_FOREACH(port, &domain->ports, switch_domain_ports) {\n \t\tif (port->ethdev_port_id == ethdev_port_id) {\n-\t\t\t*mport_sel = port->ethdev_mport;\n+\t\t\t*switch_port = port;\n \t\t\treturn 0;\n \t\t}\n \t}\n@@ -541,11 +541,27 @@ sfc_mae_switch_port_by_ethdev(uint16_t switch_domain_id,\n \t\t\t      uint16_t ethdev_port_id,\n \t\t\t      efx_mport_sel_t *mport_sel)\n {\n+\tstruct sfc_mae_switch_port *port;\n \tint rc;\n \n \trte_spinlock_lock(&sfc_mae_switch.lock);\n \trc = sfc_mae_find_switch_port_by_ethdev(switch_domain_id,\n-\t\t\t\t\t\tethdev_port_id, mport_sel);\n+\t\t\t\t\t\tethdev_port_id, &port);\n+\tif (rc != 0)\n+\t\tgoto unlock;\n+\n+\tif (port->type != SFC_MAE_SWITCH_PORT_INDEPENDENT) {\n+\t\t/*\n+\t\t * The ethdev is a \"VF representor\". It does not own\n+\t\t * a dedicated m-port suitable for use in flow rules.\n+\t\t */\n+\t\trc = ENOTSUP;\n+\t\tgoto unlock;\n+\t}\n+\n+\t*mport_sel = port->ethdev_mport;\n+\n+unlock:\n \trte_spinlock_unlock(&sfc_mae_switch.lock);\n \n \treturn rc;\n",
    "prefixes": [
        "1/7"
    ]
}