net/bnxt: refactor flow parser in ULP
authorKishore Padmanabha <kishore.padmanabha@broadcom.com>
Sun, 30 May 2021 08:59:18 +0000 (14:29 +0530)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Thu, 8 Jul 2021 00:02:09 +0000 (02:02 +0200)
commit741172be52deceaae86368f14dd5835a4c24d8c2
treece117e681474c40f83f27528c2a67e6d007eb7b0
parent3fe124d2536c5b6d4aa9f7de77f90651b8fcd8e3
net/bnxt: refactor flow parser in ULP

1. Remove Ether type, VLAN type and IP proto type from pattern matching,
since the header bits can be used for matching. This reduces the class
template signatures by a factor of 8.

2. Remove the wild card bit in the pattern matching since same template
can be used for both exact and wild card entries.

3. The action record pointers have to use higher range to not collide
with the firmware action record pointers. Hence reduced the number of
action record pointers for Whitney platform.

4. The conditional update opcode provide functionality to reject flows
for instance reject flows that do not adhere to flow signature match.

5. Added check to not populate protocol specifications if the
protocol mask is null or zero.

6. Check that field array is not overrun.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
15 files changed:
drivers/net/bnxt/tf_ulp/bnxt_ulp.c
drivers/net/bnxt/tf_ulp/ulp_mapper.c
drivers/net/bnxt/tf_ulp/ulp_mapper.h
drivers/net/bnxt/tf_ulp/ulp_matcher.c
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
drivers/net/bnxt/tf_ulp/ulp_rte_parser.h
drivers/net/bnxt/tf_ulp/ulp_template_db_class.c
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h
drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c
drivers/net/bnxt/tf_ulp/ulp_template_db_thor_act.c
drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_act.c
drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c
drivers/net/bnxt/tf_ulp/ulp_template_struct.h
drivers/net/bnxt/tf_ulp/ulp_utils.c
drivers/net/bnxt/tf_ulp/ulp_utils.h