DPDK 25.03.0-rc0
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
14#include <stdint.h>
15
19 void *handle;
20
22 uint8_t *pkt;
23
25 uint32_t offset;
26
28 uint32_t length;
29};
30
31/*
32 * Input port
33 */
34
43typedef void *
44(*rte_swx_port_in_create_t)(void *args);
45
52typedef void
53(*rte_swx_port_in_free_t)(void *port);
54
67typedef int
68(*rte_swx_port_in_pkt_rx_t)(void *port,
69 struct rte_swx_pkt *pkt);
70
74 uint64_t n_pkts;
75
77 uint64_t n_bytes;
78
80 uint64_t n_empty;
81};
82
91typedef void
93 struct rte_swx_port_in_stats *stats);
94
99
102
105
108};
109
110/*
111 * Output port
112 */
113
122typedef void *
123(*rte_swx_port_out_create_t)(void *args);
124
131typedef void
132(*rte_swx_port_out_free_t)(void *port);
133
142typedef void
143(*rte_swx_port_out_pkt_tx_t)(void *port,
144 struct rte_swx_pkt *pkt);
145
154typedef void
156 struct rte_swx_pkt *pkt);
157
168typedef void
170 struct rte_swx_pkt *pkt,
171 uint32_t truncation_length);
172
179typedef void
180(*rte_swx_port_out_flush_t)(void *port);
181
185 uint64_t n_pkts;
186
188 uint64_t n_bytes;
189
191 uint64_t n_pkts_drop;
192
194 uint64_t n_bytes_drop;
195
197 uint64_t n_pkts_clone;
198
201};
202
211typedef void
213 struct rte_swx_port_out_stats *stats);
214
219
222
225
228
231
234
237};
238
239#endif
int(* rte_swx_port_in_pkt_rx_t)(void *port, struct rte_swx_pkt *pkt)
Definition: rte_swx_port.h:68
void(* rte_swx_port_in_free_t)(void *port)
Definition: rte_swx_port.h:53
void(* rte_swx_port_out_flush_t)(void *port)
Definition: rte_swx_port.h:180
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:169
void(* rte_swx_port_in_stats_read_t)(void *port, struct rte_swx_port_in_stats *stats)
Definition: rte_swx_port.h:92
void(* rte_swx_port_out_pkt_tx_t)(void *port, struct rte_swx_pkt *pkt)
Definition: rte_swx_port.h:143
void(* rte_swx_port_out_free_t)(void *port)
Definition: rte_swx_port.h:132
void(* rte_swx_port_out_pkt_fast_clone_tx_t)(void *port, struct rte_swx_pkt *pkt)
Definition: rte_swx_port.h:155
void *(* rte_swx_port_in_create_t)(void *args)
Definition: rte_swx_port.h:44
void(* rte_swx_port_out_stats_read_t)(void *port, struct rte_swx_port_out_stats *stats)
Definition: rte_swx_port.h:212
void *(* rte_swx_port_out_create_t)(void *args)
Definition: rte_swx_port.h:123
uint8_t * pkt
Definition: rte_swx_port.h:22
void * handle
Definition: rte_swx_port.h:19
uint32_t offset
Definition: rte_swx_port.h:25
uint32_t length
Definition: rte_swx_port.h:28
rte_swx_port_in_free_t free
Definition: rte_swx_port.h:101
rte_swx_port_in_stats_read_t stats_read
Definition: rte_swx_port.h:107
rte_swx_port_in_pkt_rx_t pkt_rx
Definition: rte_swx_port.h:104
rte_swx_port_in_create_t create
Definition: rte_swx_port.h:98
rte_swx_port_out_create_t create
Definition: rte_swx_port.h:218
rte_swx_port_out_pkt_fast_clone_tx_t pkt_fast_clone_tx
Definition: rte_swx_port.h:227
rte_swx_port_out_stats_read_t stats_read
Definition: rte_swx_port.h:236
rte_swx_port_out_pkt_clone_tx_t pkt_clone_tx
Definition: rte_swx_port.h:230
rte_swx_port_out_pkt_tx_t pkt_tx
Definition: rte_swx_port.h:224
rte_swx_port_out_flush_t flush
Definition: rte_swx_port.h:233
rte_swx_port_out_free_t free
Definition: rte_swx_port.h:221