bnxt_en: allow promiscuous mode for trusted VFs
authorEdwin Peer <edwin.peer@broadcom.com>
Sun, 25 Apr 2021 17:45:21 +0000 (13:45 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 26 Apr 2021 01:37:38 +0000 (18:37 -0700)
commitdd85fc0ab5b4daa496bd3e2832b51963022182d0
tree48ea2562756f8305b61f54e02d9a21967ff30e0d
parentd5ca99054f8e25384390d41c0123d930eed510b6
bnxt_en: allow promiscuous mode for trusted VFs

Firmware previously only allowed promiscuous mode for VFs associated with
a default VLAN. It is now possible to enable promiscuous mode for a VF
having no VLAN configured provided that it is trusted. In such cases the
VF will see all packets received by the PF, irrespective of destination
MAC or VLAN.

Note, it is necessary to query firmware at the time of bnxt_promisc_ok()
instead of in bnxt_hwrm_func_qcfg() because the trusted status might be
altered by the PF after the VF has been configured. This check must now
also be deferred because the firmware call sleeps.

Signed-off-by: Edwin Peer <edwin.peer@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.h