On Fri, Mar 01, 2024 at 09:44:21AM +0000, Mingjin Ye wrote:
> Implemented a Tx wrapper to perform a thorough check on mbufs,
> categorizing and counting invalid cases by types for diagnostic
> purposes. The count of invalid cases is accessible through xstats_get.
> 
> Also, the devarg option "mbuf_check" was introduced to configure the
> diagnostic parameters to enable the appropriate diagnostic features.
> 
> supported cases: mbuf, size, segment, offload.
>  1. mbuf: check for corrupted mbuf.
>  2. size: check min/max packet length according to hw spec.
>  3. segment: check number of mbuf segments not exceed hw limitation.
>  4. offload: check any unsupported offload flag.
> 
> parameter format: "mbuf_check=<case>" or "mbuf_check=[<case1>,<case2>]"
> eg: dpdk-testpmd -a 0000:81:01.0,mbuf_check=[mbuf,size] -- -i
> 
> Signed-off-by: Mingjin Ye <mingjinx...@intel.com>
> ---
> v2: remove strict.
> ---
> v3: optimised.
> ---
> v4: rebase.
> ---
> v5: fix ci error.
> ---
>  doc/guides/nics/i40e.rst       |  13 +++
>  drivers/net/i40e/i40e_ethdev.c | 138 ++++++++++++++++++++++++++++-
>  drivers/net/i40e/i40e_ethdev.h |  28 ++++++
>  drivers/net/i40e/i40e_rxtx.c   | 153 +++++++++++++++++++++++++++++++--
>  drivers/net/i40e/i40e_rxtx.h   |   2 +
>  5 files changed, 326 insertions(+), 8 deletions(-)
> 
> diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst
> index 15689ac958..bf1d1e5d60 100644
> --- a/doc/guides/nics/i40e.rst
> +++ b/doc/guides/nics/i40e.rst
> @@ -275,6 +275,19 @@ Runtime Configuration
>  
>    -a 84:00.0,vf_msg_cfg=80@120:180
>  
> +- ``Support TX diagnostics`` (default ``not enabled``)
> +
> +  Set the ``devargs`` parameter ``mbuf_check`` to enable TX diagnostics. For 
> example,
> +  ``-a 18:01.0,mbuf_check=<case>`` or ``-a 
> 18:01.0,mbuf_check=[<case1>,<case2>...]``. Also,
> +  ``xstats_get`` can be used to get the error counts, which are collected in
> +  ``tx_mbuf_error_packets`` xstats. For example, ``testpmd> show port xstats 
> all``.
> +  Supported cases:
> +
> +  *   mbuf: Check for corrupted mbuf.
> +  *   size: Check min/max packet length according to hw spec.
> +  *   segment: Check number of mbuf segments not exceed hw limitation.
> +  *   offload: Check any unsupported offload flag.
> +

Hi Mingjin,

please see the changes made to the equivalent doc (and commit-log) updates
for iavf when I applied that earlier patch to next-net-intel. This patch
should be updated to match that. Changes were pretty basic, but still
useful, for example, aligning line breaks to punctuation.

Thanks,
/Bruce

PS: This feedback applies to the net/ice patch too.

Reply via email to