src/dpdk/drivers/net/mlx4/mlx4_mr.c
static uint32_t
mlx4_mr_create(struct rte_eth_dev *dev, struct mlx4_mr_cache *entry,
	       uintptr_t addr)
{
	uint32_t ret = 0;

	switch (rte_eal_process_type()) {
	case RTE_PROC_PRIMARY:
		ret = mlx4_mr_create_primary(dev, entry, addr);
		break;
	case RTE_PROC_SECONDARY:
		ret = mlx4_mr_create_secondary(dev, entry, addr);
		break;
	default:
		break;
	}
	return ret;
}
/**
 * Create a new global Memory Region (MR) for a missing virtual address.
 * This can be called from primary and secondary process.
 *
 * @param dev
 *   Pointer to Ethernet device.
 * @param[out] entry
 *   Pointer to returning MR cache entry, found in the global cache or newly
 *   created. If failed to create one, this will not be updated.
 * @param addr
 *   Target virtual address to register.
 *
 * @return
 *   Searched LKey on success, UINT32_MAX on failure and rte_errno is set.
 */
Create a new global Memory Region (MR) for a missing virtual address.
This can be called from primary and secondary process.

@param dev
Pointer to Ethernet device.
@param[out] entry
Pointer to returning MR cache entry, found in the global cache or newly
created. If failed to create one, this will not be updated.
@param addr
Target virtual address to register.

@return
Searched LKey on success, UINT32_MAX on failure and rte_errno is set.
Create a new global Memory Region ( MR ) for a missing virtual address . This can be called from primary and secondary process . @param dev Pointer to Ethernet device . @param [ out ] entry Pointer to returning MR cache entry found in the global cache or newly created . If failed to create one this will not be updated . @param addr Target virtual address to register . @return Searched LKey on success UINT32_MAX on failure and rte_errno is set .
static uint32_t
mlx4_mr_create(struct rte_eth_dev *dev, struct mlx4_mr_cache *entry,
	       uintptr_t addr)
{
	uint32_t ret = 0;
	switch (rte_eal_process_type()) {
	case RTE_PROC_PRIMARY:
		ret = mlx4_mr_create_primary(dev, entry, addr);
		break;
	case RTE_PROC_SECONDARY:
		ret = mlx4_mr_create_secondary(dev, entry, addr);
		break;
	default:
		break;
	}
	return ret;
}
static uint32_t mlx4_mr_create ( struct rte_eth_dev * dev , struct mlx4_mr_cache * entry , uintptr_t addr ) { uint32_t ret = 0 ; switch ( rte_eal_process_type ( ) ) { case RTE_PROC_PRIMARY : ret = mlx4_mr_create_primary ( dev , entry , addr ) ; break ; case RTE_PROC_SECONDARY : ret = mlx4_mr_create_secondary ( dev , entry , addr ) ; break ; default : break ; } return ret ; }
Create a new global Memory Region (MR) for a missing virtual address.
Create a new global Memory Region ( MR ) for a missing virtual address .