get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 50750,
    "url": "http://patches.dpdk.org/api/patches/50750/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190302104251.32565-5-hyonkim@cisco.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": "<20190302104251.32565-5-hyonkim@cisco.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190302104251.32565-5-hyonkim@cisco.com",
    "date": "2019-03-02T10:42:42",
    "name": "[v2,04/13] net/enic: allow flow mark ID 0",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "99d561b6a8e6dfbd58e7aad9c7a1474c4aea4fa0",
    "submitter": {
        "id": 948,
        "url": "http://patches.dpdk.org/api/people/948/?format=api",
        "name": "Hyong Youb Kim (hyonkim)",
        "email": "hyonkim@cisco.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/20190302104251.32565-5-hyonkim@cisco.com/mbox/",
    "series": [
        {
            "id": 3613,
            "url": "http://patches.dpdk.org/api/series/3613/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=3613",
            "date": "2019-03-02T10:42:38",
            "name": "net/enic: 19.05 updates",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/3613/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/50750/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/50750/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 7A026375B;\n\tSat,  2 Mar 2019 11:43:59 +0100 (CET)",
            "from rcdn-iport-4.cisco.com (rcdn-iport-4.cisco.com [173.37.86.75])\n\tby dpdk.org (Postfix) with ESMTP id 3F9A0375B;\n\tSat,  2 Mar 2019 11:43:58 +0100 (CET)",
            "from alln-core-1.cisco.com ([173.36.13.131])\n\tby rcdn-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t02 Mar 2019 10:43:57 +0000",
            "from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48])\n\tby alln-core-1.cisco.com (8.15.2/8.15.2) with ESMTP id x22Ahumr023815;\n\tSat, 2 Mar 2019 10:43:57 GMT",
            "by cisco.com (Postfix, from userid 508933)\n\tid B302820F2001; Sat,  2 Mar 2019 02:43:56 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n\td=cisco.com; i=@cisco.com; l=3855; q=dns/txt; s=iport;\n\tt=1551523438; x=1552733038;\n\th=from:to:cc:subject:date:message-id:in-reply-to: references;\n\tbh=oW+WxYGZR2hUXHovCh9j0aRvtGliRCDBL443/th/37o=;\n\tb=mjDO7RoPs1h3if14GJHXbml00+eATouQC7cR6tmQt+tWDhAK7NmphctU\n\tKLpfdVwbzvPSDvhO02ZkXrix/7OCrmXkRoLlcYThlpw73VUYvDMr8knMi\n\tpWfjlSXjiGtkXKXINB9wj0bwtKywgXfT9SHURkFEmoAXSU9LpiKNE4nNy E=;",
        "X-IronPort-AV": "E=Sophos;i=\"5.58,431,1544486400\"; d=\"scan'208\";a=\"527328136\"",
        "From": "Hyong Youb Kim <hyonkim@cisco.com>",
        "To": "Ferruh Yigit <ferruh.yigit@intel.com>",
        "Cc": "dev@dpdk.org, John Daley <johndale@cisco.com>,\n\tHyong Youb Kim <hyonkim@cisco.com>, stable@dpdk.org",
        "Date": "Sat,  2 Mar 2019 02:42:42 -0800",
        "Message-Id": "<20190302104251.32565-5-hyonkim@cisco.com>",
        "X-Mailer": "git-send-email 2.16.2",
        "In-Reply-To": "<20190302104251.32565-1-hyonkim@cisco.com>",
        "References": "<20190302104251.32565-1-hyonkim@cisco.com>",
        "X-Outbound-SMTP-Client": "10.193.184.48, savbu-usnic-a.cisco.com",
        "X-Outbound-Node": "alln-core-1.cisco.com",
        "Subject": "[dpdk-dev] [PATCH v2 04/13] net/enic: allow flow mark ID 0",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "The driver currently accepts mark ID 0 but does not report it in\nmatching packet's mbuf. For example, the following testpmd command\nsucceeds. But, the mbuf of a matching IPv4 UDP packet does not have\nPKT_RX_FDIR_ID set.\n\nflow create 0 ingress pattern ... actions mark id 0 / queue index 0 / end\n\nThe problem has to do with mapping mark IDs (32-bit) to NIC filter\nIDs. Filter ID is currently 16-bit, so values greater than 0xffff are\nrejected. The firmware reserves filter ID 0 for filters that do not\nmark (e.g. steer w/o mark). And, the driver reserves 0xffff for the\nflag action. This leaves 1...0xfffe for app use.\n\nIt is possible to simply reject mark ID 0 as unsupported. But, 0 is\ncommonly used (e.g. OVS-DPDK and VPP). So, when adding a filter, set\nfilter ID = mark ID + 1 to support mark ID 0. The receive handler\nsubtracts 1 from filter ID to get back the original mark ID.\n\nFixes: dfbd6a9cb504 (\"net/enic: extend flow director support for 1300 series\")\nCc: stable@dpdk.org\n\nSigned-off-by: Hyong Youb Kim <hyonkim@cisco.com>\nReviewed-by: John Daley <johndale@cisco.com>\n---\n doc/guides/nics/enic.rst            |  1 +\n drivers/net/enic/enic_flow.c        | 15 +++++++++++----\n drivers/net/enic/enic_rxtx_common.h |  3 ++-\n 3 files changed, 14 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/doc/guides/nics/enic.rst b/doc/guides/nics/enic.rst\nindex bc38f51aa..e456e6c2d 100644\n--- a/doc/guides/nics/enic.rst\n+++ b/doc/guides/nics/enic.rst\n@@ -450,6 +450,7 @@ PKT_RX_VLAN_STRIPPED mbuf flags would not be set. This mode is enabled with the\n     1000 for 1300 series VICs). Filters are checked for matching in the order they\n     were added. Since there currently is no grouping or priority support,\n     'catch-all' filters should be added last.\n+  - The supported range of IDs for the 'MARK' action is 0 - 0xFFFD.\n \n - **Statistics**\n \ndiff --git a/drivers/net/enic/enic_flow.c b/drivers/net/enic/enic_flow.c\nindex 55d8d50a1..e12a6ec73 100644\n--- a/drivers/net/enic/enic_flow.c\n+++ b/drivers/net/enic/enic_flow.c\n@@ -1081,12 +1081,18 @@ enic_copy_action_v2(const struct rte_flow_action actions[],\n \t\t\tif (overlap & MARK)\n \t\t\t\treturn ENOTSUP;\n \t\t\toverlap |= MARK;\n-\t\t\t/* ENIC_MAGIC_FILTER_ID is reserved and is the highest\n-\t\t\t * in the range of allows mark ids.\n+\t\t\t/*\n+\t\t\t * Map mark ID (32-bit) to filter ID (16-bit):\n+\t\t\t * - Reject values > 16 bits\n+\t\t\t * - Filter ID 0 is reserved for filters that steer\n+\t\t\t *   but not mark. So add 1 to the mark ID to avoid\n+\t\t\t *   using 0.\n+\t\t\t * - Filter ID (ENIC_MAGIC_FILTER_ID = 0xffff) is\n+\t\t\t *   reserved for the \"flag\" action below.\n \t\t\t */\n-\t\t\tif (mark->id >= ENIC_MAGIC_FILTER_ID)\n+\t\t\tif (mark->id >= ENIC_MAGIC_FILTER_ID - 1)\n \t\t\t\treturn EINVAL;\n-\t\t\tenic_action->filter_id = mark->id;\n+\t\t\tenic_action->filter_id = mark->id + 1;\n \t\t\tenic_action->flags |= FILTER_ACTION_FILTER_ID_FLAG;\n \t\t\tbreak;\n \t\t}\n@@ -1094,6 +1100,7 @@ enic_copy_action_v2(const struct rte_flow_action actions[],\n \t\t\tif (overlap & MARK)\n \t\t\t\treturn ENOTSUP;\n \t\t\toverlap |= MARK;\n+\t\t\t/* ENIC_MAGIC_FILTER_ID is reserved for flagging */\n \t\t\tenic_action->filter_id = ENIC_MAGIC_FILTER_ID;\n \t\t\tenic_action->flags |= FILTER_ACTION_FILTER_ID_FLAG;\n \t\t\tbreak;\ndiff --git a/drivers/net/enic/enic_rxtx_common.h b/drivers/net/enic/enic_rxtx_common.h\nindex bfbb4909e..66f631dfe 100644\n--- a/drivers/net/enic/enic_rxtx_common.h\n+++ b/drivers/net/enic/enic_rxtx_common.h\n@@ -226,7 +226,8 @@ enic_cq_rx_to_pkt_flags(struct cq_desc *cqd, struct rte_mbuf *mbuf)\n \t\tif (filter_id) {\n \t\t\tpkt_flags |= PKT_RX_FDIR;\n \t\t\tif (filter_id != ENIC_MAGIC_FILTER_ID) {\n-\t\t\t\tmbuf->hash.fdir.hi = clsf_cqd->filter_id;\n+\t\t\t\t/* filter_id = mark id + 1, so subtract 1 */\n+\t\t\t\tmbuf->hash.fdir.hi = filter_id - 1;\n \t\t\t\tpkt_flags |= PKT_RX_FDIR_ID;\n \t\t\t}\n \t\t}\n",
    "prefixes": [
        "v2",
        "04/13"
    ]
}