get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 86769,
    "url": "https://patches.dpdk.org/api/patches/86769/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210118085937.12072-1-alvinx.zhang@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": "<20210118085937.12072-1-alvinx.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210118085937.12072-1-alvinx.zhang@intel.com",
    "date": "2021-01-18T08:59:37",
    "name": "app/testpmd: fix RSS key",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "cb70d6cb00fc24965e615686ac16789e6d529bf8",
    "submitter": {
        "id": 1398,
        "url": "https://patches.dpdk.org/api/people/1398/?format=api",
        "name": "Alvin Zhang",
        "email": "alvinx.zhang@intel.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/20210118085937.12072-1-alvinx.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 14806,
            "url": "https://patches.dpdk.org/api/series/14806/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=14806",
            "date": "2021-01-18T08:59:37",
            "name": "app/testpmd: fix RSS key",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/14806/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/86769/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/86769/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 09B7CA0A03;\n\tMon, 18 Jan 2021 09:59:48 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id A89B5140CEE;\n\tMon, 18 Jan 2021 09:59:47 +0100 (CET)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id 28187140CCB;\n Mon, 18 Jan 2021 09:59:45 +0100 (CET)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 18 Jan 2021 00:59:43 -0800",
            "from shwdenpg235.ccr.corp.intel.com ([10.240.182.60])\n by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 18 Jan 2021 00:59:41 -0800"
        ],
        "IronPort-SDR": [
            "\n xWxG3Z+nIkjHGuqI39Xv2jj10g1WSEEQoe4kh5/qoHZHqmeurTvz5eb0sWxYvIdCMicivQydI/\n dhOUNhrIy1tg==",
            "\n zWNN/manKUAi6njdST/MphjQZ42H7sPfpoBez99SwpjA+RkH7Iwgk3GtFDSsxxJrxJpCVfR5+E\n wncPtV3sgGiQ=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9867\"; a=\"157957871\"",
            "E=Sophos;i=\"5.79,355,1602572400\"; d=\"scan'208\";a=\"157957871\"",
            "E=Sophos;i=\"5.79,355,1602572400\"; d=\"scan'208\";a=\"401980410\""
        ],
        "From": "\"Zhang,Alvin\" <alvinx.zhang@intel.com>",
        "To": "ferruh.yigit@intel.com",
        "Cc": "dev@dpdk.org,\n\tAlvin Zhang <alvinx.zhang@intel.com>,\n\tstable@dpdk.org",
        "Date": "Mon, 18 Jan 2021 16:59:37 +0800",
        "Message-Id": "<20210118085937.12072-1-alvinx.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.21.0.windows.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH] app/testpmd: fix RSS key",
        "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: Alvin Zhang <alvinx.zhang@intel.com>\n\nSince the patch '1848b117' has set the value of key in 'struct\nrte_flow_action_rss' to NULL, the PMD cannot get the RSS key now.\n\nThis patch sets offset and size of the key pointer as the first\nparameter of the token 'key' and copies the start address of the\n'HEX' data to the location specified by the first parameter of\nthe token.\n\nFixes: 1848b117cca1 (\"app/testpmd: fix RSS key for flow API RSS rule\")\nCc: stable@dpdk.org\n\nSigned-off-by: Alvin Zhang <alvinx.zhang@intel.com>\n---\n app/test-pmd/cmdline_flow.c | 24 +++++++++++++-----------\n 1 file changed, 13 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c\nindex 585cab9..6eb46d3 100644\n--- a/app/test-pmd/cmdline_flow.c\n+++ b/app/test-pmd/cmdline_flow.c\n@@ -3403,7 +3403,10 @@ static int comp_set_sample_index(struct context *, const struct token *,\n \t\t.name = \"key\",\n \t\t.help = \"RSS hash key\",\n \t\t.next = NEXT(action_rss, NEXT_ENTRY(HEX)),\n-\t\t.args = ARGS(ARGS_ENTRY_ARB(0, 0),\n+\t\t.args = ARGS(ARGS_ENTRY_ARB\n+\t\t\t     (offsetof(struct action_rss_data, conf) +\n+\t\t\t      offsetof(struct rte_flow_action_rss, key),\n+\t\t\t      sizeof(((struct rte_flow_action_rss *)0)->key)),\n \t\t\t     ARGS_ENTRY_ARB\n \t\t\t     (offsetof(struct action_rss_data, conf) +\n \t\t\t      offsetof(struct rte_flow_action_rss, key_len),\n@@ -6495,19 +6498,18 @@ static int comp_set_sample_index(struct context *, const struct token *,\n \tif (ctx->objmask)\n \t\tmemset((uint8_t *)ctx->objmask + arg_data->offset,\n \t\t\t\t\t0xff, hexlen);\n+\n \t/* Save address if requested. */\n \tif (arg_addr->size) {\n-\t\tmemcpy((uint8_t *)ctx->object + arg_addr->offset,\n-\t\t       (void *[]){\n-\t\t\t(uint8_t *)ctx->object + arg_data->offset\n-\t\t       },\n-\t\t       arg_addr->size);\n+\t\tif (arg_addr->size < sizeof(void *))\n+\t\t\tgoto error;\n+\n+\t\t*(void **)((uint8_t *)ctx->object + arg_addr->offset) =\n+\t\t\t\t(uint8_t *)ctx->object + arg_data->offset;\n+\n \t\tif (ctx->objmask)\n-\t\t\tmemcpy((uint8_t *)ctx->objmask + arg_addr->offset,\n-\t\t\t       (void *[]){\n-\t\t\t\t(uint8_t *)ctx->objmask + arg_data->offset\n-\t\t\t       },\n-\t\t\t       arg_addr->size);\n+\t\t\t*(void **)((uint8_t *)ctx->objmask + arg_addr->offset) =\n+\t\t\t\t(uint8_t *)ctx->objmask + arg_data->offset;\n \t}\n \treturn len;\n error:\n",
    "prefixes": []
}