rte_flow_item_eth(3)

πŸ’– rte_flow_item_eth πŸ’–

okay bestie, gather round, because we're about to talk about rte_flow_item_eth from the DPDK library β€” yes it's a manpage, yes it's about Ethernet headers, and yes it's giving main character energy. You can find this one in section 3 of the manual (library functions, iykyk).


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <rte_flow.h>

✨ Data Fields ✨

  • uint32_t has_vlan:1
  • uint32_t reserved:31

🌸 Detailed Description 🌸

RTE_FLOW_ITEM_TYPE_ETH β€” literally what it says on the tin: this matches an Ethernet header. πŸŽ€

Inside the hdr field, the sub-field ether_type stands either for EtherType or TPID, depending on whether the item is followed by a VLAN item or not. And if two VLAN items follow? Then that sub-field refers to the outer one, which, in turn, contains the inner TPID in the similar header field. The innermost VLAN item contains a layer-3 EtherType. All of that follows the order seen on the wire β€” no cap, that's just how the wire do. πŸ“‘

So if the field in question contains a TPID value, only tagged packets with the specified TPID will match the pattern. Alternatively β€” and this is the cute part β€” it's possible to match any type of tagged packets by means of the field has_vlan rather than using the EtherType/TPID field. Also, it's possible to leave the two fields unused. If that's the case, both tagged and untagged packets will match the pattern. versatile queen πŸ‘‘

Definition at line 886 of file rte_flow.h.

🌈 Field Documentation 🌈

🫢 struct rte_ether_addr dst

Destination MAC. where it's going bestie πŸ’Œ

Definition at line 893 of file rte_flow.h.

🫢 struct rte_ether_addr src

Source MAC. where it came from, iconic πŸ’«

Definition at line 894 of file rte_flow.h.

🫢 rte_be16_t type

EtherType or TPID. (yes, both, depending on context β€” see above, we been knew)

Definition at line 895 of file rte_flow.h.

🫢 uint32_t has_vlan

Packet header contains at least one VLAN. 🏷️

Definition at line 899 of file rte_flow.h.

🫢 uint32_t reserved

Reserved, must be zero. no funny business, fr fr 🚫

Definition at line 900 of file rte_flow.h.

πŸ’œ Author πŸ’œ

Generated automatically by Doxygen for DPDK from the source code. (not a human, just a very diligent robot πŸ¦‹)


and that's the whole vibe, bestie β€” DPDK, Version 25.11.3, rte_flow_item_eth(3). go forth and match some Ethernet headers, you absolute legend πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from