Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/595892/?format=api
{ "id": 595892, "url": "http://patchwork.ozlabs.org/api/patches/595892/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20160310175824.12438.85762.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": "<20160310175824.12438.85762.stgit@localhost.localdomain>", "list_archive_url": null, "date": "2016-03-10T18:01:10", "name": "ixgbe: Add support for toggling VLAN filtering flag via ethtool", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "7fd063c5ce012d4c7af89d827e91562a5f2d53dc", "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/20160310175824.12438.85762.stgit@localhost.localdomain/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/595892/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/595892/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 fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ozlabs.org (Postfix) with ESMTP id 87218140784\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 11 Mar 2016 05:01:18 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id D35BDA606B;\n\tThu, 10 Mar 2016 18:01:17 +0000 (UTC)", "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id Yi_vTcxt7YWR; Thu, 10 Mar 2016 18:01:16 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id C2C36A6070;\n\tThu, 10 Mar 2016 18:01:16 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id C6D6E1C16AD\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 10 Mar 2016 18:01:15 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id C0A3A92231\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 10 Mar 2016 18:01:15 +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 Get-Y00vJIeX for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 10 Mar 2016 18:01:13 +0000 (UTC)", "from mail-pa0-f47.google.com (mail-pa0-f47.google.com\n\t[209.85.220.47])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 0B5CC9221A\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 10 Mar 2016 18:01:12 +0000 (UTC)", "by mail-pa0-f47.google.com with SMTP id td3so45820498pab.2\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 10 Mar 2016 10:01:12 -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\to185sm7074259pfo.36.2016.03.10.10.01.11\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 10 Mar 2016 10:01:11 -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=GprOWXIH; 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:user-agent:mime-version\n\t:content-transfer-encoding;\n\tbh=k46QoihXDKI/eT/yINziH+4ZyEouc5e2QG9A9jnMNLI=;\n\tb=GprOWXIH9df4wHgzjW87c3PwQ5ma8WZVmpVpqJO8kCAG6YISxNaFJGAAZM0JWthc4z\n\ti34BlGgAzOYz/B0M9H+ss8t9s224BVwAurrfLJmm1m08ChA/+l/VC8KHmDZ3Nh63ZFO+\n\tBrUbJPeLPWgNZy4I2d3Wqj8skpwTZfFL2TAl4=", "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:user-agent\n\t:mime-version:content-transfer-encoding;\n\tbh=k46QoihXDKI/eT/yINziH+4ZyEouc5e2QG9A9jnMNLI=;\n\tb=XkBHMLeY7IodQOiI/VWvQMqni7W9tgkqGTjF8wTDDmfsHIIfKGrbCq8daPjL1B545J\n\tIvZtytyPoXUZ6YqHkNV6O1qkXSnKgBJaT4lPNlSG9mXXD9JZ3PiHhzveip8+2IY5ecEJ\n\tMEO+gbMJfZkrCYUNt/GCElMr9GZwBmbl1bMT9dfMtuYGrEOAdjxXUYoMjUI1/S73tmvS\n\tg82AV9fjSRte7beMYDJa5hS40DtubUS4iRlynQujIqwi5QqUSwaSyuy8122uJOLy0q7T\n\tkVMutHwfZ4TNUcHdD3FV/cqA4Mf3pei5GwBWS/RSve90C77rzlrAz21OxM7LirQ4cor0\n\t1FWw==", "X-Gm-Message-State": "AD7BkJJlBk16htDsqSvO2iLZD9648qIasoRJsebPy+hJIgweNjODCCW3KZ+b9Z9bfxssC2p5", "X-Received": "by 10.66.244.15 with SMTP id xc15mr6754713pac.97.1457632872722; \n\tThu, 10 Mar 2016 10:01:12 -0800 (PST)", "From": "Alexander Duyck <aduyck@mirantis.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Thu, 10 Mar 2016 10:01:10 -0800", "Message-ID": "<20160310175824.12438.85762.stgit@localhost.localdomain>", "User-Agent": "StGit/0.17.1-dirty", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [PATCH] ixgbe: Add support for toggling VLAN\n\tfiltering flag via ethtool", "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": "This change makes it so that we can use the ethtool rx-vlan-filter flag to\ntoggle Rx VLAN filtering on and off. This is basically just an extension\nof the existing VLAN promisc work in that it just adds support for the\nadditional ethtool flag.\n\nSigned-off-by: Alexander Duyck <aduyck@mirantis.com>\n---\n\nTesting-hints: The register changes can be viewed via ethregs or using a\n\t traffic generator that can be configured such that you can\n\t verify the VLAN traffic is filtered when the filter is\n\t enabled and can be received when it is not.\n\n drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 27 +++++++++++++------------\n 1 file changed, 14 insertions(+), 13 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\nindex 1b490d1c27ce..3c5276f62805 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -4451,6 +4451,7 @@ void ixgbe_set_rx_mode(struct net_device *netdev)\n \tstruct ixgbe_adapter *adapter = netdev_priv(netdev);\n \tstruct ixgbe_hw *hw = &adapter->hw;\n \tu32 fctrl, vmolr = IXGBE_VMOLR_BAM | IXGBE_VMOLR_AUPE;\n+\tnetdev_features_t features = netdev->features;\n \tint count;\n \n \t/* Check for Promiscuous and All Multicast modes */\n@@ -4468,14 +4469,13 @@ void ixgbe_set_rx_mode(struct net_device *netdev)\n \t\thw->addr_ctrl.user_set_promisc = true;\n \t\tfctrl |= (IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE);\n \t\tvmolr |= IXGBE_VMOLR_MPE;\n-\t\tixgbe_vlan_promisc_enable(adapter);\n+\t\tfeatures &= ~NETIF_F_HW_VLAN_CTAG_FILTER;\n \t} else {\n \t\tif (netdev->flags & IFF_ALLMULTI) {\n \t\t\tfctrl |= IXGBE_FCTRL_MPE;\n \t\t\tvmolr |= IXGBE_VMOLR_MPE;\n \t\t}\n \t\thw->addr_ctrl.user_set_promisc = false;\n-\t\tixgbe_vlan_promisc_disable(adapter);\n \t}\n \n \t/*\n@@ -4508,7 +4508,7 @@ void ixgbe_set_rx_mode(struct net_device *netdev)\n \t}\n \n \t/* This is useful for sniffing bad packets. */\n-\tif (adapter->netdev->features & NETIF_F_RXALL) {\n+\tif (features & NETIF_F_RXALL) {\n \t\t/* UPE and MPE will be handled by normal PROMISC logic\n \t\t * in e1000e_set_rx_mode */\n \t\tfctrl |= (IXGBE_FCTRL_SBP | /* Receive bad packets */\n@@ -4521,10 +4521,15 @@ void ixgbe_set_rx_mode(struct net_device *netdev)\n \n \tIXGBE_WRITE_REG(hw, IXGBE_FCTRL, fctrl);\n \n-\tif (netdev->features & NETIF_F_HW_VLAN_CTAG_RX)\n+\tif (features & NETIF_F_HW_VLAN_CTAG_RX)\n \t\tixgbe_vlan_strip_enable(adapter);\n \telse\n \t\tixgbe_vlan_strip_disable(adapter);\n+\n+\tif (features & NETIF_F_HW_VLAN_CTAG_FILTER)\n+\t\tixgbe_vlan_promisc_disable(adapter);\n+\telse\n+\t\tixgbe_vlan_promisc_enable(adapter);\n }\n \n static void ixgbe_napi_enable_all(struct ixgbe_adapter *adapter)\n@@ -8498,11 +8503,6 @@ static int ixgbe_set_features(struct net_device *netdev,\n \t\t\tadapter->flags |= IXGBE_FLAG_FDIR_HASH_CAPABLE;\n \t}\n \n-\tif (features & NETIF_F_HW_VLAN_CTAG_RX)\n-\t\tixgbe_vlan_strip_enable(adapter);\n-\telse\n-\t\tixgbe_vlan_strip_disable(adapter);\n-\n \tif (changed & NETIF_F_RXALL)\n \t\tneed_reset = true;\n \n@@ -8519,6 +8519,9 @@ static int ixgbe_set_features(struct net_device *netdev,\n \n \tif (need_reset)\n \t\tixgbe_do_reset(netdev);\n+\telse if (changed & (NETIF_F_HW_VLAN_CTAG_RX |\n+\t\t\t NETIF_F_HW_VLAN_CTAG_FILTER))\n+\t\tixgbe_set_rx_mode(netdev);\n \n \treturn 0;\n }\n@@ -9190,7 +9193,8 @@ skip_sriov:\n \t\t\t NETIF_F_HW_CSUM |\n \t\t\t NETIF_F_SCTP_CRC |\n \t\t\t NETIF_F_HW_VLAN_CTAG_TX |\n-\t\t\t NETIF_F_HW_VLAN_CTAG_RX;\n+\t\t\t NETIF_F_HW_VLAN_CTAG_RX |\n+\t\t\t NETIF_F_HW_VLAN_CTAG_FILTER;\n \n \tif (hw->mac.type >= ixgbe_mac_82599EB)\n \t\tnetdev->features |= NETIF_F_SCTP_CRC;\n@@ -9203,9 +9207,6 @@ skip_sriov:\n \tif (hw->mac.type >= ixgbe_mac_82599EB)\n \t\tnetdev->hw_features |= NETIF_F_NTUPLE;\n \n-\t/* set this bit last since it cannot be part of hw_features */\n-\tnetdev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;\n-\n \tnetdev->vlan_features |= NETIF_F_SG |\n \t\t\t\t NETIF_F_TSO |\n \t\t\t\t NETIF_F_TSO6 |\n", "prefixes": [] }