[dpdk-dev] [PATCH v2 1/8] ether: refine debug compile option

Ferruh Yigit ferruh.yigit at intel.com
Tue Mar 16 14:05:19 CET 2021


On 3/12/2021 12:12 PM, Qi Zhang wrote:
> PMDs use RTE_LIBRTE_<PMD_NAME>_DEBUG_RX|TX as compile option to wrap
> data path debug code. As .config has been removed since the meson build,
> It is not friendly for new DPDK users to notice those debug options.
> 
> The patch introduces below compile options for specific Rx/Tx data path
> debug, so PMD can choose to reuse them to avoid maintain their own.
> 
> - RTE_LIBRTE_ETHDEV_DEBUG_RX
> - RTE_LIBRTE_ETHDEV_DEBUG_TX
> 
> Also, all the compile options are documented on the overview page, so
> users can easily find them.
> 
> Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>
> ---
>   doc/guides/nics/overview.rst   | 20 ++++++++++++++++++++
>   lib/librte_ethdev/rte_ethdev.h | 16 ++++++++--------
>   2 files changed, 28 insertions(+), 8 deletions(-)
> 
> diff --git a/doc/guides/nics/overview.rst b/doc/guides/nics/overview.rst
> index 20cd52b097..20cf54ef32 100644
> --- a/doc/guides/nics/overview.rst
> +++ b/doc/guides/nics/overview.rst
> @@ -32,3 +32,23 @@ More details about features can be found in :doc:`features`.
>   
>      Features marked with "P" are partially supported. Refer to the appropriate
>      NIC guide in the following sections for details.
> +
> +The ethdev layer support below compile options for debug purpose:
> +
> +- ``RTE_LIBRTE_ETHDEV_DEBUG`` (default **disabled**)
> +
> +  Compile with debug code on data path.
> +
> +- ``RTE_LIBRTE_ETHDEV_DEBUG_RX`` (default **disabled**)
> +
> +  Compile with debug code on Rx data path.
> +
> +- ``RTE_LIBRTE_ETHDEV_DEBUG_TX`` (default **disabled**)
> +
> +  Compile with debug code on Tx data path.
> +
> +.. Note::
> +
> +   The lib_ethdev use above options to wrap debug code to trace invalid parameters on
> +   data path APIs, so performance downgrade is expected when enable those options.
> +   Each PMD can decide to reuse them to wrap their own debug code in the Rx/Tx path.

Hi Qi,

Overall patch looks good to me, but not sure about adding the documentation to 
the NIC overview page. What do you think about moving the doc to next chapter, 
under "3.1. Driver Compilation"?



More information about the dev mailing list