patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Huang, Wei" <wei.huang@intel.com>
To: "Yigit, Ferruh" <ferruh.yigit@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>, "Xu, Rosen" <rosen.xu@intel.com>,
	"Zhang, Qi Z" <qi.z.zhang@intel.com>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
	"Zhang, Tianfei" <tianfei.zhang@intel.com>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v11 3/4] raw/ifpga: add OPAE API for OpenStack Cyborg
Date: Fri, 22 Jan 2021 03:25:47 +0000	[thread overview]
Message-ID: <DM6PR11MB35301BE6F758A4C597D3462CEFA00@DM6PR11MB3530.namprd11.prod.outlook.com> (raw)
In-Reply-To: <a8f465ea-b7e6-c676-8ba3-974da0810b44@intel.com>

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@intel.com> 
Sent: Friday, January 22, 2021 00:34
To: Huang, Wei <wei.huang@intel.com>; dev@dpdk.org; Xu, Rosen <rosen.xu@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
Cc: stable@dpdk.org; Zhang, Tianfei <tianfei.zhang@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?

  reply	other threads:[~2021-01-22  3:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-21  6:03 [dpdk-stable] [PATCH v11 0/4] raw/ifpga: add extra OPAE APIs Wei Huang
2021-01-21  6:03 ` [dpdk-stable] [PATCH v11 1/4] raw/ifpga: add fpga rsu function Wei Huang
2021-01-21 16:30   ` Ferruh Yigit
2021-01-22  2:18     ` Huang, Wei
2021-01-25 10:01       ` Ferruh Yigit
2021-01-25 10:33         ` Xu, Rosen
2021-01-26  1:16           ` Huang, Wei
2021-01-21  6:03 ` [dpdk-stable] [PATCH v11 2/4] raw/ifpga: add fpga property get function Wei Huang
2021-01-21  6:03 ` [dpdk-stable] [PATCH v11 3/4] raw/ifpga: add OPAE API for OpenStack Cyborg Wei Huang
2021-01-21 16:29   ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit
2021-01-22  2:43     ` Huang, Wei
2021-01-25 10:07       ` Ferruh Yigit
2021-01-21 16:30   ` Ferruh Yigit
2021-01-22  3:16     ` Huang, Wei
2021-01-21 16:33   ` Ferruh Yigit
2021-01-22  3:25     ` Huang, Wei [this message]
2021-01-21  6:03 ` [dpdk-stable] [PATCH v11 4/4] examples/ifpga: add example for opae ifpga API Wei Huang
2021-01-21 16:49   ` Ferruh Yigit
2021-01-22  3:52     ` Huang, Wei
2021-01-21  7:08 ` [dpdk-stable] [PATCH v11 0/4] raw/ifpga: add extra OPAE APIs Zhang, Qi Z

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR11MB35301BE6F758A4C597D3462CEFA00@DM6PR11MB3530.namprd11.prod.outlook.com \
    --to=wei.huang@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=rosen.xu@intel.com \
    --cc=stable@dpdk.org \
    --cc=tianfei.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).