• Akeem G Abodunrin's avatar
    ice: Fix issues updating VSI MAC filters · bbb968e8
    Akeem G Abodunrin authored
    VSI, especially VF could request to add or remove filter for another VSI,
    driver should really guide such request and disallow it.
    However, instead of returning error for such malicious request, driver
    can simply return success.
    
    In addition, we are not tracking number of MAC filters configured per
    VF correctly - and this leads to issue updating VF MAC filters whenever
    they were removed and re-configured via bringing VF interface down and
    up. Also, since VF could send request to update multiple MAC filters at
    once, driver should program those filters individually in the switch, in
    order to determine which action resulted to error, and communicate
    accordingly to the VF.
    
    So, with this changes, we now track number of filters added right from
    when VF resources allocation is done, and could properly add filters for
    both trusted and non_trusted VFs, without MAC filters mis-match issue in
    the switch...
    
    Also refactor code, so that driver can use new function to add or remove
    MAC filters.
    Signed-off-by: default avatarAkeem G Abodunrin <akeem.g.abodunrin@intel.com>
    Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
    Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    bbb968e8
ice_lib.c 81.7 KB