aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAshish Shah <ashish.n.shah@intel.com>2014-08-01 16:27:10 -0400
committerDavid S. Miller <davem@davemloft.net>2014-08-02 22:41:14 -0400
commit89cb86c3b2a7ec3326dc7ffe5cfb850818f78ea0 (patch)
treeafb90cc807d0069e7618f93567d0001684fc2e03
parent84a9208d9ee025945dc9ab79f89f9d36cc60f287 (diff)
i40e: remove support for vf unicast promiscuous mode
Remove the ability of a VF to set unicast promiscuous mode. Considered to be a security risk to allow VFs to receive traffic intended for other VFs so don't allow it, simply ignore the flag. Also fix it to send the correct seid to aq for multicast promiscuous set. Change-ID: Icb9c49a281a8e9d3aeebf991ef1533ac82b84b14 Signed-off-by: Ashish Shah <ashish.n.shah@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 033d85323d6e..89672551dce9 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -1163,8 +1163,8 @@ static int i40e_vc_config_promiscuous_mode_msg(struct i40e_vf *vf,
1163 (struct i40e_virtchnl_promisc_info *)msg; 1163 (struct i40e_virtchnl_promisc_info *)msg;
1164 struct i40e_pf *pf = vf->pf; 1164 struct i40e_pf *pf = vf->pf;
1165 struct i40e_hw *hw = &pf->hw; 1165 struct i40e_hw *hw = &pf->hw;
1166 struct i40e_vsi *vsi;
1166 bool allmulti = false; 1167 bool allmulti = false;
1167 bool promisc = false;
1168 i40e_status aq_ret; 1168 i40e_status aq_ret;
1169 1169
1170 if (!test_bit(I40E_VF_STAT_ACTIVE, &vf->vf_states) || 1170 if (!test_bit(I40E_VF_STAT_ACTIVE, &vf->vf_states) ||
@@ -1174,17 +1174,10 @@ static int i40e_vc_config_promiscuous_mode_msg(struct i40e_vf *vf,
1174 aq_ret = I40E_ERR_PARAM; 1174 aq_ret = I40E_ERR_PARAM;
1175 goto error_param; 1175 goto error_param;
1176 } 1176 }
1177 1177 vsi = pf->vsi[info->vsi_id];
1178 if (info->flags & I40E_FLAG_VF_UNICAST_PROMISC)
1179 promisc = true;
1180 aq_ret = i40e_aq_set_vsi_unicast_promiscuous(hw, info->vsi_id,
1181 promisc, NULL);
1182 if (aq_ret)
1183 goto error_param;
1184
1185 if (info->flags & I40E_FLAG_VF_MULTICAST_PROMISC) 1178 if (info->flags & I40E_FLAG_VF_MULTICAST_PROMISC)
1186 allmulti = true; 1179 allmulti = true;
1187 aq_ret = i40e_aq_set_vsi_multicast_promiscuous(hw, info->vsi_id, 1180 aq_ret = i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid,
1188 allmulti, NULL); 1181 allmulti, NULL);
1189 1182
1190error_param: 1183error_param: