get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 87865,
    "url": "http://patches.dpdk.org/api/patches/87865/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210211141620.12482-11-hemant.agrawal@nxp.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": "<20210211141620.12482-11-hemant.agrawal@nxp.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210211141620.12482-11-hemant.agrawal@nxp.com",
    "date": "2021-02-11T14:16:10",
    "name": "[v2,10/20] net/dpaa2: add support for raw pattern in dpdmux",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "f6aa0b98854e6f458c9b58810dde590ca153176e",
    "submitter": {
        "id": 477,
        "url": "http://patches.dpdk.org/api/people/477/?format=api",
        "name": "Hemant Agrawal",
        "email": "hemant.agrawal@nxp.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/20210211141620.12482-11-hemant.agrawal@nxp.com/mbox/",
    "series": [
        {
            "id": 15239,
            "url": "http://patches.dpdk.org/api/series/15239/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=15239",
            "date": "2021-02-11T14:16:00",
            "name": "NXP DPAAx ethernet PMD changes",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/15239/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/87865/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/87865/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 0F7DAA054A;\n\tThu, 11 Feb 2021 15:29:28 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9AB711CC58B;\n\tThu, 11 Feb 2021 15:28:13 +0100 (CET)",
            "from inva020.nxp.com (inva020.nxp.com [92.121.34.13])\n by mails.dpdk.org (Postfix) with ESMTP id 8FE981CC505\n for <dev@dpdk.org>; Thu, 11 Feb 2021 15:28:03 +0100 (CET)",
            "from inva020.nxp.com (localhost [127.0.0.1])\n by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 731D61A05F1;\n Thu, 11 Feb 2021 15:28:03 +0100 (CET)",
            "from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com\n [165.114.16.14])\n by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 084AF1A05EF;\n Thu, 11 Feb 2021 15:28:02 +0100 (CET)",
            "from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net\n [10.232.133.63])\n by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 5BF54402D0;\n Thu, 11 Feb 2021 15:28:00 +0100 (CET)"
        ],
        "From": "Hemant Agrawal <hemant.agrawal@nxp.com>",
        "To": "dev@dpdk.org,\n\tferruh.yigit@intel.com",
        "Date": "Thu, 11 Feb 2021 19:46:10 +0530",
        "Message-Id": "<20210211141620.12482-11-hemant.agrawal@nxp.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20210211141620.12482-1-hemant.agrawal@nxp.com>",
        "References": "<20210120142723.14090-1-hemant.agrawal@nxp.com>\n <20210211141620.12482-1-hemant.agrawal@nxp.com>",
        "X-Virus-Scanned": "ClamAV using ClamSMTP",
        "Subject": "[dpdk-dev] [PATCH v2 10/20] net/dpaa2: add support for raw pattern\n in dpdmux",
        "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: Akhil Goyal <akhil.goyal@nxp.com>\n\nAdded support for flow raw pattern and check that the call\nfor dpdmux_set_custom_key() which should be called\nonly once for a particular DPDMUX as all previous rules\nwill be erased with this call.\nHence calling it for the first time only.\n\nSigned-off-by: Akhil Goyal <akhil.goyal@nxp.com>\n---\n drivers/net/dpaa2/dpaa2_mux.c         | 39 ++++++++++++++++++++++-----\n drivers/net/dpaa2/mc/dpdmux.c         |  3 ++-\n drivers/net/dpaa2/mc/fsl_dpdmux.h     | 12 +++++++--\n drivers/net/dpaa2/mc/fsl_dpdmux_cmd.h |  4 +--\n 4 files changed, 46 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/drivers/net/dpaa2/dpaa2_mux.c b/drivers/net/dpaa2/dpaa2_mux.c\nindex b397d333d6..b669a16fc1 100644\n--- a/drivers/net/dpaa2/dpaa2_mux.c\n+++ b/drivers/net/dpaa2/dpaa2_mux.c\n@@ -66,6 +66,7 @@ rte_pmd_dpaa2_mux_flow_create(uint32_t dpdmux_id,\n \tvoid *key_iova, *mask_iova, *key_cfg_iova = NULL;\n \tuint8_t key_size = 0;\n \tint ret;\n+\tstatic int i;\n \n \t/* Find the DPDMUX from dpdmux_id in our list */\n \tdpdmux_dev = get_dpdmux_from_id(dpdmux_id);\n@@ -154,6 +155,23 @@ rte_pmd_dpaa2_mux_flow_create(uint32_t dpdmux_id,\n \t}\n \tbreak;\n \n+\tcase RTE_FLOW_ITEM_TYPE_RAW:\n+\t{\n+\t\tconst struct rte_flow_item_raw *spec;\n+\n+\t\tspec = (const struct rte_flow_item_raw *)pattern[0]->spec;\n+\t\tkg_cfg.extracts[0].extract.from_data.offset = spec->offset;\n+\t\tkg_cfg.extracts[0].extract.from_data.size = spec->length;\n+\t\tkg_cfg.extracts[0].type = DPKG_EXTRACT_FROM_DATA;\n+\t\tkg_cfg.num_extracts = 1;\n+\t\tmemcpy((void *)key_iova, (const void *)spec->pattern,\n+\t\t\t\t\t\t\tspec->length);\n+\t\tmemcpy(mask_iova, pattern[0]->mask, spec->length);\n+\n+\t\tkey_size = spec->length;\n+\t}\n+\tbreak;\n+\n \tdefault:\n \t\tDPAA2_PMD_ERR(\"Not supported pattern type: %d\",\n \t\t\t\tpattern[0]->type);\n@@ -166,20 +184,27 @@ rte_pmd_dpaa2_mux_flow_create(uint32_t dpdmux_id,\n \t\tgoto creation_error;\n \t}\n \n-\tret = dpdmux_set_custom_key(&dpdmux_dev->dpdmux, CMD_PRI_LOW,\n-\t\t\t\t    dpdmux_dev->token,\n-\t\t\t(uint64_t)(DPAA2_VADDR_TO_IOVA(key_cfg_iova)));\n-\tif (ret) {\n-\t\tDPAA2_PMD_ERR(\"dpdmux_set_custom_key failed: err(%d)\", ret);\n-\t\tgoto creation_error;\n+\t/* Multiple rules with same DPKG extracts (kg_cfg.extracts) like same\n+\t * offset and length values in raw is supported right now. Different\n+\t * values of kg_cfg may not work.\n+\t */\n+\tif (i == 0) {\n+\t\tret = dpdmux_set_custom_key(&dpdmux_dev->dpdmux, CMD_PRI_LOW,\n+\t\t\t\t\t    dpdmux_dev->token,\n+\t\t\t\t(uint64_t)(DPAA2_VADDR_TO_IOVA(key_cfg_iova)));\n+\t\tif (ret) {\n+\t\t\tDPAA2_PMD_ERR(\"dpdmux_set_custom_key failed: err(%d)\",\n+\t\t\t\t\tret);\n+\t\t\tgoto creation_error;\n+\t\t}\n \t}\n-\n \t/* As now our key extract parameters are set, let us configure\n \t * the rule.\n \t */\n \tflow->rule.key_iova = (uint64_t)(DPAA2_VADDR_TO_IOVA(key_iova));\n \tflow->rule.mask_iova = (uint64_t)(DPAA2_VADDR_TO_IOVA(mask_iova));\n \tflow->rule.key_size = key_size;\n+\tflow->rule.entry_index = i++;\n \n \tvf_conf = (const struct rte_flow_action_vf *)(actions[0]->conf);\n \tif (vf_conf->id == 0 || vf_conf->id > dpdmux_dev->num_ifs) {\ndiff --git a/drivers/net/dpaa2/mc/dpdmux.c b/drivers/net/dpaa2/mc/dpdmux.c\nindex 63f1ec7d30..67d37ed4cd 100644\n--- a/drivers/net/dpaa2/mc/dpdmux.c\n+++ b/drivers/net/dpaa2/mc/dpdmux.c\n@@ -1,7 +1,7 @@\n /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)\n  *\n  * Copyright 2013-2016 Freescale Semiconductor Inc.\n- * Copyright 2018-2019 NXP\n+ * Copyright 2018-2021 NXP\n  *\n  */\n #include <fsl_mc_sys.h>\n@@ -852,6 +852,7 @@ int dpdmux_add_custom_cls_entry(struct fsl_mc_io *mc_io,\n \n \tcmd_params = (struct dpdmux_cmd_add_custom_cls_entry *)cmd.params;\n \tcmd_params->key_size = rule->key_size;\n+\tcmd_params->entry_index = rule->entry_index;\n \tcmd_params->dest_if = cpu_to_le16(action->dest_if);\n \tcmd_params->key_iova = cpu_to_le64(rule->key_iova);\n \tcmd_params->mask_iova = cpu_to_le64(rule->mask_iova);\ndiff --git a/drivers/net/dpaa2/mc/fsl_dpdmux.h b/drivers/net/dpaa2/mc/fsl_dpdmux.h\nindex accd1ef5c1..b809aade5d 100644\n--- a/drivers/net/dpaa2/mc/fsl_dpdmux.h\n+++ b/drivers/net/dpaa2/mc/fsl_dpdmux.h\n@@ -1,7 +1,7 @@\n /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)\n  *\n  * Copyright 2013-2016 Freescale Semiconductor Inc.\n- * Copyright 2018-2019 NXP\n+ * Copyright 2018-2021 NXP\n  *\n  */\n #ifndef __FSL_DPDMUX_H\n@@ -367,15 +367,23 @@ int dpdmux_set_custom_key(struct fsl_mc_io *mc_io,\n  * struct dpdmux_rule_cfg - Custom classification rule.\n  *\n  * @key_iova: DMA address of buffer storing the look-up value\n- * @mask_iova: DMA address of the mask used for TCAM classification\n+ * @mask_iova: DMA address of the mask used for TCAM classification. This\n+ *  parameter is used only if dpdmux was created using option\n+ *  DPDMUX_OPT_CLS_MASK_SUPPORT.\n  * @key_size: size, in bytes, of the look-up value. This must match the size\n  *\tof the look-up key defined using dpdmux_set_custom_key, otherwise the\n  *\tentry will never be hit\n+ * @entry_index: rule index into the table. This parameter is used only when\n+ *  dpdmux object was created using option DPDMUX_OPT_CLS_MASK_SUPPORT. In\n+ *  this case the rule is masking and the current frame may be a hit for\n+ *  multiple rules. This parameter determines the order in wich the rules\n+ *  will be checked (smaller entry_index first).\n  */\n struct dpdmux_rule_cfg {\n \tuint64_t key_iova;\n \tuint64_t mask_iova;\n \tuint8_t key_size;\n+\tuint16_t entry_index;\n };\n \n /**\ndiff --git a/drivers/net/dpaa2/mc/fsl_dpdmux_cmd.h b/drivers/net/dpaa2/mc/fsl_dpdmux_cmd.h\nindex a60b2ebe3c..b6b8c38c41 100644\n--- a/drivers/net/dpaa2/mc/fsl_dpdmux_cmd.h\n+++ b/drivers/net/dpaa2/mc/fsl_dpdmux_cmd.h\n@@ -1,7 +1,7 @@\n /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)\n  *\n  * Copyright 2013-2016 Freescale Semiconductor Inc.\n- * Copyright 2018-2019 NXP\n+ * Copyright 2018-2021 NXP\n  *\n  */\n #ifndef _FSL_DPDMUX_CMD_H\n@@ -204,7 +204,7 @@ struct dpdmux_set_custom_key {\n struct dpdmux_cmd_add_custom_cls_entry {\n \tuint8_t pad[3];\n \tuint8_t key_size;\n-\tuint16_t pad1;\n+\tuint16_t entry_index;\n \tuint16_t dest_if;\n \tuint64_t key_iova;\n \tuint64_t mask_iova;\n",
    "prefixes": [
        "v2",
        "10/20"
    ]
}