“625482f752490f04df78034a383b7cee839a8780”上不存在“paddle/fluid/git@gitcode.net:Crayonxin2000/Paddle.git”
提交 83bd9eb8 编写于 作者: M Michal Schmidt 提交者: David S. Miller

bnx2x: fix detection of VLAN filtering feature for VF

VFs are currently missing the VLAN filtering feature, because we were
checking the PF's acquire response before actually performing the acquire.

Fix it by setting the feature flag later when we have the PF response.
Signed-off-by: NMichal Schmidt <mschmidt@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 22118d86
...@@ -13292,17 +13292,15 @@ static int bnx2x_init_dev(struct bnx2x *bp, struct pci_dev *pdev, ...@@ -13292,17 +13292,15 @@ static int bnx2x_init_dev(struct bnx2x *bp, struct pci_dev *pdev,
dev->vlan_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | dev->vlan_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6 | NETIF_F_HIGHDMA; NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6 | NETIF_F_HIGHDMA;
/* VF with OLD Hypervisor or old PF do not support filtering */
if (IS_PF(bp)) { if (IS_PF(bp)) {
if (chip_is_e1x) if (chip_is_e1x)
bp->accept_any_vlan = true; bp->accept_any_vlan = true;
else else
dev->hw_features |= NETIF_F_HW_VLAN_CTAG_FILTER; dev->hw_features |= NETIF_F_HW_VLAN_CTAG_FILTER;
#ifdef CONFIG_BNX2X_SRIOV
} else if (bp->acquire_resp.pfdev_info.pf_cap & PFVF_CAP_VLAN_FILTER) {
dev->hw_features |= NETIF_F_HW_VLAN_CTAG_FILTER;
#endif
} }
/* For VF we'll know whether to enable VLAN filtering after
* getting a response to CHANNEL_TLV_ACQUIRE from PF.
*/
dev->features |= dev->hw_features | NETIF_F_HW_VLAN_CTAG_RX; dev->features |= dev->hw_features | NETIF_F_HW_VLAN_CTAG_RX;
dev->features |= NETIF_F_HIGHDMA; dev->features |= NETIF_F_HIGHDMA;
...@@ -14009,6 +14007,14 @@ static int bnx2x_init_one(struct pci_dev *pdev, ...@@ -14009,6 +14007,14 @@ static int bnx2x_init_one(struct pci_dev *pdev,
rc = bnx2x_vfpf_acquire(bp, tx_count, rx_count); rc = bnx2x_vfpf_acquire(bp, tx_count, rx_count);
if (rc) if (rc)
goto init_one_freemem; goto init_one_freemem;
#ifdef CONFIG_BNX2X_SRIOV
/* VF with OLD Hypervisor or old PF do not support filtering */
if (bp->acquire_resp.pfdev_info.pf_cap & PFVF_CAP_VLAN_FILTER) {
dev->hw_features |= NETIF_F_HW_VLAN_CTAG_FILTER;
dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
}
#endif
} }
/* Enable SRIOV if capability found in configuration space */ /* Enable SRIOV if capability found in configuration space */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册