From: "Zhang, Qi Z" <qi.z.zhang@intel.com>
To: Feifei Wang <feifei.wang2@arm.com>,
"Xing, Beilei" <beilei.xing@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"Wang, Haiyue" <haiyue.wang@intel.com>, "nd@arm.com" <nd@arm.com>,
Ruifeng Wang <ruifeng.wang@arm.com>
Subject: RE: [PATCH v2] net/i40e: reduce redundant store operation
Date: Wed, 26 Jan 2022 14:28:07 +0000 [thread overview]
Message-ID: <81e2007f120a41ecab83ac3575f74fae@intel.com> (raw)
In-Reply-To: <20211221081121.444021-1-feifei.wang2@arm.com>
> -----Original Message-----
> From: Feifei Wang <feifei.wang2@arm.com>
> Sent: Tuesday, December 21, 2021 4:11 PM
> To: Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; Wang, Haiyue <haiyue.wang@intel.com>; nd@arm.com;
> Feifei Wang <feifei.wang2@arm.com>; Ruifeng Wang
> <ruifeng.wang@arm.com>
> Subject: [PATCH v2] net/i40e: reduce redundant store operation
>
> For free buffer operation in i40e vector path, it is unnecessary to store 'NULL'
> into txep.mbuf. This is because when putting mbuf into Tx queue, tx_tail is
> the sentinel. And when doing tx_free, tx_next_dd is the sentinel. In all
> processes, mbuf==NULL is not a condition in check.
> Thus reset of mbuf is unnecessary and can be omitted.
>
> Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> ---
>
> v2: remove the change for scalar path due to scalar path needs to check
> whether the mbuf is 'NULL' to release and clean up (Haiyue)
>
> drivers/net/i40e/i40e_rxtx_vec_common.h | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h
> b/drivers/net/i40e/i40e_rxtx_vec_common.h
> index f9a7f46550..26deb59fc4 100644
> --- a/drivers/net/i40e/i40e_rxtx_vec_common.h
> +++ b/drivers/net/i40e/i40e_rxtx_vec_common.h
> @@ -103,7 +103,6 @@ i40e_tx_free_bufs(struct i40e_tx_queue *txq)
> if (txq->offloads & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) {
> for (i = 0; i < n; i++) {
> free[i] = txep[i].mbuf;
> - txep[i].mbuf = NULL;
I will suggest to still add some comment here just for explaining, this may help to avoid unnecessary suspect when someone reading or debug on these code 😊
> }
> rte_mempool_put_bulk(free[0]->pool, (void **)free, n);
> goto done;
> --
> 2.25.1
next prev parent reply other threads:[~2022-01-26 14:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-21 8:11 Feifei Wang
2022-01-26 14:28 ` Zhang, Qi Z [this message]
2022-01-27 6:08 ` 回复: " Feifei Wang
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=81e2007f120a41ecab83ac3575f74fae@intel.com \
--to=qi.z.zhang@intel.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=feifei.wang2@arm.com \
--cc=haiyue.wang@intel.com \
--cc=nd@arm.com \
--cc=ruifeng.wang@arm.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).