DPDK 23.11.2
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
7#ifdef __cplusplus
8extern "C" {
9#endif
10
18#include <stdint.h>
19
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
47typedef void *
48(*rte_swx_port_in_create_t)(void *args);
49
56typedef void
57(*rte_swx_port_in_free_t)(void *port);
58
71typedef int
72(*rte_swx_port_in_pkt_rx_t)(void *port,
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
95typedef void
97 struct rte_swx_port_in_stats *stats);
98
113
114/*
115 * Output port
116 */
117
126typedef void *
127(*rte_swx_port_out_create_t)(void *args);
128
135typedef void
136(*rte_swx_port_out_free_t)(void *port);
137
146typedef void
147(*rte_swx_port_out_pkt_tx_t)(void *port,
148 struct rte_swx_pkt *pkt);
149
158typedef void
160 struct rte_swx_pkt *pkt);
161
172typedef void
174 struct rte_swx_pkt *pkt,
175 uint32_t truncation_length);
176
183typedef void
184(*rte_swx_port_out_flush_t)(void *port);
185
189 uint64_t n_pkts;
190
192 uint64_t n_bytes;
193
195 uint64_t n_pkts_drop;
196
198 uint64_t n_bytes_drop;
199
201 uint64_t n_pkts_clone;
202
205};
206
215typedef void
217 struct rte_swx_port_out_stats *stats);
218
242
243#ifdef __cplusplus
244}
245#endif
246
247#endif
int(* rte_swx_port_in_pkt_rx_t)(void *port, struct rte_swx_pkt *pkt)
void(* rte_swx_port_in_free_t)(void *port)
void(* rte_swx_port_out_flush_t)(void *port)
void(* rte_swx_port_out_pkt_clone_tx_t)(void *port, struct rte_swx_pkt *pkt, uint32_t truncation_length)
void(* rte_swx_port_in_stats_read_t)(void *port, struct rte_swx_port_in_stats *stats)
void(* rte_swx_port_out_pkt_tx_t)(void *port, struct rte_swx_pkt *pkt)
void(* rte_swx_port_out_free_t)(void *port)
void(* rte_swx_port_out_pkt_fast_clone_tx_t)(void *port, struct rte_swx_pkt *pkt)
void *(* rte_swx_port_in_create_t)(void *args)
void(* rte_swx_port_out_stats_read_t)(void *port, struct rte_swx_port_out_stats *stats)
void *(* rte_swx_port_out_create_t)(void *args)
uint8_t * pkt
void * handle
uint32_t offset
uint32_t length
rte_swx_port_in_free_t free
rte_swx_port_in_stats_read_t stats_read
rte_swx_port_in_pkt_rx_t pkt_rx
rte_swx_port_in_create_t create
rte_swx_port_out_create_t create
rte_swx_port_out_pkt_fast_clone_tx_t pkt_fast_clone_tx
rte_swx_port_out_stats_read_t stats_read
rte_swx_port_out_pkt_clone_tx_t pkt_clone_tx
rte_swx_port_out_pkt_tx_t pkt_tx
rte_swx_port_out_flush_t flush
rte_swx_port_out_free_t free