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)
commit621650cabee54886291c4fa59544b9e30b016f92
tree7d3331e64af5b0e9854d3be96551df996cda9f47
parentd80a476f4a12a84feaebfed993f3039fdc9c1249
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