blob: ba1ee9b7d254f044a7cafb4d8a19af7a0ea715ce (
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
43
44
45
46
47
48
49
|
/* Copyright (c) 2013, Linaro Limited
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
/**
* @file
*
* ODP packet IO - implementation internal
*/
#ifndef ODP_PACKET_IO_INTERNAL_H_
#define ODP_PACKET_IO_INTERNAL_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <odp_spinlock.h>
#include <odp_packet_socket.h>
#ifdef ODP_HAVE_NETMAP
#include <odp_packet_netmap.h>
#endif
struct pktio_entry {
odp_spinlock_t lock; /**< entry spinlock */
int taken; /**< is entry taken(1) or free(0) */
odp_queue_t inq_default; /**< default input queue, if set */
odp_queue_t outq_default; /**< default out queue */
odp_pktio_params_t params; /**< pktio parameters */
pkt_sock_t pkt_sock; /**< using socket API for IO */
#ifdef ODP_HAVE_NETMAP
pkt_netmap_t pkt_nm; /**< using netmap API for IO */
#endif
};
typedef union {
struct pktio_entry s;
uint8_t pad[ODP_CACHE_LINE_SIZE_ROUNDUP(sizeof(struct pktio_entry))];
} pktio_entry_t;
#ifdef __cplusplus
}
#endif
#endif
|