[dpdk-dev] [PATCH v11 3/4] raw/ifpga: add OPAE API for OpenStack Cyborg

Huang, Wei wei.huang at intel.com
Fri Jan 22 04:25:47 CET 2021


Hi Ferruh,

Most of other APIs depends on EAL environment, they will make sure EAL is ready be executing their task.
As replied in previous mail,  these functions will be called in Python environment. Python application should initialize EAL explicitly before calling other APIs like opae_update_flash. If application forget to do such initialization, an error information will be output when calling other APIs.

Thanks,
Wei

-----Original Message-----
From: Ferruh Yigit <ferruh.yigit at intel.com> 
Sent: Friday, January 22, 2021 00:34
To: Huang, Wei <wei.huang at intel.com>; dev at dpdk.org; Xu, Rosen <rosen.xu at intel.com>; Zhang, Qi Z <qi.z.zhang at intel.com>
Cc: stable at dpdk.org; Zhang, Tianfei <tianfei.zhang at intel.com>
Subject: Re: [dpdk-dev] [PATCH v11 3/4] raw/ifpga: add OPAE API for OpenStack Cyborg

On 1/21/2021 6:03 AM, Wei Huang wrote:
> +int opae_init(int eal_init_result)
> +{
> +	int ret = 0;
> +
> +	if (!check_eal(0))
> +		return 0;
> +
> +	if (eal_init_result < 0) {
> +		if (rte_errno == EALREADY) {
> +			eal_inited = 1;
> +			opae_log_info("EAL already initialized\n");
> +		} else {
> +			opae_log_err("Cannot initialize EAL\n");
> +			ret = -1;
> +		}
> +	} else {
> +		eal_inited = 1;
> +		opae_log_info("Initialize EAL done\n");
> +	}
> +
> +	return ret;
> +}

Why an PMD API needs to know eal initialization status? This may be pointing a bad design, is it possible that most of the 'opae_' API code should go to the application?


More information about the dev mailing list