get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 72919,
    "url": "https://patches.dpdk.org/api/patches/72919/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200703022351.17172-2-hyonkim@cisco.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": "<20200703022351.17172-2-hyonkim@cisco.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200703022351.17172-2-hyonkim@cisco.com",
    "date": "2020-07-03T02:23:50",
    "name": "[1/2] net/enic: support VLAN push and pop flow actions",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "3aecf31f651489c373b8ce31027e566143be0c35",
    "submitter": {
        "id": 948,
        "url": "https://patches.dpdk.org/api/people/948/?format=api",
        "name": "Hyong Youb Kim (hyonkim)",
        "email": "hyonkim@cisco.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/20200703022351.17172-2-hyonkim@cisco.com/mbox/",
    "series": [
        {
            "id": 10752,
            "url": "https://patches.dpdk.org/api/series/10752/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=10752",
            "date": "2020-07-03T02:23:49",
            "name": "net/enic: minor flow manager changes",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/10752/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/72919/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/72919/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 42BDBA0519;\n\tFri,  3 Jul 2020 04:24:18 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 27BC81D8F4;\n\tFri,  3 Jul 2020 04:24:18 +0200 (CEST)",
            "from rcdn-iport-3.cisco.com (rcdn-iport-3.cisco.com [173.37.86.74])\n by dpdk.org (Postfix) with ESMTP id 7BA8B1D69F\n for <dev@dpdk.org>; Fri,  3 Jul 2020 04:24:16 +0200 (CEST)",
            "from rcdn-core-10.cisco.com ([173.37.93.146])\n by rcdn-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA;\n 03 Jul 2020 02:24:16 +0000",
            "from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48])\n by rcdn-core-10.cisco.com (8.15.2/8.15.2) with ESMTP id 0632OFpL028923;\n Fri, 3 Jul 2020 02:24:15 GMT",
            "by cisco.com (Postfix, from userid 508933)\n id 790A220F2005; Thu,  2 Jul 2020 19:24:15 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=cisco.com; i=@cisco.com; l=4255; q=dns/txt; s=iport;\n t=1593743056; x=1594952656;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=A3gL6V1BujUt9LMSmFQKjcA/ob7+mEp7GnBdzjluuX4=;\n b=UGBakyJF7CO26wTFBHmYhW5mSc+ItVXvOwzcJTIwsIejSU9F5EyseK5g\n LCScKbMwUDlkd0DJN1Fg0GdojGEKg1dxxzvns9LO3gNFueLt2hxDoB0cO\n /UGVTYnfhYOJ87EzNXB+LR1Qt1WsXhhLjiSs+iGDetiUmkzlcyonAts6e c=;",
        "X-IronPort-AV": "E=Sophos;i=\"5.75,306,1589241600\"; d=\"scan'208\";a=\"776789541\"",
        "From": "Hyong Youb Kim <hyonkim@cisco.com>",
        "To": "Ferruh Yigit <ferruh.yigit@intel.com>",
        "Cc": "dev@dpdk.org, Hyong Youb Kim <hyonkim@cisco.com>,\n John Daley <johndale@cisco.com>",
        "Date": "Thu,  2 Jul 2020 19:23:50 -0700",
        "Message-Id": "<20200703022351.17172-2-hyonkim@cisco.com>",
        "X-Mailer": "git-send-email 2.26.2",
        "In-Reply-To": "<20200703022351.17172-1-hyonkim@cisco.com>",
        "References": "<20200703022351.17172-1-hyonkim@cisco.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Outbound-SMTP-Client": "10.193.184.48, savbu-usnic-a.cisco.com",
        "X-Outbound-Node": "rcdn-core-10.cisco.com",
        "Subject": "[dpdk-dev] [PATCH 1/2] net/enic: support VLAN push and pop flow\n\tactions",
        "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": "Flow manager API includes push/pop actions, so support corresponding\nDPDK flow actions.\n\nSigned-off-by: Hyong Youb Kim <hyonkim@cisco.com>\nReviewed-by: John Daley <johndale@cisco.com>\n---\n doc/guides/rel_notes/release_20_08.rst |  3 ++\n drivers/net/enic/enic_fm_flow.c        | 61 ++++++++++++++++++++++++++\n 2 files changed, 64 insertions(+)",
    "diff": "diff --git a/doc/guides/rel_notes/release_20_08.rst b/doc/guides/rel_notes/release_20_08.rst\nindex ccda17fb6a..b394381961 100644\n--- a/doc/guides/rel_notes/release_20_08.rst\n+++ b/doc/guides/rel_notes/release_20_08.rst\n@@ -91,6 +91,9 @@ New Features\n   which are used to access packet data in a safe manner. Currently JIT support\n   for these instructions is implemented for x86 only.\n \n+* **Updated Cisco enic driver.**\n+\n+  * Added support for VLAN push and pop flow actions.\n \n Removed Items\n -------------\ndiff --git a/drivers/net/enic/enic_fm_flow.c b/drivers/net/enic/enic_fm_flow.c\nindex 6ee0224372..10e5bb3d29 100644\n--- a/drivers/net/enic/enic_fm_flow.c\n+++ b/drivers/net/enic/enic_fm_flow.c\n@@ -193,6 +193,7 @@ static const enum rte_flow_action_type enic_fm_supported_ig_actions[] = {\n \tRTE_FLOW_ACTION_TYPE_FLAG,\n \tRTE_FLOW_ACTION_TYPE_JUMP,\n \tRTE_FLOW_ACTION_TYPE_MARK,\n+\tRTE_FLOW_ACTION_TYPE_OF_POP_VLAN,\n \tRTE_FLOW_ACTION_TYPE_PORT_ID,\n \tRTE_FLOW_ACTION_TYPE_PASSTHRU,\n \tRTE_FLOW_ACTION_TYPE_QUEUE,\n@@ -208,6 +209,9 @@ static const enum rte_flow_action_type enic_fm_supported_eg_actions[] = {\n \tRTE_FLOW_ACTION_TYPE_COUNT,\n \tRTE_FLOW_ACTION_TYPE_DROP,\n \tRTE_FLOW_ACTION_TYPE_JUMP,\n+\tRTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN,\n+\tRTE_FLOW_ACTION_TYPE_OF_SET_VLAN_PCP,\n+\tRTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID,\n \tRTE_FLOW_ACTION_TYPE_PASSTHRU,\n \tRTE_FLOW_ACTION_TYPE_VOID,\n \tRTE_FLOW_ACTION_TYPE_VXLAN_ENCAP,\n@@ -1090,17 +1094,22 @@ enic_fm_copy_action(struct enic_flowman *fm,\n \t\tPASSTHRU = 1 << 2,\n \t\tCOUNT = 1 << 3,\n \t\tENCAP = 1 << 4,\n+\t\tPUSH_VLAN = 1 << 5,\n \t};\n \tstruct fm_tcam_match_entry *fmt;\n \tstruct fm_action_op fm_op;\n+\tbool need_ovlan_action;\n \tstruct enic *enic;\n \tuint32_t overlap;\n \tuint64_t vnic_h;\n+\tuint16_t ovlan;\n \tbool first_rq;\n \tint ret;\n \n \tENICPMD_FUNC_TRACE();\n \tfmt = &fm->tcam_entry;\n+\tneed_ovlan_action = false;\n+\tovlan = 0;\n \tfirst_rq = true;\n \tenic = fm->enic;\n \toverlap = 0;\n@@ -1307,6 +1316,50 @@ enic_fm_copy_action(struct enic_flowman *fm,\n \t\t\t\treturn ret;\n \t\t\tbreak;\n \t\t}\n+\t\tcase RTE_FLOW_ACTION_TYPE_OF_POP_VLAN: {\n+\t\t\tmemset(&fm_op, 0, sizeof(fm_op));\n+\t\t\tfm_op.fa_op = FMOP_POP_VLAN;\n+\t\t\tret = enic_fm_append_action_op(fm, &fm_op, error);\n+\t\t\tif (ret)\n+\t\t\t\treturn ret;\n+\t\t\tbreak;\n+\t\t}\n+\t\tcase RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN: {\n+\t\t\tconst struct rte_flow_action_of_push_vlan *vlan;\n+\n+\t\t\tif (overlap & PASSTHRU)\n+\t\t\t\tgoto unsupported;\n+\t\t\tvlan = actions->conf;\n+\t\t\tif (vlan->ethertype != RTE_BE16(RTE_ETHER_TYPE_VLAN)) {\n+\t\t\t\treturn rte_flow_error_set(error, EINVAL,\n+\t\t\t\t\tRTE_FLOW_ERROR_TYPE_ACTION,\n+\t\t\t\t\tNULL, \"unexpected push_vlan ethertype\");\n+\t\t\t}\n+\t\t\toverlap |= PUSH_VLAN;\n+\t\t\tneed_ovlan_action = true;\n+\t\t\tbreak;\n+\t\t}\n+\t\tcase RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_PCP: {\n+\t\t\tconst struct rte_flow_action_of_set_vlan_pcp *pcp;\n+\n+\t\t\tpcp = actions->conf;\n+\t\t\tif (pcp->vlan_pcp > 7) {\n+\t\t\t\treturn rte_flow_error_set(error, EINVAL,\n+\t\t\t\t\tRTE_FLOW_ERROR_TYPE_ACTION,\n+\t\t\t\t\tNULL, \"invalid vlan_pcp\");\n+\t\t\t}\n+\t\t\tneed_ovlan_action = true;\n+\t\t\tovlan |= ((uint16_t)pcp->vlan_pcp) << 13;\n+\t\t\tbreak;\n+\t\t}\n+\t\tcase RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID: {\n+\t\t\tconst struct rte_flow_action_of_set_vlan_vid *vid;\n+\n+\t\t\tvid = actions->conf;\n+\t\t\tneed_ovlan_action = true;\n+\t\t\tovlan |= rte_be_to_cpu_16(vid->vlan_vid);\n+\t\t\tbreak;\n+\t\t}\n \t\tdefault:\n \t\t\tgoto unsupported;\n \t\t}\n@@ -1314,6 +1367,14 @@ enic_fm_copy_action(struct enic_flowman *fm,\n \n \tif (!(overlap & (FATE | PASSTHRU | COUNT)))\n \t\tgoto unsupported;\n+\tif (need_ovlan_action) {\n+\t\tmemset(&fm_op, 0, sizeof(fm_op));\n+\t\tfm_op.fa_op = FMOP_SET_OVLAN;\n+\t\tfm_op.ovlan.vlan = ovlan;\n+\t\tret = enic_fm_append_action_op(fm, &fm_op, error);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\t}\n \tmemset(&fm_op, 0, sizeof(fm_op));\n \tfm_op.fa_op = FMOP_END;\n \tret = enic_fm_append_action_op(fm, &fm_op, error);\n",
    "prefixes": [
        "1/2"
    ]
}