[dpdk-stable] [PATCH v2 09/67] net/mlx5: warn for unsuccessful memory registration
Yongseok Koh
yskoh at mellanox.com
Tue Jun 5 02:27:32 CEST 2018
From: Shahaf Shuler <shahafs at mellanox.com>
[ upstream commit bb6883120a95861c1d4dae27839871ce5805e381 ]
Memory registration can fail, add the proper warning for such scenario
for it at least to be visible in debug mode.
Signed-off-by: Shahaf Shuler <shahafs at mellanox.com>
Signed-off-by: Xueming Li <xuemingl at mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro at 6wind.com>
---
drivers/net/mlx5/mlx5_rxtx.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index 9132d49c2..e35a6ab34 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -571,6 +571,11 @@ mlx5_tx_mb2mr(struct mlx5_txq_data *txq, struct rte_mbuf *mb)
rte_atomic32_inc(&mr->refcnt);
txq->mr_cache_idx = i >= RTE_DIM(txq->mp2mr) ? i - 1 : i;
return mr->lkey;
+ } else {
+ struct rte_mempool *mp = mlx5_tx_mb2mp(mb);
+
+ WARN("Failed to register mempool 0x%p(%s)",
+ (void *)mp, mp->name);
}
return (uint32_t)-1;
}
--
2.11.0
More information about the stable
mailing list