ITEM_VLAN_INNER_TYPE,
ITEM_VLAN_HAS_MORE_VLAN,
ITEM_IPV4,
+ ITEM_IPV4_VER_IHL,
ITEM_IPV4_TOS,
ITEM_IPV4_ID,
ITEM_IPV4_FRAGMENT_OFFSET,
};
static const enum index item_ipv4[] = {
+ ITEM_IPV4_VER_IHL,
ITEM_IPV4_TOS,
ITEM_IPV4_ID,
ITEM_IPV4_FRAGMENT_OFFSET,
.next = NEXT(item_ipv4),
.call = parse_vc,
},
+ [ITEM_IPV4_VER_IHL] = {
+ .name = "version_ihl",
+ .help = "match header length",
+ .next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED),
+ item_param),
+ .args = ARGS(ARGS_ENTRY(struct rte_flow_item_ipv4,
+ hdr.version_ihl)),
+ },
[ITEM_IPV4_TOS] = {
.name = "tos",
.help = "type of service",
break;
case RTE_FLOW_ITEM_TYPE_IPV4:
ipv4 = (struct rte_ipv4_hdr *)buf;
- ipv4->version_ihl = 0x45;
+ if (!ipv4->version_ihl)
+ ipv4->version_ihl = RTE_IPV4_VHL_DEF;
if (next_proto && ipv4->next_proto_id == 0)
ipv4->next_proto_id = (uint8_t)next_proto;
break;
- ``ipv4``: match IPv4 header.
+ - ``version_ihl {unsigned}``: IPv4 version and IP header length.
- ``tos {unsigned}``: type of service.
- ``ttl {unsigned}``: time to live.
- ``proto {unsigned}``: next protocol ID.