]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: Refactoring VF MAC filters counting to make more reliable
authorAleksandr Loktionov <aleksandr.loktionov@intel.com>
Fri, 20 Sep 2019 09:17:24 +0000 (02:17 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 25 Oct 2019 20:38:19 +0000 (13:38 -0700)
commitb5ef005e9b98ba288205f49b55e222d670b74dff
tree7d3331e64af5b0e9854d3be96551df996cda9f47
parentf18b07a100d4409cff3515b43941c283a3090d79
i40e: Refactoring VF MAC filters counting to make more reliable

This patch prepares ground for the next VF MAC address change fix.
It lets untrusted VF to delete any VF mac filter, but it still
doesn't let untrusted VF to add mac filter not setup by PF.
It removes information duplication in num_mac mac filters counter.
And improves exact h/w mac filters usage checking in the
i40e_check_vf_permission() function by counting mac2add_cnt.
It also improves logging because now all mac addresses will be validated
first and corresponding messages will be logged.

Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
drivers/net/ethernet/intel/i40e/i40e.h
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h