From: "Zhang, Qi Z" <qi.z.zhang@intel.com>
To: "Yang, MurphyX" <murphyx.yang@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Yang, Qiming" <qiming.yang@intel.com>,
"Guo, Jia" <jia.guo@intel.com>,
"Xing, Beilei" <beilei.xing@intel.com>,
"Yang, SteveX" <stevex.yang@intel.com>,
"Zhang, RobinX" <robinx.zhang@intel.com>
Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix mbuf fast free wrong check
Date: Thu, 8 Apr 2021 08:57:26 +0000 [thread overview]
Message-ID: <4cd3ec47b57c4a8e91685a21c0633968@intel.com> (raw)
In-Reply-To: <20210407063729.67731-1-murphyx.yang@intel.com>
> -----Original Message-----
> From: Yang, MurphyX <murphyx.yang@intel.com>
> Sent: Wednesday, April 7, 2021 2:37 PM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Guo, Jia <jia.guo@intel.com>;
> Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Yang,
> SteveX <stevex.yang@intel.com>; Zhang, RobinX <robinx.zhang@intel.com>;
> Yang, MurphyX <murphyx.yang@intel.com>
> Subject: [PATCH] net/i40e: fix mbuf fast free wrong check
>
> If no offload flags are set, then 0 == 0 & <anything> is true.
> This means that if DEV_TX_OFFLOAD_MBUF_FAST_FREE is not set (and no
> other flags are set) then this check will still enable `tx_simple_allowed`.
>
> This patch adds the 'offloads' flag not equal zero to avoid this scenario.
>
> Bugzilla ID: 665
> Fixes: 399421100e08 ("net/i40e: fix missing mbuf fast free offload")
>
> Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
> ---
> drivers/net/i40e/i40e_rxtx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index
> b3d7765e3b..1450b228ca 100644
> --- a/drivers/net/i40e/i40e_rxtx.c
> +++ b/drivers/net/i40e/i40e_rxtx.c
> @@ -3345,7 +3345,7 @@ i40e_set_tx_function_flag(struct rte_eth_dev *dev,
> struct i40e_tx_queue *txq)
>
> /* Use a simple Tx queue if possible (only fast free is allowed) */
> ad->tx_simple_allowed =
> - (txq->offloads ==
> + (txq->offloads != 0 && txq->offloads ==
> (txq->offloads & DEV_TX_OFFLOAD_MBUF_FAST_FREE) &&
I don't think this is correct.
Why simple_tx can't be selected if no DEV_TX_OFFLOAD_MBUF_FAST_FREE is required?
Actually, the original code means, the max Tx offload that simple_tx support is DEV_TX_OFFLOAD_MBUF_FAST_FREE, you can't have more than it, but cannot have it.
> txq->tx_rs_thresh >= RTE_PMD_I40E_TX_MAX_BURST);
> ad->tx_vec_allowed = (ad->tx_simple_allowed &&
> --
> 2.17.1
prev parent reply other threads:[~2021-04-08 8:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-07 6:37 [dpdk-dev] [PATCH] net/i40e: fix mbuf fast free wrong check Murphy Yang
2021-04-08 8:57 ` Zhang, Qi Z [this message]
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=4cd3ec47b57c4a8e91685a21c0633968@intel.com \
--to=qi.z.zhang@intel.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=jia.guo@intel.com \
--cc=murphyx.yang@intel.com \
--cc=qiming.yang@intel.com \
--cc=robinx.zhang@intel.com \
--cc=stevex.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.