ITEM_RAW_OFFSET,
ITEM_RAW_LIMIT,
ITEM_RAW_PATTERN,
+ ITEM_RAW_PATTERN_HEX,
ITEM_ETH,
ITEM_ETH_DST,
ITEM_ETH_SRC,
ITEM_RAW_OFFSET,
ITEM_RAW_LIMIT,
ITEM_RAW_PATTERN,
+ ITEM_RAW_PATTERN_HEX,
ITEM_NEXT,
ZERO,
};
ARGS_ENTRY_ARB(sizeof(struct rte_flow_item_raw),
ITEM_RAW_PATTERN_SIZE)),
},
+ [ITEM_RAW_PATTERN_HEX] = {
+ .name = "pattern_hex",
+ .help = "hex string to look for",
+ .next = NEXT(item_raw,
+ NEXT_ENTRY(COMMON_HEX),
+ NEXT_ENTRY(ITEM_PARAM_IS,
+ ITEM_PARAM_SPEC,
+ ITEM_PARAM_MASK)),
+ .args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, pattern),
+ ARGS_ENTRY(struct rte_flow_item_raw, length),
+ ARGS_ENTRY_ARB(sizeof(struct rte_flow_item_raw),
+ ITEM_RAW_PATTERN_SIZE)),
+ },
[ITEM_ETH] = {
.name = "eth",
.help = "match Ethernet header",
- ``offset {integer}``: absolute or relative offset for pattern.
- ``limit {unsigned}``: search area limit for start of pattern.
- ``pattern {string}``: byte string to look for.
+ - ``pattern_hex {string}``: byte string (provided in hexadecimal) to look for.
- ``eth``: match Ethernet header.
testpmd> flow create 0 ingress pattern eth / ipv6 / udp / l2tpv2 / ppp / ipv6
/ end actions rss types ipv6 end queues end / end
+Sample RAW rule
+~~~~~~~~~~~~~~~
+
+A RAW rule can be created as following using ``pattern_hex`` key and mask.
+
+::
+
+ testpmd> flow create 0 group 0 priority 1 ingress pattern raw relative is 0 search is 0 offset
+ is 0 limit is 0 pattern_hex spec 00000000000000000000000000000000000000000000000000000a0a0a0a
+ pattern_hex mask 0000000000000000000000000000000000000000000000000000ffffffff / end actions
+ queue index 4 / end
+
BPF Functions
--------------