src/dpdk/drivers/net/mlx4/mlx4_mr.c
uint32_t
mlx4_tx_update_ext_mp(struct txq *txq, uintptr_t addr, struct rte_mempool *mp)
{
	struct mlx4_mr_ctrl *mr_ctrl = &txq->mr_ctrl;
	struct mlx4_priv *priv = txq->priv;

	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
		WARN("port %u using address (%p) from unregistered mempool"
		     " having externally allocated memory"
		     " in secondary process, please create mempool"
		     " prior to rte_eth_dev_start()",
		     PORT_ID(priv), (void *)addr);
		return UINT32_MAX;
	}
	mlx4_mr_update_ext_mp(ETH_DEV(priv), mr_ctrl, mp);
	return mlx4_tx_addr2mr_bh(txq, addr);
}
/**
 * Register MR entire memory chunks in a Mempool having externally allocated
 * memory and search LKey of the address to return.
 *
 * @param dev
 *   Pointer to Ethernet device.
 * @param addr
 *   Search key.
 * @param mp
 *   Pointer to registering Mempool where addr belongs.
 *
 * @return
 *   LKey for address on success, UINT32_MAX on failure.
 */
Register MR entire memory chunks in a Mempool having externally allocated
memory and search LKey of the address to return.

@param dev
Pointer to Ethernet device.
@param addr
Search key.
@param mp
Pointer to registering Mempool where addr belongs.

@return
LKey for address on success, UINT32_MAX on failure.
Register MR entire memory chunks in a Mempool having externally allocated memory and search LKey of the address to return . @param dev Pointer to Ethernet device . @param addr Search key . @param mp Pointer to registering Mempool where addr belongs . @return LKey for address on success UINT32_MAX on failure .
uint32_t
mlx4_tx_update_ext_mp(struct txq *txq, uintptr_t addr, struct rte_mempool *mp)
{
	struct mlx4_mr_ctrl *mr_ctrl = &txq->mr_ctrl;
	struct mlx4_priv *priv = txq->priv;
	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
		WARN("port %u using address (%p) from unregistered mempool"
		     " having externally allocated memory"
		     " in secondary process, please create mempool"
		     " prior to rte_eth_dev_start()",
		     PORT_ID(priv), (void *)addr);
		return UINT32_MAX;
	}
	mlx4_mr_update_ext_mp(ETH_DEV(priv), mr_ctrl, mp);
	return mlx4_tx_addr2mr_bh(txq, addr);
}
uint32_t mlx4_tx_update_ext_mp ( struct txq * txq , uintptr_t addr , struct rte_mempool * mp ) { struct mlx4_mr_ctrl * mr_ctrl = & txq -> mr_ctrl ; struct mlx4_priv * priv = txq -> priv ; if ( rte_eal_process_type ( ) != RTE_PROC_PRIMARY ) { WARN ( " " " " " " " " , PORT_ID ( priv ) , ( void * ) addr ) ; return UINT32_MAX ; } mlx4_mr_update_ext_mp ( ETH_DEV ( priv ) , mr_ctrl , mp ) ; return mlx4_tx_addr2mr_bh ( txq , addr ) ; }
Register MR entire memory chunks in a Mempool having externally allocated
 memory and search LKey of the address to return.
Register MR entire memory chunks in a Mempool having externally allocated memory and search LKey of the address to return .