rte_flow_item_raw(3)

πŸ’– rte_flow_item_raw πŸ’–

okay bestie, welcome to the glow-up guide for rte_flow_item_raw πŸ’… this one lives in the Library Functions Manual, so it's the kind of thing you read when you're deep in the DPDK docs at 2am and you need to know exactly which bytes are gonna get matched. spoiler: it's giving "raw byte string matcher" and honestly? iconic.


✨ SYNOPSIS ✨

#include <rte_flow.h>

πŸŽ€ Data Fields πŸŽ€

  • uint32_t relative:1
  • uint32_t search:1
  • uint32_t reserved:30
  • int32_t offset
  • uint16_t limit
  • uint16_t length
  • const uint8_t * pattern

🌸 Detailed Description 🌸

RTE_FLOW_ITEM_TYPE_RAW β€” say it with me πŸ“£

It matches a byte string of a given length at a given offset. literally just "here's some bytes, go find them".

The offset is either absolute (measured from the very start of the packet) or relative to the end of the previous matched item in the stack β€” and in that relative case, negative values are allowed. yes bestie, negative offsets, we love a flexible queen 🫢

If search is enabled, offset becomes the starting point instead of the answer. The search area can be delimited by setting limit to a nonzero value, which is the maximum number of bytes after offset where the pattern may start. so like, "look around here, but don't wander off" πŸ¦‹

Matching a zero-length pattern is allowed, and doing so resets the relative offset for subsequent items. sneaky useful, no cap.

⚠️ Heads up: this type does not support ranges (struct rte_flow_item.last). not a single one. don't ask, it said what it said πŸ’€

Definition at line 846 of file rte_flow.h. πŸ“


πŸ”₯ Field Documentation πŸ”₯

uint32_t relative

Look for pattern after the previous item. (yes, this is the one that unlocks those negative offsets ✨)

Definition at line 847 of file rte_flow.h.

Search pattern from offset (see also limit). offset = where you start looking, not necessarily where it lands πŸ”

Definition at line 848 of file rte_flow.h.

uint32_t reserved

Reserved, must be set to zero. bestie. zero. not "close enough to zero". ZERO. 🚫

Definition at line 849 of file rte_flow.h.

int32_t offset

Absolute or relative offset for pattern. your pick, main character energy either way πŸ‘‘

Definition at line 850 of file rte_flow.h.

uint16_t limit

Search area limit for start of pattern. the perimeter fence of your little search party 🌈

Definition at line 851 of file rte_flow.h.

uint16_t length

Pattern length. how many bytes we're matching, periodt. πŸ“

Definition at line 852 of file rte_flow.h.

const uint8_t* pattern

Byte string to look for. the actual bytes. the moment. the whole point πŸ“

Definition at line 853 of file rte_flow.h.


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for DPDK from the source code. no human hand-wrote this one, it just spawned like that 🧚


k bye love u, this page came straight from DPDK, Version 25.11.3, filed under rte_flow_item_raw(3) πŸ’œβœ¨ go match some bytes responsibly, bestie πŸŽ€

πŸ“¦ where this page comes from