[dpdk-dev] [PATCH v7 03/27] net/i40e: set VF MAC anti-spoofing from PF

Wu, Jingjing jingjing.wu at intel.com
Fri Jan 6 01:33:03 CET 2017


> +
> +	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



More information about the dev mailing list