blob: d1bdeeb62701dcc2554ba56fd9921ab1de6aff25 (
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
50
51
52
53
|
/* 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>
#include <odp_align_internal.h>
#include <odp_packet_dpdk.h>
/**
* Packet IO types
*/
typedef enum {
ODP_PKTIO_TYPE_SOCKET_BASIC = 0x1,
ODP_PKTIO_TYPE_SOCKET_MMSG,
ODP_PKTIO_TYPE_SOCKET_MMAP,
} odp_pktio_type_t;
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_type_t type; /**< pktio type */
pkt_dpdk_t pkt_dpdk; /**< using DPDK API for IO */
};
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
|