get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 564179,
    "url": "http://patchwork.ozlabs.org/api/patches/564179/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20160107071103.13648.31968.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": "<20160107071103.13648.31968.stgit@localhost.localdomain>",
    "list_archive_url": null,
    "date": "2016-01-07T07:11:04",
    "name": "[next,06/11] igb: Merge VLVF configuration into igb_vfta_set",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "fcfbb9213e4c9a4d957824c8ed83e067c2730c16",
    "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/20160107071103.13648.31968.stgit@localhost.localdomain/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/564179/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/564179/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 772F51402C0\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  7 Jan 2016 18:11:18 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id A2F2132DA1;\n\tThu,  7 Jan 2016 07:11:17 +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 upzVZMMrYx8Y; Thu,  7 Jan 2016 07:11:14 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 3C66D32D9A;\n\tThu,  7 Jan 2016 07:11:14 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 0B04E1C09CE\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  7 Jan 2016 07:11:11 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id DFD159338C\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  7 Jan 2016 07:11:10 +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 NSH3m3aPSuoo for <intel-wired-lan@lists.osuosl.org>;\n\tThu,  7 Jan 2016 07:11:06 +0000 (UTC)",
            "from mail-pa0-f48.google.com (mail-pa0-f48.google.com\n\t[209.85.220.48])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 9D1F79338B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  7 Jan 2016 07:11:06 +0000 (UTC)",
            "by mail-pa0-f48.google.com with SMTP id cy9so251592769pac.0\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 06 Jan 2016 23:11:06 -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\tfl9sm149511075pab.33.2016.01.06.23.11.05\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 06 Jan 2016 23:11:05 -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=Uh5sn1rT; 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=HfKPKEU20H1Leutdw6WAsaHGAwr2IY6N55e4VzJAJWE=;\n\tb=Uh5sn1rTA2zt2dH0S5Gd4S43edbk8WHEU6HFhqZo4fNSfnRgbDlekcBqlT2NX2X6He\n\ttmoIaJDyRPuk7ClsK02+3YmDou5XPJG3y9kd9N8qtJzbobXv/AcDrpM6YpTxQsil5zEc\n\tz8gRgihJLT4nogL9W9aXP6uZSwMWc6snzWJzg=",
        "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=HfKPKEU20H1Leutdw6WAsaHGAwr2IY6N55e4VzJAJWE=;\n\tb=ff/LSq6lvGZPYYUM07rEGv4GT6y2hpxZNISTziQ/BJH4OZDXiZTsXla9z91aeN1WPL\n\ttCBcO2xumpcCGlK/41uAHCZK/Ia4K/4uYuJLYu8zQTV5dgXvMcfNsPyyJegQsRs/DR5f\n\tiNWGmXe804Q2g0EC8B921x9vAWC539cX3e0oCp1cv/oiLK9EOhnHmYYxWSks/uxo8MFS\n\tj1OCEdY4ZbEI5H0We8r2V7a0kduLy0EG7Ucdb+GVJfp/nz2aeS9ygdjgjXhPeG8nPLlM\n\tyD+3ifvTZjYPjHDMImARney6ZpcxcvC/tN/0LdoGQQujlq5cVBJlxmHaNdhACkQTy/QA\n\tGuQQ==",
        "X-Gm-Message-State": "ALoCoQlO303cHSTZKLUxwNKj3/6JdjVOvl9QxMOPLgGdAeDR9GHxQKNn8mHSK7MZ/mM7M4Z4h6qo08qvZZpslZYubZvRUQNnjQ==",
        "X-Received": "by 10.66.220.170 with SMTP id px10mr1956043pac.145.1452150666340;\n\tWed, 06 Jan 2016 23:11:06 -0800 (PST)",
        "From": "Alexander Duyck <aduyck@mirantis.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Wed, 06 Jan 2016 23:11:04 -0800",
        "Message-ID": "<20160107071103.13648.31968.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 06/11] igb: Merge VLVF configuration\n\tinto igb_vfta_set",
        "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 merge the configuration of the VLVF\nregisters into the setting of the VFTA register.  By doing this we simplify\nthe logic and make use of similar functionality that we have already added\nfor ixgbe making it easier to maintain both drivers.\n\nSigned-off-by: Alexander Duyck <aduyck@mirantis.com>\n---\n drivers/net/ethernet/intel/igb/e1000_mac.c |  119 +++++++++++++++++++++++++++-\n drivers/net/ethernet/intel/igb/e1000_mac.h |    3 -\n drivers/net/ethernet/intel/igb/igb_main.c  |  105 ++++---------------------\n 3 files changed, 135 insertions(+), 92 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/igb/e1000_mac.c b/drivers/net/ethernet/intel/igb/e1000_mac.c\nindex 97f6fae48d1d..27a25c7b8687 100644\n--- a/drivers/net/ethernet/intel/igb/e1000_mac.c\n+++ b/drivers/net/ethernet/intel/igb/e1000_mac.c\n@@ -141,21 +141,69 @@ void igb_init_rx_addrs(struct e1000_hw *hw, u16 rar_count)\n }\n \n /**\n+ *  igb_find_vlvf_slot - find the vlanid or the first empty slot\n+ *  @hw: pointer to hardware structure\n+ *  @vlan: VLAN id to write to VLAN filter\n+ *  @vlvf_bypass: skip VLVF if no match is found\n+ *\n+ *  return the VLVF index where this VLAN id should be placed\n+ *\n+ **/\n+static s32 igb_find_vlvf_slot(struct e1000_hw *hw, u32 vlan, bool vlvf_bypass)\n+{\n+\ts32 regindex, first_empty_slot;\n+\tu32 bits;\n+\n+\t/* short cut the special case */\n+\tif (vlan == 0)\n+\t\treturn 0;\n+\n+\t/* if vlvf_bypass is set we don't want to use an empty slot, we\n+\t * will simply bypass the VLVF if there are no entries present in the\n+\t * VLVF that contain our VLAN\n+\t */\n+\tfirst_empty_slot = vlvf_bypass ? -E1000_ERR_NO_SPACE : 0;\n+\n+\t/* Search for the vlan id in the VLVF entries. Save off the first empty\n+\t * slot found along the way.\n+\t *\n+\t * pre-decrement loop covering (IXGBE_VLVF_ENTRIES - 1) .. 1\n+\t */\n+\tfor (regindex = E1000_VLVF_ARRAY_SIZE; --regindex > 0;) {\n+\t\tbits = rd32(E1000_VLVF(regindex)) & E1000_VLVF_VLANID_MASK;\n+\t\tif (bits == vlan)\n+\t\t\treturn regindex;\n+\t\tif (!first_empty_slot && !bits)\n+\t\t\tfirst_empty_slot = regindex;\n+\t}\n+\n+\treturn first_empty_slot ? : -E1000_ERR_NO_SPACE;\n+}\n+\n+/**\n  *  igb_vfta_set - enable or disable vlan in VLAN filter table\n  *  @hw: pointer to the HW structure\n  *  @vlan: VLAN id to add or remove\n+ *  @vind: VMDq output index that maps queue to VLAN id\n  *  @vlan_on: if true add filter, if false remove\n  *\n  *  Sets or clears a bit in the VLAN filter table array based on VLAN id\n  *  and if we are adding or removing the filter\n  **/\n-s32 igb_vfta_set(struct e1000_hw *hw, u32 vlan, bool vlan_on)\n+s32 igb_vfta_set(struct e1000_hw *hw, u32 vlan, u32 vind,\n+\t\t bool vlan_on, bool vlvf_bypass)\n {\n \tstruct igb_adapter *adapter = hw->back;\n-\tu32 regidx, vfta_delta, vfta;\n+\tu32 regidx, vfta_delta, vfta, bits;\n+\ts32 vlvf_index;\n \n-\tif (vlan > 4095)\n-\t\treturn E1000_ERR_PARAM;\n+\tif ((vlan > 4095) || (vind > 7))\n+\t\treturn -E1000_ERR_PARAM;\n+\n+\t/* this is a 2 part operation - first the VFTA, then the\n+\t * VLVF and VLVFB if VT Mode is set\n+\t * We don't write the VFTA until we know the VLVF part succeeded.\n+\t */\n \n \t/* Part 1\n \t * The VFTA is a bitstring made up of 128 32-bit registers\n@@ -174,6 +222,69 @@ s32 igb_vfta_set(struct e1000_hw *hw, u32 vlan, bool vlan_on)\n \tvfta_delta &= vlan_on ? ~vfta : vfta;\n \tvfta ^= vfta_delta;\n \n+\t/* Part 2\n+\t * If VT Mode is set\n+\t *   Either vlan_on\n+\t *     make sure the vlan is in VLVF\n+\t *     set the vind bit in the matching VLVFB\n+\t *   Or !vlan_on\n+\t *     clear the pool bit and possibly the vind\n+\t */\n+\tif (!adapter->vfs_allocated_count)\n+\t\tgoto vfta_update;\n+\n+\tvlvf_index = igb_find_vlvf_slot(hw, vlan, vlvf_bypass);\n+\tif (vlvf_index < 0) {\n+\t\tif (vlvf_bypass)\n+\t\t\tgoto vfta_update;\n+\t\treturn vlvf_index;\n+\t}\n+\n+\tbits = rd32(E1000_VLVF(vlvf_index));\n+\n+\t/* set the pool bit */\n+\tbits |= 1 << (E1000_VLVF_POOLSEL_SHIFT + vind);\n+\tif (vlan_on)\n+\t\tgoto vlvf_update;\n+\n+\t/* clear the pool bit */\n+\tbits ^= 1 << (E1000_VLVF_POOLSEL_SHIFT + vind);\n+\n+\tif (!(bits & E1000_VLVF_POOLSEL_MASK)) {\n+\t\t/* Clear VFTA first, then disable VLVF.  Otherwise\n+\t\t * we run the risk of stray packets leaking into\n+\t\t * the PF via the default pool\n+\t\t */\n+\t\tif (vfta_delta)\n+\t\t\thw->mac.ops.write_vfta(hw, regidx, vfta);\n+\n+\t\t/* disable VLVF and clear remaining bit from pool */\n+\t\twr32(E1000_VLVF(vlvf_index), 0);\n+\n+\t\treturn 0;\n+\t}\n+\n+\t/* If there are still bits set in the VLVFB registers\n+\t * for the VLAN ID indicated we need to see if the\n+\t * caller is requesting that we clear the VFTA entry bit.\n+\t * If the caller has requested that we clear the VFTA\n+\t * entry bit but there are still pools/VFs using this VLAN\n+\t * ID entry then ignore the request.  We're not worried\n+\t * about the case where we're turning the VFTA VLAN ID\n+\t * entry bit on, only when requested to turn it off as\n+\t * there may be multiple pools and/or VFs using the\n+\t * VLAN ID entry.  In that case we cannot clear the\n+\t * VFTA bit until all pools/VFs using that VLAN ID have also\n+\t * been cleared.  This will be indicated by \"bits\" being\n+\t * zero.\n+\t */\n+\tvfta_delta = 0;\n+\n+vlvf_update:\n+\t/* record pool change and enable VLAN ID if not already enabled */\n+\twr32(E1000_VLVF(vlvf_index), bits | vlan | E1000_VLVF_VLANID_ENABLE);\n+\n+vfta_update:\n \t/* bit was set/cleared before we started */\n \tif (vfta_delta)\n \t\thw->mac.ops.write_vfta(hw, regidx, vfta);\ndiff --git a/drivers/net/ethernet/intel/igb/e1000_mac.h b/drivers/net/ethernet/intel/igb/e1000_mac.h\nindex 4fbb953012d0..90c8893c3eed 100644\n--- a/drivers/net/ethernet/intel/igb/e1000_mac.h\n+++ b/drivers/net/ethernet/intel/igb/e1000_mac.h\n@@ -57,7 +57,8 @@ s32  igb_write_8bit_ctrl_reg(struct e1000_hw *hw, u32 reg,\n void igb_clear_hw_cntrs_base(struct e1000_hw *hw);\n void igb_clear_vfta(struct e1000_hw *hw);\n void igb_write_vfta(struct e1000_hw *hw, u32 offset, u32 value);\n-s32  igb_vfta_set(struct e1000_hw *hw, u32 vid, bool add);\n+s32  igb_vfta_set(struct e1000_hw *hw, u32 vid, u32 vind,\n+\t\t  bool vlan_on, bool vlvf_bypass);\n void igb_config_collision_dist(struct e1000_hw *hw);\n void igb_init_rx_addrs(struct e1000_hw *hw, u16 rar_count);\n void igb_mta_set(struct e1000_hw *hw, u32 hash_value);\ndiff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c\nindex ccc622383552..fb98c7aa6588 100644\n--- a/drivers/net/ethernet/intel/igb/igb_main.c\n+++ b/drivers/net/ethernet/intel/igb/igb_main.c\n@@ -1556,12 +1556,13 @@ static void igb_irq_enable(struct igb_adapter *adapter)\n static void igb_update_mng_vlan(struct igb_adapter *adapter)\n {\n \tstruct e1000_hw *hw = &adapter->hw;\n+\tu16 pf_id = adapter->vfs_allocated_count;\n \tu16 vid = adapter->hw.mng_cookie.vlan_id;\n \tu16 old_vid = adapter->mng_vlan_id;\n \n \tif (hw->mng_cookie.status & E1000_MNG_DHCP_COOKIE_STATUS_VLAN) {\n \t\t/* add VID to filter table */\n-\t\tigb_vfta_set(hw, vid, true);\n+\t\tigb_vfta_set(hw, vid, pf_id, true, true);\n \t\tadapter->mng_vlan_id = vid;\n \t} else {\n \t\tadapter->mng_vlan_id = IGB_MNG_VLAN_NONE;\n@@ -1571,7 +1572,7 @@ static void igb_update_mng_vlan(struct igb_adapter *adapter)\n \t    (vid != old_vid) &&\n \t    !test_bit(old_vid, adapter->active_vlans)) {\n \t\t/* remove VID from filter table */\n-\t\tigb_vfta_set(hw, old_vid, false);\n+\t\tigb_vfta_set(hw, vid, pf_id, false, true);\n \t}\n }\n \n@@ -5906,75 +5907,13 @@ static void igb_clear_vf_vfta(struct igb_adapter *adapter, u32 vf)\n \t\t    (reg & E1000_VLVF_VLANID_ENABLE)) {\n \t\t\treg = 0;\n \t\t\tvid = reg & E1000_VLVF_VLANID_MASK;\n-\t\t\tigb_vfta_set(hw, vid, false);\n+\t\t\tigb_vfta_set(hw, vid, vf, false, true);\n \t\t}\n \n \t\twr32(E1000_VLVF(i), reg);\n \t}\n }\n \n-static s32 igb_vlvf_set(struct igb_adapter *adapter, u32 vid, bool add, u32 vf)\n-{\n-\tstruct e1000_hw *hw = &adapter->hw;\n-\tu32 reg, i;\n-\n-\t/* The vlvf table only exists on 82576 hardware and newer */\n-\tif (hw->mac.type < e1000_82576)\n-\t\treturn -1;\n-\n-\t/* we only need to do this if VMDq is enabled */\n-\tif (!adapter->vfs_allocated_count)\n-\t\treturn -1;\n-\n-\t/* Find the vlan filter for this id */\n-\tfor (i = 0; i < E1000_VLVF_ARRAY_SIZE; i++) {\n-\t\treg = rd32(E1000_VLVF(i));\n-\t\tif ((reg & E1000_VLVF_VLANID_ENABLE) &&\n-\t\t    vid == (reg & E1000_VLVF_VLANID_MASK))\n-\t\t\tbreak;\n-\t}\n-\n-\tif (add) {\n-\t\tif (i == E1000_VLVF_ARRAY_SIZE) {\n-\t\t\t/* Did not find a matching VLAN ID entry that was\n-\t\t\t * enabled.  Search for a free filter entry, i.e.\n-\t\t\t * one without the enable bit set\n-\t\t\t */\n-\t\t\tfor (i = 0; i < E1000_VLVF_ARRAY_SIZE; i++) {\n-\t\t\t\treg = rd32(E1000_VLVF(i));\n-\t\t\t\tif (!(reg & E1000_VLVF_VLANID_ENABLE))\n-\t\t\t\t\tbreak;\n-\t\t\t}\n-\t\t}\n-\t\tif (i < E1000_VLVF_ARRAY_SIZE) {\n-\t\t\t/* Found an enabled/available entry */\n-\t\t\treg |= 1 << (E1000_VLVF_POOLSEL_SHIFT + vf);\n-\n-\t\t\t/* if !enabled we need to set this up in vfta */\n-\t\t\tif (!(reg & E1000_VLVF_VLANID_ENABLE)) {\n-\t\t\t\t/* add VID to filter table */\n-\t\t\t\tigb_vfta_set(hw, vid, true);\n-\t\t\t\treg |= E1000_VLVF_VLANID_ENABLE;\n-\t\t\t}\n-\t\t\treg &= ~E1000_VLVF_VLANID_MASK;\n-\t\t\treg |= vid;\n-\t\t\twr32(E1000_VLVF(i), reg);\n-\t\t}\n-\t} else {\n-\t\tif (i < E1000_VLVF_ARRAY_SIZE) {\n-\t\t\t/* remove vf from the pool */\n-\t\t\treg &= ~(1 << (E1000_VLVF_POOLSEL_SHIFT + vf));\n-\t\t\t/* if pool is empty then remove entry from vfta */\n-\t\t\tif (!(reg & E1000_VLVF_POOLSEL_MASK)) {\n-\t\t\t\treg = 0;\n-\t\t\t\tigb_vfta_set(hw, vid, false);\n-\t\t\t}\n-\t\t\twr32(E1000_VLVF(i), reg);\n-\t\t}\n-\t}\n-\treturn 0;\n-}\n-\n static void igb_set_vmvir(struct igb_adapter *adapter, u32 vid, u32 vf)\n {\n \tstruct e1000_hw *hw = &adapter->hw;\n@@ -5988,13 +5927,14 @@ static void igb_set_vmvir(struct igb_adapter *adapter, u32 vid, u32 vf)\n static int igb_ndo_set_vf_vlan(struct net_device *netdev,\n \t\t\t       int vf, u16 vlan, u8 qos)\n {\n-\tint err = 0;\n \tstruct igb_adapter *adapter = netdev_priv(netdev);\n+\tstruct e1000_hw *hw = &adapter->hw;\n+\tint err = 0;\n \n \tif ((vf >= adapter->vfs_allocated_count) || (vlan > 4095) || (qos > 7))\n \t\treturn -EINVAL;\n \tif (vlan || qos) {\n-\t\terr = igb_vlvf_set(adapter, vlan, !!vlan, vf);\n+\t\terr = igb_vfta_set(hw, vlan, vf, !!vlan, false);\n \t\tif (err)\n \t\t\tgoto out;\n \t\tigb_set_vmvir(adapter, vlan | (qos << VLAN_PRIO_SHIFT), vf);\n@@ -6010,8 +5950,8 @@ static int igb_ndo_set_vf_vlan(struct net_device *netdev,\n \t\t\t\t \"Bring the PF device up before attempting to use the VF device.\\n\");\n \t\t}\n \t} else {\n-\t\tigb_vlvf_set(adapter, adapter->vf_data[vf].pf_vlan,\n-\t\t\t     false, vf);\n+\t\tigb_vfta_set(hw, adapter->vf_data[vf].pf_vlan, vf,\n+\t\t\t     false, false);\n \t\tigb_set_vmvir(adapter, vlan, vf);\n \t\tigb_set_vmolr(adapter, vf, true);\n \t\tadapter->vf_data[vf].pf_vlan = 0;\n@@ -6052,12 +5992,12 @@ static int igb_set_vf_vlan(struct igb_adapter *adapter, u32 *msgbuf, u32 vf)\n \t * the VLAN filter set.\n \t */\n \tif (add && (adapter->netdev->flags & IFF_PROMISC))\n-\t\terr = igb_vlvf_set(adapter, vid, add,\n-\t\t\t\t   adapter->vfs_allocated_count);\n+\t\terr = igb_vfta_set(hw, vid, adapter->vfs_allocated_count,\n+\t\t\t\t   true, false);\n \tif (err)\n \t\tgoto out;\n \n-\terr = igb_vlvf_set(adapter, vid, add, vf);\n+\terr = igb_vfta_set(hw, vid, vf, !!add, false);\n \n \tif (err)\n \t\tgoto out;\n@@ -6084,8 +6024,8 @@ static int igb_set_vf_vlan(struct igb_adapter *adapter, u32 *msgbuf, u32 vf)\n \t\tif ((vlvf & VLAN_VID_MASK) == vid &&\n \t\t    !test_bit(vid, adapter->active_vlans) &&\n \t\t    !bits)\n-\t\t\tigb_vlvf_set(adapter, vid, add,\n-\t\t\t\t     adapter->vfs_allocated_count);\n+\t\t\tigb_vfta_set(hw, vid, adapter->vfs_allocated_count,\n+\t\t\t\t     false, false);\n \t}\n \n out:\n@@ -7280,12 +7220,8 @@ static int igb_vlan_rx_add_vid(struct net_device *netdev,\n \tstruct e1000_hw *hw = &adapter->hw;\n \tint pf_id = adapter->vfs_allocated_count;\n \n-\t/* attempt to add filter to vlvf array */\n-\tigb_vlvf_set(adapter, vid, true, pf_id);\n-\n \t/* add the filter since PF can receive vlans w/o entry in vlvf */\n-\tigb_vfta_set(hw, vid, true);\n-\n+\tigb_vfta_set(hw, vid, pf_id, true, true);\n \tset_bit(vid, adapter->active_vlans);\n \n \treturn 0;\n@@ -7295,16 +7231,11 @@ static int igb_vlan_rx_kill_vid(struct net_device *netdev,\n \t\t\t\t__be16 proto, u16 vid)\n {\n \tstruct igb_adapter *adapter = netdev_priv(netdev);\n-\tstruct e1000_hw *hw = &adapter->hw;\n \tint pf_id = adapter->vfs_allocated_count;\n-\ts32 err;\n-\n-\t/* remove vlan from VLVF table array */\n-\terr = igb_vlvf_set(adapter, vid, false, pf_id);\n+\tstruct e1000_hw *hw = &adapter->hw;\n \n-\t/* if vid was not present in VLVF just remove it from table */\n-\tif (err)\n-\t\tigb_vfta_set(hw, vid, false);\n+\t/* remove VID from filter table */\n+\tigb_vfta_set(hw, vid, pf_id, false, true);\n \n \tclear_bit(vid, adapter->active_vlans);\n \n",
    "prefixes": [
        "next",
        "06/11"
    ]
}