DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Wei Huang <wei.huang@intel.com>,
	dev@dpdk.org, rosen.xu@intel.com, qi.z.zhang@intel.com
Cc: stable@dpdk.org, tianfei.zhang@intel.com,
	Ray Kinsella <mdr@ashroe.eu>,
	Hemant Agrawal <hemant.agrawal@nxp.com>
Subject: Re: [dpdk-dev] [PATCH v12 1/4] raw/ifpga: add fpga rsu function
Date: Thu, 28 Jan 2021 13:24:43 +0000	[thread overview]
Message-ID: <9d4e0dba-4630-15fe-0552-574a960ed598@intel.com> (raw)
In-Reply-To: <1611643528-18311-2-git-send-email-wei.huang@intel.com>

On 1/26/2021 6:45 AM, Wei Huang wrote:
> RSU (Remote System Update) depends on secure manager which may be
> different on various implementations, so a new secure manager device
> is implemented for adapting such difference.
> There are three major functions added:
> 1. ifpga_rawdev_update_flash() updates flash with specific image file.
> 2. ifpga_rawdev_stop_flash_update() aborts flash update process.
> 3. ifpga_rawdev_reload() reloads FPGA from updated flash.
> 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>
> ---
> v2: fix coding style issue in ifpga_fme_rsu.c and ifpga_sec_mgr.c
> ---
> v3: fix compilation issues in ifpga_fme_rsu.c
> ---
> v4: fix compilation issues in opae_intel_max10.c
> ---


> @@ -43,7 +43,7 @@ enum ifpga_rawdev_device_state {
>   static inline struct opae_adapter *
>   ifpga_rawdev_get_priv(const struct rte_rawdev *rawdev)
>   {
> -	return rawdev->dev_private;
> +	return (struct opae_adapter *)rawdev->dev_private;
>   }
> @@ -76,4 +76,9 @@ int
>   ifpga_unregister_msix_irq(enum ifpga_irq_type type,
>   		int vec_start, rte_intr_callback_fn handler, void *arg);
> +int ifpga_rawdev_update_flash(struct rte_rawdev *dev, const char *image,
> +	uint64_t *status);
> +int ifpga_rawdev_stop_flash_update(struct rte_rawdev *dev, int force);
> +int ifpga_rawdev_reload(struct rte_rawdev *dev, int type, int page);
> +
>   #endif /* _IFPGA_RAWDEV_H_ */

Hi Wei, Rosen,

This patch introduces three new PMD specific APIs, adding new API has some 

There must be a header file for user application to include, that has the 
definitions of the APIs.

This header file should be installed in meson via "headers = ..." syntax.

Indeed for rawdev a header always should be installed, because of the rawdev 
design, the user application should know about the some driver structures, to 
share those structures PMD should provide a header. This header seems missing.

You can start for providing the missing header, even before this patch.

Header file should be named as 'rte_pmd_.....', and since it is a public header 
now it should be fully documented via doxygen comments.

This header file should be added to 'doc/api/doxy-api-index.md' for API 

All APIs should start with 'rte_pmd_' prefix.

All APIs should be in the .map file

Since these are new APIs, they should be marked as experimental. This is done 
both documenting this in the doxygen comments and marking the function 
decleration via '__rte_experimental' tag

Please don't use "struct rte_rawdev *dev" as a argument in the APIs, since that 
structure is rawdev internal structures, applications (that will call your API) 
should not know or access to this struct.
Instead you can you 'dev_id' (ethdev 'port_id' equivalent) in the API, as done 
in the rawdev APIs. Driver can easily get the rawdevice from 'dev_id'.

cc'ed Ray & Hemant in case I missed something related to rawdev and API/ABIs.

And for the ifpga implementation, it is hard for me to review it, I trust Rosen 
for it.

  reply	other threads:[~2021-01-28 13:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-26  6:45 [dpdk-dev] [PATCH v12 0/4] raw/ifpga: add extra OPAE APIs Wei Huang
2021-01-26  6:45 ` [dpdk-dev] [PATCH v12 1/4] raw/ifpga: add fpga rsu function Wei Huang
2021-01-28 13:24   ` Ferruh Yigit [this message]
2021-01-29  7:38     ` Huang, Wei
2021-01-29  8:59       ` Ferruh Yigit
2021-01-26  6:45 ` [dpdk-dev] [PATCH v12 2/4] raw/ifpga: add fpga property get function Wei Huang
2021-01-26  6:45 ` [dpdk-dev] [PATCH v12 3/4] raw/ifpga: add fpga helper function Wei Huang
2021-01-28 13:30   ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2021-01-29  7:42     ` Huang, Wei
2021-01-26  6:45 ` [dpdk-dev] [PATCH v12 4/4] examples/ifpga: add example for ifpga opae API Wei Huang
2021-01-28 13:34   ` Ferruh Yigit
2021-01-29  7:44     ` Huang, Wei

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:

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

  git send-email \
    --in-reply-to=9d4e0dba-4630-15fe-0552-574a960ed598@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=mdr@ashroe.eu \
    --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 \


* 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).