[PATCH 1/4] ethdev: introduce ethdev HW desc dump PI
Stephen Hemminger
stephen at networkplumber.org
Fri May 27 17:34:18 CEST 2022
On Fri, 27 May 2022 10:33:48 +0800
"Min Hu (Connor)" <humin29 at huawei.com> wrote:
> Added the ethdev HW Rx desc dump API which provides functions for query
> HW descriptor from device. HW descriptor info differs in different NICs.
> The information demonstrates I/O process which is important for debug.
> As the information is different between NICs, the new API is introduced.
>
> Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
> ---
> doc/guides/rel_notes/release_22_07.rst | 6 ++++
> lib/ethdev/ethdev_driver.h | 42 ++++++++++++++++++++++++
> lib/ethdev/rte_ethdev.c | 44 ++++++++++++++++++++++++++
> lib/ethdev/rte_ethdev.h | 44 ++++++++++++++++++++++++++
> lib/ethdev/version.map | 2 ++
> 5 files changed, 138 insertions(+)
>
> diff --git a/doc/guides/rel_notes/release_22_07.rst b/doc/guides/rel_notes/release_22_07.rst
> index 0ed4f92820..cfb9117dd3 100644
> --- a/doc/guides/rel_notes/release_22_07.rst
> +++ b/doc/guides/rel_notes/release_22_07.rst
> @@ -95,6 +95,12 @@ New Features
> * Added AH mode support in lookaside protocol (IPsec) for CN9K & CN10K.
> * Added AES-GMAC support in lookaside protocol (IPsec) for CN9K & CN10K.
>
> +* **Added ethdev HW desc dump API, to dump Rx/Tx HW desc info from device.**
> +
> + Added the ethdev HW Rx desc dump API which provides functions for query
> + HW descriptor from device. HW descriptor info differs in different NICs.
> + The information demonstrates I/O process which is important for debug.
> + As the information is different between NICs, the new API is introduced.
>
> Removed Items
> -------------
> diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h
> index 69d9dc21d8..89512ab360 100644
> --- a/lib/ethdev/ethdev_driver.h
> +++ b/lib/ethdev/ethdev_driver.h
> @@ -1073,6 +1073,42 @@ typedef int (*eth_ip_reassembly_conf_set_t)(struct rte_eth_dev *dev,
> */
> typedef int (*eth_dev_priv_dump_t)(struct rte_eth_dev *dev, FILE *file);
>
> +/**
> + * @internal
> + * Dump ethdev Rx descriptor info to a file.
> + *
> + * @param file
> + * A pointer to a file for output.
> + * @param dev
> + * Port (ethdev) handle.
> + * @param queue_id
> + * The selected queue.
> + * @param desc_id
> + * The selected descriptor.
> + * @return
> + * Negative errno value on error, zero on success.
> + */
> +typedef int (*eth_rx_hw_desc_dump_t)(FILE *file, struct rte_eth_dev *dev,
> + uint16_t queue_id, uint16_t desc_id);
> +
> +/**
> + * @internal
> + * Dump ethdev Tx descriptor info to a file.
> + *
> + * @param file
> + * A pointer to a file for output.
> + * @param dev
> + * Port (ethdev) handle.
> + * @param queue_id
> + * The selected queue.
> + * @param desc_id
> + * The selected descriptor.
> + * @return
> + * Negative errno value on error, zero on success.
> + */
> +typedef int (*eth_tx_hw_desc_dump_t)(FILE *file, struct rte_eth_dev *dev,
> + uint16_t queue_id, uint16_t desc_id);
Should be 'const struct rte_eth_dev *dev' to remind developers that dump
should not modify device?
More information about the dev
mailing list