rte_per_lcore.h(3)

πŸ’– rte_per_lcore.h πŸ’–

okay bestie, gather round, because this one is per-lcore variables in RTE and it's lowkey iconic 🌸 β€” it's a page from the Library Functions Manual and fr fr it's short but every line eats.


✨ NAME ✨

rte_per_lcore.h β€” the header that lets you have "global variables" that are actually per-lcore πŸ‘‘


🌈 SYNOPSIS 🌈

πŸŽ€ Macros πŸŽ€

#define RTE_DEFINE_PER_LCORE(type,  name)
#define RTE_DECLARE_PER_LCORE(type,  name)
#define RTE_PER_LCORE(name)

πŸ¦‹ Detailed Description πŸ¦‹

so basically, this file defines an API for instantiating per-lcore "globalvariables" that are environment-specific. no cap.

⚠️ important note bestie: in all environments, a "shared variable" is the default when you use a global variable. like, that's the baseline behavior, periodt.

parts of this are execution environment specific. iykyk πŸ’…

definition lives in the file rte_per_lcore.h.


πŸ”₯ Macro Definition Documentation πŸ”₯

πŸ’œ #define RTE_DEFINE_PER_LCORE( type, name)

Value:

__thread type per_lcore_##name

this macro defines a per lcore variable named "var" of type "type". and listen β€” do NOT use keywords like "static" or "volatile" in type πŸ™ˆ, just prefix the whole macro instead. trust.

πŸ“ Definition at line 33 of file rte_per_lcore.h.

🫢 #define RTE_DECLARE_PER_LCORE( type, name)

Value:

extern __thread type per_lcore_##name

this one declares an extern per lcore variable named "var" of type "type" ✨. the extern glow-up, if you will.

πŸ“ Definition at line 39 of file rte_per_lcore.h.

⭐ #define RTE_PER_LCORE( name)

Value:

(per_lcore_##name)

read/write the per-lcore variable value πŸ’« like, get it and set it, main character energy.

πŸ“ Definition at line 46 of file rte_per_lcore.h.

πŸ‘‘ Author πŸ‘‘

generated automatically by Doxygen for DPDK from the source code. not a human author bestie, it's the machine doing its little thing πŸ€–πŸ’–


aaaand that's the whole page, bestie πŸŽ€ thanks for reading, you slayed. this cutie was brought to you by DPDK, Version 25.11.3 πŸ¦‹βœ¨ mwah, bye πŸ’…πŸ’œ

πŸ“¦ where this page comes from