]> git.baikalelectronics.ru Git - kernel.git/commit
iavf: Fix ping is lost after untrusted VF had tried to change MAC
authorSylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
Wed, 18 Aug 2021 17:42:17 +0000 (10:42 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 19 Aug 2021 16:56:15 +0000 (09:56 -0700)
commitba3cecec1ce45f350d9f9d423a0e283e31f23cd0
tree5b80f1111c6b3273d0d0c07478abcbf381b8576d
parentf102d745a8cf224f6b640d0985aab23e300f5d8b
iavf: Fix ping is lost after untrusted VF had tried to change MAC

Make changes to MAC address dependent on the response of PF.
Disallow changes to HW MAC address and MAC filter from untrusted
VF, thanks to that ping is not lost if VF tries to change MAC.
Add a new field in iavf_mac_filter, to indicate whether there
was response from PF for given filter. Based on this field pass
or discard the filter.
If untrusted VF tried to change it's address, it's not changed.
Still filter was changed, because of that ping couldn't go through.

Fixes: a7a317898997 ("iavf: fix MAC address setting for VFs when filter is rejected")
Signed-off-by: Przemyslaw Patynowski <przemyslawx.patynowski@intel.com>
Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
Signed-off-by: Mateusz Palczewski <mateusz.palczewski@intel.com>
Tested-by: Gurucharan G <Gurucharanx.g@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/intel/iavf/iavf.h
drivers/net/ethernet/intel/iavf/iavf_main.c
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c