get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 81064,
    "url": "http://patches.dpdk.org/api/patches/81064/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201016085557.18884-2-getelson@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": "<20201016085557.18884-2-getelson@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201016085557.18884-2-getelson@nvidia.com",
    "date": "2020-10-16T08:55:55",
    "name": "[v6,1/3] ethdev: allow negative values in flow rule types",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "3df2137aa9e839c72ab461f9201647b974e83709",
    "submitter": {
        "id": 1882,
        "url": "http://patches.dpdk.org/api/people/1882/?format=api",
        "name": "Gregory Etelson",
        "email": "getelson@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/20201016085557.18884-2-getelson@nvidia.com/mbox/",
    "series": [
        {
            "id": 13048,
            "url": "http://patches.dpdk.org/api/series/13048/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=13048",
            "date": "2020-10-16T08:55:54",
            "name": "Tunnel Offload API",
            "version": 6,
            "mbox": "http://patches.dpdk.org/series/13048/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/81064/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/81064/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 312EFA04DB;\n\tFri, 16 Oct 2020 10:56:39 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 2DE7C1E9AD;\n\tFri, 16 Oct 2020 10:56:28 +0200 (CEST)",
            "from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com\n [216.228.121.65]) by dpdk.org (Postfix) with ESMTP id C711C1E91C\n for <dev@dpdk.org>; Fri, 16 Oct 2020 10:56:25 +0200 (CEST)",
            "from hqmail.nvidia.com (Not Verified[216.228.121.13]) by\n hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA)\n id <B5f89602b0000>; Fri, 16 Oct 2020 01:56:11 -0700",
            "from nvidia.com (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13)\n with Microsoft SMTP Server (TLS) id 15.0.1473.3;\n Fri, 16 Oct 2020 08:56:15 +0000"
        ],
        "From": "Gregory Etelson <getelson@nvidia.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<getelson@nvidia.com>, <matan@nvidia.com>, <rasland@nvidia.com>,\n <elibr@nvidia.com>, <ozsh@nvidia.com>, <ajit.khaparde@broadcom.com>,\n <asafp@nvidia.com>, Ori Kam <orika@nvidia.com>, Viacheslav Ovsiienko\n <viacheslavo@nvidia.com>, Thomas Monjalon <thomas@monjalon.net>, Ferruh Yigit\n <ferruh.yigit@intel.com>, Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>",
        "Date": "Fri, 16 Oct 2020 11:55:55 +0300",
        "Message-ID": "<20201016085557.18884-2-getelson@nvidia.com>",
        "X-Mailer": "git-send-email 2.28.0",
        "In-Reply-To": "<20201016085557.18884-1-getelson@nvidia.com>",
        "References": "<20200625160348.26220-1-getelson@mellanox.com>\n <20201016085557.18884-1-getelson@nvidia.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "quoted-printable",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.124.1.5]",
        "X-ClientProxiedBy": "HQMAIL111.nvidia.com (172.20.187.18) To\n HQMAIL107.nvidia.com (172.20.187.13)",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1;\n t=1602838571; bh=/6jVazrlMnsgAfIysc1U/qyvzCMaURzmwEdLNyZNK4s=;\n h=From:To:CC:Subject:Date:Message-ID:X-Mailer:In-Reply-To:\n References:MIME-Version:Content-Transfer-Encoding:Content-Type:\n X-Originating-IP:X-ClientProxiedBy;\n b=YNMqiMu0foyXefAcojngGb7RR3XaevWpQvR05vH1GlzisT+5Z+bO/06GEsSTyxHea\n 8Nza9ZL1s+/B+Big5t5yADQJzwZMce+sfXkg7gja3K1dDCGKkC2czHi146iqIDV6zE\n 8nbwvgVzDiK1qoF5VgqvqD0051AQlOGXUV/mpKb7SWa68NT3PIfBVGafh/PawivAw6\n +LvYjQKpGz96vYaaVWww1qrgJ6LhMUIi0VF7vb1bBwHx9ocl+tS4aj8fQq/a6X8scy\n cvrJdQh0JsDMLO5wko1nVbNlGElszLSA+p9joZNzdly33Ge/VEmQsWHh/9SJv+PtS3\n OY77L54bbOo5Q==",
        "Subject": "[dpdk-dev] [PATCH v6 1/3] ethdev: allow negative values in flow\n\trule types",
        "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": "RTE flow items & actions use positive values in item & action type.\nNegative values are reserved for PMD private types. PMD\nitems & actions usually are not exposed to application and are not\nused to create RTE flows.\n\nThe patch allows applications with access to PMD flow\nitems & actions ability to integrate RTE and PMD items & actions\nand use them to create flow rule.\n\nRTE flow item or action conversion library accepts positive known\nelement types with predefined sizes only. Private PMD items and\nactions do not fit into this scheme because PMD type values are\nnegative, each PMD has it's own types numeration and element types and\ntheir sizes are not visible at RTE level.  To resolve these\nlimitations the patch proposes this solution:\n1. PMD can expose elements of pointer size only.  RTE flow\n   conversion functions will use pointer size for each configuration\n   object in private PMD element it processes;\n2. RTE flow verification will not reject elements with negative type.\n\nSigned-off-by: Gregory Etelson <getelson@nvidia.com>\nAcked-by: Ori Kam <orika@nvidia.com>\nAcked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>\n\n---\nv4:\n* update the 'Negative types' section in the rtre_flow.rst\n\n* update the patch comment\n\nv5:\n* rebase to next-net\n---\n doc/guides/prog_guide/rte_flow.rst     |  3 +++\n doc/guides/rel_notes/release_20_11.rst |  5 +++++\n lib/librte_ethdev/rte_flow.c           | 28 ++++++++++++++++++++------\n 3 files changed, 30 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst\nindex 6ee0d3a10a..7fb5ec9059 100644\n--- a/doc/guides/prog_guide/rte_flow.rst\n+++ b/doc/guides/prog_guide/rte_flow.rst\n@@ -2775,6 +2775,9 @@ identifiers they are not aware of.\n \n A method to generate them remains to be defined.\n \n+Application may use PMD dynamic items or actions in flow rules. In that case\n+size of configuration object in dynamic element must be a pointer size.\n+\n Planned types\n ~~~~~~~~~~~~~\n \ndiff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst\nindex 79d9ebac4e..9155b468d6 100644\n--- a/doc/guides/rel_notes/release_20_11.rst\n+++ b/doc/guides/rel_notes/release_20_11.rst\n@@ -116,6 +116,11 @@ New Features\n   * Updated HWRM structures to 1.10.1.70 version.\n   * Added TRUFLOW support for Stingray devices.\n \n+* **Flow rules allowed to use private PMD items / actions.**\n+\n+  * Flow rule verification was updated to accept private PMD\n+    items and actions.\n+\n * **Updated Cisco enic driver.**\n \n   * Added support for VF representors with single-queue Tx/Rx and flow API\ndiff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c\nindex 686fe40eaa..b74ea5593a 100644\n--- a/lib/librte_ethdev/rte_flow.c\n+++ b/lib/librte_ethdev/rte_flow.c\n@@ -518,7 +518,11 @@ rte_flow_conv_item_spec(void *buf, const size_t size,\n \t\t}\n \t\tbreak;\n \tdefault:\n-\t\toff = rte_flow_desc_item[item->type].size;\n+\t\t/**\n+\t\t * allow PMD private flow item\n+\t\t */\n+\t\toff = (int)item->type >= 0 ?\n+\t\t      rte_flow_desc_item[item->type].size : sizeof(void *);\n \t\trte_memcpy(buf, data, (size > off ? off : size));\n \t\tbreak;\n \t}\n@@ -621,7 +625,11 @@ rte_flow_conv_action_conf(void *buf, const size_t size,\n \t\t}\n \t\tbreak;\n \tdefault:\n-\t\toff = rte_flow_desc_action[action->type].size;\n+\t\t/**\n+\t\t * allow PMD private flow action\n+\t\t */\n+\t\toff = (int)action->type >= 0 ?\n+\t\t      rte_flow_desc_action[action->type].size : sizeof(void *);\n \t\trte_memcpy(buf, action->conf, (size > off ? off : size));\n \t\tbreak;\n \t}\n@@ -663,8 +671,12 @@ rte_flow_conv_pattern(struct rte_flow_item *dst,\n \tunsigned int i;\n \n \tfor (i = 0, off = 0; !num || i != num; ++i, ++src, ++dst) {\n-\t\tif ((size_t)src->type >= RTE_DIM(rte_flow_desc_item) ||\n-\t\t    !rte_flow_desc_item[src->type].name)\n+\t\t/**\n+\t\t * allow PMD private flow item\n+\t\t */\n+\t\tif (((int)src->type >= 0) &&\n+\t\t\t((size_t)src->type >= RTE_DIM(rte_flow_desc_item) ||\n+\t\t    !rte_flow_desc_item[src->type].name))\n \t\t\treturn rte_flow_error_set\n \t\t\t\t(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ITEM, src,\n \t\t\t\t \"cannot convert unknown item type\");\n@@ -752,8 +764,12 @@ rte_flow_conv_actions(struct rte_flow_action *dst,\n \tunsigned int i;\n \n \tfor (i = 0, off = 0; !num || i != num; ++i, ++src, ++dst) {\n-\t\tif ((size_t)src->type >= RTE_DIM(rte_flow_desc_action) ||\n-\t\t    !rte_flow_desc_action[src->type].name)\n+\t\t/**\n+\t\t * allow PMD private flow action\n+\t\t */\n+\t\tif (((int)src->type >= 0) &&\n+\t\t    ((size_t)src->type >= RTE_DIM(rte_flow_desc_action) ||\n+\t\t    !rte_flow_desc_action[src->type].name))\n \t\t\treturn rte_flow_error_set\n \t\t\t\t(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION,\n \t\t\t\t src, \"cannot convert unknown action type\");\n",
    "prefixes": [
        "v6",
        "1/3"
    ]
}