RTE_TABLE_ACTION_ENCAP_CONFIG(3)

πŸ‘‘ NAME πŸ‘‘

rte_table_action_encap_config β€” bestie, this is the struct that holds your encap action config, and it's per table action profile, okay? πŸ’–


✨ SYNOPSIS ✨

#include <rte_table_action.h>

πŸŽ€ Data Fields

uint64_t encap_mask
union {
   struct {
      uint32_t data_offset
      int vlan
      int ip_version
   } vxlan
};

πŸ¦‹ DETAILED DESCRIPTION πŸ¦‹

Encap action configuration (per table action profile).

Like, that's the whole vibe of it β€” one little bundle of settings that tells the table action profile how encapsulation should go down. 🫢

Definition at line 500 of file rte_table_action.h.


🌸 FIELD DOCUMENTATION 🌸

πŸ’œ uint64_t encap_mask

Bit mask defining the set of packet encapsulations enabled for the current table action profile. If bit (1 << N) is set in encap_mask, then packet encapsulation N is enabled, otherwise it is disabled.

So basically β€” flip the bit, get the encapsulation. Don't flip it, don't get it. That's it, that's the whole relationship. πŸ’…

See also

enum rte_table_action_encap_type

Definition at line 507 of file rte_table_action.h.


πŸ“ uint32_t data_offset

Input packet to be encapsulated: offset within the input packet buffer to the start of the Ethernet frame to be encapsulated. Offset 0 points to the first byte of the MBUF structure.

So if you're thinking "where does my Ethernet frame actually start in this buffer" β€” it's this. And heads up, offset 0 literally means the first byte of the MBUF structure itself, not the frame. πŸ‘€

Definition at line 517 of file rte_table_action.h.


🌈 int vlan

Encapsulation header: non-zero when encapsulation header includes a VLAN tag, zero otherwise.

So non-zero = yes there's a VLAN tag in there, zero = nope, no tag, we're moving plain. Simple as that. ✨

Definition at line 522 of file rte_table_action.h.


⭐ int ip_version

Encapsulation header: IP version of the IP header within the encapsulation header. Non-zero for IPv4, zero for IPv6.

Okay bestie this one is the sneaky one β€” non-zero means IPv4 and zero means IPv6. It's giving "counterintuitive on purpose", but that's the documented behavior, so memorize it. πŸ™ˆ

Definition at line 528 of file rte_table_action.h.


🧚 struct { ... } vxlan

VXLAN specific configuration.


πŸ’€ union { ... }

Encapsulation type specific configuration.


🫢 AUTHOR 🫢

Generated automatically by Doxygen for DPDK from the source code.

(Not me being a Doxygen-generated document and still having more personality than half the source tree. 😭)


And that's the whole page, bestie β€” this was rte_table_action_encap_config(3) from DPDK, Version 25.11.3, and yes the docs really do hand you that footer. Go forth and encapsulate responsibly. πŸ’–βœ¨πŸ’…

πŸ“¦ where this page comes from