src/dpdk/drivers/net/mlx4/mlx4.c
int
mlx4_proc_priv_init(struct rte_eth_dev *dev)
{
	struct mlx4_proc_priv *ppriv;
	size_t ppriv_size;

	/*
	 * UAR register table follows the process private structure. BlueFlame
	 * registers for Tx queues are stored in the table.
	 */
	ppriv_size = sizeof(struct mlx4_proc_priv) +
		     dev->data->nb_tx_queues * sizeof(void *);
	ppriv = rte_zmalloc_socket("mlx4_proc_priv", ppriv_size,
				   RTE_CACHE_LINE_SIZE, dev->device->numa_node);
	if (!ppriv) {
		rte_errno = ENOMEM;
		return -rte_errno;
	}
	ppriv->uar_table_sz = dev->data->nb_tx_queues;
	dev->process_private = ppriv;
	return 0;
}
/**
 * Initialize process private data structure.
 *
 * @param dev
 *   Pointer to Ethernet device structure.
 *
 * @return
 *   0 on success, a negative errno value otherwise and rte_errno is set.
 */
Initialize process private data structure.
@param dev
Pointer to Ethernet device structure.

@return
0 on success, a negative errno value otherwise and rte_errno is set.
Initialize process private data structure . @param dev Pointer to Ethernet device structure . @return 0 on success a negative errno value otherwise and rte_errno is set .
int
mlx4_proc_priv_init(struct rte_eth_dev *dev)
{
	struct mlx4_proc_priv *ppriv;
	size_t ppriv_size;
	ppriv_size = sizeof(struct mlx4_proc_priv) +
		     dev->data->nb_tx_queues * sizeof(void *);
	ppriv = rte_zmalloc_socket("mlx4_proc_priv", ppriv_size,
				   RTE_CACHE_LINE_SIZE, dev->device->numa_node);
	if (!ppriv) {
		rte_errno = ENOMEM;
		return -rte_errno;
	}
	ppriv->uar_table_sz = dev->data->nb_tx_queues;
	dev->process_private = ppriv;
	return 0;
}
int mlx4_proc_priv_init ( struct rte_eth_dev * dev ) { struct mlx4_proc_priv * ppriv ; size_t ppriv_size ; ppriv_size = sizeof ( struct mlx4_proc_priv ) + dev -> data -> nb_tx_queues * sizeof ( void * ) ; ppriv = rte_zmalloc_socket ( " " , ppriv_size , RTE_CACHE_LINE_SIZE , dev -> device -> numa_node ) ; if ( ! ppriv ) { rte_errno = ENOMEM ; return - rte_errno ; } ppriv -> uar_table_sz = dev -> data -> nb_tx_queues ; dev -> process_private = ppriv ; return 0 ; }
Initialize process private data structure.
Initialize process private data structure .
/*
	 * UAR register table follows the process private structure. BlueFlame
	 * registers for Tx queues are stored in the table.
	 */