diff options
author | Anjali Singhai Jain <anjali.singhai@intel.com> | 2016-04-13 12:08:23 +0200 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2016-05-02 02:03:37 +0200 |
commit | a856b5cb83fea40f28634a0220d7587d42e529d2 (patch) | |
tree | 3eadbde29df92c9fcf84eb99c82b34aa0e196760 /drivers/net/ethernet/intel/i40e | |
parent | i40e: Limit the number of MAC and VLAN addresses that can be added for VFs (diff) | |
download | linux-a856b5cb83fea40f28634a0220d7587d42e529d2.tar.xz linux-a856b5cb83fea40f28634a0220d7587d42e529d2.zip |
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: Anjali Singhai Jain <anjali.singhai@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e')
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 39b3b56d3a9f..a45748e52ef6 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -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 */ if (changed_flags & IFF_ALLMULTI) { bool cur_multipromisc; |