]> git.droids-corp.org - dpdk.git/commit
app/testpmd: support GRE option flow item
authorSean Zhang <xiazhang@nvidia.com>
Fri, 11 Feb 2022 01:45:29 +0000 (03:45 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 11 Feb 2022 15:51:59 +0000 (16:51 +0100)
commit26b7259a798d03649a733f3a3fc240a1152dee71
tree6e4726d3437212487d34cc360e7e74419bb9baee
parentf61490bdf2180879eab291c3719b29e9925bd4dd
app/testpmd: support GRE option flow item

Add gre_option command for matching optional fields
(checksum/key/sequence) in GRE header. The item must follow gre item,
and the item does not change the flags in gre item, the application
should set the flags in gre item correspondingly.
Application can still use gre_key item 'gre_key value is xx' for key
matching, the effect is the same with using 'gre_option key is xx'.

The examples for gre_option are as follows:

To match on checksum field with value 0x11:
testpmd> ... pattern / eth / gre c_bit is 1 / gre_option checksum is
0x11 / end ..

To match on checksum field with value 0x11 and any value of key:
testpmd> ... pattern / eth / gre c_bit is 1 k_bit is 1 / gre_option
checksum is 0x11 / end ..

To match on checksum field with value 0x11 and no key field in packet:
testpmd> ... pattern / eth / gre c_bit is 1 k_bit is 0 / gre_option
checksum is 0x11 / end ..

The invalid patterns for gre_option are as follows:

testpmd> ... pattern / eth / gre / gre_option checksum is 0x11 / end ..
(c_bit in gre item not present)
testpmd> ... pattern / eth / gre c_bit is 0 / gre_option checksum is 0x11 /
end .. (c_bit is unset for gre item, but checksum is
specified by gre_option item)

Signed-off-by: Sean Zhang <xiazhang@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
app/test-pmd/cmdline_flow.c
doc/guides/testpmd_app_ug/testpmd_funcs.rst