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_pkt
  • struct rte_swx_port_in_stats
  • struct rte_swx_port_in_ops
  • struct rte_swx_port_out_stats
  • struct 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 NULL on 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

  • 0 when no packet was received, 1 when a packet was received. no other return values are allowed. periodt. not -1, not 2, not your little creative number. 0 or 1.

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 NULL on 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