get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 817144,
    "url": "http://patchwork.ozlabs.org/api/patches/817144/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/0ebc997552ff5db738087771cdab1f89209e53a3.1506015856.git.rahul.lakkireddy@chelsio.com/",
    "project": {
        "id": 7,
        "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api",
        "name": "Linux network development",
        "link_name": "netdev",
        "list_id": "netdev.vger.kernel.org",
        "list_email": "netdev@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<0ebc997552ff5db738087771cdab1f89209e53a3.1506015856.git.rahul.lakkireddy@chelsio.com>",
    "list_archive_url": null,
    "date": "2017-09-21T18:11:15",
    "name": "[net-next,v2,3/4] cxgb4: add support to offload action vlan",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "15eaf96fb8611f65ecc420c101deb54612fa1402",
    "submitter": {
        "id": 69728,
        "url": "http://patchwork.ozlabs.org/api/people/69728/?format=api",
        "name": "Rahul Lakkireddy",
        "email": "rahul.lakkireddy@chelsio.com"
    },
    "delegate": {
        "id": 34,
        "url": "http://patchwork.ozlabs.org/api/users/34/?format=api",
        "username": "davem",
        "first_name": "David",
        "last_name": "Miller",
        "email": "davem@davemloft.net"
    },
    "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/0ebc997552ff5db738087771cdab1f89209e53a3.1506015856.git.rahul.lakkireddy@chelsio.com/mbox/",
    "series": [
        {
            "id": 4462,
            "url": "http://patchwork.ozlabs.org/api/series/4462/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=4462",
            "date": "2017-09-21T18:11:12",
            "name": "cxgb4: add support to offload tc flower",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/4462/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/817144/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/817144/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<netdev-owner@vger.kernel.org>",
        "X-Original-To": "patchwork-incoming@ozlabs.org",
        "Delivered-To": "patchwork-incoming@ozlabs.org",
        "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)",
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xyl7g5JGwz9t3Z\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 22 Sep 2017 04:12:15 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751743AbdIUSMO (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tThu, 21 Sep 2017 14:12:14 -0400",
            "from stargate.chelsio.com ([12.32.117.8]:47813 \"EHLO\n\tstargate.chelsio.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751726AbdIUSML (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Thu, 21 Sep 2017 14:12:11 -0400",
            "from localhost (scalar.blr.asicdesigners.com [10.193.185.94])\n\tby stargate.chelsio.com (8.13.8/8.13.8) with ESMTP id v8LIC8WN006891; \n\tThu, 21 Sep 2017 11:12:09 -0700"
        ],
        "From": "Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>",
        "To": "netdev@vger.kernel.org",
        "Cc": "davem@davemloft.net, kumaras@chelsio.com, ganeshgr@chelsio.com,\n\tnirranjan@chelsio.com, indranil@chelsio.com,\n\tRahul Lakkireddy <rahul.lakkireddy@chelsio.com>",
        "Subject": "[PATCH net-next v2 3/4] cxgb4: add support to offload action vlan",
        "Date": "Thu, 21 Sep 2017 23:41:15 +0530",
        "Message-Id": "<0ebc997552ff5db738087771cdab1f89209e53a3.1506015856.git.rahul.lakkireddy@chelsio.com>",
        "X-Mailer": "git-send-email 2.5.3",
        "In-Reply-To": [
            "<cover.1506015856.git.rahul.lakkireddy@chelsio.com>",
            "<cover.1506015856.git.rahul.lakkireddy@chelsio.com>"
        ],
        "References": [
            "<cover.1506015856.git.rahul.lakkireddy@chelsio.com>",
            "<cover.1506015856.git.rahul.lakkireddy@chelsio.com>"
        ],
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "From: Kumar Sanghvi <kumaras@chelsio.com>\n\nAdd support for offloading tc-flower flows having\nvlan actions: pop, push and modify.\n\nSigned-off-by: Kumar Sanghvi <kumaras@chelsio.com>\nSigned-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>\nSigned-off-by: Ganesh Goudar <ganeshgr@chelsio.com>\n---\nv2:\n- Avoid wrapping line for netdev_err message. Also, use\n  consistent error message string.\n\n .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c   | 42 ++++++++++++++++++++++\n 1 file changed, 42 insertions(+)",
    "diff": "diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c\nindex dda34d5a52fb..e42d2efc9ea2 100644\n--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c\n+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c\n@@ -34,6 +34,7 @@\n \n #include <net/tc_act/tc_gact.h>\n #include <net/tc_act/tc_mirred.h>\n+#include <net/tc_act/tc_vlan.h>\n \n #include \"cxgb4.h\"\n #include \"cxgb4_tc_flower.h\"\n@@ -185,6 +186,27 @@ static void cxgb4_process_flow_actions(struct net_device *in,\n \n \t\t\tfs->action = FILTER_SWITCH;\n \t\t\tfs->eport = pi->port_id;\n+\t\t} else if (is_tcf_vlan(a)) {\n+\t\t\tu32 vlan_action = tcf_vlan_action(a);\n+\t\t\tu8 prio = tcf_vlan_push_prio(a);\n+\t\t\tu16 vid = tcf_vlan_push_vid(a);\n+\t\t\tu16 vlan_tci = (prio << VLAN_PRIO_SHIFT) | vid;\n+\n+\t\t\tswitch (vlan_action) {\n+\t\t\tcase TCA_VLAN_ACT_POP:\n+\t\t\t\tfs->newvlan |= VLAN_REMOVE;\n+\t\t\t\tbreak;\n+\t\t\tcase TCA_VLAN_ACT_PUSH:\n+\t\t\t\tfs->newvlan |= VLAN_INSERT;\n+\t\t\t\tfs->vlan = vlan_tci;\n+\t\t\t\tbreak;\n+\t\t\tcase TCA_VLAN_ACT_MODIFY:\n+\t\t\t\tfs->newvlan |= VLAN_REWRITE;\n+\t\t\t\tfs->vlan = vlan_tci;\n+\t\t\t\tbreak;\n+\t\t\tdefault:\n+\t\t\t\tbreak;\n+\t\t\t}\n \t\t}\n \t}\n }\n@@ -222,6 +244,26 @@ static int cxgb4_validate_flow_actions(struct net_device *dev,\n \t\t\t\t\t   __func__);\n \t\t\t\treturn -EINVAL;\n \t\t\t}\n+\t\t} else if (is_tcf_vlan(a)) {\n+\t\t\tu16 proto = be16_to_cpu(tcf_vlan_push_proto(a));\n+\t\t\tu32 vlan_action = tcf_vlan_action(a);\n+\n+\t\t\tswitch (vlan_action) {\n+\t\t\tcase TCA_VLAN_ACT_POP:\n+\t\t\t\tbreak;\n+\t\t\tcase TCA_VLAN_ACT_PUSH:\n+\t\t\tcase TCA_VLAN_ACT_MODIFY:\n+\t\t\t\tif (proto != ETH_P_8021Q) {\n+\t\t\t\t\tnetdev_err(dev, \"%s: Unsupported vlan proto\\n\",\n+\t\t\t\t\t\t   __func__);\n+\t\t\t\t\treturn -EOPNOTSUPP;\n+\t\t\t\t}\n+\t\t\t\tbreak;\n+\t\t\tdefault:\n+\t\t\t\tnetdev_err(dev, \"%s: Unsupported vlan action\\n\",\n+\t\t\t\t\t   __func__);\n+\t\t\t\treturn -EOPNOTSUPP;\n+\t\t\t}\n \t\t} else {\n \t\t\tnetdev_err(dev, \"%s: Unsupported action\\n\", __func__);\n \t\t\treturn -EOPNOTSUPP;\n",
    "prefixes": [
        "net-next",
        "v2",
        "3/4"
    ]
}