DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Zhang, Qi Z" <qi.z.zhang@intel.com>
To: "Zhang, AlvinX" <alvinx.zhang@intel.com>,
	"Yigit, Ferruh" <ferruh.yigit@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2] net/ice: fix txq vector path selection
Date: Sat, 8 May 2021 02:37:10 +0000	[thread overview]
Message-ID: <ae6c9bbafd5d4db29d6c4f57f5044fb5@intel.com> (raw)
In-Reply-To: <20210508012032.14860-1-alvinx.zhang@intel.com>



> -----Original Message-----
> From: Zhang, AlvinX <alvinx.zhang@intel.com>
> Sent: Saturday, May 8, 2021 9:21 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Yigit, Ferruh <ferruh.yigit@intel.com>
> Cc: dev@dpdk.org; Zhang, AlvinX <alvinx.zhang@intel.com>; stable@dpdk.org
> Subject: [PATCH v2] net/ice: fix txq vector path selection
> 
> If Tx vector mode is disabled, the txq vector mode should be disabled too.

If vector mode is not allowed for Tx, no need to perform vector related setup for Tx queue

> 
> This patch adds checking of Tx vector mode before enabling txq vector mode.

The patch deferred vector setup for Tx queue to the place that vector mode is confirmed to be allowed.

> 
> Fixes: 28f9002ab67f ("net/ice: add Tx AVX512 offload path")
> Cc: stable@dpdk.org

No need to add Cc stable, if you fix on current release. 

> 
> Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
> ---
> 
> v2: Update commit log.
> ---
>  drivers/net/ice/ice_rxtx.c | 16 +++++++++-------
>  1 file changed, 9 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c index
> 92fbbc1..49abcb2 100644
> --- a/drivers/net/ice/ice_rxtx.c
> +++ b/drivers/net/ice/ice_rxtx.c
> @@ -3303,13 +3303,6 @@
>  		if (tx_check_ret >= 0 &&
>  		    rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128) {
>  			ad->tx_vec_allowed = true;
> -			for (i = 0; i < dev->data->nb_tx_queues; i++) {
> -				txq = dev->data->tx_queues[i];
> -				if (txq && ice_txq_vec_setup(txq)) {
> -					ad->tx_vec_allowed = false;
> -					break;
> -				}
> -			}
> 
>  			if (rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_512
> &&
>  			rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1 &&
> @@ -3329,6 +3322,15 @@
>  			if (!use_avx512 && tx_check_ret ==
> ICE_VECTOR_OFFLOAD_PATH)
>  				ad->tx_vec_allowed = false;
> 
> +			if (ad->tx_vec_allowed) {
> +				for (i = 0; i < dev->data->nb_tx_queues; i++) {
> +					txq = dev->data->tx_queues[i];
> +					if (txq && ice_txq_vec_setup(txq)) {
> +						ad->tx_vec_allowed = false;
> +						break;
> +					}
> +				}
> +			}
>  		} else {
>  			ad->tx_vec_allowed = false;
>  		}
> --
> 1.8.3.1


  reply	other threads:[~2021-05-08  2:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-25  9:26 [dpdk-dev] [DPDK] net/ice: fix txq mbuf release mode Alvin Zhang
2021-04-27  2:31 ` Rong, Leyi
2021-04-27  3:00   ` Zhang, Qi Z
2021-04-28 10:03 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2021-05-06  2:37   ` Zhang, AlvinX
2021-05-08  1:20 ` [dpdk-dev] [PATCH v2] net/ice: fix txq vector path selection Alvin Zhang
2021-05-08  2:37   ` Zhang, Qi Z [this message]
2021-05-08  3:10     ` Zhang, AlvinX
2021-05-08  3:11   ` [dpdk-dev] [PATCH v3] " Alvin Zhang
2021-05-08  5:53     ` Zhang, Qi Z

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=ae6c9bbafd5d4db29d6c4f57f5044fb5@intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=alvinx.zhang@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=stable@dpdk.org \
    /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).