aboutsummaryrefslogtreecommitdiff
path: root/lib/netdev-odp.h
blob: ba58c089b2b93c7df7f2bba8dc4c1dc4b43094ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef NETDEV_ODP_H
#define NETDEV_ODP_H

#include <config.h>
#include "ofpbuf.h"

#ifdef ODP_NETDEV

#include <odp.h>
#include <odp/helper/eth.h>
#include <odp/helper/ip.h>

/* This function is not exported, we need another way to deal with
   creating a packet from an ofpbuf */
extern void odp_packet_parse(odp_packet_t pkt, size_t len, size_t l2_offset);


void netdev_odp_register(void);
void free_odp_buf(struct ofpbuf *);
int odp_init(int argc, char *argv[]);

#else

static inline void
netdev_odp_register(void)
{
    /* Nothing */
}

static inline void
free_odp_buf(struct ofpbuf *buf OVS_UNUSED)
{
    /* Nothing */
}


#endif /* ODP_NETDEV */
#endif