[dpdk-dev] [RFC] net/mlx: enable DMA memory registration from secondary process

Yongseok Koh yskoh at mellanox.com
Fri Mar 1 02:39:59 CET 2019


For both mlx4 and mlx5, the Memory Region (MR) for DMA memory can't be created
from secondary process due to lib/driver limitation. It is prohibited in the
code for now, thus all the memory being used by secondary process should be
registered on initialization.

mlx5_mr_create(...)
{
[...]
	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
		DRV_LOG(WARNING,
			"port %u using address (%p) of unregistered mempool"
			" in secondary process, please create mempool"
			" before rte_eth_dev_start()",
			dev->data->port_id, (void *)addr);
		rte_errno = EPERM;
		goto err_nolock;
	}
[...]
}

In 19.05, this restriction will be removed and secondary process will be able to
send a request of creating a MR to primary process via rte_mp_*() APIs. Once a
MR is created by primary process, it will be immediately visible to the
secondary through the shared private data, struct mlx[4|5]_priv.

No changes would be needed outside of mlx4/5 PMD.


Signed-off-by: Yongseok Koh <yskoh at mellanox.com>        



More information about the dev mailing list