get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 73870,
    "url": "http://patchwork.dpdk.org/api/patches/73870/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20200713061600.19456-9-somnath.kotur@broadcom.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20200713061600.19456-9-somnath.kotur@broadcom.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200713061600.19456-9-somnath.kotur@broadcom.com",
    "date": "2020-07-13T06:15:58",
    "name": "[08/10] net/bnxt: consider vlan fields for the template match criteria",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2ddcc285d96831300ef72c7b2794271fbba6de6d",
    "submitter": {
        "id": 908,
        "url": "http://patchwork.dpdk.org/api/people/908/?format=api",
        "name": "Somnath Kotur",
        "email": "somnath.kotur@broadcom.com"
    },
    "delegate": {
        "id": 1766,
        "url": "http://patchwork.dpdk.org/api/users/1766/?format=api",
        "username": "ajitkhaparde",
        "first_name": "Ajit",
        "last_name": "Khaparde",
        "email": "ajit.khaparde@broadcom.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20200713061600.19456-9-somnath.kotur@broadcom.com/mbox/",
    "series": [
        {
            "id": 10976,
            "url": "http://patchwork.dpdk.org/api/series/10976/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=10976",
            "date": "2020-07-13T06:15:50",
            "name": "bnxt patches",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/10976/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/73870/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/73870/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 40E74A0540;\n\tMon, 13 Jul 2020 08:22:50 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id DD5951D178;\n\tMon, 13 Jul 2020 08:21:24 +0200 (CEST)",
            "from relay.smtp.broadcom.com (unknown [192.19.211.62])\n by dpdk.org (Postfix) with ESMTP id 13FC51C1BC\n for <dev@dpdk.org>; Mon, 13 Jul 2020 08:21:12 +0200 (CEST)",
            "from dhcp-10-123-153-55.dhcp.broadcom.net\n (dhcp-10-123-153-55.dhcp.broadcom.net [10.123.153.55])\n by relay.smtp.broadcom.com (Postfix) with ESMTP id 3ABFF29C684;\n Sun, 12 Jul 2020 23:21:11 -0700 (PDT)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com 3ABFF29C684",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com;\n s=dkimrelay; t=1594621271;\n bh=GlDtDZ62mxhuu6ruIXtCzzF0ZFBPvDovk0w2gqNmRYI=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=g0y0CtjS7ogZqA/KBnyre5W/u26hoBEhxwPvB9A6BwFJ9BR11HXuFA+TdVJUdSRW3\n yJr/5ETuajaxEpMW/K1gxZw3ylZl2qGIPplOLirR8UDjcAd328xwLprLRmO1q+eC/b\n /ctf3LCOVLb8mc08/dasu8tkTQhBCgeH0wtePj0Y=",
        "From": "Somnath Kotur <somnath.kotur@broadcom.com>",
        "To": "dev@dpdk.org",
        "Cc": "ferruh.yigit@intel.com",
        "Date": "Mon, 13 Jul 2020 11:45:58 +0530",
        "Message-Id": "<20200713061600.19456-9-somnath.kotur@broadcom.com>",
        "X-Mailer": "git-send-email 2.10.1.613.g2cc2e70",
        "In-Reply-To": "<20200713061600.19456-1-somnath.kotur@broadcom.com>",
        "References": "<20200713061600.19456-1-somnath.kotur@broadcom.com>",
        "Subject": "[dpdk-dev] [PATCH 08/10] net/bnxt: consider vlan fields for the\n\ttemplate match criteria",
        "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": "From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>\n\nThe vlan mask fields were not setting the field bitmap causing\nthe template match process to ignore vlan fields. This change fixes\nthis bug.\n\nSigned-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>\nReviewed-by: Michael Baucom <michael.baucom@broadcom.com>\nSigned-off-by: Somnath Kotur <somnath.kotur@broadcom.com>\n---\n drivers/net/bnxt/tf_ulp/ulp_mapper.c     |  7 +++----\n drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 34 +++++++++++++++++++++++---------\n 2 files changed, 28 insertions(+), 13 deletions(-)",
    "diff": "diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.c b/drivers/net/bnxt/tf_ulp/ulp_mapper.c\nindex 157c451..051a095 100644\n--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.c\n+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.c\n@@ -16,6 +16,7 @@\n #include \"ulp_mark_mgr.h\"\n #include \"ulp_flow_db.h\"\n #include \"ulp_mapper.h\"\n+#include \"tf_util.h\"\n \n static struct bnxt_ulp_glb_resource_info *\n ulp_mapper_glb_resource_info_list_get(uint32_t *num_entries)\n@@ -719,15 +720,13 @@ ulp_mapper_ident_extract(struct bnxt_ulp_mapper_parms *parms,\n \t/* Search identifier also increase the reference count */\n \trc = tf_search_identifier(tfp, &sparms);\n \tif (rc) {\n-\t\tBNXT_TF_DBG(ERR, \"Search ident %s:%s:%x failed.\\n\",\n+\t\tBNXT_TF_DBG(ERR, \"Search ident %s:%x failed.\\n\",\n \t\t\t    tf_dir_2_str(sparms.dir),\n-\t\t\t    tf_tbl_type_2_str(sparms.ident_type),\n \t\t\t    sparms.search_id);\n \t\treturn rc;\n \t}\n-\tBNXT_TF_INF(\"Search ident %s:%s:%x.success.\\n\",\n+\tBNXT_TF_DBG(INFO, \"Search ident %s:%x.success.\\n\",\n \t\t    tf_dir_2_str(sparms.dir),\n-\t\t    tf_tbl_type_2_str(sparms.ident_type),\n \t\t    sparms.search_id);\n \n \t/* Write it to the regfile */\ndiff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c\nindex c9237b4..b63a454 100644\n--- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c\n+++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c\n@@ -12,6 +12,11 @@\n #include \"tfp.h\"\n #include \"ulp_port_db.h\"\n \n+/* Local defines for the parsing functions */\n+#define ULP_VLAN_PRIORITY_SHIFT\t\t13 /* First 3 bits */\n+#define ULP_VLAN_PRIORITY_MASK\t\t0x700\n+#define ULP_VLAN_TAG_MASK\t\t0xFFF /* Last 12 bits*/\n+\n /* Utility function to skip the void items. */\n static inline int32_t\n ulp_rte_item_skip_void(const struct rte_flow_item **item, uint32_t increment)\n@@ -545,8 +550,8 @@ ulp_rte_vlan_hdr_handler(const struct rte_flow_item *item,\n \t */\n \tif (vlan_spec) {\n \t\tvlan_tag = ntohs(vlan_spec->tci);\n-\t\tpriority = htons(vlan_tag >> 13);\n-\t\tvlan_tag &= 0xfff;\n+\t\tpriority = htons(vlan_tag >> ULP_VLAN_PRIORITY_SHIFT);\n+\t\tvlan_tag &= ULP_VLAN_TAG_MASK;\n \t\tvlan_tag = htons(vlan_tag);\n \n \t\tfield = ulp_rte_parser_fld_copy(&params->hdr_field[idx],\n@@ -562,16 +567,27 @@ ulp_rte_vlan_hdr_handler(const struct rte_flow_item *item,\n \n \tif (vlan_mask) {\n \t\tvlan_tag = ntohs(vlan_mask->tci);\n-\t\tpriority = htons(vlan_tag >> 13);\n+\t\tpriority = htons(vlan_tag >> ULP_VLAN_PRIORITY_SHIFT);\n \t\tvlan_tag &= 0xfff;\n+\n+\t\t/*\n+\t\t * the storage for priority and vlan tag is 2 bytes\n+\t\t * The mask of priority which is 3 bits if it is all 1's\n+\t\t * then make the rest bits 13 bits as 1's\n+\t\t * so that it is matched as exact match.\n+\t\t */\n+\t\tif (priority == ULP_VLAN_PRIORITY_MASK)\n+\t\t\tpriority |= ~ULP_VLAN_PRIORITY_MASK;\n+\t\tif (vlan_tag == ULP_VLAN_TAG_MASK)\n+\t\t\tvlan_tag |= ~ULP_VLAN_TAG_MASK;\n \t\tvlan_tag = htons(vlan_tag);\n \n-\t\tfield = &params->hdr_field[idx];\n-\t\tmemcpy(field->mask, &priority, field->size);\n-\t\tfield++;\n-\t\tmemcpy(field->mask, &vlan_tag, field->size);\n-\t\tfield++;\n-\t\tmemcpy(field->mask, &vlan_mask->inner_type, field->size);\n+\t\tulp_rte_prsr_mask_copy(params, &idx, &priority,\n+\t\t\t\t       sizeof(priority));\n+\t\tulp_rte_prsr_mask_copy(params, &idx, &vlan_tag,\n+\t\t\t\t       sizeof(vlan_tag));\n+\t\tulp_rte_prsr_mask_copy(params, &idx, &vlan_mask->inner_type,\n+\t\t\t\t       sizeof(vlan_mask->inner_type));\n \t}\n \t/* Set the vlan index to new incremented value */\n \tparams->vlan_idx += BNXT_ULP_PROTO_HDR_S_VLAN_NUM;\n",
    "prefixes": [
        "08/10"
    ]
}