DPDK 21.11.9
rte_swx_port.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2020 Intel Corporation
3 */
4#ifndef __INCLUDE_RTE_SWX_PORT_H__
5#define __INCLUDE_RTE_SWX_PORT_H__
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
18#include <stdint.h>
19
23 void *handle;
24
26 uint8_t *pkt;
27
29 uint32_t offset;
30
32 uint32_t length;
33};
34
35/*
36 * Input port
37 */
38
47typedef void *
48(*rte_swx_port_in_create_t)(void *args);
49
56typedef void
57(*rte_swx_port_in_free_t)(void *port);
58
71typedef int
72(*rte_swx_port_in_pkt_rx_t)(void *port,
73 struct rte_swx_pkt *pkt);
74
78 uint64_t n_pkts;
79
81 uint64_t n_bytes;
82
84 uint64_t n_empty;
85};
86
95typedef void
97 struct rte_swx_port_in_stats *stats);
98
103
106
109
112};
113
114/*
115 * Output port
116 */
117
126typedef void *
127(*rte_swx_port_out_create_t)(void *args);
128
135typedef void
136(*rte_swx_port_out_free_t)(void *port);
137
146typedef void
147(*rte_swx_port_out_pkt_tx_t)(void *port,
148 struct rte_swx_pkt *pkt);
149
156typedef void
157(*rte_swx_port_out_flush_t)(void *port);
158
162 uint64_t n_pkts;
163
165 uint64_t n_bytes;
166};
167
176typedef void
178 struct rte_swx_port_out_stats *stats);
179
184
187
190
193
196};
197
198#ifdef __cplusplus
199}
200#endif
201
202#endif
int(* rte_swx_port_in_pkt_rx_t)(void *port, struct rte_swx_pkt *pkt)
Definition: rte_swx_port.h:72
void(* rte_swx_port_in_free_t)(void *port)
Definition: rte_swx_port.h:57
void(* rte_swx_port_out_flush_t)(void *port)
Definition: rte_swx_port.h:157
void(* rte_swx_port_in_stats_read_t)(void *port, struct rte_swx_port_in_stats *stats)
Definition: rte_swx_port.h:96
void(* rte_swx_port_out_pkt_tx_t)(void *port, struct rte_swx_pkt *pkt)
Definition: rte_swx_port.h:147
void(* rte_swx_port_out_free_t)(void *port)
Definition: rte_swx_port.h:136
void *(* rte_swx_port_in_create_t)(void *args)
Definition: rte_swx_port.h:48
void(* rte_swx_port_out_stats_read_t)(void *port, struct rte_swx_port_out_stats *stats)
Definition: rte_swx_port.h:177
void *(* rte_swx_port_out_create_t)(void *args)
Definition: rte_swx_port.h:127
uint8_t * pkt
Definition: rte_swx_port.h:26
void * handle
Definition: rte_swx_port.h:23
uint32_t offset
Definition: rte_swx_port.h:29
uint32_t length
Definition: rte_swx_port.h:32
rte_swx_port_in_free_t free
Definition: rte_swx_port.h:105
rte_swx_port_in_stats_read_t stats_read
Definition: rte_swx_port.h:111
rte_swx_port_in_pkt_rx_t pkt_rx
Definition: rte_swx_port.h:108
rte_swx_port_in_create_t create
Definition: rte_swx_port.h:102
rte_swx_port_out_create_t create
Definition: rte_swx_port.h:183
rte_swx_port_out_stats_read_t stats_read
Definition: rte_swx_port.h:195
rte_swx_port_out_pkt_tx_t pkt_tx
Definition: rte_swx_port.h:189
rte_swx_port_out_flush_t flush
Definition: rte_swx_port.h:192
rte_swx_port_out_free_t free
Definition: rte_swx_port.h:186