diff options
Diffstat (limited to 'vnet')
-rw-r--r-- | vnet/vnet/devices/netmap/cli.c | 4 | ||||
-rw-r--r-- | vnet/vnet/devices/netmap/device.c | 5 | ||||
-rw-r--r-- | vnet/vnet/devices/netmap/netmap.h | 9 | ||||
-rw-r--r-- | vnet/vnet/devices/netmap/node.c | 5 |
4 files changed, 17 insertions, 6 deletions
diff --git a/vnet/vnet/devices/netmap/cli.c b/vnet/vnet/devices/netmap/cli.c index e3d61460b6c..584d68002d3 100644 --- a/vnet/vnet/devices/netmap/cli.c +++ b/vnet/vnet/devices/netmap/cli.c @@ -14,11 +14,15 @@ * limitations under the License. *------------------------------------------------------------------ */ +#include <stdint.h> +#include <net/if.h> +#include <sys/ioctl.h> #include <vlib/vlib.h> #include <vlib/unix/unix.h> #include <vnet/ethernet/ethernet.h> +#include <vnet/devices/netmap/net_netmap.h> #include <vnet/devices/netmap/netmap.h> static clib_error_t * diff --git a/vnet/vnet/devices/netmap/device.c b/vnet/vnet/devices/netmap/device.c index dcd04733613..f04e0672c90 100644 --- a/vnet/vnet/devices/netmap/device.c +++ b/vnet/vnet/devices/netmap/device.c @@ -15,10 +15,15 @@ *------------------------------------------------------------------ */ +#include <stdint.h> +#include <net/if.h> +#include <sys/ioctl.h> + #include <vlib/vlib.h> #include <vlib/unix/unix.h> #include <vnet/ethernet/ethernet.h> +#include <vnet/devices/netmap/net_netmap.h> #include <vnet/devices/netmap/netmap.h> #define foreach_netmap_tx_func_error \ diff --git a/vnet/vnet/devices/netmap/netmap.h b/vnet/vnet/devices/netmap/netmap.h index 026f0001f96..c5b3dfbc71a 100644 --- a/vnet/vnet/devices/netmap/netmap.h +++ b/vnet/vnet/devices/netmap/netmap.h @@ -40,11 +40,6 @@ * SUCH DAMAGE. */ -#include <stdint.h> -#include <net/if.h> -#include <sys/ioctl.h> -#include <vnet/devices/netmap/net_netmap.h> - typedef struct { CLIB_CACHE_LINE_ALIGN_MARK(cacheline0); u8 * host_if_name; @@ -101,6 +96,8 @@ int netmap_delete_if(vlib_main_t * vm, u8 * host_if_name); /* Macros and helper functions from sys/net/netmap_user.h */ +#ifdef _NET_NETMAP_H_ + #define _NETMAP_OFFSET(type, ptr, offset) \ ((type)(void *)((char *)(ptr) + (offset))) @@ -144,5 +141,5 @@ nm_ring_space(struct netmap_ring *ring) ret += ring->num_slots; return ret; } - +#endif diff --git a/vnet/vnet/devices/netmap/node.c b/vnet/vnet/devices/netmap/node.c index d4c01411904..3986c7e4762 100644 --- a/vnet/vnet/devices/netmap/node.c +++ b/vnet/vnet/devices/netmap/node.c @@ -15,10 +15,15 @@ *------------------------------------------------------------------ */ +#include <stdint.h> +#include <net/if.h> +#include <sys/ioctl.h> + #include <vlib/vlib.h> #include <vlib/unix/unix.h> #include <vnet/ethernet/ethernet.h> +#include <vnet/devices/netmap/net_netmap.h> #include <vnet/devices/netmap/netmap.h> #define foreach_netmap_input_error |