MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mlx4_proc_priv_init

Function mlx4_proc_priv_init

dpdk/drivers/net/mlx4/mlx4.c:198–220  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

196 * 0 on success, a negative errno value otherwise and rte_errno is set.
197 */
198int
199mlx4_proc_priv_init(struct rte_eth_dev *dev)
200{
201 struct mlx4_proc_priv *ppriv;
202 size_t ppriv_size;
203
204 mlx4_proc_priv_uninit(dev);
205 /*
206 * UAR register table follows the process private structure. BlueFlame
207 * registers for Tx queues are stored in the table.
208 */
209 ppriv_size = sizeof(struct mlx4_proc_priv) +
210 dev->data->nb_tx_queues * sizeof(void *);
211 ppriv = rte_zmalloc_socket("mlx4_proc_priv", ppriv_size,
212 RTE_CACHE_LINE_SIZE, dev->device->numa_node);
213 if (!ppriv) {
214 rte_errno = ENOMEM;
215 return -rte_errno;
216 }
217 ppriv->uar_table_sz = dev->data->nb_tx_queues;
218 dev->process_private = ppriv;
219 return 0;
220}
221
222/**
223 * Un-initialize process private data structure.

Callers 3

mlx4_dev_configureFunction · 0.85
mlx4_pci_probeFunction · 0.85
mp_secondary_handleFunction · 0.85

Calls 2

mlx4_proc_priv_uninitFunction · 0.85
rte_zmalloc_socketFunction · 0.85

Tested by

no test coverage detected