From: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
To: dev@dpdk.org
Cc: Thomas Monjalon <thomas.monjalon@6wind.com>,
Adrien Mazarguil <adrien.mazarguil@6wind.com>
Subject: [dpdk-dev] [PATCH 7/7] net/mlx5: remove inefficient prefetching
Date: Thu, 24 Nov 2016 17:03:36 +0100 [thread overview]
Message-ID: <9c689005d303b22bd4704d226aff4782a5f5a00b.1479995764.git.nelio.laranjeiro@6wind.com> (raw)
In-Reply-To: <cover.1479995764.git.nelio.laranjeiro@6wind.com>
In-Reply-To: <cover.1479995764.git.nelio.laranjeiro@6wind.com>
Prefetching completion queue entries is inefficient because too few CPU
cycles are spent before their use, which results into cache misses anyway.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
drivers/net/mlx5/mlx5_rxtx.c | 21 ---------------------
1 file changed, 21 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 4b8c197..9f74fd4 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -348,23 +348,6 @@ mlx5_tx_dbrec(struct txq *txq)
}
/**
- * Prefetch a CQE.
- *
- * @param txq
- * Pointer to TX queue structure.
- * @param cqe_ci
- * CQE consumer index.
- */
-static inline void
-tx_prefetch_cqe(struct txq *txq, uint16_t ci)
-{
- volatile struct mlx5_cqe *cqe;
-
- cqe = &(*txq->cqes)[ci & ((1 << txq->cqe_n) - 1)];
- rte_prefetch0(cqe);
-}
-
-/**
* DPDK callback for TX.
*
* @param dpdk_txq
@@ -395,8 +378,6 @@ mlx5_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
if (unlikely(!pkts_n))
return 0;
/* Prefetch first packet cacheline. */
- tx_prefetch_cqe(txq, txq->cq_ci);
- tx_prefetch_cqe(txq, txq->cq_ci + 1);
rte_prefetch0(*pkts);
/* Start processing. */
txq_complete(txq);
@@ -733,7 +714,6 @@ mlx5_tx_burst_mpw(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
if (unlikely(!pkts_n))
return 0;
/* Prefetch first packet cacheline. */
- tx_prefetch_cqe(txq, txq->cq_ci);
rte_prefetch0(tx_mlx5_wqe(txq, txq->wqe_ci));
rte_prefetch0(tx_mlx5_wqe(txq, txq->wqe_ci + 1));
/* Start processing. */
@@ -938,7 +918,6 @@ mlx5_tx_burst_mpw_inline(void *dpdk_txq, struct rte_mbuf **pkts,
if (unlikely(!pkts_n))
return 0;
/* Prefetch first packet cacheline. */
- tx_prefetch_cqe(txq, txq->cq_ci);
rte_prefetch0(tx_mlx5_wqe(txq, txq->wqe_ci));
rte_prefetch0(tx_mlx5_wqe(txq, txq->wqe_ci + 1));
/* Start processing. */
--
2.1.4
next prev parent reply other threads:[~2016-11-24 16:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-24 16:03 [dpdk-dev] [PATCH 0/7] net/mlx5: improve single core performance Nelio Laranjeiro
2016-11-24 16:03 ` [dpdk-dev] [PATCH 1/7] net/mlx5: prepare Tx vectorization Nelio Laranjeiro
2016-11-24 16:03 ` [dpdk-dev] [PATCH 2/7] net/mlx5: use work queue buffer as a raw buffer Nelio Laranjeiro
2016-11-24 16:03 ` [dpdk-dev] [PATCH 3/7] net/mlx5: use vector types to speed up processing Nelio Laranjeiro
2016-11-24 16:03 ` [dpdk-dev] [PATCH 4/7] net/mlx5: fix missing inline attributes Nelio Laranjeiro
2016-11-24 16:03 ` [dpdk-dev] [PATCH 5/7] net/mlx5: move static prototype Nelio Laranjeiro
2016-11-24 16:03 ` [dpdk-dev] [PATCH 6/7] net/mlx5: optimize copy of Ethernet header Nelio Laranjeiro
2016-11-24 16:03 ` Nelio Laranjeiro [this message]
2017-01-05 14:13 ` [dpdk-dev] [PATCH 0/7] net/mlx5: improve single core performance Ferruh Yigit
2017-01-18 7:20 ` Thomas Monjalon
2017-01-18 9:23 ` Nélio Laranjeiro
2017-01-18 10:01 ` [dpdk-dev] [PATCH] net/mlx5: fix 32bits compilation issue Nelio Laranjeiro
2017-01-18 10:13 ` Thomas Monjalon
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=9c689005d303b22bd4704d226aff4782a5f5a00b.1479995764.git.nelio.laranjeiro@6wind.com \
--to=nelio.laranjeiro@6wind.com \
--cc=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=thomas.monjalon@6wind.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).