rte_swx_extern.h(3)

πŸ’– rte_swx_extern.h β€” Library Functions Manual, section 3 πŸ’–

okay bestie, sit down, hydrate, and let's talk about rte_swx_extern.h ✨ this is the header that lets you hook your own ~external~ functionality straight into the packet processing pipeline. it's giving backstage pass. it's giving VIP entrance to the pipeline. no cap 🫢


🌸 NAME 🌸

rte_swx_extern.h β€” the extern object + extern function interface situation, in the Library Functions Manual (section 3, iykyk)


✨ SYNOPSIS ✨

#include <stdint.h>

πŸŽ€ Typedefs

typedef void *(* rte_swx_extern_type_constructor_t) (const char *args)
typedef void(* rte_swx_extern_type_destructor_t) (void *object)
typedef int(* rte_swx_extern_type_member_func_t) (void *object, void
    *mailbox)
typedef int(* rte_swx_extern_func_t) (void *mailbox)

πŸ¦‹ Detailed Description πŸ¦‹

RTE SWX Extern objects and functions πŸ’…

Extern object and extern function interfaces. The extern objects and extern functions provide the mechanisms to hook external functionality into the packet processing pipeline.

Definition in file rte_swx_extern.h.


πŸ‘‘ Typedef Documentation πŸ‘‘

🌈 typedef void *(* rte_swx_extern_type_constructor_t) (const char *args)

Extern object constructor 🍼 β€” the glow-up moment where your extern object gets born.

Parameters

  • args β€” Extern object constructor arguments. It may be NULL.

Returns

  • Extern object handle.

Definition at line 30 of file rte_swx_extern.h.


🌈 typedef void(* rte_swx_extern_type_destructor_t) (void *object)

Extern object destructor πŸ’€ β€” the part where we say bye and clean up after ourselves. main character energy, but make it tidy.

Parameters

  • object β€” Extern object handle.

Definition at line 39 of file rte_swx_extern.h.


🌈 typedef int(* rte_swx_extern_type_member_func_t) (void *object, void *mailbox)

Extern object member function ⭐

The mailbox is used to pass input arguments to the member function and retrieve the output results. The mailbox mechanism allows for multiple concurrent executions of the same member function for the same extern object. (yes bestie, concurrent, it's that kind of party πŸŽ‰)

Multiple invocations of the same member function may be required in order for the associated operation to complete. The completion is flagged by a return value of 1, in which case the results are available in the mailbox; in case of a return value of 0, the operation is not yet completed, so the member function must be invoked again with exactly the same object and mailbox arguments. (literally exactly the same, don't get creative πŸ™ˆ)

Parameters

  • object β€” Extern object handle.
  • mailbox β€” Extern object mailbox.

Returns

  • 0 when the operation is not yet completed, and 1 when the operation is completed. No other return values are allowed. 🚫 that's the vibe check, and only 0 or 1 pass it.

Definition at line 64 of file rte_swx_extern.h.


🌈 typedef int(* rte_swx_extern_func_t) (void *mailbox)

Extern function 🫢

The mailbox is used to pass input arguments to the extern function and retrieve the output results. The mailbox mechanism allows for multiple concurrent executions of the same extern function.

Multiple invocations of the same extern function may be required in order for the associated operation to complete. The completion is flagged by a return value of 1, in which case the results are available in the mailbox; in case of a return value of 0, the operation is not yet completed, so the extern function must be invoked again with exactly the same mailbox argument. (same mailbox, bestie, do not swap it out βœ‹)

Parameters

  • mailbox β€” Extern object mailbox.

Returns

  • 0 when the operation is not yet completed, and 1 when the operation is completed. No other return values are allowed. πŸ’€ nothing else, periodt.

Definition at line 87 of file rte_swx_extern.h.


🌸 Author 🌸

Generated automatically by Doxygen for DPDK from the source code. (not me writing my own autobiography, the robots did it πŸ€–βœ¨)


and that's the whole page, bestie!! ty for reading, drink some water, go hook some external functionality into a packet processing pipeline responsibly πŸ’–βœ¨πŸŽ€πŸ¦‹

This was DPDK, Version 25.11.3, page rte_swx_extern.h in the Library Functions Manual β€” mwah, catch you in the next manpage πŸ‘‘πŸ’…
πŸ“¦ where this page comes from