From: Shahaf Shuler Date: Thu, 25 Jan 2018 16:18:01 +0000 (+0200) Subject: net/mlx5: warn for unsuccessful memory registration X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=bb6883120a95861c1d4dae27839871ce5805e381;p=dpdk.git 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 Signed-off-by: Xueming Li Acked-by: Nelio Laranjeiro --- diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h index 56da93480f..b40177d429 100644 --- a/drivers/net/mlx5/mlx5_rxtx.h +++ b/drivers/net/mlx5/mlx5_rxtx.h @@ -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; }