DPDK  20.11.3
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 
156 typedef void
158 
162  uint64_t n_pkts;
163 
165  uint64_t n_bytes;
166 };
167 
176 typedef void
178  struct rte_swx_port_out_stats *stats);
179 
184 
187 
190 
193 
196 };
197 
198 #ifdef __cplusplus
199 }
200 #endif
201 
202 #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:186
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:192
void(* rte_swx_port_out_stats_read_t)(void *port, struct rte_swx_port_out_stats *stats)
Definition: rte_swx_port.h:177
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_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:157
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:183
uint32_t length
Definition: rte_swx_port.h:32
rte_swx_port_out_stats_read_t stats_read
Definition: rte_swx_port.h:195
rte_swx_port_out_pkt_tx_t pkt_tx
Definition: rte_swx_port.h:189
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