Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/564184/?format=api
{ "id": 564184, "url": "http://patchwork.ozlabs.org/api/patches/564184/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20160107071143.13648.51160.stgit@localhost.localdomain/", "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": "<20160107071143.13648.51160.stgit@localhost.localdomain>", "list_archive_url": null, "date": "2016-01-07T07:11:43", "name": "[next,11/11] igb: Add workaround for VLAN tag stripping on 82576", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "160ac9f59a7eb9eb49840900edd41d169d4e5c9f", "submitter": { "id": 67293, "url": "http://patchwork.ozlabs.org/api/people/67293/?format=api", "name": "Alexander Duyck", "email": "aduyck@mirantis.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/20160107071143.13648.51160.stgit@localhost.localdomain/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/564184/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/564184/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@lists.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" ], "Received": [ "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ozlabs.org (Postfix) with ESMTP id 5498E1402C0\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 7 Jan 2016 18:11:52 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 6C22232D9E;\n\tThu, 7 Jan 2016 07:11:51 +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 hSd7xkb9Ppmb; Thu, 7 Jan 2016 07:11:49 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id BD1E2303A9;\n\tThu, 7 Jan 2016 07:11:49 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id F1ACA1C09CE\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 7 Jan 2016 07:11:48 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id EAA3132D95\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 7 Jan 2016 07:11:48 +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 MVXAbhobyG7e for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 7 Jan 2016 07:11:47 +0000 (UTC)", "from mail-pa0-f54.google.com (mail-pa0-f54.google.com\n\t[209.85.220.54])\n\tby silver.osuosl.org (Postfix) with ESMTPS id DD91A303A9\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 7 Jan 2016 07:11:47 +0000 (UTC)", "by mail-pa0-f54.google.com with SMTP id qh10so1184269pab.2\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 06 Jan 2016 23:11:47 -0800 (PST)", "from localhost.localdomain\n\t(static-50-53-29-36.bvtn.or.frontiernet.net. [50.53.29.36])\n\tby smtp.gmail.com with ESMTPSA id\n\ttv6sm95246660pab.4.2016.01.06.23.11.46\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 06 Jan 2016 23:11:47 -0800 (PST)" ], "Authentication-Results": "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=mirantis.com header.i=@mirantis.com\n\theader.b=A+CAFZ32; dkim-atps=neutral", "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "from auto-whitelisted by SQLgrey-1.7.6", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=mirantis.com;\n\ts=google; \n\th=subject:from:to:cc:date:message-id:in-reply-to:references\n\t:user-agent:mime-version:content-type:content-transfer-encoding;\n\tbh=WkwlSouuLSd0ZgpLd4QpVnUDOKtIB5LKSd7vnDen8wk=;\n\tb=A+CAFZ32WpfzR5xJA/NAUh3TliY7NhE0trZC10ofoH0fffuhdKUw87YcwxMvPvgCxt\n\tiaNUbmUNY1k1FwfXxNgvfSKTdzTHTvsA4VVvz8mkrSkKkZBz+thM0kPC0yKJVW8Tusml\n\tXZGAhBR3eQr8vBriDe5BBI+HdhKMsI8AAxOEc=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:subject:from:to:cc:date:message-id:in-reply-to\n\t:references:user-agent:mime-version:content-type\n\t:content-transfer-encoding;\n\tbh=WkwlSouuLSd0ZgpLd4QpVnUDOKtIB5LKSd7vnDen8wk=;\n\tb=BHW9WN9hDUlB6hygiItVjtH4ncgmZJVSMX1HmghU750gl7g7p3vXhpEBY5zx0sS1e+\n\tC47B4/hK4e/mx9XyL0h6E5/QEd+YsvjIjeLkD0OsvTCvEIAXF8WbvtqBK5FO1tpgOkoO\n\ts+OUKrmTlyYNFiO5Vupei7mA1rVds0Yukp/W+KZn3X6pLwd+bHWqtAbTRY1XCgeCkY2+\n\tCaMQejvUMMolI8lexzjq6LWkAfsOwUHSq6ARjdeHuPcvsw65Vx6HfEr3ILZLI6i+OuaI\n\tTMBoKEgHyFcskBHs8BFgXjuUT8Xitbytobts8CWHZlEYkN9vnqfMFmAw/X8yAg1XpwU2\n\tkFVw==", "X-Gm-Message-State": "ALoCoQkdZ27SwXpyXblZ97PKeXQZyMPjfMuqKUP6UDzBWVz+Vjn4Vw8wnJJAskbab9LrYLYGg/C9SGBIse+ke85oyLmDJWSxWA==", "X-Received": "by 10.66.236.69 with SMTP id us5mr31662097pac.93.1452150707602; \n\tWed, 06 Jan 2016 23:11:47 -0800 (PST)", "From": "Alexander Duyck <aduyck@mirantis.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Wed, 06 Jan 2016 23:11:43 -0800", "Message-ID": "<20160107071143.13648.51160.stgit@localhost.localdomain>", "In-Reply-To": "<20160107070850.13648.21033.stgit@localhost.localdomain>", "References": "<20160107070850.13648.21033.stgit@localhost.localdomain>", "User-Agent": "StGit/0.17.1-dirty", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [next PATCH 11/11] igb: Add workaround for VLAN\n\ttag stripping on 82576", "X-BeenThere": "intel-wired-lan@lists.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.lists.osuosl.org>", "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>", "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@lists.osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>" }, "content": "There was a workaround partially implemented for the 82576 that is needed\nin order for VLAN tag stripping to function correctly. The original code\nhad side effects that would make it so the workaround was active on all\nMACs. I have updated the code so that the workaround is enabled, but\nlimited to the 82576, or activated if we exceed the available unicast\naddresses.\n\nThe workaround has a side effect of mirroring all of the traffic outgoing\nfrom the VFs back to the PF. As such it is not recommended to use the\n82576 in promiscuous mode as it will take a performance hit, though this is\nnow consistent with the performance as seen on the out-of-tree igb driver.\n\nI also limited the scope of the UTA bits all being set to only when the\nVMOLR register is enabled. This should limit the effects of the UTA\nregister so that we don't pick up any excess traffic unless promiscuous mode\nhas been enabled on the PF, whereas before the PF would have ended up in\nsomething equivalent to unicast promiscuous mode with VLAN filtering\notherwise.\n\nSigned-off-by: Alexander Duyck <aduyck@mirantis.com>\n---\n drivers/net/ethernet/intel/igb/e1000_82575.c | 2 ++\n drivers/net/ethernet/intel/igb/igb_main.c | 26 ++++++++++++++------------\n 2 files changed, 16 insertions(+), 12 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/igb/e1000_82575.c b/drivers/net/ethernet/intel/igb/e1000_82575.c\nindex fff50523b440..9a1a9c7b0748 100644\n--- a/drivers/net/ethernet/intel/igb/e1000_82575.c\n+++ b/drivers/net/ethernet/intel/igb/e1000_82575.c\n@@ -425,6 +425,8 @@ static s32 igb_init_mac_params_82575(struct e1000_hw *hw)\n \n \t/* Set mta register count */\n \tmac->mta_reg_count = 128;\n+\t/* Set uta register count */\n+\tmac->uta_reg_count = (hw->mac.type == e1000_82575) ? 0 : 128;\n \t/* Set rar entry count */\n \tswitch (mac->type) {\n \tcase e1000_82576:\ndiff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c\nindex 06b8b1e0362b..ade8dee55fb8 100644\n--- a/drivers/net/ethernet/intel/igb/igb_main.c\n+++ b/drivers/net/ethernet/intel/igb/igb_main.c\n@@ -141,7 +141,7 @@ static struct rtnl_link_stats64 *igb_get_stats64(struct net_device *dev,\n \t\t\t\t\t struct rtnl_link_stats64 *stats);\n static int igb_change_mtu(struct net_device *, int);\n static int igb_set_mac(struct net_device *, void *);\n-static void igb_set_uta(struct igb_adapter *adapter);\n+static void igb_set_uta(struct igb_adapter *adapter, bool set);\n static irqreturn_t igb_intr(int irq, void *);\n static irqreturn_t igb_intr_msi(int irq, void *);\n static irqreturn_t igb_msix_other(int irq, void *);\n@@ -3790,9 +3790,6 @@ static void igb_configure_rx(struct igb_adapter *adapter)\n {\n \tint i;\n \n-\t/* set UTA to appropriate mode */\n-\tigb_set_uta(adapter);\n-\n \t/* set the correct pool for the PF default MAC address in entry 0 */\n \tigb_rar_set_qsel(adapter, adapter->hw.mac.addr, 0,\n \t\t\t adapter->vfs_allocated_count);\n@@ -4258,7 +4255,11 @@ static void igb_set_rx_mode(struct net_device *netdev)\n \t/* Check for Promiscuous and All Multicast modes */\n \tif (netdev->flags & IFF_PROMISC) {\n \t\trctl |= E1000_RCTL_UPE | E1000_RCTL_MPE;\n-\t\tvmolr |= E1000_VMOLR_ROPE | E1000_VMOLR_MPME;\n+\t\tvmolr |= E1000_VMOLR_MPME;\n+\n+\t\t/* enable use of UTA filter to force packets to default pool */\n+\t\tif (hw->mac.type == e1000_82576)\n+\t\t\tvmolr |= E1000_VMOLR_ROPE;\n \t} else {\n \t\tif (netdev->flags & IFF_ALLMULTI) {\n \t\t\trctl |= E1000_RCTL_MPE;\n@@ -4314,6 +4315,9 @@ static void igb_set_rx_mode(struct net_device *netdev)\n \tif ((hw->mac.type < e1000_82576) || (hw->mac.type > e1000_i350))\n \t\treturn;\n \n+\t/* set UTA to appropriate mode */\n+\tigb_set_uta(adapter, !!(vmolr & E1000_VMOLR_ROPE));\n+\n \tvmolr |= rd32(E1000_VMOLR(vfn)) &\n \t\t ~(E1000_VMOLR_ROPE | E1000_VMOLR_MPME | E1000_VMOLR_ROMPE);\n \n@@ -6451,6 +6455,7 @@ static void igb_msg_task(struct igb_adapter *adapter)\n /**\n * igb_set_uta - Set unicast filter table address\n * @adapter: board private structure\n+ * @set: boolean indicating if we are setting or clearing bits\n *\n * The unicast table address is a register array of 32-bit registers.\n * The table is meant to be used in a way similar to how the MTA is used\n@@ -6458,21 +6463,18 @@ static void igb_msg_task(struct igb_adapter *adapter)\n * set all the hash bits to 1 and use the VMOLR ROPE bit as a promiscuous\n * enable bit to allow vlan tag stripping when promiscuous mode is enabled\n **/\n-static void igb_set_uta(struct igb_adapter *adapter)\n+static void igb_set_uta(struct igb_adapter *adapter, bool set)\n {\n \tstruct e1000_hw *hw = &adapter->hw;\n+\tu32 uta = set ? ~0 : 0;\n \tint i;\n \n-\t/* The UTA table only exists on 82576 hardware and newer */\n-\tif (hw->mac.type < e1000_82576)\n-\t\treturn;\n-\n \t/* we only need to do this if VMDq is enabled */\n \tif (!adapter->vfs_allocated_count)\n \t\treturn;\n \n-\tfor (i = 0; i < hw->mac.uta_reg_count; i++)\n-\t\tarray_wr32(E1000_UTA, i, ~0);\n+\tfor (i = hw->mac.uta_reg_count; i--;)\n+\t\tarray_wr32(E1000_UTA, i, uta);\n }\n \n /**\n", "prefixes": [ "next", "11/11" ] }