Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/798902/?format=api
{ "id": 798902, "url": "http://patchwork.ozlabs.org/api/patches/798902/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170807131812.86747-12-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": "<20170807131812.86747-12-alice.michael@intel.com>", "list_archive_url": null, "date": "2017-08-07T13:18:12", "name": "[next,S78-V5,12/12] i40e: Stop dropping 802.1ad tags (eth proto 0x88a8", "commit_ref": null, "pull_url": null, "state": "changes-requested", "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/20170807131812.86747-12-alice.michael@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/798902/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/798902/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.133; helo=hemlock.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "Received": [ "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\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 3xR9VL6zbDz9sDB\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 8 Aug 2017 07:22:50 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 08CEA86CA7;\n\tMon, 7 Aug 2017 21:22:49 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id lSP48Z-Ig47m; Mon, 7 Aug 2017 21:22:48 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 1ACF686C21;\n\tMon, 7 Aug 2017 21:22:48 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 8B5421C203E\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 7 Aug 2017 21:22:46 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 82E1C2C945\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 7 Aug 2017 21:22:46 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id IPtuoi19OeHp for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 7 Aug 2017 21:22:45 +0000 (UTC)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 984C92A29E\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 7 Aug 2017 21:22:45 +0000 (UTC)", "from orsmga004.jf.intel.com ([10.7.209.38])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t07 Aug 2017 14:22:44 -0700", "from unknown (HELO localhost.jf.intel.com) ([10.166.16.121])\n\tby orsmga004.jf.intel.com with ESMTP; 07 Aug 2017 14:22:43 -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,339,1498546800\"; d=\"scan'208\";a=\"116660486\"", "From": "Alice Michael <alice.michael@intel.com>", "To": "alice.michael@intel.com,\n\tintel-wired-lan@lists.osuosl.org", "Date": "Mon, 7 Aug 2017 09:18:12 -0400", "Message-Id": "<20170807131812.86747-12-alice.michael@intel.com>", "X-Mailer": "git-send-email 2.9.4", "In-Reply-To": "<20170807131812.86747-1-alice.michael@intel.com>", "References": "<20170807131812.86747-1-alice.michael@intel.com>", "Subject": "[Intel-wired-lan] [next PATCH S78-V5 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 340e5a2..8553f2b 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 8fcbbd8..b59e8a7 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 6b7712c..46db282 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_common.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c\n@@ -2404,7 +2404,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 370ce9f..17dc8e2 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -12451,6 +12451,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 b7715d4..3a498d5 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-V5", "12/12" ] }