rte_swx_ta...ner_params(3)
β¨ NAME β¨
rte_swx_table_learner_params β it's a struct, bestie, and it's literally the β¨learner table creation parametersβ¨
So like, this is a manpage from the Library Functions Manual, and it's all about one lil struct that you fill in when you want a learner table to exist. She's giving config energy. π
πΈ SYNOPSIS πΈ
#include <rte_swx_table_learner.h>
π¦ Data Fields
uint32_t key_sizeuint32_t key_offsetuint8_t * key_mask0uint32_t action_data_sizerte_swx_hash_func_t hash_funcuint32_t n_keys_maxuint32_t * key_timeoutuint32_t n_key_timeouts
π Detailed Description π
Learner table creation parameters. That's the whole thing. She's a params struct, she knows what she is, and she's not gonna pretend otherwise. π
Oh and also β this girl is defined at line 62 of file rte_swx_table_learner.h. Remember that, there might be a pop quiz. π
π«Ά Field Documentation π«Ά
π uint32_t key_size
Key size, measured in bytes. And listen β this one must be non-zero. Zero is NOT the vibe here.
Defined at line 64 of file rte_swx_table_learner.h.
π uint32_t key_offset
The offset of the first byte of the key, like, within the key buffer. Where does the key start? Right here. π
Defined at line 67 of file rte_swx_table_learner.h.
π uint8_t* key_mask0
Okay so this one's a mask, and it's key_size bytes long, and it's logically laid over the bytes sitting at positions key_offset .. (key_offset + key_size - 1) of the key buffer. Her whole job? To specify which bits from the key buffer are actually part of the key and which ones are just... there. Living their lives. Not in the key.
The rules, fr fr:
- a bit value of 1 in the
key_mask0β that respective bit in the key buffer is part of the key β - a bit value of 0 β the opposite, that bit is not part of the key β
- a
NULLvalue β all the bits are part of the key, i.e.key_mask0is just an all-ones mask π―
Defined at line 76 of file rte_swx_table_learner.h.
π uint32_t action_data_size
Maximum size, in bytes, of the action data. And here's the tea: the data stored in the table for each entry is equal to action_data_size plus 8 bytes, and those 8 extra bytes are used to store the action ID. So budget accordingly bestie, there's a lil surcharge. π§Ύβ¨
Defined at line 81 of file rte_swx_table_learner.h.
π rte_swx_hash_func_t hash_func
The hash function. Hashy. When it's NULL, the default hash function gets used instead. So she's optional, she's chill like that. π
Defined at line 85 of file rte_swx_table_learner.h.
π uint32_t n_keys_max
Maximum number of keys to be stored in the table, together with their associated data. Like, the capacity, the headcount, the guest list. ποΈ
Defined at line 88 of file rte_swx_table_learner.h.
π uint32_t* key_timeout
The set of all possible key timeout values, measured in seconds. Every single value in here must be non-zero β no zeroes allowed, that's the rule. And each table key expires and is automatically deleted from the table after this many seconds. She's got a timer and she WILL use it. πβ°
Defined at line 94 of file rte_swx_table_learner.h.
π uint32_t n_key_timeouts
The number of possible key timeout values present in the key_timeout set. And it must be less than or equal to RTE_SWX_TABLE_LEARNER_N_KEY_TIMEOUTS_MAX β don't try to be overachieving, that's the ceiling, respect the ceiling. π§
Defined at line 99 of file rte_swx_table_learner.h.
π Author π
Generated automatically by Doxygen for DPDK from the source code. So like, a robot wrote this, but I'm here translating it into human for you. You're welcome. π«Ά
k that's the whole page bestie, no cap, every single field accounted for π this was DPDK Version 25.11.3, go forth and configure your learner table, you're gonna slay β¨ππ
π¦ 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