src/dpdk/drivers/net/mlx5/mlx5_txq.c
void
mlx5_tx_uar_uninit_secondary(struct rte_eth_dev *dev)
{
	struct mlx5_proc_priv *ppriv = (struct mlx5_proc_priv *)
					dev->process_private;
	const size_t page_size = rte_mem_page_size();
	void *addr;
	unsigned int i;

	if (page_size == (size_t)-1) {
		DRV_LOG(ERR, "Failed to get mem page size");
		return;
	}
	MLX5_ASSERT(rte_eal_process_type() == RTE_PROC_SECONDARY);
	for (i = 0; i != ppriv->uar_table_sz; ++i) {
		if (!ppriv->uar_table[i])
			continue;
		addr = ppriv->uar_table[i];
		rte_mem_unmap(RTE_PTR_ALIGN_FLOOR(addr, page_size), page_size);

	}
}
/**
 * Deinitialize Tx UAR registers for secondary process.
 *
 * @param dev
 *   Pointer to Ethernet device.
 */
Deinitialize Tx UAR registers for secondary process.
@param dev
Pointer to Ethernet device.
Deinitialize Tx UAR registers for secondary process . @param dev Pointer to Ethernet device .
void
mlx5_tx_uar_uninit_secondary(struct rte_eth_dev *dev)
{
	struct mlx5_proc_priv *ppriv = (struct mlx5_proc_priv *)
					dev->process_private;
	const size_t page_size = rte_mem_page_size();
	void *addr;
	unsigned int i;
	if (page_size == (size_t)-1) {
		DRV_LOG(ERR, "Failed to get mem page size");
		return;
	}
	MLX5_ASSERT(rte_eal_process_type() == RTE_PROC_SECONDARY);
	for (i = 0; i != ppriv->uar_table_sz; ++i) {
		if (!ppriv->uar_table[i])
			continue;
		addr = ppriv->uar_table[i];
		rte_mem_unmap(RTE_PTR_ALIGN_FLOOR(addr, page_size), page_size);
	}
}
void mlx5_tx_uar_uninit_secondary ( struct rte_eth_dev * dev ) { struct mlx5_proc_priv * ppriv = ( struct mlx5_proc_priv * ) dev -> process_private ; const size_t page_size = rte_mem_page_size ( ) ; void * addr ; unsigned int i ; if ( page_size == ( size_t ) -1 ) { DRV_LOG ( ERR , " " ) ; return ; } MLX5_ASSERT ( rte_eal_process_type ( ) == RTE_PROC_SECONDARY ) ; for ( i = 0 ; i != ppriv -> uar_table_sz ; ++ i ) { if ( ! ppriv -> uar_table [ i ] ) continue ; addr = ppriv -> uar_table [ i ] ; rte_mem_unmap ( RTE_PTR_ALIGN_FLOOR ( addr , page_size ) , page_size ) ; } }
Deinitialize Tx UAR registers for secondary process.
Deinitialize Tx UAR registers for secondary process .