aboutsummaryrefslogtreecommitdiff
path: root/lib/netdev-odp.h
blob: 8f5aa00e7db3b91505247817c1775658f8fc2dcc (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
39
40
41
42
#ifndef NETDEV_ODP_H
#define NETDEV_ODP_H

#include <config.h>

extern int odp_initialized;
#ifdef ODP_NETDEV

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

extern const odp_platform_init_t *platform_params;
extern odp_instance_t odp_instance;

/* This function is not exported, we need another way to deal with
   creating a packet from an dp_packet */
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 dp_packet *);
int pmd_thread_setaffinity_cpu(int cpu);
void odp_init(void);

#else

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

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


#endif /* ODP_NETDEV */
#endif