kernel: fix cross-build of Linux modules with meson
[dpdk.git] / examples / tep_termination / vxlan_setup.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2010-2015 Intel Corporation
3  */
4
5 #ifndef VXLAN_SETUP_H_
6 #define VXLAN_SETUP_H_
7
8 extern uint16_t nb_devices;
9 extern uint16_t udp_port;
10 extern uint8_t filter_idx;
11 extern uint16_t ports[RTE_MAX_ETHPORTS];
12 extern struct ether_addr ports_eth_addr[RTE_MAX_ETHPORTS];
13 extern uint32_t enable_stats;
14 extern struct device_statistics dev_statistics[MAX_DEVICES];
15 extern uint8_t rx_decap;
16 extern uint8_t tx_encap;
17
18 typedef int (*ol_port_configure_t)(uint16_t port,
19                                    struct rte_mempool *mbuf_pool);
20
21 typedef int (*ol_tunnel_setup_t)(struct vhost_dev *vdev,
22                                  struct rte_mbuf *m);
23
24 typedef void (*ol_tunnel_destroy_t)(struct vhost_dev *vdev);
25
26 typedef int (*ol_tx_handle_t)(uint16_t port_id, uint16_t queue_id,
27                               struct rte_mbuf **tx_pkts, uint16_t nb_pkts);
28
29 typedef int (*ol_rx_handle_t)(int vid, struct rte_mbuf **pkts,
30                               uint32_t count);
31
32 typedef int (*ol_param_handle)(int vid);
33
34 struct ol_switch_ops {
35         ol_port_configure_t        port_configure;
36         ol_tunnel_setup_t          tunnel_setup;
37         ol_tunnel_destroy_t        tunnel_destroy;
38         ol_tx_handle_t             tx_handle;
39         ol_rx_handle_t             rx_handle;
40         ol_param_handle            param_handle;
41 };
42
43 int
44 vxlan_port_init(uint16_t port, struct rte_mempool *mbuf_pool);
45
46 int
47 vxlan_link(struct vhost_dev *vdev, struct rte_mbuf *m);
48
49 void
50 vxlan_unlink(struct vhost_dev *vdev);
51
52 int
53 vxlan_tx_pkts(uint16_t port_id, uint16_t queue_id,
54                         struct rte_mbuf **tx_pkts, uint16_t nb_pkts);
55 int
56 vxlan_rx_pkts(int vid, struct rte_mbuf **pkts, uint32_t count);
57
58 #endif /* VXLAN_SETUP_H_ */