1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation
5 #ifndef _RTE_COMPAT_NETMAP_H_
8 #include <linux/ioctl.h>
11 #include <rte_ethdev.h>
12 #include <rte_mempool.h>
15 #include "netmap_user.h"
18 * One can overwrite Netmap macros here as needed
21 struct rte_netmap_conf {
23 uint32_t max_rings; /* number of rings(queues) per netmap_if(port) */
24 uint32_t max_slots; /* number of slots(descriptors) per netmap ring. */
25 uint16_t max_bufsz; /* size of each netmap buffer. */
28 struct rte_netmap_port_conf {
29 struct rte_eth_conf *eth_conf;
30 struct rte_mempool *pool;
40 int rte_netmap_init(const struct rte_netmap_conf *conf);
41 int rte_netmap_init_port(uint16_t portid,
42 const struct rte_netmap_port_conf *conf);
44 int rte_netmap_close(int fd);
45 int rte_netmap_ioctl(int fd, uint32_t op, void *param);
46 int rte_netmap_open(const char *pathname, int flags);
47 int rte_netmap_poll(struct pollfd *fds, nfds_t nfds, int timeout);
48 void *rte_netmap_mmap(void *addr, size_t length, int prot, int flags, int fd,
51 #endif /* _RTE_COMPAT_NETMAP_H_ */