]> git.proxmox.com Git - ceph.git/blob - ceph/src/spdk/dpdk/lib/librte_node/rte_node_eth_api.h
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / spdk / dpdk / lib / librte_node / rte_node_eth_api.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2020 Marvell International Ltd.
3 */
4
5 #ifndef __INCLUDE_RTE_NODE_ETH_API_H__
6 #define __INCLUDE_RTE_NODE_ETH_API_H__
7
8 /**
9 * @file rte_node_eth_api.h
10 *
11 * @warning
12 * @b EXPERIMENTAL: this API may change without prior notice
13 *
14 * This API allows to setup ethdev_rx and ethdev_tx nodes
15 * and its queue associations.
16 *
17 */
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23 #include <rte_common.h>
24 #include <rte_mempool.h>
25
26 /**
27 * Port config for ethdev_rx and ethdev_tx node.
28 */
29 struct rte_node_ethdev_config {
30 uint16_t port_id;
31 /**< Port identifier */
32 uint16_t num_rx_queues;
33 /**< Number of Rx queues. */
34 uint16_t num_tx_queues;
35 /**< Number of Tx queues. */
36 struct rte_mempool **mp;
37 /**< Array of mempools associated to Rx queue. */
38 uint16_t mp_count;
39 /**< Size of mp array. */
40 };
41
42 /**
43 * Initializes ethdev nodes.
44 *
45 * @param cfg
46 * Array of ethdev config that identifies which port's
47 * ethdev_rx and ethdev_tx nodes need to be created
48 * and queue association.
49 * @param cnt
50 * Size of cfg array.
51 * @param nb_graphs
52 * Number of graphs that will be used.
53 *
54 * @return
55 * 0 on successful initialization, negative otherwise.
56 */
57 __rte_experimental
58 int rte_node_eth_config(struct rte_node_ethdev_config *cfg,
59 uint16_t cnt, uint16_t nb_graphs);
60 #ifdef __cplusplus
61 }
62 #endif
63
64 #endif /* __INCLUDE_RTE_NODE_ETH_API_H__ */