[PATCH v4] doc: add new driver guidelines
Ferruh Yigit
ferruh.yigit at amd.com
Fri Sep 27 02:19:15 CEST 2024
On 9/16/2024 5:28 PM, Stephen Hemminger wrote:
> From: Nandini Persad <nandinipersad361 at gmail.com>
>
> This document was created to assist contributors in creating DPDK drivers
> and provides suggestions and guidelines on how to upstream effectively.
>
> Co-authored-by: Ferruh Yigit <ferruh.yigit at amd.com>
> Co-authored-by: Thomas Monjalon <thomas at monjalon.net>
> Signed-off-by: Nandini Persad <nandinipersad361 at gmail.com>
> Reviewed-by: Stephen Hemminger <stephen at networkplumber.org>
> Acked-by: Chengwen Feng <fengchengwen at huawei.com>
>
Thanks for the update, build warnings and format issues seems fixed.
<...>
> ---
> doc/guides/contributing/index.rst | 1 +
> doc/guides/contributing/new_driver.rst | 207 +++++++++++++++++++++++++
> 2 files changed, 208 insertions(+)
> create mode 100644 doc/guides/contributing/new_driver.rst
>
> diff --git a/doc/guides/contributing/index.rst b/doc/guides/contributing/index.rst
> index dcb9b1fbf0..7fc6511361 100644
> --- a/doc/guides/contributing/index.rst
> +++ b/doc/guides/contributing/index.rst
> @@ -15,6 +15,7 @@ Contributor's Guidelines
> documentation
> unit_test
> new_library
> + new_driver
> patches
> vulnerability
> stable
> diff --git a/doc/guides/contributing/new_driver.rst b/doc/guides/contributing/new_driver.rst
> new file mode 100644
> index 0000000000..f95d3b90bc
> --- /dev/null
> +++ b/doc/guides/contributing/new_driver.rst
> @@ -0,0 +1,207 @@
> +.. SPDX-License-Identifier: BSD-3-Clause
> + Copyright 2024 The DPDK contributors
> +
> +
> +Upstreaming New DPDK Drivers Guide
> +==================================
> +
>
The title of this guide is:
"Upstreaming New DPDK Drivers Guide"
Title of the document for adding new libraries:
"Adding a new library"
In the index they are next to each other, and different wording looks
inconsistent.
We can simply call this document "Adding a new driver",
or update library one title, but I think better to align them somehow.
<...>
> +Avoid doing the following:
> +
> +* Using PMD specific macros when DPDK macros exist
> +* Including unused headers (process-iwyu.py)
> +* Disabling compiler warnings for driver
> +* #ifdef with driver-defined macros
> +* DPDK version checks (via RTE_VERSION_NUM) in the upstream code
> +* Introducing Public APIs directly from the driver
> +* Adding driver private APIs. If a new feature is needed, it is
> + better to extend the corresponding framework API
> +
>
Last two items are for the same issue, we sometime call public APIs from
drivers as "driver private APIs".
First one looks simpler, perhaps we can keep that one, but I don't have
strong opinion, as long as we remove the duplication.
<...>
> +
> +Be sure to run the following test tools per patch in a patch series:
>
The list is missing in the patch, it was:
* checkpatches.sh
* check-git-log.sh
* check-meson.py
* check-doc-vs-code.sh
* check-spdx-tag.sh
* Build documentation and validate how output looks
More information about the dev
mailing list