DPDK
25.11.0
Toggle main menu visibility
Loading...
Searching...
No Matches
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
13
14
#include <stdint.h>
15
17
struct
rte_swx_pkt
{
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
43
typedef
void
*
44
(*rte_swx_port_in_create_t)(
void
*args);
45
52
typedef
void
53
(*
rte_swx_port_in_free_t
)(
void
*port);
54
67
typedef
int
68
(*
rte_swx_port_in_pkt_rx_t
)(
void
*port,
69
struct
rte_swx_pkt
*
pkt
);
70
72
struct
rte_swx_port_in_stats
{
74
uint64_t
n_pkts
;
75
77
uint64_t
n_bytes
;
78
80
uint64_t
n_empty
;
81
};
82
91
typedef
void
92
(*
rte_swx_port_in_stats_read_t
)(
void
*port,
93
struct
rte_swx_port_in_stats
*stats);
94
96
struct
rte_swx_port_in_ops
{
98
rte_swx_port_in_create_t
create
;
99
101
rte_swx_port_in_free_t
free
;
102
104
rte_swx_port_in_pkt_rx_t
pkt_rx
;
105
107
rte_swx_port_in_stats_read_t
stats_read
;
108
};
109
110
/*
111
* Output port
112
*/
113
122
typedef
void
*
123
(*rte_swx_port_out_create_t)(
void
*args);
124
131
typedef
void
132
(*
rte_swx_port_out_free_t
)(
void
*port);
133
142
typedef
void
143
(*
rte_swx_port_out_pkt_tx_t
)(
void
*port,
144
struct
rte_swx_pkt
*
pkt
);
145
154
typedef
void
155
(*
rte_swx_port_out_pkt_fast_clone_tx_t
)(
void
*port,
156
struct
rte_swx_pkt
*
pkt
);
157
168
typedef
void
169
(*
rte_swx_port_out_pkt_clone_tx_t
)(
void
*port,
170
struct
rte_swx_pkt
*
pkt
,
171
uint32_t truncation_length);
172
179
typedef
void
180
(*
rte_swx_port_out_flush_t
)(
void
*port);
181
183
struct
rte_swx_port_out_stats
{
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
200
uint64_t
n_pkts_clone_err
;
201
};
202
211
typedef
void
212
(*
rte_swx_port_out_stats_read_t
)(
void
*port,
213
struct
rte_swx_port_out_stats
*stats);
214
216
struct
rte_swx_port_out_ops
{
218
rte_swx_port_out_create_t
create
;
219
221
rte_swx_port_out_free_t
free
;
222
224
rte_swx_port_out_pkt_tx_t
pkt_tx
;
225
227
rte_swx_port_out_pkt_fast_clone_tx_t
pkt_fast_clone_tx
;
228
230
rte_swx_port_out_pkt_clone_tx_t
pkt_clone_tx
;
231
233
rte_swx_port_out_flush_t
flush
;
234
236
rte_swx_port_out_stats_read_t
stats_read
;
237
};
238
239
#endif
rte_swx_port_in_pkt_rx_t
int(* rte_swx_port_in_pkt_rx_t)(void *port, struct rte_swx_pkt *pkt)
Definition
rte_swx_port.h:68
rte_swx_port_in_free_t
void(* rte_swx_port_in_free_t)(void *port)
Definition
rte_swx_port.h:53
rte_swx_port_out_flush_t
void(* rte_swx_port_out_flush_t)(void *port)
Definition
rte_swx_port.h:180
rte_swx_port_out_pkt_clone_tx_t
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
rte_swx_port_in_stats_read_t
void(* rte_swx_port_in_stats_read_t)(void *port, struct rte_swx_port_in_stats *stats)
Definition
rte_swx_port.h:92
rte_swx_port_out_pkt_tx_t
void(* rte_swx_port_out_pkt_tx_t)(void *port, struct rte_swx_pkt *pkt)
Definition
rte_swx_port.h:143
rte_swx_port_out_free_t
void(* rte_swx_port_out_free_t)(void *port)
Definition
rte_swx_port.h:132
rte_swx_port_out_pkt_fast_clone_tx_t
void(* rte_swx_port_out_pkt_fast_clone_tx_t)(void *port, struct rte_swx_pkt *pkt)
Definition
rte_swx_port.h:155
rte_swx_port_in_create_t
void *(* rte_swx_port_in_create_t)(void *args)
Definition
rte_swx_port.h:44
rte_swx_port_out_stats_read_t
void(* rte_swx_port_out_stats_read_t)(void *port, struct rte_swx_port_out_stats *stats)
Definition
rte_swx_port.h:212
rte_swx_port_out_create_t
void *(* rte_swx_port_out_create_t)(void *args)
Definition
rte_swx_port.h:123
rte_swx_pkt
Definition
rte_swx_port.h:17
rte_swx_pkt::pkt
uint8_t * pkt
Definition
rte_swx_port.h:22
rte_swx_pkt::handle
void * handle
Definition
rte_swx_port.h:19
rte_swx_pkt::offset
uint32_t offset
Definition
rte_swx_port.h:25
rte_swx_pkt::length
uint32_t length
Definition
rte_swx_port.h:28
rte_swx_port_in_ops
Definition
rte_swx_port.h:96
rte_swx_port_in_ops::free
rte_swx_port_in_free_t free
Definition
rte_swx_port.h:101
rte_swx_port_in_ops::stats_read
rte_swx_port_in_stats_read_t stats_read
Definition
rte_swx_port.h:107
rte_swx_port_in_ops::pkt_rx
rte_swx_port_in_pkt_rx_t pkt_rx
Definition
rte_swx_port.h:104
rte_swx_port_in_ops::create
rte_swx_port_in_create_t create
Definition
rte_swx_port.h:98
rte_swx_port_in_stats
Definition
rte_swx_port.h:72
rte_swx_port_in_stats::n_bytes
uint64_t n_bytes
Definition
rte_swx_port.h:77
rte_swx_port_in_stats::n_pkts
uint64_t n_pkts
Definition
rte_swx_port.h:74
rte_swx_port_in_stats::n_empty
uint64_t n_empty
Definition
rte_swx_port.h:80
rte_swx_port_out_ops
Definition
rte_swx_port.h:216
rte_swx_port_out_ops::create
rte_swx_port_out_create_t create
Definition
rte_swx_port.h:218
rte_swx_port_out_ops::pkt_fast_clone_tx
rte_swx_port_out_pkt_fast_clone_tx_t pkt_fast_clone_tx
Definition
rte_swx_port.h:227
rte_swx_port_out_ops::stats_read
rte_swx_port_out_stats_read_t stats_read
Definition
rte_swx_port.h:236
rte_swx_port_out_ops::pkt_clone_tx
rte_swx_port_out_pkt_clone_tx_t pkt_clone_tx
Definition
rte_swx_port.h:230
rte_swx_port_out_ops::pkt_tx
rte_swx_port_out_pkt_tx_t pkt_tx
Definition
rte_swx_port.h:224
rte_swx_port_out_ops::flush
rte_swx_port_out_flush_t flush
Definition
rte_swx_port.h:233
rte_swx_port_out_ops::free
rte_swx_port_out_free_t free
Definition
rte_swx_port.h:221
rte_swx_port_out_stats
Definition
rte_swx_port.h:183
rte_swx_port_out_stats::n_pkts_drop
uint64_t n_pkts_drop
Definition
rte_swx_port.h:191
rte_swx_port_out_stats::n_bytes
uint64_t n_bytes
Definition
rte_swx_port.h:188
rte_swx_port_out_stats::n_pkts
uint64_t n_pkts
Definition
rte_swx_port.h:185
rte_swx_port_out_stats::n_bytes_drop
uint64_t n_bytes_drop
Definition
rte_swx_port.h:194
rte_swx_port_out_stats::n_pkts_clone
uint64_t n_pkts_clone
Definition
rte_swx_port.h:197
rte_swx_port_out_stats::n_pkts_clone_err
uint64_t n_pkts_clone_err
Definition
rte_swx_port.h:200
lib
port
rte_swx_port.h
Generated by
1.17.0