get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 804626,
    "url": "http://patchwork.ozlabs.org/api/patches/804626/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170822105754.29486-13-alice.michael@intel.com/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api",
        "name": "Intel Wired Ethernet development",
        "link_name": "intel-wired-lan",
        "list_id": "intel-wired-lan.osuosl.org",
        "list_email": "intel-wired-lan@osuosl.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170822105754.29486-13-alice.michael@intel.com>",
    "list_archive_url": null,
    "date": "2017-08-22T10:57:54",
    "name": "[next,S78-V8,12/12] i40e: Stop dropping 802.1ad tags (eth proto 0x88a8",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "db9b97ddb7daaf80ec67abe8cf4376b58cb39f0b",
    "submitter": {
        "id": 71123,
        "url": "http://patchwork.ozlabs.org/api/people/71123/?format=api",
        "name": "Michael, Alice",
        "email": "alice.michael@intel.com"
    },
    "delegate": {
        "id": 68,
        "url": "http://patchwork.ozlabs.org/api/users/68/?format=api",
        "username": "jtkirshe",
        "first_name": "Jeff",
        "last_name": "Kirsher",
        "email": "jeffrey.t.kirsher@intel.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170822105754.29486-13-alice.michael@intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/804626/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/804626/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@osuosl.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Authentication-Results": "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.138; helo=whitealder.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)",
        "Received": [
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xcKgs0TTWz9t0j\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 23 Aug 2017 05:02:48 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 8BC3287E5D;\n\tTue, 22 Aug 2017 19:02:47 +0000 (UTC)",
            "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id t79w-upD4SeQ; Tue, 22 Aug 2017 19:02:45 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 0F9BE87E54;\n\tTue, 22 Aug 2017 19:02:45 +0000 (UTC)",
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id B09051C415B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 22 Aug 2017 19:02:40 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id A9C7687E05\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 22 Aug 2017 19:02:40 +0000 (UTC)",
            "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 8KOf0g49ewB4 for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 22 Aug 2017 19:02:40 +0000 (UTC)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id E961487E16\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 22 Aug 2017 19:02:39 +0000 (UTC)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby fmsmga105.fm.intel.com with ESMTP; 22 Aug 2017 12:02:39 -0700",
            "from unknown (HELO localhost.jf.intel.com) ([10.166.16.121])\n\tby orsmga005.jf.intel.com with ESMTP; 22 Aug 2017 12:02:38 -0700"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.41,413,1498546800\"; d=\"scan'208\";a=\"140827640\"",
        "From": "Alice Michael <alice.michael@intel.com>",
        "To": "alice.michael@intel.com,\n\tintel-wired-lan@lists.osuosl.org",
        "Date": "Tue, 22 Aug 2017 06:57:54 -0400",
        "Message-Id": "<20170822105754.29486-13-alice.michael@intel.com>",
        "X-Mailer": "git-send-email 2.9.4",
        "In-Reply-To": "<20170822105754.29486-1-alice.michael@intel.com>",
        "References": "<20170822105754.29486-1-alice.michael@intel.com>",
        "Subject": "[Intel-wired-lan] [next PATCH S78-V8 12/12] i40e: Stop dropping\n\t802.1ad tags (eth proto 0x88a8",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.18-1",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>",
        "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "From: Scott Peterson <scott.d.peterson@intel.com>\n\nEnable i40e to pass traffic with VLAN tags using the 802.1ad ethernet\nprotocol ID (0x88a8).\n\nThis requires NIC firmware providing version 1.7 of the API. With\nolder NIC firmware 802.1ad tagged packets will continue to be dropped.\n\nNo VLAN offloads nor RSS are supported for 802.1ad VLANs.\n\nSigned-off-by: Scott Peterson <scott.d.peterson@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_adminq.c       |  6 ++++++\n drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h   | 17 ++++++++++++++++-\n drivers/net/ethernet/intel/i40e/i40e_common.c       |  6 +++++-\n drivers/net/ethernet/intel/i40e/i40e_main.c         |  7 +++++++\n drivers/net/ethernet/intel/i40e/i40e_type.h         |  6 ++++++\n drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 17 ++++++++++++++++-\n drivers/net/ethernet/intel/i40evf/i40e_type.h       |  6 ++++++\n 7 files changed, 62 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq.c b/drivers/net/ethernet/intel/i40e/i40e_adminq.c\nindex 08f6322..ed5e344 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_adminq.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq.c\n@@ -613,6 +613,12 @@ i40e_status i40e_init_adminq(struct i40e_hw *hw)\n \t\thw->flags |= I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE;\n \t}\n \n+\t/* The ability to RX (not drop) 802.1ad frames was added in API 1.7 */\n+\tif ((hw->aq.api_maj_ver > 1) ||\n+\t    ((hw->aq.api_maj_ver == 1) &&\n+\t     (hw->aq.api_min_ver >= 7)))\n+\t\thw->flags |= I40E_HW_FLAG_802_1AD_CAPABLE;\n+\n \tif (hw->aq.api_maj_ver > I40E_FW_API_VERSION_MAJOR) {\n \t\tret_code = I40E_ERR_FIRMWARE_API_VERSION;\n \t\tgoto init_adminq_free_arq;\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h\nindex ed7bbe1..4c85ea9 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h\n@@ -775,7 +775,22 @@ struct i40e_aqc_set_switch_config {\n #define I40E_AQ_SET_SWITCH_CFG_PROMISC\t\t0x0001\n #define I40E_AQ_SET_SWITCH_CFG_L2_FILTER\t0x0002\n \t__le16\tvalid_flags;\n-\tu8\treserved[12];\n+\t/* The ethertype in switch_tag is dropped on ingress and used\n+\t * internally by the switch. Set this to zero for the default\n+\t * of 0x88a8 (802.1ad). Should be zero for firmware API\n+\t * versions lower than 1.7.\n+\t */\n+\t__le16\tswitch_tag;\n+\t/* The ethertypes in first_tag and second_tag are used to\n+\t * match the outer and inner VLAN tags (respectively) when HW\n+\t * double VLAN tagging is enabled via the set port parameters\n+\t * AQ command. Otherwise these are both ignored. Set them to\n+\t * zero for their defaults of 0x8100 (802.1Q). Should be zero\n+\t * for firmware API versions lower than 1.7.\n+\t */\n+\t__le16\tfirst_tag;\n+\t__le16\tsecond_tag;\n+\tu8\treserved[6];\n };\n \n I40E_CHECK_CMD_LENGTH(i40e_aqc_set_switch_config);\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c\nindex 0e41b35..cb4468c 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_common.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c\n@@ -2407,7 +2407,11 @@ enum i40e_status_code i40e_aq_set_switch_config(struct i40e_hw *hw,\n \t\t\t\t\t  i40e_aqc_opc_set_switch_config);\n \tscfg->flags = cpu_to_le16(flags);\n \tscfg->valid_flags = cpu_to_le16(valid_flags);\n-\n+\tif (hw->flags & I40E_HW_FLAG_802_1AD_CAPABLE) {\n+\t\tscfg->switch_tag = cpu_to_le16(hw->switch_tag);\n+\t\tscfg->first_tag = cpu_to_le16(hw->first_tag);\n+\t\tscfg->second_tag = cpu_to_le16(hw->second_tag);\n+\t}\n \tstatus = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);\n \n \treturn status;\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex d2ca98f..32c1914 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -11362,6 +11362,13 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n \thw->bus.bus_id = pdev->bus->number;\n \tpf->instance = pfs_found;\n \n+\t/* Select something other than the 802.1ad ethertype for the\n+\t * switch to use internally and drop on ingress.\n+\t */\n+\thw->switch_tag = 0xffff;\n+\thw->first_tag = ETH_P_8021AD;\n+\thw->second_tag = ETH_P_8021Q;\n+\n \tINIT_LIST_HEAD(&pf->l3_flex_pit_list);\n \tINIT_LIST_HEAD(&pf->l4_flex_pit_list);\n \ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_type.h b/drivers/net/ethernet/intel/i40e/i40e_type.h\nindex 8b0b9f8..4b32b1d 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_type.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e_type.h\n@@ -610,9 +610,15 @@ struct i40e_hw {\n \tstruct i40e_dcbx_config desired_dcbx_config; /* CEE Desired Cfg */\n \n #define I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE BIT_ULL(0)\n+#define I40E_HW_FLAG_802_1AD_CAPABLE        BIT_ULL(1)\n #define I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE  BIT_ULL(2)\n \tu64 flags;\n \n+\t/* Used in set switch config AQ command */\n+\tu16 switch_tag;\n+\tu16 first_tag;\n+\tu16 second_tag;\n+\n \t/* debug mask */\n \tu32 debug_mask;\n \tchar err_str[16];\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h\nindex eee7ece..ed5602f 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h\n+++ b/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h\n@@ -771,7 +771,22 @@ struct i40e_aqc_set_switch_config {\n #define I40E_AQ_SET_SWITCH_CFG_PROMISC\t\t0x0001\n #define I40E_AQ_SET_SWITCH_CFG_L2_FILTER\t0x0002\n \t__le16\tvalid_flags;\n-\tu8\treserved[12];\n+\t/* The ethertype in switch_tag is dropped on ingress and used\n+\t * internally by the switch. Set this to zero for the default\n+\t * of 0x88a8 (802.1ad). Should be zero for firmware API\n+\t * versions lower than 1.7.\n+\t */\n+\t__le16\tswitch_tag;\n+\t/* The ethertypes in first_tag and second_tag are used to\n+\t * match the outer and inner VLAN tags (respectively) when HW\n+\t * double VLAN tagging is enabled via the set port parameters\n+\t * AQ command. Otherwise these are both ignored. Set them to\n+\t * zero for their defaults of 0x8100 (802.1Q). Should be zero\n+\t * for firmware API versions lower than 1.7.\n+\t */\n+\t__le16\tfirst_tag;\n+\t__le16\tsecond_tag;\n+\tu8\treserved[6];\n };\n \n I40E_CHECK_CMD_LENGTH(i40e_aqc_set_switch_config);\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40e_type.h b/drivers/net/ethernet/intel/i40evf/i40e_type.h\nindex 48eacf5..9364b67 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40e_type.h\n+++ b/drivers/net/ethernet/intel/i40evf/i40e_type.h\n@@ -568,6 +568,7 @@ struct i40e_hw {\n \t/* LLDP/DCBX Status */\n \tu16 dcbx_status;\n \n+#define I40E_HW_FLAG_802_1AD_CAPABLE        BIT_ULL(1)\n #define I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE  BIT_ULL(2)\n \n \t/* DCBX info */\n@@ -575,6 +576,11 @@ struct i40e_hw {\n \tstruct i40e_dcbx_config remote_dcbx_config; /* Peer Cfg */\n \tstruct i40e_dcbx_config desired_dcbx_config; /* CEE Desired Cfg */\n \n+\t/* Used in set switch config AQ command */\n+\tu16 switch_tag;\n+\tu16 first_tag;\n+\tu16 second_tag;\n+\n \t/* debug mask */\n \tu32 debug_mask;\n \tchar err_str[16];\n",
    "prefixes": [
        "next",
        "S78-V8",
        "12/12"
    ]
}