From: Ajit Khaparde Date: Thu, 28 Sep 2017 21:43:29 +0000 (-0500) Subject: net/bnxt: fix usage of VMDq flags X-Git-Tag: spdx-start~1867 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=0714ee90de2665f08d7bf7b7ac540497da92c2a1;p=dpdk.git 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 Signed-off-by: Ajit Khaparde --- diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c index c343d9033c..0bf5db5ec3 100644 --- a/drivers/net/bnxt/rte_pmd_bnxt.c +++ b/drivers/net/bnxt/rte_pmd_bnxt.c @@ -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;