Commit a856b5cb authored by Anjali Singhai Jain's avatar Anjali Singhai Jain Committed by Jeff Kirsher

i40e: Prevent falling to promiscuous if the VF is not trusted

With this change a non trusted VF can never fall to promiscuous
mode when there is no room for a MAC/VLAN filter.

Change-Id: I8a155aa25c0bcdc6093414920c9ade4ee0bd20e8
Signed-off-by: default avatarAnjali Singhai Jain <anjali.singhai@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 5f527ba9
...@@ -2098,6 +2098,12 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi) ...@@ -2098,6 +2098,12 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi)
} }
} }
/* if the VF is not trusted do not do promisc */
if ((vsi->type == I40E_VSI_SRIOV) && !pf->vf[vsi->vf_id].trusted) {
clear_bit(__I40E_FILTER_OVERFLOW_PROMISC, &vsi->state);
goto out;
}
/* check for changes in promiscuous modes */ /* check for changes in promiscuous modes */
if (changed_flags & IFF_ALLMULTI) { if (changed_flags & IFF_ALLMULTI) {
bool cur_multipromisc; bool cur_multipromisc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment