net/bnxt: fix usage of VMDq flags

Map ETH_VMDQ_ACCEPT_HASH_UC to the promiscuous bit.
Also, set ALLMULTI and MCAST when MCAST is set to ensure multicast traffic
is received regardless of the VF driver list.

Fixes: 4cfe399f6550 ("net/bnxt: support to set VF rxmode")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
This commit is contained in:
Ajit Khaparde 2017-09-28 16:43:29 -05:00 committed by Ferruh Yigit
parent a01a07286d
commit 0714ee90de

View File

@ -409,20 +409,19 @@ int rte_pmd_bnxt_set_vf_rxmode(uint8_t port, uint16_t vf,
if (vf >= bp->pdev->max_vfs)
return -EINVAL;
if (rx_mask & (ETH_VMDQ_ACCEPT_UNTAG | ETH_VMDQ_ACCEPT_HASH_MC)) {
if (rx_mask & ETH_VMDQ_ACCEPT_UNTAG) {
RTE_LOG(ERR, PMD, "Currently cannot toggle this setting\n");
return -ENOTSUP;
}
if (rx_mask & ETH_VMDQ_ACCEPT_HASH_UC && !on) {
RTE_LOG(ERR, PMD, "Currently cannot disable UC Rx\n");
return -ENOTSUP;
}
/* Is this really the correct mapping? VFd seems to think it is. */
if (rx_mask & ETH_VMDQ_ACCEPT_HASH_UC)
flag |= BNXT_VNIC_INFO_PROMISC;
if (rx_mask & ETH_VMDQ_ACCEPT_BROADCAST)
flag |= BNXT_VNIC_INFO_BCAST;
if (rx_mask & ETH_VMDQ_ACCEPT_MULTICAST)
flag |= BNXT_VNIC_INFO_ALLMULTI;
flag |= BNXT_VNIC_INFO_ALLMULTI | BNXT_VNIC_INFO_MCAST;
if (on)
bp->pf.vf_info[vf].l2_rx_mask |= flag;