Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

qed: Prevent VF from Tx-switching 'promisc'

Internal loopback in driver is based on two things - first
is the willingness of transmitter to use it [in case of VFs,
this can be forced based on VEPA/VEB] and secondly on another
vport classification configuration which should match the
packet's destination.

Current code allows non-linux VFs to configure a 'promisc'
mode on Tx, meaning all traffic sent by VF would be loopbacked
internally by firmware; This isn't considered a valid mode and
as such should be prevented by PF.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Yuval Mintz and committed by
David S. Miller
32643988 e6bd8923

-4
-4
drivers/net/ethernet/qlogic/qed/qed_l2.c
··· 248 248 SET_FIELD(state, ETH_VPORT_TX_MODE_UCAST_DROP_ALL, 249 249 !!(accept_filter & QED_ACCEPT_NONE)); 250 250 251 - SET_FIELD(state, ETH_VPORT_TX_MODE_UCAST_ACCEPT_ALL, 252 - (!!(accept_filter & QED_ACCEPT_UCAST_MATCHED) && 253 - !!(accept_filter & QED_ACCEPT_UCAST_UNMATCHED))); 254 - 255 251 SET_FIELD(state, ETH_VPORT_TX_MODE_MCAST_DROP_ALL, 256 252 !!(accept_filter & QED_ACCEPT_NONE)); 257 253