DPDK patches and discussions
 help / color / mirror / Atom feed
From: Feifei Wang <Feifei.Wang2@arm.com>
To: "Xing, Beilei" <beilei.xing@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, nd <nd@arm.com>,
	Ruifeng Wang <Ruifeng.Wang@arm.com>, nd <nd@arm.com>
Subject: [dpdk-dev] 回复: [PATCH v1 1/2] net/i40e: improve performance for scalar Tx
Date: Tue, 22 Jun 2021 10:08:02 +0000	[thread overview]
Message-ID: <AS8PR08MB69193E702E1BA7DF058FD48FC8099@AS8PR08MB6919.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <AS8PR08MB6919CC9FCE8471F74E5D242EC8099@AS8PR08MB6919.eurprd08.prod.outlook.com>

Sorry for a mistake for the code, it should be:
------------------------------------------------------------------------------------------------
int n = txq->tx_rs_thresh;
 int32_t i = 0, j = 0;
const int32_t k = RTE_ALIGN_FLOOR(n, RTE_I40E_TX_MAX_FREE_BUF_SZ);
const int32_t m = n % RTE_I40E_TX_MAX_FREE_BUF_SZ; 
struct rte_mbuf *free[RTE_I40E_TX_MAX_FREE_BUF_SZ];

For FAST_FREE_MODE:

if (k) {
 	for (j = 0; j != k - RTE_I40E_TX_MAX_FREE_BUF_SZ;
 			j += RTE_I40E_TX_MAX_FREE_BUF_SZ) {
		for (i = 0; i <RTE_I40E_TX_MAX_FREE_BUF_SZ; ++i, ++txep) {
			free[i] = txep->mbuf;
			txep->mbuf = NULL;
		}
 		rte_mempool_put_bulk(free[0]->pool, (void **)free,
 					RTE_I40E_TX_MAX_FREE_BUF_SZ);
 	}
 } 

if (m) {
 	for (i = 0; i < m; ++i, ++txep) {
		free[i] = txep->mbuf;
 		txep->mbuf = NULL;
	}
 }
 rte_mempool_put_bulk(free[0]->pool, (void **)free, m); }
------------------------------------------------------------------------------------------------

  reply	other threads:[~2021-06-22 10:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-27  8:17 [dpdk-dev] [PATCH v1 0/2] net/i40e: improve free mbuf Feifei Wang
2021-05-27  8:17 ` [dpdk-dev] [PATCH v1 1/2] net/i40e: improve performance for scalar Tx Feifei Wang
2021-06-22  6:07   ` Xing, Beilei
2021-06-22  9:58     ` [dpdk-dev] 回复: " Feifei Wang
2021-06-22 10:08       ` Feifei Wang [this message]
2021-06-23  7:02         ` [dpdk-dev] " Xing, Beilei
2021-06-25  9:40           ` [dpdk-dev] 回复: " Feifei Wang
2021-06-28  2:27             ` [dpdk-dev] " Xing, Beilei
2021-06-28  2:28               ` [dpdk-dev] 回复: " Feifei Wang
2021-05-27  8:17 ` [dpdk-dev] [PATCH v1 2/2] net/i40e: improve performance for vector Tx Feifei Wang
2021-06-22  1:52 ` [dpdk-dev] 回复: [PATCH v1 0/2] net/i40e: improve free mbuf Feifei Wang
2021-06-30  6:40 ` [dpdk-dev] [PATCH v3 0/2] net/i40e: improve free mbuf for Tx Feifei Wang
2021-06-30  6:40   ` [dpdk-dev] [PATCH v3 1/2] net/i40e: improve performance for scalar Tx Feifei Wang
2021-06-30  6:59     ` Xing, Beilei
2021-06-30  6:40   ` [dpdk-dev] [PATCH v3 2/2] net/i40e: improve performance for vector Tx Feifei Wang
2021-07-01 12:34   ` [dpdk-dev] [PATCH v3 0/2] net/i40e: improve free mbuf for Tx 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=AS8PR08MB69193E702E1BA7DF058FD48FC8099@AS8PR08MB6919.eurprd08.prod.outlook.com \
    --to=feifei.wang2@arm.com \
    --cc=Ruifeng.Wang@arm.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=nd@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).