> +
> +     vsi->info.valid_sections =
> cpu_to_le16(I40E_AQ_VSI_PROP_SECURITY_VALID);
> +     if (on)
> +             vsi->info.sec_flags |=
> I40E_AQ_VSI_SEC_FLAG_ENABLE_MAC_CHK;
> +     else
> +             vsi->info.sec_flags &=
> ~I40E_AQ_VSI_SEC_FLAG_ENABLE_MAC_CHK;
> +
> +     memset(&ctxt, 0, sizeof(ctxt));
> +     (void)rte_memcpy(&ctxt.info, &vsi->info, sizeof(vsi->info));
> +     ctxt.seid = vsi->seid;
> +
> +     hw = I40E_VSI_TO_HW(vsi);
> +     ret = i40e_aq_update_vsi_params(hw, &ctxt, NULL);
> +     if (ret != I40E_SUCCESS)
> +             PMD_DRV_LOG(ERR, "Failed to update VSI params");

If fails, will you revert the info in vsi struct?

> +
> +     return ret;

Please return eth dev lib error code, but not I40E_XXX

Reply via email to