]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ixgbe: Reset interface after enabling SR-IOV
authorAlexander Duyck <aduyck@mirantis.com>
Tue, 20 Oct 2015 20:28:17 +0000 (13:28 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 6 Jul 2016 23:40:00 +0000 (16:40 -0700)
commit0e24aa6d15f10b8e5941220b21c7d2a71f9cb861
tree26070c220fc9ad06e8123fa1fa8ba93514f25873
parent3136e53018d1225c961a0f1ff4d031c8307d0d14
ixgbe: Reset interface after enabling SR-IOV

Orabug: 23177316

Enabling SR-IOV and then bringing the interface up was resulting in the PF
MAC addresses getting into a bad state.  Specifically the MAC address was
enabled for both VF 0 and the PF.  This resulted in some odd behaviors such
as VF 0 receiving a copy of the PFs traffic, which in turn enables the
ability for VF 0 to spoof the PF.

A workaround for this issue appears to be to bring up the interface first
and then enable SR-IOV as this way the reset is then triggered in the
existing code.

In order to correct this I have added a change to ixgbe_setup_tc where if
the interface is down we still will at least call ixgbe_reset so that the
MAC addresses for the device are reset to the correct pools.

Steps to reproduce issue:
modprobe ixgbe
echo 7 > /sys/bus/pci/devices/0000\:01\:00.1/sriov_numvfs
ifconfig enp1s0f1 up
ethregs -s 1:00.1 | grep MPSAR | grep -v 00000000

Result:
MPSAR[0]               00000081
MPSAR[254]             00000001

Expected Result, behavior after patch:
MPSAR[0]               00000080
MPSAR[254]             00000080

Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
Tested-by: Darin Miller <darin.j.miller@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit bf4d67d94c842edf57e3cac2c4dff58a9ce7ac41)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c