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
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v12 4/4] examples/ifpga: add example for ifpga opae API
Date: Thu, 28 Jan 2021 13:34:42 +0000 [thread overview]
Message-ID: <39a48ca1-d963-11d3-1738-6aadf7710158@intel.com> (raw)
In-Reply-To: <1611643528-18311-5-git-send-email-wei.huang@intel.com>
On 1/26/2021 6:45 AM, Wei Huang wrote:
> Below major OPAE APIs are added in this example.
> 1. opae_init_eal() set up EAL environment.
> 2. opae_cleanup_eal() clean up EAL 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.
>
> An example application shows how to call above OPAE APIs.
> You can test each API by running corresponding command.
> A guide is also added to show how to run the example.
>
> 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 commands.c
> ---
> v3: add guide for running example
> ---
> v4: fix compilation issue of ifpga.rst
> ---
> v5: add ifpga.rst into sample_app_ug/index.rst
> ---
> v6: implement OPAE APIs in example instead of ifpga rawdev
> ---
> MAINTAINERS | 1 +
> doc/guides/sample_app_ug/ifpga.rst | 433 +++++++
> doc/guides/sample_app_ug/index.rst | 1 +
> examples/ifpga/Makefile | 45 +
> examples/ifpga/commands.c | 1321 ++++++++++++++++++++
> examples/ifpga/commands.h | 16 +
> examples/ifpga/main.c | 38 +
> examples/ifpga/meson.build | 20 +
> examples/ifpga/opae_api.c | 1788 ++++++++++++++++++++++++++++
> examples/ifpga/opae_api.h | 245 ++++
> 10 files changed, 3908 insertions(+)
> create mode 100644 doc/guides/sample_app_ug/ifpga.rst
> create mode 100644 examples/ifpga/Makefile
> create mode 100644 examples/ifpga/commands.c
> create mode 100644 examples/ifpga/commands.h
> create mode 100644 examples/ifpga/main.c
> create mode 100644 examples/ifpga/meson.build
> create mode 100644 examples/ifpga/opae_api.c
> create mode 100644 examples/ifpga/opae_api.h
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index eafe9f8c4..04a8fdebb 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -1237,6 +1237,7 @@ M: Tianfei zhang <tianfei.zhang@intel.com>
> T: git://dpdk.org/next/dpdk-next-net-intel
> F: drivers/raw/ifpga/
> F: doc/guides/rawdevs/ifpga.rst
> +F: doc/guides/sample_app_ug/ifpga.rst
The new example also needs to be added to the maintainers file.
>
> IOAT Rawdev
> M: Bruce Richardson <bruce.richardson@intel.com>
> diff --git a/doc/guides/sample_app_ug/ifpga.rst b/doc/guides/sample_app_ug/ifpga.rst
> new file mode 100644
> index 000000000..adcac3bdf
> --- /dev/null
> +++ b/doc/guides/sample_app_ug/ifpga.rst
> @@ -0,0 +1,433 @@
> +.. SPDX-License-Identifier: BSD-3-Clause
> + Copyright(c) 2020-2021 Intel Corporation.
> +
> +Intel FPGA Sample Application
> +=============================
> +
> +The Intel FPGA sample application is an example of how to use OPAE API to manage
> +Intel FPGA.
> +
Can you please explain more what is "OPAE API" in documentation, provide links
if possible.
> +Overview
> +--------
> +
> +The Intel FPGA sample application is a simple application that demonstrates
> +the use of the OPAE API provided by ifpga driver in the DPDK.
> +This application is a readline-like interface that can be used to manage
> +Intel FPGA, in a Linux* application environment.
> +
> +Compiling the Application
> +-------------------------
> +
> +To compile the sample application see :doc:`compiling`
> +
> +The application is located in the ``ifpga`` sub-directory.
> +
> +Running the Application
> +-----------------------
> +
> +To run the application in linux environment, issue the following command:
> +
> +.. code-block:: console
> +
> + $ ./<build_dir>/examples/dpdk-ifpga --proc-type=auto
> +
> +Refer to the *DPDK Getting Started Guide* for general information on running
> +applications and the Environment Abstraction Layer (EAL) options.
> +
> +Explanation
> +-----------
> +
> +The following sections provide some explanation of the code.
> +
> +EAL Initialization and cmdline Start
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +The first task is the initialization of the Environment Abstraction Layer (EAL).
> +This is achieved as follows:
> +
> +.. code-block:: c
> +
> + int main(int argc, char **argv)
> + {
> + ret = opae_init_eal(argc, argv);
> + if (ret < 0)
> + rte_panic("Cannot init EAL\n");
> +
Adding code to the documentation will be heachache to maintain, and it will be
wrong by time as people update the code but not documentation.
I highly suggest removing code snippets from the documentation.
next prev parent reply other threads:[~2021-01-28 13:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-26 6:45 [dpdk-stable] [PATCH v12 0/4] raw/ifpga: add extra OPAE APIs Wei Huang
2021-01-26 6:45 ` [dpdk-stable] [PATCH v12 1/4] raw/ifpga: add fpga rsu function Wei Huang
2021-01-28 13:24 ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit
2021-01-29 7:38 ` Huang, Wei
2021-01-29 8:59 ` Ferruh Yigit
2021-01-26 6:45 ` [dpdk-stable] [PATCH v12 2/4] raw/ifpga: add fpga property get function Wei Huang
2021-01-26 6:45 ` [dpdk-stable] [PATCH v12 3/4] raw/ifpga: add fpga helper function Wei Huang
2021-01-28 13:30 ` Ferruh Yigit
2021-01-29 7:42 ` Huang, Wei
2021-01-26 6:45 ` [dpdk-stable] [PATCH v12 4/4] examples/ifpga: add example for ifpga opae API Wei Huang
2021-01-28 13:34 ` Ferruh Yigit [this message]
2021-01-29 7:44 ` [dpdk-stable] [dpdk-dev] " 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:
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=39a48ca1-d963-11d3-1738-6aadf7710158@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).