DPDK  22.07.0
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
8 extern "C" {
9 #endif
10 
18 #include <stdint.h>
19 
21 struct rte_swx_pkt {
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 
47 typedef void *
48 (*rte_swx_port_in_create_t)(void *args);
49 
56 typedef void
57 (*rte_swx_port_in_free_t)(void *port);
58 
71 typedef int
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 
95 typedef void
97  struct rte_swx_port_in_stats *stats);
98 
103 
106 
109 
112 };
113 
114 /*
115  * Output port
116  */
117 
126 typedef void *
127 (*rte_swx_port_out_create_t)(void *args);
128 
135 typedef void
136 (*rte_swx_port_out_free_t)(void *port);
137 
146 typedef void
148  struct rte_swx_pkt *pkt);
149 
158 typedef void
160  struct rte_swx_pkt *pkt);
161 
172 typedef void
174  struct rte_swx_pkt *pkt,
175  uint32_t truncation_length);
176 
183 typedef void
185 
189  uint64_t n_pkts;
190 
192  uint64_t n_bytes;
193 
195  uint64_t n_pkts_clone;
196 
199 };
200 
209 typedef void
211  struct rte_swx_port_out_stats *stats);
212 
217 
220 
223 
226 
229 
232 
235 };
236 
237 #ifdef __cplusplus
238 }
239 #endif
240 
241 #endif
rte_swx_port_in_stats_read_t stats_read
Definition: rte_swx_port.h:111
rte_swx_port_in_free_t free
Definition: rte_swx_port.h:105
void * handle
Definition: rte_swx_port.h:23
rte_swx_port_out_free_t free
Definition: rte_swx_port.h:219
rte_swx_port_out_pkt_fast_clone_tx_t pkt_fast_clone_tx
Definition: rte_swx_port.h:225
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_create_t)(void *args)
Definition: rte_swx_port.h:127
rte_swx_port_in_create_t create
Definition: rte_swx_port.h:102
rte_swx_port_out_flush_t flush
Definition: rte_swx_port.h:231
void(* rte_swx_port_out_stats_read_t)(void *port, struct rte_swx_port_out_stats *stats)
Definition: rte_swx_port.h:210
uint8_t * pkt
Definition: rte_swx_port.h:26
void(* rte_swx_port_in_free_t)(void *port)
Definition: rte_swx_port.h:57
void *(* rte_swx_port_in_create_t)(void *args)
Definition: rte_swx_port.h:48
rte_swx_port_out_pkt_clone_tx_t pkt_clone_tx
Definition: rte_swx_port.h:228
rte_swx_port_in_pkt_rx_t pkt_rx
Definition: rte_swx_port.h:108
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_out_pkt_fast_clone_tx_t)(void *port, struct rte_swx_pkt *pkt)
Definition: rte_swx_port.h:159
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
rte_swx_port_out_create_t create
Definition: rte_swx_port.h:216
uint32_t length
Definition: rte_swx_port.h:32
rte_swx_port_out_stats_read_t stats_read
Definition: rte_swx_port.h:234
rte_swx_port_out_pkt_tx_t pkt_tx
Definition: rte_swx_port.h:222
uint32_t offset
Definition: rte_swx_port.h:29
int(* rte_swx_port_in_pkt_rx_t)(void *port, struct rte_swx_pkt *pkt)
Definition: rte_swx_port.h:72