net/mlx5: warn for unsuccessful memory registration
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@mellanox.com> Signed-off-by: Xueming Li <xuemingl@mellanox.com> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
This commit is contained in:
parent
1b2a3baaed
commit
bb6883120a
@ -576,6 +576,11 @@ mlx5_tx_mb2mr(struct mlx5_txq_data *txq, struct rte_mbuf *mb)
|
||||
if (mr) {
|
||||
rte_atomic32_inc(&mr->refcnt);
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user