rte_swx_table_params(3)

πŸ’– rte_swx_table_params(3) πŸ’–

okay bestie, welcome to the Library Functions Manual page for rte_swx_table_params β€” yes that's the whole name, no marketing budget, just a struct, and honestly? iconic. 🫢


✨ NAME ✨

rte_swx_table_params β€” the little bundle of settings you hand over when you're creating a table. it's giving "paperwork but make it fashion". no cap.


🌸 SYNOPSIS 🌸

#include <rte_swx_table.h>

πŸŽ€ Data Fields πŸŽ€

here's the whole squad, in order, exactly as they show up in the struct:

  • enum rte_swx_table_match_type match_type
  • uint32_t key_size
  • uint32_t key_offset
  • uint8_t * key_mask0
  • uint32_t action_data_size
  • rte_swx_hash_func_t hash_func
  • uint32_t n_keys_max

not me listing every single one because skipping even one would be a crime πŸ’…


πŸ¦‹ Detailed Description πŸ¦‹

Table creation parameters. that's the whole vibe β€” these are the params you pass when you make a table.

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

🌈 Field Documentation 🌈

🌟 enum rte_swx_table_match_type match_type 🌟

the table's match type. that's it, that's the whole field. she's simple, she's important.

Definition at line 35 of file rte_swx_table.h. πŸ“

πŸ’œ uint32_t key_size πŸ’œ

how big the key is, in bytes.

Definition at line 38 of file rte_swx_table.h. πŸ“

πŸ“ uint32_t key_offset πŸ“

where the key actually starts β€” specifically, the offset of the first byte of the key inside the key buffer. like, the key doesn't have to start at byte zero, bestie, she can arrive fashionably late. ✨

Definition at line 41 of file rte_swx_table.h. πŸ“

🧚 uint8_t* key_mask0 🧚

okay this one is the main character so listen up. it's a mask of key_size bytes, logically laid over the bytes sitting at positions key_offset .. (key_offset + key_size - 1) of the key buffer. what's it for? to spell out which bits from the key buffer are part of the key and which ones are just... there. a bit value of 1 in the key_mask0 means that bit in the key buffer is part of the key. a bit value of 0 means the opposite, she's not invited. and if you pass NULL? that means all the bits are part of the key, i.e. key_mask0 is an all-ones mask. slay, no mask needed. 😌

Definition at line 51 of file rte_swx_table.h. πŸ“

πŸ”₯ uint32_t action_data_size πŸ”₯

the maximum size of the action data, in bytes. heads up though, because math is math: the data stored in the table for each entry is equal to action_data_size plus 8 bytes, and those extra 8 bytes are there to store the action ID. so it's never just action_data_size, it's action_data_size + 8. the 8 is non-negotiable, she's coming to the party too. πŸ’€

Definition at line 57 of file rte_swx_table.h. πŸ“

⭐ rte_swx_hash_func_t hash_func ⭐

the hash function. this one gets ignored when the table implementation doesn't need it β€” like, not even looked at. but when it is needed and you've set it to NULL, the table implementation will pick the hash function to use itself. so either you choose or it chooses, no third option, periodt.

Definition at line 63 of file rte_swx_table.h. πŸ“

πŸ‘‘ uint32_t n_keys_max πŸ‘‘

the maximum number of keys that can be stored in the table, together with their associated data. it's the capacity, bestie. the guest list max. 🎟️

Definition at line 68 of file rte_swx_table.h. πŸ“

πŸ’… Author πŸ’…

Generated automatically by Doxygen for DPDK from the source code. so technically a robot wrote this and i just gave it a glow-up, we don't talk about it. πŸ™ˆ


okay that's the whole page!! πŸ₯³ this was DPDK, Version 25.11.3, and the page itself is rte_swx_table_params(3). mwah, go build something cute with your tables, ily, bye!! πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from