1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation
5 #ifndef _RTE_ETH_RING_H_
6 #define _RTE_ETH_RING_H_
15 * Create a new ethdev port from a set of rings
18 * name to be given to the new ethdev port
20 * pointer to array of rte_rings to be used as RX queues
22 * number of elements in the rx_queues array
24 * pointer to array of rte_rings to be used as TX queues
26 * number of elements in the tx_queues array
28 * the numa node on which the memory for this port is to be allocated
30 * the port number of the newly created the ethdev or -1 on error.
32 int rte_eth_from_rings(const char *name,
33 struct rte_ring * const rx_queues[],
34 const unsigned nb_rx_queues,
35 struct rte_ring *const tx_queues[],
36 const unsigned nb_tx_queues,
37 const unsigned numa_node);
40 * Create a new ethdev port from a ring
42 * This function is a shortcut call for rte_eth_from_rings for the
43 * case where one wants to take a single rte_ring and use it as though
47 * the ring to be used as an ethdev
49 * the port number of the newly created ethdev, or -1 on error
51 int rte_eth_from_ring(struct rte_ring *r);