Skip to content

Commit

Permalink
app/testpmd: add IPv4 length field matching
Browse files Browse the repository at this point in the history
In the command line, the total length field translation support is
added to pass the value to the rte_flow API.

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Signed-off-by: 0-day Robot <robot@bytheb.org>
  • Loading branch information
zorrohahaha authored and ovsrobot committed Jul 1, 2023
1 parent 93a4b3b commit 493db81
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/test-pmd/cmdline_flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ enum index {
ITEM_IPV4,
ITEM_IPV4_VER_IHL,
ITEM_IPV4_TOS,
ITEM_IPV4_LENGTH,
ITEM_IPV4_ID,
ITEM_IPV4_FRAGMENT_OFFSET,
ITEM_IPV4_TTL,
Expand Down Expand Up @@ -1604,6 +1605,7 @@ static const enum index item_vlan[] = {
static const enum index item_ipv4[] = {
ITEM_IPV4_VER_IHL,
ITEM_IPV4_TOS,
ITEM_IPV4_LENGTH,
ITEM_IPV4_ID,
ITEM_IPV4_FRAGMENT_OFFSET,
ITEM_IPV4_TTL,
Expand Down Expand Up @@ -4228,6 +4230,14 @@ static const struct token token_list[] = {
.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
hdr.type_of_service)),
},
[ITEM_IPV4_LENGTH] = {
.name = "length",
.help = "total length",
.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED),
item_param),
.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
hdr.total_length)),
},
[ITEM_IPV4_ID] = {
.name = "packet_id",
.help = "fragment packet id",
Expand Down

0 comments on commit 493db81

Please sign in to comment.