]> git.droids-corp.org - dpdk.git/commitdiff
net/mlx5: warn for unsuccessful memory registration
authorShahaf Shuler <shahafs@mellanox.com>
Thu, 25 Jan 2018 16:18:01 +0000 (18:18 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 29 Jan 2018 09:04:28 +0000 (10:04 +0100)
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>
drivers/net/mlx5/mlx5_rxtx.h

index 56da93480f0e1409e7d8d252982d5e5212dd249a..b40177d42933913c05acda55672526bdd3570b90 100644 (file)
@@ -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;
 }