rte_swx_port.h(3)
π rte_swx_port.h β bestie, meet your port interface π
okay so this page is from the Library Functions Manual, and it's all about rte_swx_port.h β the RTE SWX Port header. Yes it's a header file, and yes it's got lore. Sit down, grab a strawberry π, and let's get into it.
β¨ SYNOPSIS β¨
#include <stdint.h>
π Data Structures π
these are the lil structs living in here, no cap:
struct rte_swx_pktstruct rte_swx_port_in_statsstruct rte_swx_port_in_opsstruct rte_swx_port_out_statsstruct rte_swx_port_out_ops
π¦ Typedefs π¦
and these are the function-pointer girlies, the whole squad:
typedef void *(* rte_swx_port_in_create_t) (void *args)typedef void(* rte_swx_port_in_free_t) (void *port)typedef int(* rte_swx_port_in_pkt_rx_t) (void *port, struct rte_swx_pkt *pkt)typedef void(* rte_swx_port_in_stats_read_t) (void *port, struct rte_swx_port_in_stats *stats)typedef void *(* rte_swx_port_out_create_t) (void *args)typedef void(* rte_swx_port_out_free_t) (void *port)typedef void(* rte_swx_port_out_pkt_tx_t) (void *port, struct rte_swx_pkt *pkt)typedef void(* rte_swx_port_out_pkt_fast_clone_tx_t) (void *port, struct rte_swx_pkt *pkt)typedef void(* rte_swx_port_out_pkt_clone_tx_t) (void *port, struct rte_swx_pkt *pkt, uint32_t truncation_length)typedef void(* rte_swx_port_out_flush_t) (void *port)typedef void(* rte_swx_port_out_stats_read_t) (void *port, struct rte_swx_port_out_stats *stats)
πΈ Detailed Description πΈ
RTE SWX Port
it's giving packet I/O port interface. that's the whole vibe. iykyk. π
Definition in file rte_swx_port.h.
π Typedef Documentation π
okay now the main event, one by one, no skips, we're doing all of them because every single one ate π₯
π typedef void *(* rte_swx_port_in_create_t) (void *args)
Input port create β it's literally the moment the input port is born. main character energy for the input side.
Parameters
argsβ arguments for input port creation. the format is specific to each port type, so don't come at it with assumptions bestie.
Returns
- a handle to the input port instance on success, and
NULLon error. simple as that.
Definition at line 43 of file rte_swx_port.h.
π typedef void(* rte_swx_port_in_free_t) (void *port)
Input port free β the goodbye arc. release that input port, let it rest. π¦
Parameters
portβ input port handle.
Definition at line 52 of file rte_swx_port.h.
π typedef int(* rte_swx_port_in_pkt_rx_t) (void *port, struct rte_swx_pkt *pkt)
Input port packet receive β the moment we all wait for. a packet walks in.
Parameters
portβ input port handle.pktβ received packet. only valid when the function returns 1. must point to valid memory.
Returns
0when no packet was received,1when a packet was received. no other return values are allowed. periodt. not-1, not2, not your little creative number.0or1.
Definition at line 67 of file rte_swx_port.h.
π typedef void(* rte_swx_port_in_stats_read_t) (void *port, struct rte_swx_port_in_stats *stats)
Input port statistics counters read β the receipts. β¨
Parameters
portβ input port handle.statsβ input port statistics counters. must point to valid memory.
Definition at line 91 of file rte_swx_port.h.
π typedef void *(* rte_swx_port_out_create_t) (void *args)
Output port create β now the output side gets its glow-up moment.
Parameters
argsβ arguments for output port creation. the format is specific to each port type.
Returns
- a handle to the output port instance on success, and
NULLon error.
Definition at line 122 of file rte_swx_port.h.
π typedef void(* rte_swx_port_out_free_t) (void *port)
Output port free β clean exit, no drama left behind.
Parameters
portβ output port handle.
Definition at line 131 of file rte_swx_port.h.
π typedef void(* rte_swx_port_out_pkt_tx_t) (void *port, struct rte_swx_pkt *pkt)
Output port packet transmit β send that packet, slay. π
Parameters
portβ output port handle.pktβ packet to be transmitted.
Definition at line 142 of file rte_swx_port.h.
π typedef void(* rte_swx_port_out_pkt_fast_clone_tx_t) (void *port, struct rte_swx_pkt *pkt)
Output port packet fast clone and transmit β clone and send, but make it fast. the speedrun version. β‘
Parameters
portβ output port handle.pktβ packet to be transmitted.
Definition at line 154 of file rte_swx_port.h.
π typedef void(* rte_swx_port_out_pkt_clone_tx_t) (void *port, struct rte_swx_pkt *pkt, uint32_t truncation_length)
Output port packet clone and transmit β the regular clone-and-send, but with βοΈ a truncation length, so you can snip while you clone.
Parameters
portβ output port handle.pktβ packet to be transmitted.truncation_lengthβ packet length to be cloned.
Definition at line 168 of file rte_swx_port.h.
π typedef void(* rte_swx_port_out_flush_t) (void *port)
Output port flush β flush it out, bestie. get everything out of there. π½β¨ (affectionately)
Parameters
portβ output port handle.
Definition at line 179 of file rte_swx_port.h.
π typedef void(* rte_swx_port_out_stats_read_t) (void *port, struct rte_swx_port_out_stats *stats)
Output port statistics counters read β the output side receipts, we love a well-documented metric. π
Parameters
portβ output port handle.statsβ output port statistics counters. must point to valid memory.
Definition at line 211 of file rte_swx_port.h.
π«Ά Author π«Ά
Generated automatically by Doxygen for DPDK from the source code.
i know, bestie, a robot wrote it and it still ate. iconic. πβ¨
and that's the whole page!! tysm for reading, you're now officially a rte_swx_port.h expert, no cap π
DPDK β Version 25.11.3 π bye bestie, go compile something beautiful π¦
π¦ where this page comes from
- ubuntu resolute: dpdk-doc 25.11.3-0ubuntu0.26.04.1 Β· BSD-3-Clause
- ubuntu stonking: dpdk-doc 25.11.3-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms