vhost: support virtio status
[dpdk.git] / lib / librte_node / ethdev_rx_priv.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(C) 2020 Marvell International Ltd.
3  */
4 #ifndef __INCLUDE_ETHDEV_RX_PRIV_H__
5 #define __INCLUDE_ETHDEV_RX_PRIV_H__
6
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10
11 #include <rte_common.h>
12
13 struct ethdev_rx_node_elem;
14 struct ethdev_rx_node_ctx;
15 typedef struct ethdev_rx_node_elem ethdev_rx_node_elem_t;
16 typedef struct ethdev_rx_node_ctx ethdev_rx_node_ctx_t;
17
18 /**
19  * @internal
20  *
21  * Ethernet device Rx node context structure.
22  */
23 struct ethdev_rx_node_ctx {
24         uint16_t port_id;  /**< Port identifier of the Rx node. */
25         uint16_t queue_id; /**< Queue identifier of the Rx node. */
26 };
27
28 /**
29  * @internal
30  *
31  * Ethernet device Rx node list element structure.
32  */
33 struct ethdev_rx_node_elem {
34         struct ethdev_rx_node_elem *next;
35         /**< Pointer to the next Rx node element. */
36         struct ethdev_rx_node_ctx ctx;
37         /**< Rx node context. */
38         rte_node_t nid;
39         /**< Node identifier of the Rx node. */
40 };
41
42 enum ethdev_rx_next_nodes {
43         ETHDEV_RX_NEXT_IP4_LOOKUP,
44         ETHDEV_RX_NEXT_MAX,
45 };
46
47 /**
48  * @internal
49  *
50  * Ethernet Rx node main structure.
51  */
52 struct ethdev_rx_node_main {
53         ethdev_rx_node_elem_t *head;
54         /**< Pointer to the head Rx node element. */
55 };
56
57 /**
58  * @internal
59  *
60  * Get the Ethernet Rx node data.
61  *
62  * @return
63  *   Pointer to Ethernet Rx node data.
64  */
65 struct ethdev_rx_node_main *ethdev_rx_get_node_data_get(void);
66
67 /**
68  * @internal
69  *
70  * Get the Ethernet Rx node.
71  *
72  * @retrun
73  *   Pointer to the Ethernet Rx node.
74  */
75 struct rte_node_register *ethdev_rx_node_get(void);
76
77 #ifdef __cplusplus
78 }
79 #endif
80
81 #endif /* __INCLUDE_ETHDEV_RX_PRIV_H__ */