On 2/6/2024 2:06 AM, Suanming Mou wrote: > The new item type is added for the case user wants to match traffic > based on packet field compare result with other fields or immediate > value. > > e.g. take advantage the compare item user will be able to accumulate > a IPv4/TCP packet's TCP data_offset and IPv4 IHL field to a tag > register, then compare the tag register with IPv4 header total length > to understand the packet has payload or not. > > The supported operations can be as below: > - RTE_FLOW_ITEM_COMPARE_EQ (equal) > - RTE_FLOW_ITEM_COMPARE_NE (not equal) > - RTE_FLOW_ITEM_COMPARE_LT (less than) > - RTE_FLOW_ITEM_COMPARE_LE (less than or equal) > - RTE_FLOW_ITEM_COMPARE_GT (great than) > - RTE_FLOW_ITEM_COMPARE_GE (great than or equal) > > A sample for create the comparison flow: > flow pattern_template 0 create ingress pattern_template_id 1 template \ > compare op mask le a_type mask tag a_tag_index mask 1 b_type \ > mask tag b_tag_index mask 2 width mask 0xffffffff / end > flow actions_template 0 create ingress actions_template_id 1 template \ > count / drop / end mask count / drop / end > flow template_table 0 create table_id 1 group 2 priority 1 ingress \ > rules_number 1 pattern_template 1 actions_template 1 > flow queue 0 create 0 template_table 1 pattern_template 0 \ > actions_template 0 postpone no pattern compare op is le \ > a_type is tag a_tag_index is 1 b_type is tag b_tag_index is 2 \ > width is 32 / end actions count / drop / end > > Signed-off-by: Suanming Mou <suanmi...@nvidia.com> > Acked-by: Ori Kam <or...@nvidia.com> > Acked-by: Andrew Rybchenko <andrew.rybche...@oktetlabs.ru> >
Acked-by: Ferruh Yigit <ferruh.yi...@amd.com>