]> git.baikalelectronics.ru Git - kernel.git/commit
iavf: fix MAC address setting for VFs when filter is rejected
authorStefan Assmann <sassmann@kpanic.de>
Thu, 5 Sep 2019 06:34:22 +0000 (08:34 +0200)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 11 Sep 2019 16:10:46 +0000 (09:10 -0700)
commitf8db5a5009476e6fb4d3b23a8938bc7c4083f310
tree0eec06c79e9dd6ea09f021d60b6497dffcf51190
parentecedadf7e82409040eac13646e4d155ecb64ee62
iavf: fix MAC address setting for VFs when filter is rejected

Currently iavf unconditionally applies MAC address change requests. This
brings the VF in a state where it is no longer able to pass traffic if
the PF rejects a MAC filter change for the VF.
A typical scenario for a rejected MAC filter is for an untrusted VF to
request to change the MAC address when an administratively set MAC is
present.

To keep iavf working in this scenario the MAC filter handling in iavf
needs to act on the PF reply regarding the MAC filter change. In the
case of an ack the new MAC address gets set, whereas in the case of a
nack the previous MAC address needs to stay in place.

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/iavf/iavf_main.c
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c