get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 89935,
    "url": "https://patches.dpdk.org/api/patches/89935/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210326183630.9425-1-cristian.dumitrescu@intel.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": "<20210326183630.9425-1-cristian.dumitrescu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210326183630.9425-1-cristian.dumitrescu@intel.com",
    "date": "2021-03-26T18:36:30",
    "name": "table: relax requirements for table entry action data",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "7f8fa18f1d28d0e87e90743a16b2c1304622a32c",
    "submitter": {
        "id": 19,
        "url": "https://patches.dpdk.org/api/people/19/?format=api",
        "name": "Cristian Dumitrescu",
        "email": "cristian.dumitrescu@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210326183630.9425-1-cristian.dumitrescu@intel.com/mbox/",
    "series": [
        {
            "id": 15913,
            "url": "https://patches.dpdk.org/api/series/15913/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=15913",
            "date": "2021-03-26T18:36:30",
            "name": "table: relax requirements for table entry action data",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/15913/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/89935/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/89935/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 7F38AA0A02;\n\tFri, 26 Mar 2021 19:36:35 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 01DD5140DCC;\n\tFri, 26 Mar 2021 19:36:35 +0100 (CET)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by mails.dpdk.org (Postfix) with ESMTP id 7C0B140685\n for <dev@dpdk.org>; Fri, 26 Mar 2021 19:36:33 +0100 (CET)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 26 Mar 2021 11:36:32 -0700",
            "from silpixa00400573.ir.intel.com (HELO\n silpixa00400573.ger.corp.intel.com) ([10.237.223.107])\n by fmsmga001.fm.intel.com with ESMTP; 26 Mar 2021 11:36:31 -0700"
        ],
        "IronPort-SDR": [
            "\n Jsg22YSlCGnrQgcYUMIvXXT7R/vFyP4k/Fa3MjgyTKy5oC3H0tVimuZXDQNVxrTcHDLvYCbqci\n pfjI1JUE92uw==",
            "\n 4QH5MfdEiprDoHVQmCopuB7obGZ22qjKnvC1IG3fG3JwMWH8vAtaDUA/tZKtrMe8AAP9BHgz0h\n rjPMCL5jXFqw=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9935\"; a=\"255194536\"",
            "E=Sophos;i=\"5.81,281,1610438400\"; d=\"scan'208\";a=\"255194536\"",
            "E=Sophos;i=\"5.81,281,1610438400\"; d=\"scan'208\";a=\"515154123\""
        ],
        "X-ExtLoop1": "1",
        "From": "Cristian Dumitrescu <cristian.dumitrescu@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Churchill Khangar <churchill.khangar@intel.com>",
        "Date": "Fri, 26 Mar 2021 18:36:30 +0000",
        "Message-Id": "<20210326183630.9425-1-cristian.dumitrescu@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "Subject": "[dpdk-dev] [PATCH] table: relax requirements for table entry action\n data",
        "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": "From: Churchill Khangar <churchill.khangar@intel.com>\n\nCurrently, the table entry action data is required to be NULL when the\naction data size is zero. We now require that action data is ignored\nwhen the action data size is zero. This is to allow for a table entry\ninstance to be allocated once with max action data size for the table\nand reused repeteadly for actions of different sizes, including zero.\n\nSigned-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\nSigned-off-by: Churchill Khangar <churchill.khangar@intel.com>\n---\n lib/librte_pipeline/rte_swx_ctl.c | 3 +--\n lib/librte_table/rte_swx_table.h  | 9 +++++----\n 2 files changed, 6 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/lib/librte_pipeline/rte_swx_ctl.c b/lib/librte_pipeline/rte_swx_ctl.c\nindex 2e4538bd0..ca30767ef 100644\n--- a/lib/librte_pipeline/rte_swx_ctl.c\n+++ b/lib/librte_pipeline/rte_swx_ctl.c\n@@ -338,8 +338,7 @@ table_entry_check(struct rte_swx_ctl_pipeline *ctl,\n \n \t\t/* action_data. */\n \t\ta = &ctl->actions[entry->action_id];\n-\t\tCHECK((a->data_size && entry->action_data) ||\n-\t\t      (!a->data_size && !entry->action_data), EINVAL);\n+\t\tCHECK(!(a->data_size && !entry->action_data), EINVAL);\n \t}\n \n \treturn 0;\ndiff --git a/lib/librte_table/rte_swx_table.h b/lib/librte_table/rte_swx_table.h\nindex 00446718f..e23f2304c 100644\n--- a/lib/librte_table/rte_swx_table.h\n+++ b/lib/librte_table/rte_swx_table.h\n@@ -101,10 +101,11 @@ struct rte_swx_table_entry {\n \t/** Action ID for the current entry. */\n \tuint64_t action_id;\n \n-\t/** Action data for the current entry. Its size is defined by the action\n-\t * specified by the *action_id*. It must be NULL when the action data\n-\t * size of the *action_id* action is NULL. It must never exceed the\n-\t * *action_data_size* of the table.\n+\t/** Action data for the current entry. Considering S as the action data\n+\t * size of the *action_id* action, which must be less than or equal to\n+\t * the table *action_data_size*, the *action_data* field must point to\n+\t * an array of S bytes when S is non-zero. The *action_data* field is\n+\t * ignored when S is zero.\n \t */\n \tuint8_t *action_data;\n };\n",
    "prefixes": []
}