rte_flow_action_count(3)

πŸ’– rte_flow_action_count πŸ’–

okay bestie, gather round, because today we're getting into rte_flow_action_count, a section 3 library function situation from the DPDK cinematic universe. it's giving "small struct, big responsibilities", and honestly? we're obsessed. πŸŽ€


✨ SYNOPSIS ✨

#include <rte_flow.h>

🌸 Data Fields 🌸

  • uint32_t id β€” yes queen, that's the whole field list, we love a minimal icon πŸ‘‘

πŸ¦‹ Detailed Description πŸ¦‹

⚠️ Warning β€” EXPERIMENTAL: this structure may change without prior notice. no cap, it can shift under you like a group chat at 2am, so don't build your whole personality on it πŸ’€

This is the RTE_FLOW_ACTION_TYPE_COUNT vibe. ✨

Basically, it adds a counter action to a matched flow. you match a flow, you count it, slay.

now here's the important part, and it's highkey important: if you've got more than one count action specified in a single flow rule, then each action must specify a unique ID. literally no two counters sharing an ID in the same rule, that's the rule bestie πŸ™ˆ

and how do you actually get at these counters? you retrieve and reset them through rte_flow_query(), see struct rte_flow_query_count. that's your one-stop shop for reading and zeroing, iykyk πŸ’…

one more thing that's easy to miss (ngl, super easy to miss): for ports within the same switch domain, the counter ID namespace extends to all ports within that switch domain. so it's not per-port isolated, it's shared across the whole domain β€” whole squad shares the namespace, fr fr 🌈

oh and fun fact, all this lives at Definition at line 3450 of file rte_flow.h. remember that address like it's a crush's birthday 🫢


πŸ’œ Field Documentation πŸ’œ

uint32_t id πŸ“

Counter ID. that's the label on your counter, keep it unique if you're running multiple count actions, you got this ✨

Definition at line 3451 of file rte_flow.h. ⭐


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for DPDK from the source code. so technically a robot wrote this and we're just here giving it main character energy 😭 iconic behavior honestly.


and that's the tea, bestie 🧚 from DPDK, Version 25.11.3 β€” that's the whole rte_flow_action_count(3) page, every crumb of it, no notes. now go forth and count responsibly πŸ’– ✨ πŸŽ€

πŸ“¦ where this page comes from