bnx2x: Fix vlan credit issues for VFs
authorYuval Mintz <Yuval.Mintz@qlogic.com>
Thu, 24 Apr 2014 16:29:53 +0000 (19:29 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 26 Apr 2014 16:15:27 +0000 (12:15 -0400)
commit1a3d94240bc5e969e7e8cef661fbad24296ba36f
tree5ce6fccec942f80313703c7171e2938f85b5dbf9
parente2a367f8e3c2afd5cfd5f0892844c74960ecc031
bnx2x: Fix vlan credit issues for VFs

Starting with commit 2dc33bbc "bnx2x: Remove the sriov VFOP mechanism",
the bnx2x started enforcing vlan credits for all vlan configurations.
This exposed 2 issues:
  - Vlan credits are not returned once a VF is removed; this causes a leak
    of credits, and eventually will lead to VFs with no vlan credits.
  - A vlan credit must be set aside for the Hypervisor to use, and should
    not be visible to the VF.

Although linux VFs at the moment do not support vlan configuration [from the
VF side] which causes them to be resilient to this sort of issue, Windows VF
over linux hypervisors might fail to load as the vlan credits become depleted.

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>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h
drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c