get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 808245,
    "url": "http://patchwork.ozlabs.org/api/patches/808245/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/1504186749-8926-6-git-send-email-lipeng321@huawei.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": "<1504186749-8926-6-git-send-email-lipeng321@huawei.com>",
    "list_archive_url": null,
    "date": "2017-08-31T13:39:06",
    "name": "[net-next,5/8] net: hns3: set the VLAN Ethernet type to HW",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "350b9d1ced98cd326ec41dad73a7e7cf386410ee",
    "submitter": {
        "id": 71468,
        "url": "http://patchwork.ozlabs.org/api/people/71468/?format=api",
        "name": "lipeng (Y)",
        "email": "lipeng321@huawei.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/1504186749-8926-6-git-send-email-lipeng321@huawei.com/mbox/",
    "series": [
        {
            "id": 823,
            "url": "http://patchwork.ozlabs.org/api/series/823/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=823",
            "date": "2017-08-31T13:39:02",
            "name": "Bug fixes & Code improvements in HNS driver",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/823/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/808245/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/808245/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 3xjjXS60jyz9sMN\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 23:15:04 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751650AbdHaNOv (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tThu, 31 Aug 2017 09:14:51 -0400",
            "from szxga05-in.huawei.com ([45.249.212.191]:5069 \"EHLO\n\tszxga05-in.huawei.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751034AbdHaNLY (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Thu, 31 Aug 2017 09:11:24 -0400",
            "from 172.30.72.60 (EHLO DGGEMS404-HUB.china.huawei.com)\n\t([172.30.72.60])\n\tby dggrg05-dlp.huawei.com (MOS 4.4.6-GA FastPath queued)\n\twith ESMTP id DGI62427; Thu, 31 Aug 2017 21:11:21 +0800 (CST)",
            "from linux-ioko.site (10.71.200.31) by\n\tDGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP\n\tServer id 14.3.301.0; Thu, 31 Aug 2017 21:11:10 +0800"
        ],
        "From": "Lipeng <lipeng321@huawei.com>",
        "To": "<davem@davemloft.net>",
        "CC": "<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,\n\t<linuxarm@huawei.com>, <yisen.zhuang@huawei.com>,\n\t<salil.mehta@huawei.com>, <lipeng321@huawei.com>",
        "Subject": "[PATCH net-next 5/8] net: hns3: set the VLAN Ethernet type to HW",
        "Date": "Thu, 31 Aug 2017 21:39:06 +0800",
        "Message-ID": "<1504186749-8926-6-git-send-email-lipeng321@huawei.com>",
        "X-Mailer": "git-send-email 1.9.1",
        "In-Reply-To": "<1504186749-8926-1-git-send-email-lipeng321@huawei.com>",
        "References": "<1504186749-8926-1-git-send-email-lipeng321@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.71.200.31]",
        "X-CFilter-Loop": "Reflected",
        "X-Mirapoint-Virus-RAPID-Raw": "score=unknown(0),\n\trefid=str=0001.0A020202.59A80AF9.02B1, ss=1, re=0.000, recu=0.000,\n\treip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0,\n\tso=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32",
        "X-Mirapoint-Loop-Id": "3208435015500fdb50a36ba9dcf053a5",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "This patch set the VLAN Ethetnet type(0x8100) to HW. With this\nconfigure, HW can identify vlan packets.\n\nSigned-off-by: Mingguang Qu <qumingguang@huawei.com>\nSigned-off-by: Lipeng <lipeng321@huawei.com>\n---\n .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 13 +++++\n .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c    | 58 +++++++++++++++++++++-\n .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h    | 11 ++++\n 3 files changed, 80 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h\nindex dd8e513..b841df1 100644\n--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h\n+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h\n@@ -655,6 +655,19 @@ struct hclge_vlan_filter_vf_cfg {\n \tu8  vf_bitmap[16];\n };\n \n+struct hclge_tx_vlan_type_cfg {\n+\tu16 ot_vlan_type;\n+\tu16 in_vlan_type;\n+\tu8 rsv[20];\n+};\n+\n+struct hclge_rx_vlan_type_cfg {\n+\tu16 ot_fst_vlan_type;\n+\tu16 ot_sec_vlan_type;\n+\tu16 in_fst_vlan_type;\n+\tu16 in_sec_vlan_type;\n+\tu8 rsv[16];\n+};\n struct hclge_cfg_com_tqp_queue {\n \t__le16 tqp_id;\n \t__le16 stream_id;\ndiff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c\nindex 7374053..f2ea88f 100644\n--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c\n+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c\n@@ -3694,10 +3694,52 @@ static int hclge_set_vf_vlan_filter(struct hnae3_handle *handle, int vfid,\n \treturn hclge_set_vf_vlan_common(hdev, vfid, false, vlan, qos, proto);\n }\n \n+static int hclge_set_vlan_protocol_type(struct hclge_dev *hdev)\n+{\n+\tstruct hclge_desc desc;\n+\tstruct hclge_rx_vlan_type_cfg *rx_req =\n+\t\t(struct hclge_rx_vlan_type_cfg *)&desc.data[0];\n+\tstruct hclge_tx_vlan_type_cfg *tx_req =\n+\t\t(struct hclge_tx_vlan_type_cfg *)&desc.data[0];\n+\tenum hclge_cmd_status status;\n+\n+\thclge_cmd_setup_basic_desc(&desc,\n+\t\t\t\t   HCLGE_OPC_MAC_VLAN_TYPE_ID, false);\n+\n+\trx_req->ot_fst_vlan_type = hdev->vlan_type_cfg.rx_ot_fst_vlan_type;\n+\trx_req->ot_sec_vlan_type = hdev->vlan_type_cfg.rx_ot_sec_vlan_type;\n+\trx_req->in_fst_vlan_type = hdev->vlan_type_cfg.rx_in_fst_vlan_type;\n+\trx_req->in_sec_vlan_type = hdev->vlan_type_cfg.rx_in_sec_vlan_type;\n+\n+\tstatus = hclge_cmd_send(&hdev->hw, &desc, 1);\n+\tif (status) {\n+\t\tdev_err(&hdev->pdev->dev,\n+\t\t\t\"Send rxvlan protocol type command fail, ret =%d.\\n\",\n+\t\t\tstatus);\n+\t\treturn -EIO;\n+\t}\n+\n+\thclge_cmd_setup_basic_desc(&desc,\n+\t\t\t\t   HCLGE_OPC_MAC_VLAN_INSERT, false);\n+\n+\ttx_req->ot_vlan_type = hdev->vlan_type_cfg.tx_ot_vlan_type;\n+\ttx_req->in_vlan_type = hdev->vlan_type_cfg.tx_in_vlan_type;\n+\n+\tstatus = hclge_cmd_send(&hdev->hw, &desc, 1);\n+\tif (status) {\n+\t\tdev_err(&hdev->pdev->dev,\n+\t\t\t\"Send txvlan protocol type command fail, ret =%d.\\n\",\n+\t\t\tstatus);\n+\t\treturn -EIO;\n+\t}\n+\treturn 0;\n+}\n+\n static int hclge_init_vlan_config(struct hclge_dev *hdev)\n {\n-#define HCLGE_VLAN_TYPE_VF_TABLE   0\n-#define HCLGE_VLAN_TYPE_PORT_TABLE 1\n+#define HCLGE_VLAN_TYPE_VF_TABLE\t0\n+#define HCLGE_VLAN_TYPE_PORT_TABLE\t1\n+#define HCLGE_DEF_VLAN_TYPE\t\t0x8100\n \tstruct hnae3_handle *handle;\n \tint ret;\n \n@@ -3708,6 +3750,18 @@ static int hclge_init_vlan_config(struct hclge_dev *hdev)\n \n \tret = hclge_set_vlan_filter_ctrl(hdev, HCLGE_VLAN_TYPE_PORT_TABLE,\n \t\t\t\t\t true);\n+\n+\thdev->vlan_type_cfg.rx_in_fst_vlan_type = HCLGE_DEF_VLAN_TYPE;\n+\thdev->vlan_type_cfg.rx_in_sec_vlan_type = HCLGE_DEF_VLAN_TYPE;\n+\thdev->vlan_type_cfg.rx_ot_fst_vlan_type = HCLGE_DEF_VLAN_TYPE;\n+\thdev->vlan_type_cfg.rx_ot_sec_vlan_type = HCLGE_DEF_VLAN_TYPE;\n+\thdev->vlan_type_cfg.tx_ot_vlan_type = HCLGE_DEF_VLAN_TYPE;\n+\thdev->vlan_type_cfg.tx_in_vlan_type = HCLGE_DEF_VLAN_TYPE;\n+\n+\tret = hclge_set_vlan_protocol_type(hdev);\n+\tif (ret)\n+\t\treturn ret;\n+\n \thandle = &hdev->vport[0].nic;\n \tret = hclge_set_port_vlan_filter(handle, htons(ETH_P_8021Q), 0, false);\n \ndiff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h\nindex edb10ad..0905ae5 100644\n--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h\n+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h\n@@ -388,6 +388,15 @@ struct hclge_hw_stats {\n \tstruct hclge_32_bit_stats   all_32_bit_stats;\n };\n \n+struct hclge_vlan_type_cfg {\n+\tu16 rx_ot_fst_vlan_type;\n+\tu16 rx_ot_sec_vlan_type;\n+\tu16 rx_in_fst_vlan_type;\n+\tu16 rx_in_sec_vlan_type;\n+\tu16 tx_ot_vlan_type;\n+\tu16 tx_in_vlan_type;\n+};\n+\n struct hclge_dev {\n \tstruct pci_dev *pdev;\n \tstruct hnae3_ae_dev *ae_dev;\n@@ -469,6 +478,8 @@ struct hclge_dev {\n \tenum hclge_mta_dmac_sel_type mta_mac_sel_type;\n \tbool enable_mta; /* Mutilcast filter enable */\n \tbool accept_mta_mc; /* Whether accept mta filter multicast */\n+\n+\tstruct hclge_vlan_type_cfg vlan_type_cfg;\n };\n \n struct hclge_vport {\n",
    "prefixes": [
        "net-next",
        "5/8"
    ]
}