bnx2x: Correct logic for pvid configuration.

Commit 05cc5a39dd ("bnx2x: add vlan filtering offload") has introduced
an incorrect logic for checking whether pvid should be configured for
a vf, causing the hypervisor driver to send unneeded ramrods for all of
the vfs each time a pvid has changed.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Yuval Mintz 2015-08-02 12:42:41 +03:00 committed by David S. Miller
parent 5510b3c2a1
commit c46309c7f8
1 changed files with 1 additions and 1 deletions

View File

@ -2528,7 +2528,7 @@ void bnx2x_pf_set_vfs_vlan(struct bnx2x *bp)
DP(BNX2X_MSG_IOV, "configuring vlan for VFs from sp-task\n"); DP(BNX2X_MSG_IOV, "configuring vlan for VFs from sp-task\n");
for_each_vf(bp, vfidx) { for_each_vf(bp, vfidx) {
bulletin = BP_VF_BULLETIN(bp, vfidx); bulletin = BP_VF_BULLETIN(bp, vfidx);
if (bulletin->valid_bitmap & VLAN_VALID) if (bulletin->valid_bitmap & (1 << VLAN_VALID))
bnx2x_set_vf_vlan(bp->dev, vfidx, bulletin->vlan, 0); bnx2x_set_vf_vlan(bp->dev, vfidx, bulletin->vlan, 0);
} }
} }