From: Shahaf Shuler <shahafs@mellanox.com>
To: nelio.laranjeiro@6wind.com, yskoh@mellanox.com,
adrien.mazarguil@6wind.com
Cc: dev@dpdk.org, stable@dpdk.org
Subject: [dpdk-dev] [PATCH 4/5] net/mlx5: fix memory registration cache last index
Date: Tue, 23 Jan 2018 19:08:22 +0200 [thread overview]
Message-ID: <fdd12318a13867d2bd06b26aaee34f28cea787b4.1516727100.git.shahafs@mellanox.com> (raw)
In-Reply-To: <cover.1516727100.git.shahafs@mellanox.com>
In case memory registration cache is full the new mempool will be
inserted in the last index of the array.
Update the last entry being hit to reflect it.
Fixes: 6cb559d67b83 ("net/mlx5: add vectorized Rx/Tx burst for x86")
Cc: stable@dpdk.org
Cc: yskoh@mellanox.com
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
---
drivers/net/mlx5/mlx5_rxtx.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index 2934f9fb3..4bedfb89b 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -572,7 +572,6 @@ mlx5_tx_mb2mr(struct mlx5_txq_data *txq, struct rte_mbuf *mb)
return txq->mp2mr[i]->lkey;
}
}
- txq->mr_cache_idx = 0;
mp = mlx5_tx_mb2mp(mb);
if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
WARN("Using unregistered mempool 0x%p(%s) in secondary process,"
@@ -588,6 +587,7 @@ mlx5_tx_mb2mr(struct mlx5_txq_data *txq, struct rte_mbuf *mb)
*/
if (mr) {
rte_atomic32_inc(&mr->refcnt);
+ txq->mr_cache_idx = i >= RTE_DIM(txq->mp2mr) ? i - 1 : i;
return mr->lkey;
} else {
WARN("Failed to register mempool 0x%p(%s)",
--
2.12.0
next prev parent reply other threads:[~2018-01-23 17:08 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-23 17:08 [dpdk-dev] [PATCH 0/5] fix Memory region lookups Shahaf Shuler
2018-01-23 17:08 ` [dpdk-dev] [PATCH 1/5] net/mlx5: fix Memory Region cache lookup Shahaf Shuler
2018-01-23 17:08 ` [dpdk-dev] [PATCH 2/5] net/mlx5: fix secondary process mempool registration Shahaf Shuler
2018-01-24 8:14 ` Nélio Laranjeiro
2018-01-24 13:37 ` Shahaf Shuler
2018-01-23 17:08 ` [dpdk-dev] [PATCH 3/5] net/mlx5: assert for un-successful memory registration Shahaf Shuler
2018-01-24 8:15 ` Nélio Laranjeiro
2018-01-23 17:08 ` Shahaf Shuler [this message]
2018-01-23 17:08 ` [dpdk-dev] [PATCH 5/5] net/mlx5: fix Memory Region boundary checks Shahaf Shuler
2018-01-25 16:17 ` [dpdk-dev] [PATCH v2 0/6] fix Memory region lookups Shahaf Shuler
2018-01-25 16:17 ` [dpdk-dev] [PATCH v2 1/6] net/mlx5: fix Memory Region cache lookup Shahaf Shuler
2018-01-25 16:17 ` [dpdk-dev] [PATCH v2 2/6] net/mlx5: fix secondary process mempool registration Shahaf Shuler
2018-01-25 16:18 ` [dpdk-dev] [PATCH v2 3/6] net/mlx5: remove assert un-accessible from secondary process Shahaf Shuler
2018-01-25 16:18 ` [dpdk-dev] [PATCH v2 4/6] net/mlx5: warn for un-successful memory registration Shahaf Shuler
2018-01-25 16:18 ` [dpdk-dev] [PATCH v2 5/6] net/mlx5: fix Memory Region cache last index Shahaf Shuler
2018-01-25 16:18 ` [dpdk-dev] [PATCH v2 6/6] net/mlx5: fix Memory Region boundary checks Shahaf Shuler
2018-01-25 19:06 ` Yongseok Koh
2018-01-25 16:25 ` [dpdk-dev] [PATCH v2 0/6] fix Memory region lookups Shahaf Shuler
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=fdd12318a13867d2bd06b26aaee34f28cea787b4.1516727100.git.shahafs@mellanox.com \
--to=shahafs@mellanox.com \
--cc=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=nelio.laranjeiro@6wind.com \
--cc=stable@dpdk.org \
--cc=yskoh@mellanox.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).