DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Zhang, Qi Z" <qi.z.zhang@intel.com>
To: "Ye, MingjinX" <mingjinx.ye@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Yang, Qiming" <qiming.yang@intel.com>,
	"Ye, MingjinX" <mingjinx.ye@intel.com>,
	"Wu, Jingjing" <jingjing.wu@intel.com>,
	"Xing, Beilei" <beilei.xing@intel.com>
Subject: RE: [PATCH] net/iavf: add diagnostic support in TX path
Date: Thu, 21 Dec 2023 12:00:49 +0000	[thread overview]
Message-ID: <DM4PR11MB59946AB629C0492B44971B65D795A@DM4PR11MB5994.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20231221101202.2815069-1-mingjinx.ye@intel.com>



> -----Original Message-----
> From: Mingjin Ye <mingjinx.ye@intel.com>
> Sent: Thursday, December 21, 2023 6:12 PM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Ye, MingjinX
> <mingjinx.ye@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>
> Subject: [PATCH] net/iavf: add diagnostic support in TX path
> 
> The only way to enable diagnostics for TX paths is to modify the application
> source code. Making it difficult to diagnose faults.
> 
> In this patch, the devarg option "mbuf_check" is introduced and the
> parameters are configured to enable the corresponding diagnostics.
> 
> supported cases: mbuf, size, segment, offload, strict.
>  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.
>  5. strict: check protocol headers.
> 
> parameter format: mbuf_check=[mbuf,<case1>,<case2>]
> eg: dpdk-testpmd -a 0000:81:01.0,mbuf_check=[mbuf,size] -- -i
> 
> Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>



> +
> +static uint16_t
> +iavf_xmit_pkts_chain(void *tx_queue, struct rte_mbuf **tx_pkts,
> +uint16_t nb_pkts) {
> +	struct iavf_tx_queue *txq = tx_queue;
> +	struct iavf_adapter *adapter = txq->vsi->adapter;
> +	struct iavf_tx_burst_elem *pos;
> +	struct iavf_tx_burst_elem *save_next;
> +	struct iavf_pkt_burst *item;
> +	uint16_t ret;
> +
> +	item = &ice_rxtx_pkt_burst[adapter->dev_data->port_id];
> +	RTE_TAILQ_FOREACH_SAFE(pos, &item->tx_burst_list, next,
> save_next) {
> +		ret = pos->tx_pkt_burst(tx_queue, tx_pkts, nb_pkts);
> +		if (nb_pkts != ret)

This is not correct,

> +			break;
> +	}
> +
> +	return ret;
> +}
> +
> 
>  /* choose rx function*/
> @@ -3973,9 +4226,6 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
> void  iavf_set_tx_function(struct rte_eth_dev *dev)  {
> -	struct iavf_adapter *adapter =
> -		IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
> -	int no_poll_on_link_down = adapter-
> >devargs.no_poll_on_link_down;
>  #ifdef RTE_ARCH_X86
>  	struct iavf_tx_queue *txq;
>  	int i;
> @@ -4062,10 +4312,7 @@ iavf_set_tx_function(struct rte_eth_dev *dev)
> #endif
>  		}
> 
> -		if (no_poll_on_link_down) {
> -			adapter->tx_pkt_burst = dev->tx_pkt_burst;
> -			dev->tx_pkt_burst = iavf_xmit_pkts_no_poll;
> -		}
> +		iavf_set_tx_interceptors(dev);

If no_poll or diagnose mode are not enabled, why we still need to interceptor?, 

Btw, its too heavy to use a chain here and I even didn't see an Rx chain implementation.

Why not simplify it as below:

adapter->tx_pkt_burst = dev->tx_pkt_burst;
if (no_poll_on_link_down)
	dev->tx_pkt_burst = iavf_xmit_pkts_no_poll;
else if (diagnose mode)
	dev->tx_pkt_burst = iavf_xmit_pkt_mdd_check.

then iavf_xmit_pkt_mdd_check,  call iavf_xmit_pkts_no_poll or adapter->tx_pkt_burst






  reply	other threads:[~2023-12-21 12:01 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-21 10:12 Mingjin Ye
2023-12-21 12:00 ` Zhang, Qi Z [this message]
2023-12-22 10:44 ` [PATCH v2] " Mingjin Ye
2023-12-22 11:37   ` Zhang, Qi Z
2023-12-25  2:48     ` Ye, MingjinX
2023-12-26 10:07   ` [PATCH v3] " Mingjin Ye
2023-12-27 10:16     ` [PATCH v4 1/2] " Mingjin Ye
2023-12-27 11:30       ` Zhang, Qi Z
2023-12-28 10:26       ` [PATCH v5 0/2] net/iavf: add diagnostics and fix error Mingjin Ye
2023-12-28 10:26         ` [PATCH v5 1/2] net/iavf: fix Tx path error in multi-process Mingjin Ye
2023-12-28 10:50           ` Zhang, Qi Z
2023-12-29 10:11           ` [PATCH v6 0/2] net/iavf: fix Rx/Tx burst and add diagnostics Mingjin Ye
2023-12-29 10:11             ` [PATCH v6 1/2] net/iavf: fix Rx/Tx burst in multi-process Mingjin Ye
2023-12-31  6:41               ` Zhang, Qi Z
2024-01-02 10:52               ` [PATCH v7 0/2] net/iavf: fix Rx/Tx burst and add diagnostics Mingjin Ye
2024-01-02 10:52                 ` [PATCH v7 1/2] net/iavf: fix Rx/Tx burst in multi-process Mingjin Ye
2024-01-03  2:22                   ` Zhang, Qi Z
2024-01-02 10:52                 ` [PATCH v7 2/2] net/iavf: add diagnostic support in TX path Mingjin Ye
2024-01-03  2:54                   ` Zhang, Qi Z
2024-01-03 10:10                   ` [PATCH v8 0/2] net/iavf: fix Rx/Tx burst and add diagnostics Mingjin Ye
2024-01-03 10:10                     ` [PATCH v8 1/2] net/iavf: fix Rx/Tx burst in multi-process Mingjin Ye
2024-01-03 10:10                     ` [PATCH v8 2/2] net/iavf: add diagnostic support in TX path Mingjin Ye
2024-01-04 10:18                       ` [PATCH v9 0/2] net/iavf: fix Rx/Tx burst and add diagnostics Mingjin Ye
2024-01-04 10:18                         ` [PATCH v9 1/2] net/iavf: fix Rx/Tx burst in multi-process Mingjin Ye
2024-01-04 10:18                         ` [PATCH v9 2/2] net/iavf: add diagnostic support in TX path Mingjin Ye
2024-01-05  9:58                           ` [PATCH v10] " Mingjin Ye
2024-01-09 10:09                             ` [PATCH v11] " Mingjin Ye
2024-01-10  2:25                             ` Mingjin Ye
2024-02-09 14:43                               ` Burakov, Anatoly
2024-02-09 15:20                               ` Burakov, Anatoly
2024-02-19  9:55                               ` [PATCH v12] " Mingjin Ye
2024-02-29 18:38                                 ` Bruce Richardson
2024-03-04 12:34                                   ` Bruce Richardson
2024-01-05  0:44                       ` [PATCH v8 2/2] " Zhang, Qi Z
2023-12-29 10:11             ` [PATCH v6 " Mingjin Ye
2023-12-28 10:26         ` [PATCH v5 " Mingjin Ye

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=DM4PR11MB59946AB629C0492B44971B65D795A@DM4PR11MB5994.namprd11.prod.outlook.com \
    --to=qi.z.zhang@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=mingjinx.ye@intel.com \
    --cc=qiming.yang@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).