DPDK
2.0.0
|
Data Structures | |
struct | rte_port_in_ops |
struct | rte_port_out_ops |
Macros | |
#define | RTE_PORT_IN_BURST_SIZE_MAX 64 |
#define | RTE_MBUF_METADATA_UINT8(mbuf, offset) (((uint8_t *)&(mbuf)[1])[offset]) |
#define | RTE_MBUF_METADATA_UINT16(mbuf, offset) (((uint16_t *)&(mbuf)[1])[offset/sizeof(uint16_t)]) |
#define | RTE_MBUF_METADATA_UINT32(mbuf, offset) (((uint32_t *)&(mbuf)[1])[offset/sizeof(uint32_t)]) |
#define | RTE_MBUF_METADATA_UINT64(mbuf, offset) (((uint64_t *)&(mbuf)[1])[offset/sizeof(uint64_t)]) |
#define | RTE_MBUF_METADATA_UINT8_PTR(mbuf, offset) (&RTE_MBUF_METADATA_UINT8(mbuf, offset)) |
#define | RTE_MBUF_METADATA_UINT16_PTR(mbuf, offset) (&RTE_MBUF_METADATA_UINT16(mbuf, offset)) |
#define | RTE_MBUF_METADATA_UINT32_PTR(mbuf, offset) (&RTE_MBUF_METADATA_UINT32(mbuf, offset)) |
#define | RTE_MBUF_METADATA_UINT64_PTR(mbuf, offset) (&RTE_MBUF_METADATA_UINT64(mbuf, offset)) |
Typedefs | |
typedef void *(* | rte_port_in_op_create )(void *params, int socket_id) |
typedef int(* | rte_port_in_op_free )(void *port) |
typedef int(* | rte_port_in_op_rx )(void *port, struct rte_mbuf **pkts, uint32_t n_pkts) |
typedef void *(* | rte_port_out_op_create )(void *params, int socket_id) |
typedef int(* | rte_port_out_op_free )(void *port) |
typedef int(* | rte_port_out_op_tx )(void *port, struct rte_mbuf *pkt) |
typedef int(* | rte_port_out_op_tx_bulk )(void *port, struct rte_mbuf **pkt, uint64_t pkts_mask) |
typedef int(* | rte_port_out_op_flush )(void *port) |
RTE Port
This tool is part of the Intel DPDK Packet Framework tool suite and provides a standard interface to implement different types of packet ports.
#define RTE_MBUF_METADATA_UINT16 | ( | mbuf, | |
offset | |||
) | (((uint16_t *)&(mbuf)[1])[offset/sizeof(uint16_t)]) |
Macros to allow accessing metadata stored in the mbuf headroom just beyond the end of the mbuf data structure returned by a port
#define RTE_MBUF_METADATA_UINT16_PTR | ( | mbuf, | |
offset | |||
) | (&RTE_MBUF_METADATA_UINT16(mbuf, offset)) |
Macros to allow accessing metadata stored in the mbuf headroom just beyond the end of the mbuf data structure returned by a port
#define RTE_MBUF_METADATA_UINT32 | ( | mbuf, | |
offset | |||
) | (((uint32_t *)&(mbuf)[1])[offset/sizeof(uint32_t)]) |
Macros to allow accessing metadata stored in the mbuf headroom just beyond the end of the mbuf data structure returned by a port
#define RTE_MBUF_METADATA_UINT32_PTR | ( | mbuf, | |
offset | |||
) | (&RTE_MBUF_METADATA_UINT32(mbuf, offset)) |
Macros to allow accessing metadata stored in the mbuf headroom just beyond the end of the mbuf data structure returned by a port
#define RTE_MBUF_METADATA_UINT64 | ( | mbuf, | |
offset | |||
) | (((uint64_t *)&(mbuf)[1])[offset/sizeof(uint64_t)]) |
Macros to allow accessing metadata stored in the mbuf headroom just beyond the end of the mbuf data structure returned by a port
#define RTE_MBUF_METADATA_UINT64_PTR | ( | mbuf, | |
offset | |||
) | (&RTE_MBUF_METADATA_UINT64(mbuf, offset)) |
Macros to allow accessing metadata stored in the mbuf headroom just beyond the end of the mbuf data structure returned by a port
#define RTE_MBUF_METADATA_UINT8 | ( | mbuf, | |
offset | |||
) | (((uint8_t *)&(mbuf)[1])[offset]) |
Macros to allow accessing metadata stored in the mbuf headroom just beyond the end of the mbuf data structure returned by a port
#define RTE_MBUF_METADATA_UINT8_PTR | ( | mbuf, | |
offset | |||
) | (&RTE_MBUF_METADATA_UINT8(mbuf, offset)) |
Macros to allow accessing metadata stored in the mbuf headroom just beyond the end of the mbuf data structure returned by a port
#define RTE_PORT_IN_BURST_SIZE_MAX 64 |
Maximum number of packets read from any input port in a single burst.
Cannot be changed.
typedef void*(* rte_port_in_op_create)(void *params, int socket_id) |
Input port create
params | Parameters for input port creation |
socket_id | CPU socket ID (e.g. for memory allocation purpose) |
typedef int(* rte_port_in_op_free)(void *port) |
Input port free
port | Handle to input port instance |
Input port packet burst RX
port | Handle to input port instance |
pkts | Burst of input packets |
n_pkts | Number of packets in the input burst |
typedef void*(* rte_port_out_op_create)(void *params, int socket_id) |
Output port create
params | Parameters for output port creation |
socket_id | CPU socket ID (e.g. for memory allocation purpose) |
typedef int(* rte_port_out_op_flush)(void *port) |
Output port flush
port | Handle to output port instance |
typedef int(* rte_port_out_op_free)(void *port) |
Output port free
port | Handle to output port instance |
Output port single packet TX
port | Handle to output port instance |
pkt | Input packet |
Output port packet burst TX
port | Handle to output port instance |
pkts | Burst of input packets specified as array of up to 64 pointers to struct rte_mbuf |
pkts_mask | 64-bit bitmask specifying which packets in the input burst are valid. When pkts_mask bit n is set, then element n of pkts array is pointing to a valid packet. Otherwise, element n of pkts array will not be accessed. |