DPDK  24.11.0-rc3
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 
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
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 
91 typedef void
93  struct rte_swx_port_in_stats *stats);
94 
99 
102 
105 
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
144  struct rte_swx_pkt *pkt);
145 
154 typedef void
156  struct rte_swx_pkt *pkt);
157 
168 typedef void
170  struct rte_swx_pkt *pkt,
171  uint32_t truncation_length);
172 
179 typedef void
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 
211 typedef void
213  struct rte_swx_port_out_stats *stats);
214 
219 
222 
225 
228 
231 
234 
237 };
238 
239 #endif
rte_swx_port_in_stats_read_t stats_read
Definition: rte_swx_port.h:107
rte_swx_port_in_free_t free
Definition: rte_swx_port.h:101
void * handle
Definition: rte_swx_port.h:19
rte_swx_port_out_free_t free
Definition: rte_swx_port.h:221
rte_swx_port_out_pkt_fast_clone_tx_t pkt_fast_clone_tx
Definition: rte_swx_port.h:227
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_create_t)(void *args)
Definition: rte_swx_port.h:123
rte_swx_port_in_create_t create
Definition: rte_swx_port.h:98
rte_swx_port_out_flush_t flush
Definition: rte_swx_port.h:233
void(* rte_swx_port_out_stats_read_t)(void *port, struct rte_swx_port_out_stats *stats)
Definition: rte_swx_port.h:212
uint8_t * pkt
Definition: rte_swx_port.h:22
void(* rte_swx_port_in_free_t)(void *port)
Definition: rte_swx_port.h:53
void *(* rte_swx_port_in_create_t)(void *args)
Definition: rte_swx_port.h:44
rte_swx_port_out_pkt_clone_tx_t pkt_clone_tx
Definition: rte_swx_port.h:230
rte_swx_port_in_pkt_rx_t pkt_rx
Definition: rte_swx_port.h:104
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_out_pkt_fast_clone_tx_t)(void *port, struct rte_swx_pkt *pkt)
Definition: rte_swx_port.h:155
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
rte_swx_port_out_create_t create
Definition: rte_swx_port.h:218
uint32_t length
Definition: rte_swx_port.h:28
rte_swx_port_out_stats_read_t stats_read
Definition: rte_swx_port.h:236
rte_swx_port_out_pkt_tx_t pkt_tx
Definition: rte_swx_port.h:224
uint32_t offset
Definition: rte_swx_port.h:25
int(* rte_swx_port_in_pkt_rx_t)(void *port, struct rte_swx_pkt *pkt)
Definition: rte_swx_port.h:68