DPDK 22.11.7
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
158typedef void
160 struct rte_swx_pkt *pkt);
161
172typedef void
174 struct rte_swx_pkt *pkt,
175 uint32_t truncation_length);
176
183typedef void
184(*rte_swx_port_out_flush_t)(void *port);
185
189 uint64_t n_pkts;
190
192 uint64_t n_bytes;
193
195 uint64_t n_pkts_drop;
196
198 uint64_t n_bytes_drop;
199
201 uint64_t n_pkts_clone;
202
205};
206
215typedef void
217 struct rte_swx_port_out_stats *stats);
218
223
226
229
232
235
238
241};
242
243#ifdef __cplusplus
244}
245#endif
246
247#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:184
void(* rte_swx_port_out_pkt_clone_tx_t)(void *port, struct rte_swx_pkt *pkt, uint32_t truncation_length)
Definition: rte_swx_port.h:173
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_out_pkt_fast_clone_tx_t)(void *port, struct rte_swx_pkt *pkt)
Definition: rte_swx_port.h:159
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:216
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:222
rte_swx_port_out_pkt_fast_clone_tx_t pkt_fast_clone_tx
Definition: rte_swx_port.h:231
rte_swx_port_out_stats_read_t stats_read
Definition: rte_swx_port.h:240
rte_swx_port_out_pkt_clone_tx_t pkt_clone_tx
Definition: rte_swx_port.h:234
rte_swx_port_out_pkt_tx_t pkt_tx
Definition: rte_swx_port.h:228
rte_swx_port_out_flush_t flush
Definition: rte_swx_port.h:237
rte_swx_port_out_free_t free
Definition: rte_swx_port.h:225