DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: "Huang, Wei" <wei.huang@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-dev] [PATCH v11 3/4] raw/ifpga: add OPAE API for OpenStack Cyborg
Date: Mon, 25 Jan 2021 10:07:24 +0000	[thread overview]
Message-ID: <fb8aaa36-b9b0-0146-6d3b-c3d7e0a64ac5@intel.com> (raw)
In-Reply-To: <DM6PR11MB353093E99909BF424A4F177AEFA00@DM6PR11MB3530.namprd11.prod.outlook.com>

On 1/22/2021 2:43 AM, Huang, Wei wrote:

<Please do not top post, your comment moved below>

>> -----Original Message-----
>> From: Ferruh Yigit <ferruh.yigit@intel.com>
>> Sent: Friday, January 22, 2021 00:30
>> 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:
>>> Cyborg is an OpenStack project that aims to provide a general purpose
>>> management framework for acceleration resources (i.e. various types of
>>> accelerators such as GPU, FPGA, NP, ODP, DPDK/SPDK and so on).
>>> It needs some OPAE type APIs to manage PACs (Programmable Acceleration
>>> Card) with Intel FPGA. Below major functions are added to meets Cyborg
>>> requirements.
>>> 1. opae_init() set up OPAE environment.
>>> 2. opae_cleanup() clean up OPAE environment.
>>> 3. opae_enumerate() searches PAC with specific FPGA.
>>> 4. opae_get_property() gets properties of FPGA.
>>> 5. opae_partial_reconfigure() perform partial configuration on FPGA.
>>> 6. opae_get_image_info() gets information of image file.
>>> 7. opae_update_flash() updates FPGA flash with specific image file.
>>> 8. opae_cancel_flash_update() cancel process of FPGA flash update.
>>> 9. opae_probe_device() manually probe specific FPGA with ifpga driver.
>>> 10. opae_remove_device() manually remove specific FPGA from ifpga driver.
>>> 11. opae_bind_driver() binds specific FPGA with specified kernel driver.
>>> 12. opae_unbind_driver() unbinds specific FPGA from kernel driver.
>>> 13. opae_reboot_device() reboots specific FPGA (do reconfiguration).
>>>
>>> Signed-off-by: Wei Huang <wei.huang@intel.com>
>>> Acked-by: Tianfei Zhang <tianfei.zhang@intel.com>
>>> Acked-by: Rosen Xu <rosen.xu@intel.com>
>> 
>> <...>
>> 
>>> +
>>> +RTE_INIT(init_api_env)
>>> +{
>>> +eal_inited = 0;
>>> +opae_log_level = OPAE_LOG_ERR;
>>> +opae_log_file = NULL;
>>> +ifpga_rawdev_logtype = 0;
>>> +
>>> +opae_log_info("API environment is initialized\n"); }
>>> +
>>> +RTE_FINI(clean_api_env)
>>> +{
>>> +if (opae_log_file) {
>>> +fclose(opae_log_file);
>>> +opae_log_file = NULL;
>>> +}
>>> +opae_log_info("API environment is cleaned\n"); }
>>> +
>> 
>> There are called in constructor and destructor, which means all DPDK applications have this PMD compiled will run above and print some log, is this really what we want here?
>> Is there a way to limit the initialize to the PMD context, like 'probe()' etc?
>> 
> 
> Hi Ferruh,
> 
> These log information will not be output for the default log level is OPAE_LOG_ERR, they are output only when log level is set to OPAE_LOG_INFO. I can remove them if you think it's necessary.
> 

Although they don't output because of default log level, I think it is wrong 
that they run for _all_ dpdk applications, I still think it should run for the 
scope of the driver, not for all dpdk applications.

> All these opae_xxx functions will check the input PCI address is valid or not, and the rawdev PMD will also filter input PCI device ID. I think it's enough to prevent these function to be misused.
> 
> Thanks,
> Wei


  reply	other threads:[~2021-01-25 10:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-21  6:03 [dpdk-dev] [PATCH v11 0/4] raw/ifpga: add extra OPAE APIs Wei Huang
2021-01-21  6:03 ` [dpdk-dev] [PATCH v11 1/4] raw/ifpga: add fpga rsu function Wei Huang
2021-01-21 16:30   ` [dpdk-dev] [dpdk-stable] " 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-dev] [PATCH v11 2/4] raw/ifpga: add fpga property get function Wei Huang
2021-01-21  6:03 ` [dpdk-dev] [PATCH v11 3/4] raw/ifpga: add OPAE API for OpenStack Cyborg Wei Huang
2021-01-21 16:29   ` Ferruh Yigit
2021-01-22  2:43     ` Huang, Wei
2021-01-25 10:07       ` Ferruh Yigit [this message]
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
2021-01-21  6:03 ` [dpdk-dev] [PATCH v11 4/4] examples/ifpga: add example for opae ifpga API Wei Huang
2021-01-21 16:49   ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2021-01-22  3:52     ` Huang, Wei
2021-01-21  7:08 ` [dpdk-dev] [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=fb8aaa36-b9b0-0146-6d3b-c3d7e0a64ac5@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=rosen.xu@intel.com \
    --cc=stable@dpdk.org \
    --cc=tianfei.zhang@intel.com \
    --cc=wei.huang@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).