|
@@ -9903,6 +9903,31 @@ static int i40e_add_vsi(struct i40e_vsi *vsi)
|
|
|
|
|
|
enabled_tc = i40e_pf_get_tc_map(pf);
|
|
|
|
|
|
+ /* Source pruning is enabled by default, so the flag is
|
|
|
+ * negative logic - if it's set, we need to fiddle with
|
|
|
+ * the VSI to disable source pruning.
|
|
|
+ */
|
|
|
+ if (pf->flags & I40E_FLAG_SOURCE_PRUNING_DISABLED) {
|
|
|
+ memset(&ctxt, 0, sizeof(ctxt));
|
|
|
+ ctxt.seid = pf->main_vsi_seid;
|
|
|
+ ctxt.pf_num = pf->hw.pf_id;
|
|
|
+ ctxt.vf_num = 0;
|
|
|
+ ctxt.info.valid_sections |=
|
|
|
+ cpu_to_le16(I40E_AQ_VSI_PROP_SWITCH_VALID);
|
|
|
+ ctxt.info.switch_id =
|
|
|
+ cpu_to_le16(I40E_AQ_VSI_SW_ID_FLAG_LOCAL_LB);
|
|
|
+ ret = i40e_aq_update_vsi_params(hw, &ctxt, NULL);
|
|
|
+ if (ret) {
|
|
|
+ dev_info(&pf->pdev->dev,
|
|
|
+ "update vsi failed, err %s aq_err %s\n",
|
|
|
+ i40e_stat_str(&pf->hw, ret),
|
|
|
+ i40e_aq_str(&pf->hw,
|
|
|
+ pf->hw.aq.asq_last_status));
|
|
|
+ ret = -ENOENT;
|
|
|
+ goto err;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/* MFP mode setup queue map and update VSI */
|
|
|
if ((pf->flags & I40E_FLAG_MFP_ENABLED) &&
|
|
|
!(pf->hw.func_caps.iscsi)) { /* NIC type PF */
|