DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v3 00/47] TruFlow update for Thor2
@ 2024-10-01  5:57 Sriharsha Basavapatna
  2024-10-01  5:57 ` [PATCH v3 01/47] net/bnxt: tf_core: fix wc tcam multi slice delete issue Sriharsha Basavapatna
                   ` (33 more replies)
  0 siblings, 34 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:57 UTC (permalink / raw)
  To: dev; +Cc: Sriharsha Basavapatna

This patch series introduces TruFlow functionality for Broadcom Thor2 NIC.

TruFlow(TF) is the software library that exposes CFA HW resources to
upper layer protocols or applications. This patch series implements the
tfc (tf_core) and the tf_ulp libraries as a part of the bnxt PMD,
so that upper layer APIs such as rte_flow can access the hardware.

******
v2->v3:
Updated the below patch to fix errors reported by DPDK CICD tests.
    0011-net-bnxt-tfc-support-tf-core-for-Thor2.patch

v1->v2:
Updated the below two patches to fix errors reported by DPDK CICD tests.
    0011-net-bnxt-tfc-support-tf-core-for-Thor2.patch
    0047-net-bnxt-tf_ulp-add-stats-cache-for-thor2.patch
******

Farah Smith (2):
  net/bnxt: tf_core: Thor TF EM key size check
  net/bnxt: tfc: support tf-core for Thor2

Jay Ding (2):
  net/bnxt: tf_ulp: add action read and clear support
  net/bnxt: tf_ulp: add rte_mtr support for Thor2

Kishore Padmanabha (21):
  net/bnxt: tf_core: flow scale improvement
  net/bnxt: tf_ulp: add support for vf to vf flow offload
  net/bnxt: tf_ulp: add support for overlapping flows
  net/bnxt: tf_ulp: convert recipe table to dynamic memory
  net/bnxt: tf_ulp: add feature bit support
  net/bnxt: tf_ulp: update template files
  net/bnxt: tf_ulp: add support for tunnel flow stats
  net/bnxt: tf_ulp: update template files
  net/bnxt: tf_ulp: enable recipe id generation
  net/bnxt: tf_ulp: fixed parent child db counters
  net/bnxt: tf_ulp: update template files
  net/bnxt: tf_ulp: add mask defaults when mask is not specified
  net/bnxt: tf_ulp: add jump action support
  net/bnxt: tf_ulp: add support for flow priority
  net/bnxt: tf_ulp: support for dynamic tunnel ports
  net/bnxt: tf_ulp: add track type feature to tables
  net/bnxt: tf_ulp: update template files
  net/bnxt: tf_ulp: support a few generic template items
  net/bnxt: tf_ulp: update template files
  net/bnxt: tf_ulp: enable support for truflow feature configuration
  net/bnxt: tf_ulp: support a few feature extensions

Manish Kurup (1):
  net/bnxt: tf_ulp: Wh+ mirroring support

Mike Baucom (2):
  net/bnxt: tf_ulp: miscellaneous fixes
  net/bnxt: tf_ulp: VFR updates for Thor 2

Peter Spreadborough (4):
  net/bnxt: tf_ulp: inline utility functions and use likely/unlikely
  net/bnxt: tf_ulp: switch ulp to use rte crc32 hash
  net/bnxt: update template files
  net/bnxt: tf_ulp: add stats cache for thor2

Randy Schacher (5):
  net/bnxt: tf_core: convert priority based TCAM manager to dynamic
    allocation
  net/bnxt: tf_core: remove dead AFM code from session-based priority
    TCAM mgr
  net/bnxt: tf_core: remove dead code from session-based priority TCAM
    mgr
  net/bnxt: tf_ulp: add vxlan-gpe base support
  net/bnxt: tf_ulp: add support for rss flow query to ULP

Sangtani Parag Satishbhai (1):
  net/bnxt: tf_core: fix slice count in case of HA entry move

Shahaji Bhosle (3):
  net/bnxt: tf_core: fix wc tcam multi slice delete issue
  net/bnxt: tf_core: tcam manager data corruption
  net/bnxt: tf_ulp: add custom l2 etype tunnel support

Shuanglin Wang (6):
  net/bnxt: tf_core: External EM support cleanup
  net/bnxt: tf_core: TF support flow scale query
  net/bnxt: tf_ulp: support for Thor2 ulp layer
  net/bnxt: tf_ulp: modify return values to adhere to C coding standard
  net/bnxt: tf_ulp: TF support flow scale query
  net/bnxt: tf_ulp: TFC support flow scale query for Thor2

 drivers/net/bnxt/bnxt.h                       |    41 +-
 drivers/net/bnxt/bnxt_cpr.c                   |    63 +-
 drivers/net/bnxt/bnxt_cpr.h                   |    24 +-
 drivers/net/bnxt/bnxt_ethdev.c                |   111 +-
 drivers/net/bnxt/bnxt_flow.c                  |     5 +-
 drivers/net/bnxt/bnxt_hwrm.c                  |   326 +-
 drivers/net/bnxt/bnxt_hwrm.h                  |    20 +
 drivers/net/bnxt/bnxt_mpc.c                   |   828 +
 drivers/net/bnxt/bnxt_mpc.h                   |   117 +
 drivers/net/bnxt/bnxt_reps.c                  |   108 +-
 drivers/net/bnxt/bnxt_ring.c                  |    19 +-
 drivers/net/bnxt/bnxt_ring.h                  |    54 +-
 drivers/net/bnxt/bnxt_rxr.c                   |     5 +-
 drivers/net/bnxt/bnxt_txr.c                   |    30 +-
 drivers/net/bnxt/bnxt_vnic.c                  |    39 +-
 drivers/net/bnxt/bnxt_vnic.h                  |     8 +
 drivers/net/bnxt/hcapi/cfa/hcapi_cfa.h        |    15 +-
 drivers/net/bnxt/hcapi/cfa/hcapi_cfa_defs.h   |   576 +-
 drivers/net/bnxt/hcapi/cfa_v3/CMakeLists.txt  |    92 +
 .../bnxt/hcapi/cfa_v3/bld/host/cfa_bld_mpc.c  |    42 +
 .../hcapi/cfa_v3/bld/include/cfa_bld_defs.h   |   578 +
 .../hcapi/cfa_v3/bld/include/host/cfa_bld.h   |   524 +
 .../cfa_v3/bld/include/host/cfa_bld_devops.h  |   297 +
 .../bld/include/host/cfa_bld_field_ids.h      |  1542 +
 .../bld/include/host/cfa_bld_mpc_field_ids.h  |  1286 +
 .../cfa_v3/bld/include/host/cfa_bld_mpcops.h  |   598 +
 .../cfa_v3/bld/include/p70/cfa_bld_p70_defs.h |   543 +
 .../bld/include/p70/cfa_bld_p70_field_ids.h   |  1542 +
 .../cfa_v3/bld/include/p70/cfa_bld_p70_mpc.h  |   548 +
 .../hcapi/cfa_v3/bld/include/p70/cfa_p70.h    |   164 +
 .../hcapi/cfa_v3/bld/include/p70/cfa_p70_hw.h |  4286 +
 .../bld/include/p70/cfa_p70_mpc_structs.h     |  1496 +
 .../hcapi/cfa_v3/bld/p70/cfa_bld_p70_mpc.c    |   927 +
 .../cfa_v3/bld/p70/cfa_bld_p70_mpc_defs.h     |    51 +
 .../p70/host/cfa_bld_p70_host_mpc_wrapper.c   |  1127 +
 .../p70/host/cfa_bld_p70_host_mpc_wrapper.h   |    83 +
 .../cfa_v3/bld/p70/host/cfa_bld_p70_mpcops.c  |    56 +
 .../cfa_v3/bld/p70/host/cfa_bld_p70_mpcops.h  |    22 +
 .../bld/p70/host/cfa_p70_mpc_field_ids.h      |  1177 +
 .../bld/p70/host/cfa_p70_mpc_field_mapping.h  |   775 +
 .../bnxt/hcapi/cfa_v3/include/cfa_resources.h |   185 +
 .../net/bnxt/hcapi/cfa_v3/include/cfa_trace.h |   273 +
 .../net/bnxt/hcapi/cfa_v3/include/cfa_types.h |   122 +
 .../net/bnxt/hcapi/cfa_v3/include/cfa_util.h  |    44 +
 .../include/platform/dpdk/cfa_debug_defs.h    |    52 +
 .../net/bnxt/hcapi/cfa_v3/include/sys_util.h  |   101 +
 drivers/net/bnxt/hcapi/cfa_v3/meson.build     |    36 +
 .../net/bnxt/hcapi/cfa_v3/mm/CMakeLists.txt   |    42 +
 drivers/net/bnxt/hcapi/cfa_v3/mm/cfa_mm.c     |   624 +
 .../net/bnxt/hcapi/cfa_v3/mm/cfa_mm_priv.h    |    92 +
 .../net/bnxt/hcapi/cfa_v3/mm/include/cfa_mm.h |   173 +
 .../net/bnxt/hcapi/cfa_v3/tim/CMakeLists.txt  |    43 +
 drivers/net/bnxt/hcapi/cfa_v3/tim/cfa_tim.c   |   124 +
 .../net/bnxt/hcapi/cfa_v3/tim/cfa_tim_priv.h  |    85 +
 .../bnxt/hcapi/cfa_v3/tim/include/cfa_tim.h   |   133 +
 .../net/bnxt/hcapi/cfa_v3/tpm/CMakeLists.txt  |    44 +
 drivers/net/bnxt/hcapi/cfa_v3/tpm/cfa_tpm.c   |   273 +
 .../net/bnxt/hcapi/cfa_v3/tpm/cfa_tpm_priv.h  |    47 +
 .../bnxt/hcapi/cfa_v3/tpm/include/cfa_tpm.h   |   215 +
 drivers/net/bnxt/hsi_struct_def_dpdk.h        | 25664 +++--
 drivers/net/bnxt/meson.build                  |     5 +-
 drivers/net/bnxt/tf_core/cfa_tcam_mgr.c       |  1486 +-
 drivers/net/bnxt/tf_core/cfa_tcam_mgr.h       |   112 +-
 .../net/bnxt/tf_core/cfa_tcam_mgr_device.h    |    91 +-
 .../net/bnxt/tf_core/cfa_tcam_mgr_hwop_msg.c  |   135 +-
 .../net/bnxt/tf_core/cfa_tcam_mgr_hwop_msg.h  |    18 +-
 drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.c    |   844 +-
 drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.h    |     9 +-
 drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.c   |   834 +-
 drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.h   |    10 +-
 .../net/bnxt/tf_core/cfa_tcam_mgr_session.c   |    13 +
 .../net/bnxt/tf_core/cfa_tcam_mgr_session.h   |    54 -
 drivers/net/bnxt/tf_core/meson.build          |     6 +-
 drivers/net/bnxt/tf_core/tf_core.c            |   152 +-
 drivers/net/bnxt/tf_core/tf_core.h            |    86 +-
 drivers/net/bnxt/tf_core/tf_device.c          |    30 -
 drivers/net/bnxt/tf_core/tf_device.h          |    67 +-
 drivers/net/bnxt/tf_core/tf_device_p4.c       |    27 +-
 drivers/net/bnxt/tf_core/tf_device_p4.h       |     1 +
 drivers/net/bnxt/tf_core/tf_device_p58.c      |   113 +-
 drivers/net/bnxt/tf_core/tf_em.h              |   361 +-
 drivers/net/bnxt/tf_core/tf_em_common.c       |  1191 -
 drivers/net/bnxt/tf_core/tf_em_common.h       |     1 +
 .../net/bnxt/tf_core/tf_em_hash_internal.c    |    34 +-
 drivers/net/bnxt/tf_core/tf_em_host.c         |   574 -
 drivers/net/bnxt/tf_core/tf_em_internal.c     |     9 +-
 drivers/net/bnxt/tf_core/tf_msg.c             |   672 +-
 drivers/net/bnxt/tf_core/tf_msg.h             |    57 +
 drivers/net/bnxt/tf_core/tf_resources.c       |   627 +
 drivers/net/bnxt/tf_core/tf_resources.h       |   131 +-
 drivers/net/bnxt/tf_core/tf_rm.c              |    41 +-
 drivers/net/bnxt/tf_core/tf_session.c         |    12 +-
 drivers/net/bnxt/tf_core/tf_session.h         |     7 +-
 drivers/net/bnxt/tf_core/tf_tcam.c            |   299 +-
 drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c    |    99 +-
 drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.h    |     6 -
 drivers/net/bnxt/tf_core/v3/meson.build       |    34 +
 drivers/net/bnxt/tf_core/v3/tfc.h             |  1527 +
 drivers/net/bnxt/tf_core/v3/tfc_act.c         |   843 +
 .../net/bnxt/tf_core/v3/tfc_action_handle.h   |    68 +
 drivers/net/bnxt/tf_core/v3/tfc_cpm.c         |   439 +
 drivers/net/bnxt/tf_core/v3/tfc_cpm.h         |   214 +
 drivers/net/bnxt/tf_core/v3/tfc_debug.h       |    28 +
 drivers/net/bnxt/tf_core/v3/tfc_em.c          |  1053 +
 drivers/net/bnxt/tf_core/v3/tfc_em.h          |   174 +
 drivers/net/bnxt/tf_core/v3/tfc_flow_handle.h |    81 +
 drivers/net/bnxt/tf_core/v3/tfc_global_id.c   |    58 +
 drivers/net/bnxt/tf_core/v3/tfc_ident.c       |    83 +
 drivers/net/bnxt/tf_core/v3/tfc_idx_tbl.c     |   328 +
 drivers/net/bnxt/tf_core/v3/tfc_if_tbl.c      |   133 +
 drivers/net/bnxt/tf_core/v3/tfc_init.c        |    69 +
 drivers/net/bnxt/tf_core/v3/tfc_mpc_table.c   |  1211 +
 drivers/net/bnxt/tf_core/v3/tfc_msg.c         |  1202 +
 drivers/net/bnxt/tf_core/v3/tfc_msg.h         |   164 +
 drivers/net/bnxt/tf_core/v3/tfc_priv.c        |   124 +
 drivers/net/bnxt/tf_core/v3/tfc_priv.h        |    78 +
 drivers/net/bnxt/tf_core/v3/tfc_resources.c   |    99 +
 drivers/net/bnxt/tf_core/v3/tfc_resources.h   |    15 +
 drivers/net/bnxt/tf_core/v3/tfc_session.c     |   155 +
 drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c   |  2069 +
 drivers/net/bnxt/tf_core/v3/tfc_tcam.c        |   299 +
 drivers/net/bnxt/tf_core/v3/tfc_util.c        |   230 +
 drivers/net/bnxt/tf_core/v3/tfc_util.h        |   123 +
 drivers/net/bnxt/tf_core/v3/tfc_vf2pf_msg.c   |   360 +
 drivers/net/bnxt/tf_core/v3/tfc_vf2pf_msg.h   |   220 +
 drivers/net/bnxt/tf_core/v3/tfo.c             |   575 +
 drivers/net/bnxt/tf_core/v3/tfo.h             |   429 +
 drivers/net/bnxt/tf_ulp/bnxt_tf_common.h      |    14 +-
 drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c    |   304 +-
 drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.h    |    23 +-
 drivers/net/bnxt/tf_ulp/bnxt_ulp.c            |  2607 +-
 drivers/net/bnxt/tf_ulp/bnxt_ulp.h            |   329 +-
 drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c       |   610 +-
 drivers/net/bnxt/tf_ulp/bnxt_ulp_meter.c      |   326 +-
 drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c         |  1645 +
 drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.h         |    24 +
 drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c        |  1119 +
 drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.h        |    74 +
 drivers/net/bnxt/tf_ulp/bnxt_ulp_utils.h      |  1096 +
 .../bnxt/tf_ulp/generic_templates/meson.build |    16 +-
 .../generic_templates/ulp_template_db_act.c   |  7250 +-
 .../generic_templates/ulp_template_db_class.c | 48727 ++-------
 .../generic_templates/ulp_template_db_enum.h  |  3771 +-
 .../generic_templates/ulp_template_db_field.h |  1189 +-
 .../generic_templates/ulp_template_db_tbl.c   | 19669 +---
 .../generic_templates/ulp_template_db_tbl.h   |    72 +
 .../ulp_template_db_thor2_act.c               | 10098 ++
 .../ulp_template_db_thor2_class.c             | 60934 +++++++++++
 .../ulp_template_db_thor_act.c                |  9046 +-
 .../ulp_template_db_thor_class.c              | 88530 ++++++++++------
 .../ulp_template_db_wh_plus_act.c             | 11153 +-
 .../ulp_template_db_wh_plus_class.c           | 11925 ++-
 drivers/net/bnxt/tf_ulp/meson.build           |    10 +-
 drivers/net/bnxt/tf_ulp/ulp_alloc_tbl.c       |   228 +
 drivers/net/bnxt/tf_ulp/ulp_alloc_tbl.h       |    71 +
 drivers/net/bnxt/tf_ulp/ulp_def_rules.c       |   456 +-
 drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c          |   373 +-
 drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h          |    30 +-
 drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tf.c       |   259 +
 drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c      |   130 +
 drivers/net/bnxt/tf_ulp/ulp_flow_db.c         |   361 +-
 drivers/net/bnxt/tf_ulp/ulp_flow_db.h         |    34 +-
 drivers/net/bnxt/tf_ulp/ulp_gen_hash.c        |    67 +-
 drivers/net/bnxt/tf_ulp/ulp_gen_tbl.c         |   326 +-
 drivers/net/bnxt/tf_ulp/ulp_gen_tbl.h         |    62 +-
 drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c          |   188 +-
 drivers/net/bnxt/tf_ulp/ulp_mapper.c          |  5047 +-
 drivers/net/bnxt/tf_ulp/ulp_mapper.h          |   289 +-
 drivers/net/bnxt/tf_ulp/ulp_mapper_tf.c       |  1389 +
 drivers/net/bnxt/tf_ulp/ulp_mapper_tfc.c      |  1783 +
 drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c        |    41 +-
 drivers/net/bnxt/tf_ulp/ulp_matcher.c         |   470 +-
 drivers/net/bnxt/tf_ulp/ulp_matcher.h         |    42 +-
 drivers/net/bnxt/tf_ulp/ulp_port_db.c         |   189 +-
 drivers/net/bnxt/tf_ulp/ulp_port_db.h         |    53 +
 drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c |    22 +-
 drivers/net/bnxt/tf_ulp/ulp_rte_parser.c      |   928 +-
 drivers/net/bnxt/tf_ulp/ulp_rte_parser.h      |    26 +-
 drivers/net/bnxt/tf_ulp/ulp_sc_mgr.c          |   529 +
 drivers/net/bnxt/tf_ulp/ulp_sc_mgr.h          |   142 +
 drivers/net/bnxt/tf_ulp/ulp_sc_mgr_tfc.c      |    60 +
 drivers/net/bnxt/tf_ulp/ulp_template_struct.h |    76 +-
 drivers/net/bnxt/tf_ulp/ulp_tun.c             |    14 +-
 drivers/net/bnxt/tf_ulp/ulp_utils.c           |   141 +-
 drivers/net/bnxt/tf_ulp/ulp_utils.h           |   936 +-
 185 files changed, 228186 insertions(+), 136353 deletions(-)
 create mode 100644 drivers/net/bnxt/bnxt_mpc.c
 create mode 100644 drivers/net/bnxt/bnxt_mpc.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/CMakeLists.txt
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/bld/host/cfa_bld_mpc.c
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/bld/include/cfa_bld_defs.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/bld/include/host/cfa_bld.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/bld/include/host/cfa_bld_devops.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/bld/include/host/cfa_bld_field_ids.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/bld/include/host/cfa_bld_mpc_field_ids.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/bld/include/host/cfa_bld_mpcops.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/bld/include/p70/cfa_bld_p70_defs.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/bld/include/p70/cfa_bld_p70_field_ids.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/bld/include/p70/cfa_bld_p70_mpc.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/bld/include/p70/cfa_p70.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/bld/include/p70/cfa_p70_hw.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/bld/include/p70/cfa_p70_mpc_structs.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/bld/p70/cfa_bld_p70_mpc.c
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/bld/p70/cfa_bld_p70_mpc_defs.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/bld/p70/host/cfa_bld_p70_host_mpc_wrapper.c
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/bld/p70/host/cfa_bld_p70_host_mpc_wrapper.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/bld/p70/host/cfa_bld_p70_mpcops.c
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/bld/p70/host/cfa_bld_p70_mpcops.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/bld/p70/host/cfa_p70_mpc_field_ids.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/bld/p70/host/cfa_p70_mpc_field_mapping.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/include/cfa_resources.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/include/cfa_trace.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/include/cfa_types.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/include/cfa_util.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/include/platform/dpdk/cfa_debug_defs.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/include/sys_util.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/meson.build
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/mm/CMakeLists.txt
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/mm/cfa_mm.c
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/mm/cfa_mm_priv.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/mm/include/cfa_mm.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/tim/CMakeLists.txt
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/tim/cfa_tim.c
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/tim/cfa_tim_priv.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/tim/include/cfa_tim.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/tpm/CMakeLists.txt
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/tpm/cfa_tpm.c
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/tpm/cfa_tpm_priv.h
 create mode 100644 drivers/net/bnxt/hcapi/cfa_v3/tpm/include/cfa_tpm.h
 delete mode 100644 drivers/net/bnxt/tf_core/cfa_tcam_mgr_session.h
 create mode 100644 drivers/net/bnxt/tf_core/tf_resources.c
 create mode 100644 drivers/net/bnxt/tf_core/v3/meson.build
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc.h
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc_act.c
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc_action_handle.h
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc_cpm.c
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc_cpm.h
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc_debug.h
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc_em.c
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc_em.h
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc_flow_handle.h
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc_global_id.c
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc_ident.c
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc_idx_tbl.c
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc_if_tbl.c
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc_init.c
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc_mpc_table.c
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc_msg.c
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc_msg.h
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc_priv.c
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc_priv.h
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc_resources.c
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc_resources.h
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc_session.c
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc_tcam.c
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc_util.c
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc_util.h
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc_vf2pf_msg.c
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfc_vf2pf_msg.h
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfo.c
 create mode 100644 drivers/net/bnxt/tf_core/v3/tfo.h
 create mode 100644 drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
 create mode 100644 drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.h
 create mode 100644 drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
 create mode 100644 drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.h
 create mode 100644 drivers/net/bnxt/tf_ulp/bnxt_ulp_utils.h
 create mode 100644 drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor2_act.c
 create mode 100644 drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor2_class.c
 create mode 100644 drivers/net/bnxt/tf_ulp/ulp_alloc_tbl.c
 create mode 100644 drivers/net/bnxt/tf_ulp/ulp_alloc_tbl.h
 create mode 100644 drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tf.c
 create mode 100644 drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c
 create mode 100644 drivers/net/bnxt/tf_ulp/ulp_mapper_tf.c
 create mode 100644 drivers/net/bnxt/tf_ulp/ulp_mapper_tfc.c
 create mode 100644 drivers/net/bnxt/tf_ulp/ulp_sc_mgr.c
 create mode 100644 drivers/net/bnxt/tf_ulp/ulp_sc_mgr.h
 create mode 100644 drivers/net/bnxt/tf_ulp/ulp_sc_mgr_tfc.c

-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 01/47] net/bnxt: tf_core: fix wc tcam multi slice delete issue
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
@ 2024-10-01  5:57 ` Sriharsha Basavapatna
  2024-10-01  5:57 ` [PATCH v3 02/47] net/bnxt: tf_core: tcam manager data corruption Sriharsha Basavapatna
                   ` (32 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:57 UTC (permalink / raw)
  To: dev
  Cc: Shahaji Bhosle, Randy Schacher, Kishore Padmanabha,
	Sriharsha Basavapatna, Ajit Khaparde

From: Shahaji Bhosle <sbhosle@broadcom.com>

FW tries to update the HWRM request data in the
delete case to update the mode bit and also
update invalid profile id. This update only
happens when the data is send over DMA. HWRM
requests are read only buffers and cannot be
updated. So driver now will always send WC
tcam set message over DMA channel.

Update tunnel alloc apis to provide error message.

Fixes: ca5e61bd562d ("net/bnxt: support EM and TCAM lookup with table scope")
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Shahaji Bhosle <sbhosle@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_core/tf_msg.c          | 28 +++++++++++-----------
 drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c | 18 ++++++++++++--
 2 files changed, 30 insertions(+), 16 deletions(-)

diff --git a/drivers/net/bnxt/tf_core/tf_msg.c b/drivers/net/bnxt/tf_core/tf_msg.c
index 1c66c7e01a..4aa90f6b07 100644
--- a/drivers/net/bnxt/tf_core/tf_msg.c
+++ b/drivers/net/bnxt/tf_core/tf_msg.c
@@ -1612,20 +1612,20 @@ tf_msg_tcam_entry_set(struct tf *tfp,
 	req.result_size = parms->result_size;
 	data_size = 2 * req.key_size + req.result_size;
 
-	if (data_size <= TF_PCI_BUF_SIZE_MAX) {
-		/* use pci buffer */
-		data = &req.dev_data[0];
-	} else {
-		/* use dma buffer */
-		req.flags |= HWRM_TF_TCAM_SET_INPUT_FLAGS_DMA;
-		rc = tf_msg_alloc_dma_buf(&buf, data_size);
-		if (rc)
-			goto cleanup;
-		data = buf.va_addr;
-		tfp_memcpy(&req.dev_data[0],
-			   &buf.pa_addr,
-			   sizeof(buf.pa_addr));
-	}
+	/*
+	 * Always use dma buffer, as the delete multi slice
+	 * tcam entries not support with HWRM request buffer
+	 * only DMA'ed buffer can update the mode bits for
+	 * the delete to work
+	 */
+	req.flags |= HWRM_TF_TCAM_SET_INPUT_FLAGS_DMA;
+	rc = tf_msg_alloc_dma_buf(&buf, data_size);
+	if (rc)
+		goto cleanup;
+	data = buf.va_addr;
+	tfp_memcpy(&req.dev_data[0],
+		   &buf.pa_addr,
+		   sizeof(buf.pa_addr));
 
 	tfp_memcpy(&data[0], parms->key, parms->key_size);
 	tfp_memcpy(&data[parms->key_size], parms->mask, parms->key_size);
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c b/drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c
index 96d61c3ed2..7e4952c062 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c
@@ -32,9 +32,17 @@ bnxt_tunnel_dst_port_alloc(struct bnxt *bp,
 			   uint16_t port,
 			   uint8_t type)
 {
-	return bnxt_hwrm_tunnel_dst_port_alloc(bp,
+	int rc = 0;
+	rc = bnxt_hwrm_tunnel_dst_port_alloc(bp,
 					       port,
 					       type);
+	if (rc) {
+		PMD_DRV_LOG(ERR, "Tunnel type:%d alloc failed for port:%d error:%s\n",
+			    type, port,
+			    (rc == HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_ERROR_INFO_ERR_ALLOCATED) ?
+			    "already allocated" : "no resource");
+	}
+	return rc;
 }
 
 int
@@ -589,7 +597,13 @@ bnxt_pmd_global_tunnel_set(uint16_t port_id, uint8_t type,
 		}
 
 		rc = bnxt_hwrm_tunnel_dst_port_alloc(bp, udp_port, hwtype);
-		if (!rc) {
+		if (rc) {
+			PMD_DRV_LOG(ERR, "Tunnel type:%d alloc failed for port:%d error:%s\n",
+				    hwtype, udp_port,
+				    (rc ==
+				     HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_ERROR_INFO_ERR_ALLOCATED) ?
+				    "already allocated" : "no resource");
+		} else {
 			ulp_global_tunnel_db[type].ref_cnt++;
 			ulp_global_tunnel_db[type].dport = udp_port;
 			bnxt_pmd_global_reg_data_to_hndl(port_id, bp->ecpri_upar_in_use,
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 02/47] net/bnxt: tf_core: tcam manager data corruption
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
  2024-10-01  5:57 ` [PATCH v3 01/47] net/bnxt: tf_core: fix wc tcam multi slice delete issue Sriharsha Basavapatna
@ 2024-10-01  5:57 ` Sriharsha Basavapatna
  2024-10-01  5:57 ` [PATCH v3 03/47] net/bnxt: tf_core: External EM support cleanup Sriharsha Basavapatna
                   ` (31 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:57 UTC (permalink / raw)
  To: dev
  Cc: Shahaji Bhosle, Sriharsha Basavapatna, Farah Smith,
	Kishore Padmanabha, Shuanglin Wang, Ajit Khaparde

From: Shahaji Bhosle <sbhosle@broadcom.com>

Max entries per session were not getting initialized
to 0, when the sessions were closed.
Reset max entries counter session when the session is initialized

Fixes: 97435d7906d7 ("net/bnxt: update Truflow core")
Signed-off-by: Shahaji Bhosle <sbhosle@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Shuanglin Wang <shuanglin.wang@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_core/cfa_tcam_mgr.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c
index f26d93e7a9..9df2d2b937 100644
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c
+++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c
@@ -909,6 +909,7 @@ cfa_tcam_mgr_init(int sess_idx, enum cfa_tcam_mgr_device_type type,
 	/* Now calculate the max entries per table and global max entries based
 	 * on the updated table limits.
 	 */
+	cfa_tcam_mgr_max_entries[sess_idx] = 0;
 	for (dir = 0; dir < ARRAY_SIZE(cfa_tcam_mgr_tables[sess_idx]); dir++)
 		for (tbl_type = 0;
 		     tbl_type < ARRAY_SIZE(cfa_tcam_mgr_tables[sess_idx][dir]);
@@ -958,8 +959,8 @@ cfa_tcam_mgr_init(int sess_idx, enum cfa_tcam_mgr_device_type type,
 	if (parms != NULL)
 		parms->max_entries = cfa_tcam_mgr_max_entries[sess_idx];
 
-	CFA_TCAM_MGR_LOG(INFO, "Global TCAM table initialized for sess_idx %d.\n",
-			 sess_idx);
+	CFA_TCAM_MGR_LOG(DEBUG, "Global TCAM table initialized for sess_idx %d max entries %d.\n",
+			 sess_idx, cfa_tcam_mgr_max_entries[sess_idx]);
 
 	return 0;
 }
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 03/47] net/bnxt: tf_core: External EM support cleanup
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
  2024-10-01  5:57 ` [PATCH v3 01/47] net/bnxt: tf_core: fix wc tcam multi slice delete issue Sriharsha Basavapatna
  2024-10-01  5:57 ` [PATCH v3 02/47] net/bnxt: tf_core: tcam manager data corruption Sriharsha Basavapatna
@ 2024-10-01  5:57 ` Sriharsha Basavapatna
  2024-10-01  5:57 ` [PATCH v3 04/47] net/bnxt: tf_core: Thor TF EM key size check Sriharsha Basavapatna
                   ` (30 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:57 UTC (permalink / raw)
  To: dev
  Cc: Shuanglin Wang, Sriharsha Basavapatna, Shahaji Bhosle,
	Farah Smith, Ajit Khaparde

From: Shuanglin Wang <shuanglin.wang@broadcom.com>

Isolate external EM support as it is now defunct on Wh+.

Signed-off-by: Shuanglin Wang <shuanglin.wang@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_core/meson.build     |    2 -
 drivers/net/bnxt/tf_core/tf_core.h       |   34 +-
 drivers/net/bnxt/tf_core/tf_device.c     |   30 -
 drivers/net/bnxt/tf_core/tf_device_p4.c  |   17 +-
 drivers/net/bnxt/tf_core/tf_device_p4.h  |    1 +
 drivers/net/bnxt/tf_core/tf_device_p58.c |    6 +-
 drivers/net/bnxt/tf_core/tf_em.h         |  361 +------
 drivers/net/bnxt/tf_core/tf_em_common.c  | 1191 ----------------------
 drivers/net/bnxt/tf_core/tf_em_common.h  |    1 +
 drivers/net/bnxt/tf_core/tf_em_host.c    |  574 -----------
 drivers/net/bnxt/tf_core/tf_msg.c        |  465 ---------
 drivers/net/bnxt/tf_core/tf_tcam.c       |    1 -
 12 files changed, 71 insertions(+), 2612 deletions(-)

diff --git a/drivers/net/bnxt/tf_core/meson.build b/drivers/net/bnxt/tf_core/meson.build
index ae44aa34cf..13a71738a0 100644
--- a/drivers/net/bnxt/tf_core/meson.build
+++ b/drivers/net/bnxt/tf_core/meson.build
@@ -21,9 +21,7 @@ sources += files(
         'tf_device.c',
         'tf_device_p4.c',
         'tf_device_p58.c',
-        'tf_em_common.c',
         'tf_em_hash_internal.c',
-        'tf_em_host.c',
         'tf_em_internal.c',
         'tf_global_cfg.c',
         'tf_hash.c',
diff --git a/drivers/net/bnxt/tf_core/tf_core.h b/drivers/net/bnxt/tf_core/tf_core.h
index 3da1d2a5ca..fd1ee2f454 100644
--- a/drivers/net/bnxt/tf_core/tf_core.h
+++ b/drivers/net/bnxt/tf_core/tf_core.h
@@ -21,9 +21,15 @@
 
 /********** BEGIN Truflow Core DEFINITIONS **********/
 
+/**
+ * \cond DO_NOT_DOCUMENT
+ */
 #define TF_KILOBYTE  1024
 #define TF_MEGABYTE  (1024 * 1024)
 
+/**
+ * \endcond
+ */
 /**
  * direction
  */
@@ -93,15 +99,19 @@ enum tf_sram_bank_id {
  *
  * Convert absolute offset to action record pointer in EEM record entry
  * Convert action record pointer in EEM record entry to absolute offset
+ * \cond DO_NOT_DOCUMENT
  */
 #define TF_ACT_REC_OFFSET_2_PTR(offset) ((offset) >> 4)
 #define TF_ACT_REC_PTR_2_OFFSET(offset) ((offset) << 4)
 
-/*
+/**
  * Helper Macros
  */
 #define TF_BITS_2_BYTES(num_bits) (((num_bits) + 7) / 8)
 
+/**
+ * \endcond
+ */
 /********** BEGIN API FUNCTION PROTOTYPES/PARAMETERS **********/
 
 /**
@@ -147,6 +157,8 @@ enum tf_sram_bank_id {
  * TruFlow session. Session ID is constructed from the passed in
  * ctrl_chan_name in tf_open_session() together with an allocated
  * fw_session_id. Done by TruFlow on tf_open_session().
+ *
+ * \cond DO_NOT_DOCUMENT
  */
 union tf_session_id {
 	uint32_t id;
@@ -172,6 +184,10 @@ union tf_session_client_id {
 		uint8_t fw_session_client_id;
 	} internal;
 };
+/**
+ * \endcond
+ */
+
 
 /**
  * Session Version
@@ -181,12 +197,17 @@ union tf_session_client_id {
  * versions can be supported.
  *
  * Please see the TF_VER_MAJOR/MINOR and UPDATE defines.
+ *
+ * \cond DO_NOT_DOCUMENT
  */
 struct tf_session_version {
 	uint8_t major;
 	uint8_t minor;
 	uint8_t update;
 };
+/**
+ * \endcond
+ */
 
 /**
  * Session supported device types
@@ -485,6 +506,7 @@ struct tf_session_info {
  *
  * NOTE: This struct must be within the BNXT PMD struct bnxt
  *       (bp). This allows use of container_of() to get access to the PMD.
+ * \cond DO_NOT_DOCUMENT
  */
 struct tf {
 	struct tf_session_info *session;
@@ -493,6 +515,9 @@ struct tf {
 	 */
 	void *bp;
 };
+/**
+ * \endcond
+ */
 
 /**
  * Identifier resource definition
@@ -716,12 +741,15 @@ int tf_open_session(struct tf *tfp,
 
 /**
  * General internal resource info
- *
+ * \cond DO_NOT_DOCUMENT
  */
 struct tf_resource_info {
 	uint16_t start;
 	uint16_t stride;
 };
+/**
+ * \endcond
+ */
 
 /**
  * Identifier resource definition
@@ -2386,6 +2414,7 @@ struct tf_get_version_parms {
 	/* [out] major
 	 *
 	 * Version Major number.
+	 * \cond DO_NOT_DOCUMENT
 	 */
 	uint8_t	major;
 
@@ -2402,6 +2431,7 @@ struct tf_get_version_parms {
 	uint8_t	update;
 
 	/**
+	 * \endcond
 	 * [out] dev_ident_caps
 	 *
 	 * fw available identifier resource list
diff --git a/drivers/net/bnxt/tf_core/tf_device.c b/drivers/net/bnxt/tf_core/tf_device.c
index 02a9ebd7b2..d023194d0c 100644
--- a/drivers/net/bnxt/tf_core/tf_device.c
+++ b/drivers/net/bnxt/tf_core/tf_device.c
@@ -153,28 +153,6 @@ tf_dev_bind_p4(struct tf *tfp,
 		}
 		no_rsv_flag = false;
 	}
-
-	/*
-	 * EEM
-	 */
-
-	em_cfg.cfg = tf_em_ext_p4;
-	rsv_cnt = tf_dev_reservation_check(TF_EM_TBL_TYPE_MAX,
-					   em_cfg.cfg,
-					   (uint16_t *)resources->em_cnt);
-	if (rsv_cnt) {
-		em_cfg.num_elements = TF_EM_TBL_TYPE_MAX;
-		em_cfg.resources = resources;
-		em_cfg.mem_type = TF_EEM_MEM_TYPE_HOST;
-		rc = tf_em_ext_common_bind(tfp, &em_cfg);
-		if (rc) {
-			TFP_DRV_LOG(ERR,
-				    "EEM initialization failure\n");
-			goto fail;
-		}
-		no_rsv_flag = false;
-	}
-
 	/*
 	 * EM
 	 */
@@ -294,14 +272,6 @@ tf_dev_unbind_p4(struct tf *tfp)
 			    "Device unbind failed, Table Type\n");
 		fail = true;
 	}
-
-	rc = tf_em_ext_common_unbind(tfp);
-	if (rc) {
-		TFP_DRV_LOG(INFO,
-			    "Device unbind failed, EEM\n");
-		fail = true;
-	}
-
 	rc = tf_em_int_unbind(tfp);
 	if (rc) {
 		TFP_DRV_LOG(INFO,
diff --git a/drivers/net/bnxt/tf_core/tf_device_p4.c b/drivers/net/bnxt/tf_core/tf_device_p4.c
index 911ea92471..4df1918bc5 100644
--- a/drivers/net/bnxt/tf_core/tf_device_p4.c
+++ b/drivers/net/bnxt/tf_core/tf_device_p4.c
@@ -15,6 +15,7 @@
 #include "tf_if_tbl.h"
 #include "tfp.h"
 #include "tf_msg_common.h"
+#include "tf_util.h"
 
 #define TF_DEV_P4_PARIF_MAX 16
 #define TF_DEV_P4_PF_MASK 0xfUL
@@ -528,13 +529,13 @@ const struct tf_dev_ops tf_dev_ops_p4 = {
 	.tf_dev_get_tbl_info = NULL,
 	.tf_dev_is_sram_managed = tf_dev_p4_is_sram_managed,
 	.tf_dev_alloc_tbl = tf_tbl_alloc,
-	.tf_dev_alloc_ext_tbl = tf_tbl_ext_alloc,
+	.tf_dev_alloc_ext_tbl = NULL,
 	.tf_dev_alloc_sram_tbl = tf_tbl_alloc,
 	.tf_dev_free_tbl = tf_tbl_free,
-	.tf_dev_free_ext_tbl = tf_tbl_ext_free,
+	.tf_dev_free_ext_tbl = NULL,
 	.tf_dev_free_sram_tbl = tf_tbl_free,
 	.tf_dev_set_tbl = tf_tbl_set,
-	.tf_dev_set_ext_tbl = tf_tbl_ext_common_set,
+	.tf_dev_set_ext_tbl = NULL,
 	.tf_dev_set_sram_tbl = NULL,
 	.tf_dev_get_tbl = tf_tbl_get,
 	.tf_dev_get_sram_tbl = NULL,
@@ -551,13 +552,13 @@ const struct tf_dev_ops tf_dev_ops_p4 = {
 	.tf_dev_get_tcam_resc_info = tf_tcam_get_resc_info,
 	.tf_dev_insert_int_em_entry = tf_em_insert_int_entry,
 	.tf_dev_delete_int_em_entry = tf_em_delete_int_entry,
-	.tf_dev_insert_ext_em_entry = tf_em_insert_ext_entry,
-	.tf_dev_delete_ext_em_entry = tf_em_delete_ext_entry,
+	.tf_dev_insert_ext_em_entry = NULL,
+	.tf_dev_delete_ext_em_entry = NULL,
 	.tf_dev_get_em_resc_info = tf_em_get_resc_info,
-	.tf_dev_alloc_tbl_scope = tf_em_ext_common_alloc,
-	.tf_dev_map_tbl_scope = tf_em_ext_map_tbl_scope,
+	.tf_dev_alloc_tbl_scope = NULL,
+	.tf_dev_map_tbl_scope = NULL,
 	.tf_dev_map_parif = tf_dev_p4_map_parif,
-	.tf_dev_free_tbl_scope = tf_em_ext_common_free,
+	.tf_dev_free_tbl_scope = NULL,
 	.tf_dev_set_if_tbl = tf_if_tbl_set,
 	.tf_dev_get_if_tbl = tf_if_tbl_get,
 	.tf_dev_set_global_cfg = tf_global_cfg_set,
diff --git a/drivers/net/bnxt/tf_core/tf_device_p4.h b/drivers/net/bnxt/tf_core/tf_device_p4.h
index 20da2f97db..750e50f787 100644
--- a/drivers/net/bnxt/tf_core/tf_device_p4.h
+++ b/drivers/net/bnxt/tf_core/tf_device_p4.h
@@ -11,6 +11,7 @@
 #include "tf_rm.h"
 #include "tf_if_tbl.h"
 #include "tf_global_cfg.h"
+#include "hcapi_cfa_defs.h"
 
 extern struct tf_rm_element_cfg tf_tbl_p4[TF_DIR_MAX][TF_TBL_TYPE_MAX];
 
diff --git a/drivers/net/bnxt/tf_core/tf_device_p58.c b/drivers/net/bnxt/tf_core/tf_device_p58.c
index 6916c50fdc..51c260b5d7 100644
--- a/drivers/net/bnxt/tf_core/tf_device_p58.c
+++ b/drivers/net/bnxt/tf_core/tf_device_p58.c
@@ -853,12 +853,12 @@ const struct tf_dev_ops tf_dev_ops_p58 = {
 	.tf_dev_get_tbl_info = tf_dev_p58_get_sram_tbl_info,
 	.tf_dev_alloc_tbl = tf_tbl_alloc,
 	.tf_dev_alloc_sram_tbl = tf_tbl_sram_alloc,
-	.tf_dev_alloc_ext_tbl = tf_tbl_ext_alloc,
+	.tf_dev_alloc_ext_tbl = NULL,
 	.tf_dev_free_tbl = tf_tbl_free,
-	.tf_dev_free_ext_tbl = tf_tbl_ext_free,
+	.tf_dev_free_ext_tbl = NULL,
 	.tf_dev_free_sram_tbl = tf_tbl_sram_free,
 	.tf_dev_set_tbl = tf_tbl_set,
-	.tf_dev_set_ext_tbl = tf_tbl_ext_common_set,
+	.tf_dev_set_ext_tbl = NULL,
 	.tf_dev_set_sram_tbl = tf_tbl_sram_set,
 	.tf_dev_get_tbl = tf_tbl_get,
 	.tf_dev_get_sram_tbl = tf_tbl_sram_get,
diff --git a/drivers/net/bnxt/tf_core/tf_em.h b/drivers/net/bnxt/tf_core/tf_em.h
index 97cdb48f14..15f810521c 100644
--- a/drivers/net/bnxt/tf_core/tf_em.h
+++ b/drivers/net/bnxt/tf_core/tf_em.h
@@ -12,70 +12,11 @@
 
 #include "hcapi_cfa_defs.h"
 
-#define TF_EM_MIN_ENTRIES     (1 << 15) /* 32K */
-#define TF_EM_MAX_ENTRIES     (1 << 27) /* 128M */
-
 #define TF_P4_HW_EM_KEY_MAX_SIZE 52
 #define TF_P4_EM_KEY_RECORD_SIZE 64
 
 #define TF_P58_HW_EM_KEY_MAX_SIZE 80
 
-#define TF_EM_MAX_MASK 0x7FFF
-#define TF_EM_MAX_ENTRY (128 * 1024 * 1024)
-
-/**
- * Hardware Page sizes supported for EEM:
- *   4K, 8K, 64K, 256K, 1M, 2M, 4M, 1G.
- *
- * Round-down other page sizes to the lower hardware page
- * size supported.
- */
-#define TF_EM_PAGE_SIZE_4K 12
-#define TF_EM_PAGE_SIZE_8K 13
-#define TF_EM_PAGE_SIZE_64K 16
-#define TF_EM_PAGE_SIZE_256K 18
-#define TF_EM_PAGE_SIZE_1M 20
-#define TF_EM_PAGE_SIZE_2M 21
-#define TF_EM_PAGE_SIZE_4M 22
-#define TF_EM_PAGE_SIZE_1G 30
-
-/* Set page size */
-#define BNXT_TF_PAGE_SIZE TF_EM_PAGE_SIZE_2M
-
-#if (BNXT_TF_PAGE_SIZE == TF_EM_PAGE_SIZE_4K)	/** 4K */
-#define TF_EM_PAGE_SHIFT TF_EM_PAGE_SIZE_4K
-#define TF_EM_PAGE_SIZE_ENUM HWRM_TF_CTXT_MEM_RGTR_INPUT_PAGE_SIZE_4K
-#elif (BNXT_TF_PAGE_SIZE == TF_EM_PAGE_SIZE_8K)	/** 8K */
-#define TF_EM_PAGE_SHIFT TF_EM_PAGE_SIZE_8K
-#define TF_EM_PAGE_SIZE_ENUM HWRM_TF_CTXT_MEM_RGTR_INPUT_PAGE_SIZE_8K
-#elif (BNXT_TF_PAGE_SIZE == TF_EM_PAGE_SIZE_64K)	/** 64K */
-#define TF_EM_PAGE_SHIFT TF_EM_PAGE_SIZE_64K
-#define TF_EM_PAGE_SIZE_ENUM HWRM_TF_CTXT_MEM_RGTR_INPUT_PAGE_SIZE_64K
-#elif (BNXT_TF_PAGE_SIZE == TF_EM_PAGE_SIZE_256K)	/** 256K */
-#define TF_EM_PAGE_SHIFT TF_EM_PAGE_SIZE_256K
-#define TF_EM_PAGE_SIZE_ENUM HWRM_TF_CTXT_MEM_RGTR_INPUT_PAGE_SIZE_256K
-#elif (BNXT_TF_PAGE_SIZE == TF_EM_PAGE_SIZE_1M)	/** 1M */
-#define TF_EM_PAGE_SHIFT TF_EM_PAGE_SIZE_1M
-#define TF_EM_PAGE_SIZE_ENUM HWRM_TF_CTXT_MEM_RGTR_INPUT_PAGE_SIZE_1M
-#elif (BNXT_TF_PAGE_SIZE == TF_EM_PAGE_SIZE_2M)	/** 2M */
-#define TF_EM_PAGE_SHIFT TF_EM_PAGE_SIZE_2M
-#define TF_EM_PAGE_SIZE_ENUM HWRM_TF_CTXT_MEM_RGTR_INPUT_PAGE_SIZE_2M
-#elif (BNXT_TF_PAGE_SIZE == TF_EM_PAGE_SIZE_4M)	/** 4M */
-#define TF_EM_PAGE_SHIFT TF_EM_PAGE_SIZE_4M
-#define TF_EM_PAGE_SIZE_ENUM HWRM_TF_CTXT_MEM_RGTR_INPUT_PAGE_SIZE_4M
-#elif (BNXT_TF_PAGE_SIZE == TF_EM_PAGE_SIZE_1G)	/** 1G */
-#define TF_EM_PAGE_SHIFT TF_EM_PAGE_SIZE_1G
-#define TF_EM_PAGE_SIZE_ENUM HWRM_TF_CTXT_MEM_RGTR_INPUT_PAGE_SIZE_1G
-#else
-#error "Invalid Page Size specified. Please use a TF_EM_PAGE_SIZE_n define"
-#endif
-
-/*
- * System memory always uses 4K pages
- */
-#define TF_EM_PAGE_SIZE	(1 << TF_EM_PAGE_SHIFT)
-#define TF_EM_PAGE_ALIGNMENT (1 << TF_EM_PAGE_SHIFT)
-
 /*
  * Used to build GFID:
  *
@@ -90,16 +31,6 @@
 #define TF_EM_INTERNAL_INDEX_MASK 0xFFFC
 #define TF_EM_INTERNAL_ENTRY_MASK  0x3
 
-/** EM Entry
- *  Each EM entry is 512-bit (64-bytes) but ordered differently to
- *  EEM.
- */
-struct tf_em_64b_entry {
-	/** Header is 8 bytes long */
-	struct cfa_p4_eem_entry_hdr hdr;
-	/** Key is 448 bits - 56 bytes */
-	uint8_t key[TF_P4_EM_KEY_RECORD_SIZE - sizeof(struct cfa_p4_eem_entry_hdr)];
-};
 
 /** EEM Memory Type
  *
@@ -132,6 +63,17 @@ struct tf_em_cfg_parms {
 	enum tf_mem_type mem_type;
 };
 
+/** EM Entry
+ *  Each EM entry is 512-bit (64-bytes) but ordered differently to
+ *  EEM.
+ */
+struct tf_em_64b_entry {
+	/** Header is 8 bytes long */
+	struct cfa_p4_eem_entry_hdr hdr;
+	/** Key is 448 bits - 56 bytes */
+	uint8_t key[TF_P4_EM_KEY_RECORD_SIZE - sizeof(struct cfa_p4_eem_entry_hdr)];
+};
+
 /**
  * EM database
  *
@@ -153,29 +95,33 @@ struct em_rm_db {
  *
  * @ref tf_em_delete_int_entry
  *
- * @ref tf_em_insert_ext_entry
+ * @ref tf_em_insert_ext_entry DEFUNCT
  *
- * @ref tf_em_delete_ext_entry
+ * @ref tf_em_delete_ext_entry DEFUNCT
  *
- * @ref tf_em_insert_ext_sys_entry
+ * @ref tf_em_insert_ext_sys_entry DEFUNCT
  *
- * @ref tf_em_delete_ext_sys_entry
+ * @ref tf_em_delete_ext_sys_entry DEFUNCT
  *
  * @ref tf_em_int_bind
  *
  * @ref tf_em_int_unbind
  *
- * @ref tf_em_ext_common_bind
+ * @ref tf_em_ext_common_bind DEFUNCT
  *
- * @ref tf_em_ext_common_unbind
+ * @ref tf_em_ext_common_unbind DEFUNCT
  *
- * @ref tf_em_ext_alloc
+ * @ref tf_em_ext_host_alloc DEFUNCT
  *
- * @ref tf_em_ext_free
+ * @ref tf_em_ext_host_free DEFUNCT
  *
- * @ref tf_em_ext_common_free
+ * @ref tf_em_ext_system_alloc DEFUNCT
  *
- * @ref tf_em_ext_common_alloc
+ * @ref tf_em_ext_system_free DEFUNCT
+ *
+ * @ref tf_em_ext_common_free DEFUNCT
+ *
+ * @ref tf_em_ext_common_alloc DEFUNCT
  */
 
 /**
@@ -258,70 +204,6 @@ int tf_em_hash_delete_int_entry(struct tf *tfp,
 int tf_em_move_int_entry(struct tf *tfp,
 			 struct tf_move_em_entry_parms *parms);
 
-/**
- * Insert record in to external EEM table
- *
- * [in] tfp
- *   Pointer to TruFlow handle
- *
- * [in] parms
- *   Pointer to input parameters
- *
- * Returns:
- *   0       - Success
- *   -EINVAL - Parameter error
- */
-int tf_em_insert_ext_entry(struct tf *tfp,
-			   struct tf_insert_em_entry_parms *parms);
-
-/**
- * Insert record from external EEM table
- *
- * [in] tfp
- *   Pointer to TruFlow handle
- *
- * [in] parms
- *   Pointer to input parameters
- *
- * Returns:
- *   0       - Success
- *   -EINVAL - Parameter error
- */
-int tf_em_delete_ext_entry(struct tf *tfp,
-			   struct tf_delete_em_entry_parms *parms);
-
-/**
- * Insert record in to external system EEM table
- *
- * [in] tfp
- *   Pointer to TruFlow handle
- *
- * [in] parms
- *   Pointer to input parameters
- *
- * Returns:
- *   0       - Success
- *   -EINVAL - Parameter error
- */
-int tf_em_insert_ext_sys_entry(struct tf *tfp,
-			       struct tf_insert_em_entry_parms *parms);
-
-/**
- * Delete record from external system EEM table
- *
- * [in] tfp
- *   Pointer to TruFlow handle
- *
- * [in] parms
- *   Pointer to input parameters
- *
- * Returns:
- *   0       - Success
- *   -EINVAL - Parameter error
- */
-int tf_em_delete_ext_sys_entry(struct tf *tfp,
-			       struct tf_delete_em_entry_parms *parms);
-
 /**
  * Bind internal EM device interface
  *
@@ -353,199 +235,6 @@ int tf_em_int_bind(struct tf *tfp,
  */
 int tf_em_int_unbind(struct tf *tfp);
 
-/**
- * Common bind for EEM device interface. Used for both host and
- * system memory
- *
- * [in] tfp
- *   Pointer to TruFlow handle
- *
- * [in] parms
- *   Pointer to input parameters
- *
- * Returns:
- *   0       - Success
- *   -EINVAL - Parameter error
- */
-int tf_em_ext_common_bind(struct tf *tfp,
-			  struct tf_em_cfg_parms *parms);
-
-/**
- * Common unbind for EEM device interface. Used for both host and
- * system memory
- *
- * [in] tfp
- *   Pointer to TruFlow handle
- *
- * [in] parms
- *   Pointer to input parameters
- *
- * Returns:
- *   0       - Success
- *   -EINVAL - Parameter error
- */
-int tf_em_ext_common_unbind(struct tf *tfp);
-
-/**
- * Alloc for external EEM using host memory
- *
- * [in] tfp
- *   Pointer to TruFlow handle
- *
- * [in] parms
- *   Pointer to input parameters
- *
- * Returns:
- *   0       - Success
- *   -EINVAL - Parameter error
- */
-int tf_em_ext_alloc(struct tf *tfp,
-		    struct tf_alloc_tbl_scope_parms *parms);
-
-/**
- * Free for external EEM using host memory
- *
- * [in] tfp
- *   Pointer to TruFlow handle
- *
- * [in] parms
- *   Pointer to input parameters
- *
- * Returns:
- *   0       - Success
- *   -EINVAL - Parameter error
- */
-int tf_em_ext_free(struct tf *tfp,
-		   struct tf_free_tbl_scope_parms *parms);
-
-/**
- * Common free table scope for external EEM using host or system memory
- *
- * [in] tfp
- *   Pointer to TruFlow handle
- *
- * [in] parms
- *   Pointer to input parameters
- *
- * Returns:
- *   0       - Success
- *   -EINVAL - Parameter error
- */
-int tf_em_ext_common_free(struct tf *tfp,
-			  struct tf_free_tbl_scope_parms *parms);
-
-/**
- * Common alloc table scope for external EEM using host or system memory
- *
- * [in] tfp
- *   Pointer to TruFlow handle
- *
- * [in] parms
- *   Pointer to input parameters
- *
- * Returns:
- *   0       - Success
- *   -EINVAL - Parameter error
- */
-int tf_em_ext_common_alloc(struct tf *tfp,
-			   struct tf_alloc_tbl_scope_parms *parms);
-/**
- * Map a set of parifs to a set of EEM base addresses (table scope)
- *
- * [in] tfp
- *   Pointer to TruFlow handle
- *
- * [in] parms
- *   Pointer to input parameters
- *
- * Returns:
- *   0       - Success
- *   -EINVAL - Parameter error
- */
-int tf_em_ext_map_tbl_scope(struct tf *tfp,
-			    struct tf_map_tbl_scope_parms *parms);
-
-/**
- * Allocate External Tbl entry from the scope pool.
- *
- * [in] tfp
- *   Pointer to Truflow Handle
- * [in] parms
- *   Allocation parameters
- *
- * Return:
- *  0       - Success, entry allocated - no search support
- *  -ENOMEM -EINVAL -EOPNOTSUPP
- *          - Failure, entry not allocated, out of resources
- */
-int
-tf_tbl_ext_alloc(struct tf *tfp,
-		 struct tf_tbl_alloc_parms *parms);
-
-/**
- * Free External Tbl entry to the scope pool.
- *
- * [in] tfp
- *   Pointer to Truflow Handle
- * [in] parms
- *   Allocation parameters
- *
- * Return:
- *  0       - Success, entry freed
- *
- * - Failure, entry not successfully freed for these reasons
- *  -ENOMEM
- *  -EOPNOTSUPP
- *  -EINVAL
- */
-int
-tf_tbl_ext_free(struct tf *tfp,
-		struct tf_tbl_free_parms *parms);
-
-/**
- * Sets the specified external table type element.
- *
- * This API sets the specified element data by invoking the
- * firmware.
- *
- * [in] tfp
- *   Pointer to TF handle
- *
- * [in] parms
- *   Pointer to table set parameters
- *
- * Returns
- *   - (0) if successful.
- *   - (-EINVAL) on failure.
- */
-int tf_tbl_ext_common_set(struct tf *tfp,
-			  struct tf_tbl_set_parms *parms);
-
-/**
- * Sets the specified external table type element.
- *
- * This API sets the specified element data by invoking the
- * firmware.
- *
- * [in] tfp
- *   Pointer to TF handle
- *
- * [in] parms
- *   Pointer to table set parameters
- *
- * Returns
- *   - (0) if successful.
- *   - (-EINVAL) on failure.
- */
-int tf_tbl_ext_set(struct tf *tfp,
-		   struct tf_tbl_set_parms *parms);
-
-int
-tf_em_ext_system_bind(struct tf *tfp,
-		      struct tf_em_cfg_parms *parms);
-
-int offload_system_mmap(struct tf_tbl_scope_cb *tbl_scope_cb);
-
 /**
  * Retrieves the allocated resource info
  *
diff --git a/drivers/net/bnxt/tf_core/tf_em_common.c b/drivers/net/bnxt/tf_core/tf_em_common.c
index c518150d1f..2449759db0 100644
--- a/drivers/net/bnxt/tf_core/tf_em_common.c
+++ b/drivers/net/bnxt/tf_core/tf_em_common.c
@@ -21,1194 +21,3 @@
 #include "hcapi_cfa.h"
 #include "bnxt.h"
 
-/** Invalid table scope id */
-#define TF_TBL_SCOPE_INVALID 0xffffffff
-
-/* Number of pointers per page_size */
-#define MAX_PAGE_PTRS(page_size)  ((page_size) / sizeof(void *))
-
-/**
- * Host or system
- */
-static enum tf_mem_type mem_type;
-
-/* API defined in tf_em.h */
-int
-tf_create_tbl_pool_external(enum tf_dir dir,
-			    struct tf_tbl_scope_cb *tbl_scope_cb,
-			    uint32_t num_entries,
-			    uint32_t entry_sz_bytes)
-{
-	struct tfp_calloc_parms parms;
-	uint32_t i;
-	int32_t j;
-	int rc = 0;
-	struct stack *pool = &tbl_scope_cb->ext_act_pool[dir];
-
-	parms.nitems = num_entries;
-	parms.size = sizeof(uint32_t);
-	parms.alignment = 0;
-
-	if (tfp_calloc(&parms) != 0) {
-		TFP_DRV_LOG(ERR, "%s: TBL: external pool failure %s\n",
-			    tf_dir_2_str(dir), strerror(ENOMEM));
-		return -ENOMEM;
-	}
-
-	/* Create empty stack
-	 */
-	rc = stack_init(num_entries, parms.mem_va, pool);
-
-	if (rc != 0) {
-		TFP_DRV_LOG(ERR, "%s: TBL: stack init failure %s\n",
-			    tf_dir_2_str(dir), strerror(-rc));
-		goto cleanup;
-	}
-
-	/* Save the  malloced memory address so that it can
-	 * be freed when the table scope is freed.
-	 */
-	tbl_scope_cb->ext_act_pool_mem[dir] = (uint32_t *)parms.mem_va;
-
-	/* Fill pool with indexes in reverse
-	 */
-	j = (num_entries - 1) * entry_sz_bytes;
-
-	for (i = 0; i < num_entries; i++) {
-		rc = stack_push(pool, j);
-		if (rc != 0) {
-			TFP_DRV_LOG(ERR, "%s TBL: stack failure %s\n",
-				    tf_dir_2_str(dir), strerror(-rc));
-			goto cleanup;
-		}
-
-		if (j < 0) {
-			TFP_DRV_LOG(ERR, "%d TBL: invalid offset (%d)\n",
-				    dir, j);
-			goto cleanup;
-		}
-		j -= entry_sz_bytes;
-	}
-
-	if (!stack_is_full(pool)) {
-		rc = -EINVAL;
-		TFP_DRV_LOG(ERR, "%s TBL: stack failure %s\n",
-			    tf_dir_2_str(dir), strerror(-rc));
-		goto cleanup;
-	}
-	return 0;
-cleanup:
-	tfp_free((void *)parms.mem_va);
-	return rc;
-}
-
-/**
- * Destroy External Tbl pool of memory indexes.
- *
- * [in] dir
- *   direction
- * [in] tbl_scope_cb
- *   pointer to the table scope
- */
-void
-tf_destroy_tbl_pool_external(enum tf_dir dir,
-			     struct tf_tbl_scope_cb *tbl_scope_cb)
-{
-	uint32_t *ext_act_pool_mem =
-		tbl_scope_cb->ext_act_pool_mem[dir];
-
-	tfp_free(ext_act_pool_mem);
-}
-
-/**
- * Looks up table scope control block using tbl_scope_id from tf_session.
- *
- * [in] tfp
- *   Pointer to Truflow Handle
- * [in] tbl_scope_id
- *   table scope id
- *
- * Return:
- *  - Pointer to the tf_tbl_scope_cb, if found.
- *  - (NULL) on failure, not found.
- */
-struct tf_tbl_scope_cb *
-tf_em_ext_common_tbl_scope_find(struct tf *tfp,
-			uint32_t tbl_scope_id)
-{
-	int rc;
-	struct em_ext_db *ext_db;
-	void *ext_ptr = NULL;
-	struct tf_tbl_scope_cb *tbl_scope_cb = NULL;
-	struct ll_entry *entry;
-
-	rc = tf_session_get_em_ext_db(tfp, &ext_ptr);
-	if (rc)
-		return NULL;
-
-	ext_db = (struct em_ext_db *)ext_ptr;
-
-	for (entry = ext_db->tbl_scope_ll.head; entry != NULL;
-			entry = entry->next) {
-		tbl_scope_cb = (struct tf_tbl_scope_cb *)entry;
-		if (tbl_scope_cb->tbl_scope_id == tbl_scope_id)
-			return tbl_scope_cb;
-	}
-
-	return NULL;
-}
-
-/**
- * Allocate External Tbl entry from the scope pool.
- *
- * [in] tfp
- *   Pointer to Truflow Handle
- * [in] parms
- *   Allocation parameters
- *
- * Return:
- *  0       - Success, entry allocated - no search support
- *  -ENOMEM -EINVAL -EOPNOTSUPP
- *          - Failure, entry not allocated, out of resources
- */
-int
-tf_tbl_ext_alloc(struct tf *tfp,
-		 struct tf_tbl_alloc_parms *parms)
-{
-	int rc;
-	uint32_t index;
-	struct tf_tbl_scope_cb *tbl_scope_cb;
-	struct stack *pool;
-
-	TF_CHECK_PARMS2(tfp, parms);
-
-	tbl_scope_cb = tf_em_ext_common_tbl_scope_find(tfp, parms->tbl_scope_id);
-	if (tbl_scope_cb == NULL) {
-		TFP_DRV_LOG(ERR,
-			    "%s, table scope not allocated\n",
-			    tf_dir_2_str(parms->dir));
-		return -EINVAL;
-	}
-
-	pool = &tbl_scope_cb->ext_act_pool[parms->dir];
-
-	/* Allocate an element
-	 */
-	rc = stack_pop(pool, &index);
-
-	if (rc != 0) {
-		TFP_DRV_LOG(ERR,
-		   "%s, Allocation failed, type:%d\n",
-		   tf_dir_2_str(parms->dir),
-		   parms->type);
-		return rc;
-	}
-
-	*parms->idx = index;
-	return rc;
-}
-
-/**
- * Free External Tbl entry to the scope pool.
- *
- * [in] tfp
- *   Pointer to Truflow Handle
- * [in] parms
- *   Allocation parameters
- *
- * Return:
- *  0       - Success, entry freed
- *
- * - Failure, entry not successfully freed for these reasons
- *  -ENOMEM
- *  -EOPNOTSUPP
- *  -EINVAL
- */
-int
-tf_tbl_ext_free(struct tf *tfp,
-		struct tf_tbl_free_parms *parms)
-{
-	int rc = 0;
-	uint32_t index;
-	struct tf_tbl_scope_cb *tbl_scope_cb;
-	struct stack *pool;
-
-	TF_CHECK_PARMS2(tfp, parms);
-
-	tbl_scope_cb = tf_em_ext_common_tbl_scope_find(tfp, parms->tbl_scope_id);
-	if (tbl_scope_cb == NULL) {
-		TFP_DRV_LOG(ERR,
-			    "%s, table scope error\n",
-			    tf_dir_2_str(parms->dir));
-		return -EINVAL;
-	}
-	pool = &tbl_scope_cb->ext_act_pool[parms->dir];
-
-	index = parms->idx;
-
-	rc = stack_push(pool, index);
-
-	if (rc != 0) {
-		TFP_DRV_LOG(ERR,
-		   "%s, consistency error, stack full, type:%d, idx:%d\n",
-		   tf_dir_2_str(parms->dir),
-		   parms->type,
-		   index);
-	}
-	return rc;
-}
-
-uint32_t
-tf_em_get_key_mask(int num_entries)
-{
-	uint32_t mask = num_entries - 1;
-
-	if (num_entries & TF_EM_MAX_MASK)
-		return 0;
-
-	if (num_entries > TF_EM_MAX_ENTRY)
-		return 0;
-
-	return mask;
-}
-
-void
-tf_em_create_key_entry(struct cfa_p4_eem_entry_hdr *result,
-		       uint8_t *in_key,
-		       struct cfa_p4_eem_64b_entry *key_entry)
-{
-	key_entry->hdr.word1 = result->word1;
-	key_entry->hdr.pointer = result->pointer;
-	memcpy(key_entry->key, in_key, TF_P4_HW_EM_KEY_MAX_SIZE + 4);
-}
-
-/**
- * Return the number of page table pages needed to
- * reference the given number of next level pages.
- *
- * [in] num_pages
- *   Number of EM pages
- *
- * [in] page_size
- *   Size of each EM page
- *
- * Returns:
- *   Number of EM page table pages
- */
-static uint32_t
-tf_em_page_tbl_pgcnt(uint32_t num_pages,
-		     uint32_t page_size)
-{
-	return roundup(num_pages, MAX_PAGE_PTRS(page_size)) /
-		       MAX_PAGE_PTRS(page_size);
-	return 0;
-}
-
-/**
- * Given the number of data pages, page_size and the maximum
- * number of page table levels (already determined), size
- * the number of page table pages required at each level.
- *
- * [in] max_lvl
- *   Max number of levels
- *
- * [in] num_data_pages
- *   Number of EM data pages
- *
- * [in] page_size
- *   Size of an EM page
- *
- * [out] *page_cnt
- *   EM page count
- */
-static void
-tf_em_size_page_tbls(int max_lvl,
-		     uint64_t num_data_pages,
-		     uint32_t page_size,
-		     uint32_t *page_cnt)
-{
-	if (max_lvl == TF_PT_LVL_0) {
-		page_cnt[TF_PT_LVL_0] = num_data_pages;
-	} else if (max_lvl == TF_PT_LVL_1) {
-		page_cnt[TF_PT_LVL_1] = num_data_pages;
-		page_cnt[TF_PT_LVL_0] =
-		tf_em_page_tbl_pgcnt(page_cnt[TF_PT_LVL_1], page_size);
-	} else if (max_lvl == TF_PT_LVL_2) {
-		page_cnt[TF_PT_LVL_2] = num_data_pages;
-		page_cnt[TF_PT_LVL_1] =
-		tf_em_page_tbl_pgcnt(page_cnt[TF_PT_LVL_2], page_size);
-		page_cnt[TF_PT_LVL_0] =
-		tf_em_page_tbl_pgcnt(page_cnt[TF_PT_LVL_1], page_size);
-	} else {
-		return;
-	}
-}
-
-/**
- * Given the page size, size of each data item (entry size),
- * and the total number of entries needed, determine the number
- * of page table levels and the number of data pages required.
- *
- * [in] page_size
- *   Page size
- *
- * [in] entry_size
- *   Entry size
- *
- * [in] num_entries
- *   Number of entries needed
- *
- * [out] num_data_pages
- *   Number of pages required
- *
- * Returns:
- *   Success  - Number of EM page levels required
- *   -ENOMEM  - Out of memory
- */
-static int
-tf_em_size_page_tbl_lvl(uint32_t page_size,
-			uint32_t entry_size,
-			uint32_t num_entries,
-			uint64_t *num_data_pages)
-{
-	uint64_t lvl_data_size = page_size;
-	int lvl = TF_PT_LVL_0;
-	uint64_t data_size;
-
-	*num_data_pages = 0;
-	data_size = (uint64_t)num_entries * entry_size;
-
-	while (lvl_data_size < data_size) {
-		lvl++;
-
-		if (lvl == TF_PT_LVL_1)
-			lvl_data_size = (uint64_t)MAX_PAGE_PTRS(page_size) *
-				page_size;
-		else if (lvl == TF_PT_LVL_2)
-			lvl_data_size = (uint64_t)MAX_PAGE_PTRS(page_size) *
-				MAX_PAGE_PTRS(page_size) * page_size;
-		else
-			return -ENOMEM;
-	}
-
-	*num_data_pages = roundup(data_size, page_size) / page_size;
-
-	return lvl;
-}
-
-/**
- * Size the EM table based on capabilities
- *
- * [in] tbl
- *   EM table to size
- *
- * Returns:
- *   0        - Success
- *   - EINVAL - Parameter error
- *   - ENOMEM - Out of memory
- */
-int
-tf_em_size_table(struct hcapi_cfa_em_table *tbl,
-		 uint32_t page_size)
-{
-	uint64_t num_data_pages;
-	uint32_t *page_cnt;
-	int max_lvl;
-	uint32_t num_entries;
-	uint32_t cnt = TF_EM_MIN_ENTRIES;
-
-	/* Ignore entry if both size and number are zero */
-	if (!tbl->entry_size && !tbl->num_entries)
-		return 0;
-
-	/* If only one is set then error */
-	if (!tbl->entry_size || !tbl->num_entries)
-		return -EINVAL;
-
-	/* Determine number of page table levels and the number
-	 * of data pages needed to process the given eem table.
-	 */
-	if (tbl->type == TF_RECORD_TABLE) {
-		/*
-		 * For action records just a memory size is provided. Work
-		 * backwards to resolve to number of entries
-		 */
-		num_entries = tbl->num_entries / tbl->entry_size;
-		if (num_entries < TF_EM_MIN_ENTRIES) {
-			num_entries = TF_EM_MIN_ENTRIES;
-		} else {
-			while (num_entries > cnt && cnt <= TF_EM_MAX_ENTRIES)
-				cnt *= 2;
-			num_entries = cnt;
-		}
-	} else {
-		num_entries = tbl->num_entries;
-	}
-
-	max_lvl = tf_em_size_page_tbl_lvl(page_size,
-					  tbl->entry_size,
-					  tbl->num_entries,
-					  &num_data_pages);
-	if (max_lvl < 0) {
-		TFP_DRV_LOG(WARNING, "EEM: Failed to size page table levels\n");
-		TFP_DRV_LOG(WARNING,
-			    "table: %d data-sz: %016" PRIu64 " page-sz: %u\n",
-			    tbl->type, (uint64_t)num_entries * tbl->entry_size,
-			    page_size);
-		return -ENOMEM;
-	}
-
-	tbl->num_lvl = max_lvl + 1;
-	tbl->num_data_pages = num_data_pages;
-
-	/* Determine the number of pages needed at each level */
-	page_cnt = tbl->page_cnt;
-	memset(page_cnt, 0, sizeof(tbl->page_cnt));
-	tf_em_size_page_tbls(max_lvl, num_data_pages, page_size,
-				page_cnt);
-
-	TFP_DRV_LOG(INFO, "EEM: Sized page table: %d\n", tbl->type);
-	TFP_DRV_LOG(INFO,
-		    "EEM: lvls: %d sz: %016" PRIu64 " pgs: %016" PRIu64 \
-		    " l0: %u l1: %u l2: %u\n",
-		    max_lvl + 1,
-		    (uint64_t)num_data_pages * page_size,
-		    num_data_pages,
-		    page_cnt[TF_PT_LVL_0],
-		    page_cnt[TF_PT_LVL_1],
-		    page_cnt[TF_PT_LVL_2]);
-
-	return 0;
-}
-
-/**
- * Validates EM number of entries requested
- *
- * [in] tbl_scope_cb
- *   Pointer to table scope control block to be populated
- *
- * [in] parms
- *   Pointer to input parameters
- *
- * Returns:
- *   0       - Success
- *   -EINVAL - Parameter error
- */
-int
-tf_em_validate_num_entries(struct tf_tbl_scope_cb *tbl_scope_cb,
-			   struct tf_alloc_tbl_scope_parms *parms)
-{
-	uint32_t cnt;
-
-	if (parms->rx_mem_size_in_mb != 0) {
-		uint32_t key_b = 2 * ((parms->rx_max_key_sz_in_bits / 8) + 1);
-		uint32_t action_b = ((parms->rx_max_action_entry_sz_in_bits / 8)
-				     + 1);
-		uint32_t num_entries = (parms->rx_mem_size_in_mb *
-					TF_MEGABYTE) / (key_b + action_b);
-
-		if (num_entries < TF_EM_MIN_ENTRIES) {
-			TFP_DRV_LOG(ERR, "EEM: Insufficient memory requested:"
-				    "%uMB\n",
-				    parms->rx_mem_size_in_mb);
-			return -EINVAL;
-		}
-
-		cnt = TF_EM_MIN_ENTRIES;
-		while (num_entries > cnt &&
-		       cnt <= TF_EM_MAX_ENTRIES)
-			cnt *= 2;
-
-		if (cnt > TF_EM_MAX_ENTRIES) {
-			TFP_DRV_LOG(ERR, "EEM: Invalid number of Tx requested: "
-				    "%u\n",
-		       (parms->tx_num_flows_in_k * TF_KILOBYTE));
-			return -EINVAL;
-		}
-
-		parms->rx_num_flows_in_k = cnt / TF_KILOBYTE;
-	} else {
-		if ((parms->rx_num_flows_in_k * TF_KILOBYTE) <
-		    TF_EM_MIN_ENTRIES ||
-		    (parms->rx_num_flows_in_k * TF_KILOBYTE) >
-		    tbl_scope_cb->em_caps[TF_DIR_RX].max_entries_supported) {
-			TFP_DRV_LOG(ERR,
-				    "EEM: Invalid number of Rx flows "
-				    "requested:%u max:%u\n",
-				    parms->rx_num_flows_in_k * TF_KILOBYTE,
-			tbl_scope_cb->em_caps[TF_DIR_RX].max_entries_supported);
-			return -EINVAL;
-		}
-
-		/* must be a power-of-2 supported value
-		 * in the range 32K - 128M
-		 */
-		cnt = TF_EM_MIN_ENTRIES;
-		while ((parms->rx_num_flows_in_k * TF_KILOBYTE) != cnt &&
-		       cnt <= TF_EM_MAX_ENTRIES)
-			cnt *= 2;
-
-		if (cnt > TF_EM_MAX_ENTRIES) {
-			TFP_DRV_LOG(ERR,
-				    "EEM: Invalid number of Rx requested: %u\n",
-				    (parms->rx_num_flows_in_k * TF_KILOBYTE));
-			return -EINVAL;
-		}
-	}
-
-	if (parms->tx_mem_size_in_mb != 0) {
-		uint32_t key_b = 2 * (parms->tx_max_key_sz_in_bits / 8 + 1);
-		uint32_t action_b = ((parms->tx_max_action_entry_sz_in_bits / 8)
-				     + 1);
-		uint32_t num_entries = (parms->tx_mem_size_in_mb *
-					(TF_KILOBYTE * TF_KILOBYTE)) /
-			(key_b + action_b);
-
-		if (num_entries < TF_EM_MIN_ENTRIES) {
-			TFP_DRV_LOG(ERR,
-				    "EEM: Insufficient memory requested:%uMB\n",
-				    parms->rx_mem_size_in_mb);
-			return -EINVAL;
-		}
-
-		cnt = TF_EM_MIN_ENTRIES;
-		while (num_entries > cnt &&
-		       cnt <= TF_EM_MAX_ENTRIES)
-			cnt *= 2;
-
-		if (cnt > TF_EM_MAX_ENTRIES) {
-			TFP_DRV_LOG(ERR,
-				    "EEM: Invalid number of Tx requested: %u\n",
-		       (parms->tx_num_flows_in_k * TF_KILOBYTE));
-			return -EINVAL;
-		}
-
-		parms->tx_num_flows_in_k = cnt / TF_KILOBYTE;
-	} else {
-		if ((parms->tx_num_flows_in_k * TF_KILOBYTE) <
-		    TF_EM_MIN_ENTRIES ||
-		    (parms->tx_num_flows_in_k * TF_KILOBYTE) >
-		    tbl_scope_cb->em_caps[TF_DIR_TX].max_entries_supported) {
-			TFP_DRV_LOG(ERR,
-				    "EEM: Invalid number of Tx flows "
-				    "requested:%u max:%u\n",
-				    (parms->tx_num_flows_in_k * TF_KILOBYTE),
-			tbl_scope_cb->em_caps[TF_DIR_TX].max_entries_supported);
-			return -EINVAL;
-		}
-
-		cnt = TF_EM_MIN_ENTRIES;
-		while ((parms->tx_num_flows_in_k * TF_KILOBYTE) != cnt &&
-		       cnt <= TF_EM_MAX_ENTRIES)
-			cnt *= 2;
-
-		if (cnt > TF_EM_MAX_ENTRIES) {
-			TFP_DRV_LOG(ERR,
-				    "EEM: Invalid number of Tx requested: %u\n",
-		       (parms->tx_num_flows_in_k * TF_KILOBYTE));
-			return -EINVAL;
-		}
-	}
-
-	if (parms->rx_num_flows_in_k != 0 &&
-	    parms->rx_max_key_sz_in_bits / 8 == 0) {
-		TFP_DRV_LOG(ERR,
-			    "EEM: Rx key size required: %u\n",
-			    (parms->rx_max_key_sz_in_bits));
-		return -EINVAL;
-	}
-
-	if (parms->tx_num_flows_in_k != 0 &&
-	    parms->tx_max_key_sz_in_bits / 8 == 0) {
-		TFP_DRV_LOG(ERR,
-			    "EEM: Tx key size required: %u\n",
-			    (parms->tx_max_key_sz_in_bits));
-		return -EINVAL;
-	}
-	/* Rx */
-	tbl_scope_cb->em_ctx_info[TF_DIR_RX].em_tables[TF_KEY0_TABLE].num_entries =
-		parms->rx_num_flows_in_k * TF_KILOBYTE;
-	tbl_scope_cb->em_ctx_info[TF_DIR_RX].em_tables[TF_KEY0_TABLE].entry_size =
-		parms->rx_max_key_sz_in_bits / 8;
-
-	tbl_scope_cb->em_ctx_info[TF_DIR_RX].em_tables[TF_KEY1_TABLE].num_entries =
-		parms->rx_num_flows_in_k * TF_KILOBYTE;
-	tbl_scope_cb->em_ctx_info[TF_DIR_RX].em_tables[TF_KEY1_TABLE].entry_size =
-		parms->rx_max_key_sz_in_bits / 8;
-
-	tbl_scope_cb->em_ctx_info[TF_DIR_RX].em_tables[TF_RECORD_TABLE].num_entries =
-		parms->rx_num_flows_in_k * TF_KILOBYTE;
-	tbl_scope_cb->em_ctx_info[TF_DIR_RX].em_tables[TF_RECORD_TABLE].entry_size =
-		parms->rx_max_action_entry_sz_in_bits / 8;
-
-	tbl_scope_cb->em_ctx_info[TF_DIR_RX].em_tables[TF_EFC_TABLE].num_entries =
-		0;
-
-	tbl_scope_cb->em_ctx_info[TF_DIR_RX].em_tables[TF_ACTION_TABLE].num_entries =
-		parms->rx_num_flows_in_k * TF_KILOBYTE;
-	tbl_scope_cb->em_ctx_info[TF_DIR_RX].em_tables[TF_ACTION_TABLE].entry_size =
-		parms->rx_max_action_entry_sz_in_bits / 8;
-
-	tbl_scope_cb->em_ctx_info[TF_DIR_RX].em_tables[TF_EM_LKUP_TABLE].num_entries =
-		parms->rx_num_flows_in_k * TF_KILOBYTE;
-	tbl_scope_cb->em_ctx_info[TF_DIR_RX].em_tables[TF_EM_LKUP_TABLE].entry_size =
-		parms->rx_max_key_sz_in_bits / 8;
-
-	/* Tx */
-	tbl_scope_cb->em_ctx_info[TF_DIR_TX].em_tables[TF_KEY0_TABLE].num_entries =
-		parms->tx_num_flows_in_k * TF_KILOBYTE;
-	tbl_scope_cb->em_ctx_info[TF_DIR_TX].em_tables[TF_KEY0_TABLE].entry_size =
-		parms->tx_max_key_sz_in_bits / 8;
-
-	tbl_scope_cb->em_ctx_info[TF_DIR_TX].em_tables[TF_KEY1_TABLE].num_entries =
-		parms->tx_num_flows_in_k * TF_KILOBYTE;
-	tbl_scope_cb->em_ctx_info[TF_DIR_TX].em_tables[TF_KEY1_TABLE].entry_size =
-		parms->tx_max_key_sz_in_bits / 8;
-
-	tbl_scope_cb->em_ctx_info[TF_DIR_TX].em_tables[TF_RECORD_TABLE].num_entries =
-		parms->tx_num_flows_in_k * TF_KILOBYTE;
-	tbl_scope_cb->em_ctx_info[TF_DIR_TX].em_tables[TF_RECORD_TABLE].entry_size =
-		parms->tx_max_action_entry_sz_in_bits / 8;
-
-	tbl_scope_cb->em_ctx_info[TF_DIR_TX].em_tables[TF_EFC_TABLE].num_entries =
-		0;
-
-	tbl_scope_cb->em_ctx_info[TF_DIR_TX].em_tables[TF_ACTION_TABLE].num_entries =
-		parms->rx_num_flows_in_k * TF_KILOBYTE;
-	tbl_scope_cb->em_ctx_info[TF_DIR_TX].em_tables[TF_ACTION_TABLE].entry_size =
-		parms->tx_max_action_entry_sz_in_bits / 8;
-
-	tbl_scope_cb->em_ctx_info[TF_DIR_TX].em_tables[TF_EM_LKUP_TABLE].num_entries =
-		parms->rx_num_flows_in_k * TF_KILOBYTE;
-	tbl_scope_cb->em_ctx_info[TF_DIR_TX].em_tables[TF_EM_LKUP_TABLE].entry_size =
-		parms->tx_max_key_sz_in_bits / 8;
-
-	return 0;
-}
-
-/** insert EEM entry API
- *
- * returns:
- *  0
- *  TF_ERR	    - unable to get lock
- *
- * insert callback returns:
- *   0
- *   TF_ERR_EM_DUP  - key is already in table
- */
-static int
-tf_insert_eem_entry(struct tf_dev_info *dev,
-		    struct tf_tbl_scope_cb *tbl_scope_cb,
-		    struct tf_insert_em_entry_parms *parms)
-{
-	uint32_t mask;
-	uint32_t key0_hash;
-	uint32_t key1_hash;
-	uint32_t key0_index;
-	uint32_t key1_index;
-	struct cfa_p4_eem_64b_entry key_entry;
-	uint32_t index;
-	enum hcapi_cfa_em_table_type table_type;
-	uint32_t gfid;
-	struct hcapi_cfa_hwop op;
-	struct hcapi_cfa_key_tbl key_tbl;
-	struct hcapi_cfa_key_data key_obj;
-	struct hcapi_cfa_key_loc key_loc;
-	uint64_t big_hash;
-	int rc;
-
-	/* Get mask to use on hash */
-	mask = tf_em_get_key_mask(tbl_scope_cb->em_ctx_info[parms->dir].em_tables[TF_KEY0_TABLE].num_entries);
-
-	if (!mask)
-		return -EINVAL;
-
-	if (dev->ops->tf_dev_cfa_key_hash == NULL)
-		return -EINVAL;
-
-	big_hash = dev->ops->tf_dev_cfa_key_hash((uint64_t *)parms->key,
-					 (TF_P4_HW_EM_KEY_MAX_SIZE + 4) * 8);
-	key0_hash = (uint32_t)(big_hash >> 32);
-	key1_hash = (uint32_t)(big_hash & 0xFFFFFFFF);
-
-	key0_index = key0_hash & mask;
-	key1_index = key1_hash & mask;
-
-	/*
-	 * Use the "result" arg to populate all of the key entry then
-	 * store the byte swapped "raw" entry in a local copy ready
-	 * for insertion in to the table.
-	 */
-	tf_em_create_key_entry((struct cfa_p4_eem_entry_hdr *)parms->em_record,
-				((uint8_t *)parms->key),
-				&key_entry);
-
-	/*
-	 * Try to add to Key0 table, if that does not work then
-	 * try the key1 table.
-	 */
-	index = key0_index;
-	op.opcode = HCAPI_CFA_HWOPS_ADD;
-	key_tbl.base0 =
-		(uint8_t *)&tbl_scope_cb->em_ctx_info[parms->dir].em_tables[TF_KEY0_TABLE];
-	key_tbl.page_size = TF_EM_PAGE_SIZE;
-	key_obj.offset = index * TF_P4_EM_KEY_RECORD_SIZE;
-	key_obj.data = (uint8_t *)&key_entry;
-	key_obj.size = TF_P4_EM_KEY_RECORD_SIZE;
-
-	rc = cfa_p4_devops.hcapi_cfa_key_hw_op(&op,
-					       &key_tbl,
-					       &key_obj,
-					       &key_loc);
-
-	if (rc == 0) {
-		table_type = TF_KEY0_TABLE;
-	} else {
-		index = key1_index;
-
-		key_tbl.base0 =
-			(uint8_t *)&tbl_scope_cb->em_ctx_info[parms->dir].em_tables[TF_KEY1_TABLE];
-		key_obj.offset = index * TF_P4_EM_KEY_RECORD_SIZE;
-
-		rc = cfa_p4_devops.hcapi_cfa_key_hw_op(&op,
-						       &key_tbl,
-						       &key_obj,
-						       &key_loc);
-		if (rc != 0)
-			return rc;
-
-		table_type = TF_KEY1_TABLE;
-	}
-
-	TF_SET_GFID(gfid,
-		    index,
-		    table_type);
-	TF_SET_FLOW_ID(parms->flow_id,
-		       gfid,
-		       TF_GFID_TABLE_EXTERNAL,
-		       parms->dir);
-	TF_SET_FIELDS_IN_FLOW_HANDLE(parms->flow_handle,
-				     0,
-				     0,
-				     0,
-				     index,
-				     0,
-				     table_type);
-
-	return 0;
-}
-
-/** delete EEM hash entry API
- *
- * returns:
- *   0
- *   -EINVAL	  - parameter error
- *   TF_NO_SESSION    - bad session ID
- *   TF_ERR_TBL_SCOPE - invalid table scope
- *   TF_ERR_TBL_IF    - invalid table interface
- *
- * insert callback returns
- *   0
- *   TF_NO_EM_MATCH - entry not found
- */
-static int
-tf_delete_eem_entry(struct tf_tbl_scope_cb *tbl_scope_cb,
-		    struct tf_delete_em_entry_parms *parms)
-{
-	enum hcapi_cfa_em_table_type hash_type;
-	uint32_t index;
-	struct hcapi_cfa_hwop op;
-	struct hcapi_cfa_key_tbl key_tbl;
-	struct hcapi_cfa_key_data key_obj;
-	struct hcapi_cfa_key_loc key_loc;
-	int rc;
-
-	TF_GET_HASH_TYPE_FROM_FLOW_HANDLE(parms->flow_handle, hash_type);
-	TF_GET_INDEX_FROM_FLOW_HANDLE(parms->flow_handle, index);
-
-	op.opcode = HCAPI_CFA_HWOPS_DEL;
-	key_tbl.base0 =
-		(uint8_t *)&tbl_scope_cb->em_ctx_info[parms->dir].em_tables
-			[(hash_type == 0 ? TF_KEY0_TABLE : TF_KEY1_TABLE)];
-	key_tbl.page_size = TF_EM_PAGE_SIZE;
-	key_obj.offset = index * TF_P4_EM_KEY_RECORD_SIZE;
-	key_obj.data = NULL;
-	key_obj.size = TF_P4_EM_KEY_RECORD_SIZE;
-
-	rc = cfa_p4_devops.hcapi_cfa_key_hw_op(&op,
-					       &key_tbl,
-					       &key_obj,
-					       &key_loc);
-
-	if (!rc)
-		return rc;
-
-	return 0;
-}
-
-/** insert EM hash entry API
- *
- *    returns:
- *    0       - Success
- *    -EINVAL - Error
- */
-int
-tf_em_insert_ext_entry(struct tf *tfp,
-		       struct tf_insert_em_entry_parms *parms)
-{
-	int rc;
-	struct tf_tbl_scope_cb *tbl_scope_cb;
-	struct tf_session *tfs;
-	struct tf_dev_info *dev;
-
-	tbl_scope_cb = tf_em_ext_common_tbl_scope_find(tfp, parms->tbl_scope_id);
-	if (tbl_scope_cb == NULL) {
-		TFP_DRV_LOG(ERR, "Invalid tbl_scope_cb\n");
-		return -EINVAL;
-	}
-
-	/* Retrieve the session information */
-	rc = tf_session_get_session_internal(tfp, &tfs);
-	if (rc)
-		return rc;
-
-	/* Retrieve the device information */
-	rc = tf_session_get_device(tfs, &dev);
-	if (rc)
-		return rc;
-
-	return tf_insert_eem_entry
-		(dev,
-		 tbl_scope_cb,
-		 parms);
-}
-
-/** Delete EM hash entry API
- *
- *    returns:
- *    0       - Success
- *    -EINVAL - Error
- */
-int
-tf_em_delete_ext_entry(struct tf *tfp,
-		       struct tf_delete_em_entry_parms *parms)
-{
-	struct tf_tbl_scope_cb *tbl_scope_cb;
-
-	tbl_scope_cb = tf_em_ext_common_tbl_scope_find(tfp, parms->tbl_scope_id);
-	if (tbl_scope_cb == NULL) {
-		TFP_DRV_LOG(ERR, "Invalid tbl_scope_cb\n");
-		return -EINVAL;
-	}
-
-	return tf_delete_eem_entry(tbl_scope_cb, parms);
-}
-
-int
-tf_em_ext_common_bind(struct tf *tfp,
-		      struct tf_em_cfg_parms *parms)
-{
-	int rc;
-	int i;
-	struct tf_rm_create_db_parms db_cfg = { 0 };
-	struct em_ext_db *ext_db;
-	struct tfp_calloc_parms cparms;
-
-	TF_CHECK_PARMS2(tfp, parms);
-
-	cparms.nitems = 1;
-	cparms.size = sizeof(struct em_ext_db);
-	cparms.alignment = 0;
-	if (tfp_calloc(&cparms) != 0) {
-		TFP_DRV_LOG(ERR, "em_ext_db alloc error %s\n",
-			    strerror(ENOMEM));
-		return -ENOMEM;
-	}
-
-	ext_db = cparms.mem_va;
-	ll_init(&ext_db->tbl_scope_ll);
-	for (i = 0; i < TF_DIR_MAX; i++)
-		ext_db->eem_db[i] = NULL;
-	tf_session_set_em_ext_db(tfp, ext_db);
-
-	db_cfg.module = TF_MODULE_TYPE_EM;
-	db_cfg.num_elements = parms->num_elements;
-	db_cfg.cfg = parms->cfg;
-
-	for (i = 0; i < TF_DIR_MAX; i++) {
-		db_cfg.dir = i;
-		db_cfg.alloc_cnt = parms->resources->em_cnt[i].cnt;
-
-		/* Check if we got any request to support EEM, if so
-		 * we build an EM Ext DB holding Table Scopes.
-		 */
-		if (db_cfg.alloc_cnt[TF_EM_TBL_TYPE_TBL_SCOPE] == 0)
-			continue;
-
-		db_cfg.rm_db = (void *)&ext_db->eem_db[i];
-		rc = tf_rm_create_db(tfp, &db_cfg);
-		if (rc) {
-			TFP_DRV_LOG(ERR,
-				    "%s: EM Ext DB creation failed\n",
-				    tf_dir_2_str(i));
-
-			return rc;
-		}
-	}
-
-	mem_type = parms->mem_type;
-
-	return 0;
-}
-
-int
-tf_em_ext_common_unbind(struct tf *tfp)
-{
-	int rc;
-	int i;
-	struct tf_rm_free_db_parms fparms = { 0 };
-	struct em_ext_db *ext_db = NULL;
-	struct tf_session *tfs = NULL;
-	struct tf_dev_info *dev;
-	struct ll_entry *entry;
-	struct tf_tbl_scope_cb *tbl_scope_cb = NULL;
-	void *ext_ptr = NULL;
-	struct tf_free_tbl_scope_parms tparms = { 0 };
-
-	TF_CHECK_PARMS1(tfp);
-
-	rc = tf_session_get_session_internal(tfp, &tfs);
-	if (rc) {
-		TFP_DRV_LOG(ERR, "Failed to get tf_session, rc:%s\n",
-		strerror(-rc));
-		return rc;
-	}
-
-	/* Retrieve the device information */
-	rc = tf_session_get_device(tfs, &dev);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			    "Failed to lookup device, rc:%s\n",
-			    strerror(-rc));
-		return rc;
-	}
-
-	rc = tf_session_get_em_ext_db(tfp, &ext_ptr);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			    "Failed to get em_ext_db from session, rc:%s\n",
-			    strerror(-rc));
-		return rc;
-	}
-
-	ext_db = (struct em_ext_db *)ext_ptr;
-	if (ext_db != NULL) {
-		entry = ext_db->tbl_scope_ll.head;
-		while (entry != NULL) {
-			tbl_scope_cb = (struct tf_tbl_scope_cb *)entry;
-			entry = entry->next;
-			tparms.tbl_scope_id =
-				tbl_scope_cb->tbl_scope_id;
-
-			if (dev->ops->tf_dev_free_tbl_scope) {
-				dev->ops->tf_dev_free_tbl_scope(tfp,
-								&tparms);
-			} else {
-				/* should not reach here */
-				ll_delete(&ext_db->tbl_scope_ll,
-					  &tbl_scope_cb->ll_entry);
-				tfp_free(tbl_scope_cb);
-			}
-		}
-
-		for (i = 0; i < TF_DIR_MAX; i++) {
-			if (ext_db->eem_db[i] == NULL)
-				continue;
-
-			fparms.dir = i;
-			fparms.rm_db = ext_db->eem_db[i];
-			rc = tf_rm_free_db(tfp, &fparms);
-			if (rc)
-				return rc;
-
-			ext_db->eem_db[i] = NULL;
-		}
-
-		tfp_free(ext_db);
-	}
-
-	tf_session_set_em_ext_db(tfp, NULL);
-
-	return 0;
-}
-
-/**
- * Sets the specified external table type element.
- *
- * This API sets the specified element data
- *
- * [in] tfp
- *   Pointer to TF handle
- *
- * [in] parms
- *   Pointer to table set parameters
- *
- * Returns
- *   - (0) if successful.
- *   - (-EINVAL) on failure.
- */
-int tf_tbl_ext_common_set(struct tf *tfp,
-			  struct tf_tbl_set_parms *parms)
-{
-	int rc = 0;
-	struct tf_tbl_scope_cb *tbl_scope_cb;
-	uint32_t tbl_scope_id;
-	struct hcapi_cfa_hwop op;
-	struct hcapi_cfa_key_tbl key_tbl;
-	struct hcapi_cfa_key_data key_obj;
-	struct hcapi_cfa_key_loc key_loc;
-
-	TF_CHECK_PARMS2(tfp, parms);
-
-	if (parms->data == NULL) {
-		TFP_DRV_LOG(ERR,
-			    "%s, invalid parms->data\n",
-			    tf_dir_2_str(parms->dir));
-		return -EINVAL;
-	}
-
-	tbl_scope_id = parms->tbl_scope_id;
-
-	if (tbl_scope_id == TF_TBL_SCOPE_INVALID)  {
-		TFP_DRV_LOG(ERR,
-			    "%s, Table scope not allocated\n",
-			    tf_dir_2_str(parms->dir));
-		return -EINVAL;
-	}
-
-	tbl_scope_cb = tf_em_ext_common_tbl_scope_find(tfp, tbl_scope_id);
-	if (tbl_scope_cb == NULL) {
-		TFP_DRV_LOG(ERR,
-			    "%s, table scope error\n",
-			    tf_dir_2_str(parms->dir));
-		return -EINVAL;
-	}
-
-	op.opcode = HCAPI_CFA_HWOPS_PUT;
-	key_tbl.base0 =
-		(uint8_t *)&tbl_scope_cb->em_ctx_info[parms->dir].em_tables[TF_RECORD_TABLE];
-	key_tbl.page_size = TF_EM_PAGE_SIZE;
-	key_obj.offset = parms->idx;
-	key_obj.data = parms->data;
-	key_obj.size = parms->data_sz_in_bytes;
-
-	rc = cfa_p4_devops.hcapi_cfa_key_hw_op(&op,
-					       &key_tbl,
-					       &key_obj,
-					       &key_loc);
-
-	return rc;
-}
-
-int
-tf_em_ext_common_alloc(struct tf *tfp,
-		       struct tf_alloc_tbl_scope_parms *parms)
-{
-	return tf_em_ext_alloc(tfp, parms);
-}
-
-int
-tf_em_ext_common_free(struct tf *tfp,
-		      struct tf_free_tbl_scope_parms *parms)
-{
-	return tf_em_ext_free(tfp, parms);
-}
-
-int tf_em_ext_map_tbl_scope(struct tf *tfp,
-			    struct tf_map_tbl_scope_parms *parms)
-{
-	int rc = 0;
-	struct tf_session *tfs;
-	struct tf_tbl_scope_cb *tbl_scope_cb;
-	struct tf_global_cfg_parms gcfg_parms = { 0 };
-	struct tfp_calloc_parms aparms;
-	uint32_t *data, *mask;
-	uint32_t sz_in_bytes = 8;
-	struct tf_dev_info *dev;
-
-	/* Retrieve the session information */
-	rc = tf_session_get_session_internal(tfp, &tfs);
-	if (rc)
-		return rc;
-
-	/* Retrieve the device information */
-	rc = tf_session_get_device(tfs, &dev);
-	if (rc)
-		return rc;
-
-	tbl_scope_cb = tf_em_ext_common_tbl_scope_find(tfp, parms->tbl_scope_id);
-	if (tbl_scope_cb == NULL) {
-		TFP_DRV_LOG(ERR, "Invalid tbl_scope_cb tbl_scope_id(%d)\n",
-			    parms->tbl_scope_id);
-		return -EINVAL;
-	}
-
-	if (dev->ops->tf_dev_map_tbl_scope == NULL) {
-		rc = -EOPNOTSUPP;
-		TFP_DRV_LOG(ERR,
-			    "Map table scope operation not supported, rc:%s\n",
-			    strerror(-rc));
-		return rc;
-	}
-
-	aparms.nitems = 2;
-	aparms.size = sizeof(uint32_t);
-	aparms.alignment = 0;
-
-	if (tfp_calloc(&aparms) != 0) {
-		TFP_DRV_LOG(ERR, "Map tbl scope alloc data error %s\n",
-			    strerror(ENOMEM));
-		return -ENOMEM;
-	}
-	data = aparms.mem_va;
-
-	if (tfp_calloc(&aparms) != 0) {
-		TFP_DRV_LOG(ERR, "Map tbl scope alloc mask error %s\n",
-			    strerror(ENOMEM));
-		rc = -ENOMEM;
-		goto clean;
-	}
-	mask = aparms.mem_va;
-
-	rc = dev->ops->tf_dev_map_parif(tfp, parms->parif_bitmask,
-					tbl_scope_cb->pf,
-					(uint8_t *)data, (uint8_t *)mask,
-					sz_in_bytes);
-
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			    "Map table scope config failure, rc:%s\n",
-			    strerror(-rc));
-		goto cleaner;
-	}
-
-	/* Note that TF_GLOBAL_CFG_INTERNAL_PARIF_2_PF is same as below enum */
-	gcfg_parms.type = TF_GLOBAL_CFG_TYPE_MAX;
-	gcfg_parms.offset = 0;
-	gcfg_parms.config = (uint8_t *)data;
-	gcfg_parms.config_mask = (uint8_t *)mask;
-	gcfg_parms.config_sz_in_bytes = sizeof(uint64_t);
-
-	rc = tf_msg_set_global_cfg(tfp, &gcfg_parms);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			    "Map tbl scope, set failed, rc:%s\n",
-			    strerror(-rc));
-	}
-cleaner:
-	tfp_free(mask);
-clean:
-	tfp_free(data);
-
-	return rc;
-}
diff --git a/drivers/net/bnxt/tf_core/tf_em_common.h b/drivers/net/bnxt/tf_core/tf_em_common.h
index 0ae95f260a..3625673952 100644
--- a/drivers/net/bnxt/tf_core/tf_em_common.h
+++ b/drivers/net/bnxt/tf_core/tf_em_common.h
@@ -6,6 +6,7 @@
 #ifndef _TF_EM_COMMON_H_
 #define _TF_EM_COMMON_H_
 
+#include "hcapi_cfa_defs.h"
 #include "tf_core.h"
 #include "tf_session.h"
 #include "ll.h"
diff --git a/drivers/net/bnxt/tf_core/tf_em_host.c b/drivers/net/bnxt/tf_core/tf_em_host.c
index 9efffe4ee5..6db0057b2c 100644
--- a/drivers/net/bnxt/tf_core/tf_em_host.c
+++ b/drivers/net/bnxt/tf_core/tf_em_host.c
@@ -21,577 +21,3 @@
 #include "tf_ext_flow_handle.h"
 
 #include "bnxt.h"
-
-#define PTU_PTE_VALID          0x1UL
-#define PTU_PTE_LAST           0x2UL
-#define PTU_PTE_NEXT_TO_LAST   0x4UL
-
-/* Number of pointers per page_size */
-#define MAX_PAGE_PTRS(page_size)  ((page_size) / sizeof(void *))
-
-/**
- * Function to free a page table
- *
- * [in] tp
- *   Pointer to the page table to free
- */
-static void
-tf_em_free_pg_tbl(struct hcapi_cfa_em_page_tbl *tp)
-{
-	uint32_t i;
-
-	for (i = 0; i < tp->pg_count; i++) {
-		if (!tp->pg_va_tbl[i]) {
-			TFP_DRV_LOG(WARNING,
-				    "No mapping for page: %d table: %016" PRIu64 "\n",
-				    i,
-				    (uint64_t)(uintptr_t)tp);
-			continue;
-		}
-
-		tfp_free(tp->pg_va_tbl[i]);
-		tp->pg_va_tbl[i] = NULL;
-	}
-
-	tp->pg_count = 0;
-	tfp_free(tp->pg_va_tbl);
-	tp->pg_va_tbl = NULL;
-	tfp_free(tp->pg_pa_tbl);
-	tp->pg_pa_tbl = NULL;
-}
-
-/**
- * Function to free an EM table
- *
- * [in] tbl
- *   Pointer to the EM table to free
- */
-static void
-tf_em_free_page_table(struct hcapi_cfa_em_table *tbl)
-{
-	struct hcapi_cfa_em_page_tbl *tp;
-	int i;
-
-	for (i = 0; i < tbl->num_lvl; i++) {
-		tp = &tbl->pg_tbl[i];
-		TFP_DRV_LOG(INFO,
-			   "EEM: Freeing page table: size %u lvl %d cnt %u\n",
-			   TF_EM_PAGE_SIZE,
-			    i,
-			    tp->pg_count);
-
-		tf_em_free_pg_tbl(tp);
-	}
-
-	tbl->l0_addr = NULL;
-	tbl->l0_dma_addr = 0;
-	tbl->num_lvl = 0;
-	tbl->num_data_pages = 0;
-}
-
-/**
- * Allocation of page tables
- *
- * [in] tfp
- *   Pointer to a TruFlow handle
- *
- * [in] pg_count
- *   Page count to allocate
- *
- * [in] pg_size
- *   Size of each page
- *
- * Returns:
- *   0       - Success
- *   -ENOMEM - Out of memory
- */
-static int
-tf_em_alloc_pg_tbl(struct hcapi_cfa_em_page_tbl *tp,
-		   uint32_t pg_count,
-		   uint32_t pg_size)
-{
-	uint32_t i;
-	struct tfp_calloc_parms parms;
-
-	parms.nitems = pg_count;
-	parms.size = sizeof(void *);
-	parms.alignment = 0;
-
-	if (tfp_calloc(&parms) != 0)
-		return -ENOMEM;
-
-	tp->pg_va_tbl = parms.mem_va;
-
-	if (tfp_calloc(&parms) != 0) {
-		tfp_free(tp->pg_va_tbl);
-		return -ENOMEM;
-	}
-
-	tp->pg_pa_tbl = parms.mem_va;
-
-	tp->pg_count = 0;
-	tp->pg_size = pg_size;
-
-	for (i = 0; i < pg_count; i++) {
-		parms.nitems = 1;
-		parms.size = pg_size;
-		parms.alignment = TF_EM_PAGE_ALIGNMENT;
-
-		if (tfp_calloc(&parms) != 0)
-			goto cleanup;
-
-		tp->pg_pa_tbl[i] = (uintptr_t)parms.mem_pa;
-		tp->pg_va_tbl[i] = parms.mem_va;
-
-		memset(tp->pg_va_tbl[i], 0, pg_size);
-		tp->pg_count++;
-	}
-
-	return 0;
-
-cleanup:
-	tf_em_free_pg_tbl(tp);
-	return -ENOMEM;
-}
-
-/**
- * Allocates EM page tables
- *
- * [in] tbl
- *   Table to allocate pages for
- *
- * Returns:
- *   0       - Success
- *   -ENOMEM - Out of memory
- */
-static int
-tf_em_alloc_page_table(struct hcapi_cfa_em_table *tbl)
-{
-	struct hcapi_cfa_em_page_tbl *tp;
-	int rc = 0;
-	int i;
-	uint32_t j;
-
-	for (i = 0; i < tbl->num_lvl; i++) {
-		tp = &tbl->pg_tbl[i];
-
-		rc = tf_em_alloc_pg_tbl(tp,
-					tbl->page_cnt[i],
-					TF_EM_PAGE_SIZE);
-		if (rc) {
-			TFP_DRV_LOG(WARNING,
-				"Failed to allocate page table: lvl: %d, rc:%s\n",
-				i,
-				strerror(-rc));
-			goto cleanup;
-		}
-
-		for (j = 0; j < tp->pg_count; j++) {
-			TFP_DRV_LOG(INFO,
-				"EEM: Allocated page table: size %u lvl %d cnt"
-				" %u VA:%p PA:%p\n",
-				TF_EM_PAGE_SIZE,
-				i,
-				tp->pg_count,
-				(void *)(uintptr_t)tp->pg_va_tbl[j],
-				(void *)(uintptr_t)tp->pg_pa_tbl[j]);
-		}
-	}
-	return rc;
-
-cleanup:
-	tf_em_free_page_table(tbl);
-	return rc;
-}
-
-/**
- * Links EM page tables
- *
- * [in] tp
- *   Pointer to page table
- *
- * [in] tp_next
- *   Pointer to the next page table
- *
- * [in] set_pte_last
- *   Flag controlling if the page table is last
- */
-static void
-tf_em_link_page_table(struct hcapi_cfa_em_page_tbl *tp,
-		      struct hcapi_cfa_em_page_tbl *tp_next,
-		      bool set_pte_last)
-{
-	uint64_t *pg_pa = tp_next->pg_pa_tbl;
-	uint64_t *pg_va;
-	uint64_t valid;
-	uint32_t k = 0;
-	uint32_t i;
-	uint32_t j;
-
-	for (i = 0; i < tp->pg_count; i++) {
-		pg_va = tp->pg_va_tbl[i];
-
-		for (j = 0; j < MAX_PAGE_PTRS(tp->pg_size); j++) {
-			if (k == tp_next->pg_count - 2 && set_pte_last)
-				valid = PTU_PTE_NEXT_TO_LAST | PTU_PTE_VALID;
-			else if (k == tp_next->pg_count - 1 && set_pte_last)
-				valid = PTU_PTE_LAST | PTU_PTE_VALID;
-			else
-				valid = PTU_PTE_VALID;
-
-			pg_va[j] = tfp_cpu_to_le_64(pg_pa[k] | valid);
-			if (++k >= tp_next->pg_count)
-				return;
-		}
-	}
-}
-
-/**
- * Setup a EM page table
- *
- * [in] tbl
- *   Pointer to EM page table
- */
-static void
-tf_em_setup_page_table(struct hcapi_cfa_em_table *tbl)
-{
-	struct hcapi_cfa_em_page_tbl *tp_next;
-	struct hcapi_cfa_em_page_tbl *tp;
-	bool set_pte_last = 0;
-	int i;
-
-	for (i = 0; i < tbl->num_lvl - 1; i++) {
-		tp = &tbl->pg_tbl[i];
-		tp_next = &tbl->pg_tbl[i + 1];
-		if (i == tbl->num_lvl - 2)
-			set_pte_last = 1;
-		tf_em_link_page_table(tp, tp_next, set_pte_last);
-	}
-
-	tbl->l0_addr = tbl->pg_tbl[TF_PT_LVL_0].pg_va_tbl[0];
-	tbl->l0_dma_addr = tbl->pg_tbl[TF_PT_LVL_0].pg_pa_tbl[0];
-}
-
-/**
- * Unregisters EM Ctx in Firmware
- *
- * [in] tfp
- *   Pointer to a TruFlow handle
- *
- * [in] tbl_scope_cb
- *   Pointer to a table scope control block
- *
- * [in] dir
- *   Receive or transmit direction
- */
-static void
-tf_em_ctx_unreg(struct tf *tfp,
-		struct tf_tbl_scope_cb *tbl_scope_cb,
-		int dir)
-{
-	struct hcapi_cfa_em_ctx_mem_info *ctxp = &tbl_scope_cb->em_ctx_info[dir];
-	struct hcapi_cfa_em_table *tbl;
-	int i;
-
-	for (i = TF_KEY0_TABLE; i < TF_MAX_TABLE; i++) {
-		tbl = &ctxp->em_tables[i];
-
-		if (tbl->num_entries != 0 && tbl->entry_size != 0) {
-			tf_msg_em_mem_unrgtr(tfp, &tbl->ctx_id);
-			tf_em_free_page_table(tbl);
-		}
-	}
-}
-
-/**
- * Registers EM Ctx in Firmware
- *
- * [in] tfp
- *   Pointer to a TruFlow handle
- *
- * [in] tbl_scope_cb
- *   Pointer to a table scope control block
- *
- * [in] dir
- *   Receive or transmit direction
- *
- * Returns:
- *   0       - Success
- *   -ENOMEM - Out of Memory
- */
-static int
-tf_em_ctx_reg(struct tf *tfp,
-	      struct tf_tbl_scope_cb *tbl_scope_cb,
-	      int dir)
-{
-	struct hcapi_cfa_em_ctx_mem_info *ctxp = &tbl_scope_cb->em_ctx_info[dir];
-	struct hcapi_cfa_em_table *tbl;
-	int rc = 0;
-	int i;
-
-	for (i = TF_KEY0_TABLE; i < TF_MAX_TABLE; i++) {
-		tbl = &ctxp->em_tables[i];
-
-		if (tbl->num_entries && tbl->entry_size) {
-			rc = tf_em_size_table(tbl, TF_EM_PAGE_SIZE);
-
-			if (rc)
-				goto cleanup;
-
-			rc = tf_em_alloc_page_table(tbl);
-			if (rc)
-				goto cleanup;
-
-			tf_em_setup_page_table(tbl);
-			rc = tf_msg_em_mem_rgtr(tfp,
-						tbl->num_lvl - 1,
-						TF_EM_PAGE_SIZE_ENUM,
-						tbl->l0_dma_addr,
-						&tbl->ctx_id);
-			if (rc)
-				goto cleanup;
-		}
-	}
-	return rc;
-
-cleanup:
-	tf_em_ctx_unreg(tfp, tbl_scope_cb, dir);
-	return rc;
-}
-
-int
-tf_em_ext_alloc(struct tf *tfp,
-		struct tf_alloc_tbl_scope_parms *parms)
-{
-	int rc;
-	enum tf_dir dir;
-	struct tf_tbl_scope_cb *tbl_scope_cb;
-	struct hcapi_cfa_em_table *em_tables;
-	struct tf_free_tbl_scope_parms free_parms;
-	struct tf_rm_allocate_parms aparms = { 0 };
-	struct tf_rm_free_parms fparms = { 0 };
-	struct tfp_calloc_parms cparms;
-	struct tf_session *tfs = NULL;
-	struct em_ext_db *ext_db = NULL;
-	void *ext_ptr = NULL;
-	uint16_t pf;
-
-	rc = tf_session_get_session_internal(tfp, &tfs);
-	if (rc) {
-		TFP_DRV_LOG(ERR, "Failed to get tf_session, rc:%s\n",
-		strerror(-rc));
-		return rc;
-	}
-
-	rc = tf_session_get_em_ext_db(tfp, &ext_ptr);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			"Failed to get em_ext_db from session, rc:%s\n",
-			strerror(-rc));
-		return rc;
-	}
-	ext_db = (struct em_ext_db *)ext_ptr;
-
-	rc = tfp_get_pf(tfp, &pf);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			    "EEM: PF query error rc:%s\n",
-			    strerror(-rc));
-		goto cleanup;
-	}
-
-	/* Get Table Scope control block from the session pool */
-	aparms.rm_db = ext_db->eem_db[TF_DIR_RX];
-	aparms.subtype = TF_EM_TBL_TYPE_TBL_SCOPE;
-	aparms.index = (uint32_t *)&parms->tbl_scope_id;
-	rc = tf_rm_allocate(&aparms);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			    "Failed to allocate table scope\n");
-		goto cleanup;
-	}
-
-	/* Create tbl_scope, initialize and attach to the session */
-	cparms.nitems = 1;
-	cparms.size = sizeof(struct tf_tbl_scope_cb);
-	cparms.alignment = 0;
-	rc = tfp_calloc(&cparms);
-	if (rc) {
-		/* Log error */
-		TFP_DRV_LOG(ERR,
-			"Failed to allocate session table scope, rc:%s\n",
-			strerror(-rc));
-		goto cleanup;
-	}
-
-	tbl_scope_cb = cparms.mem_va;
-	tbl_scope_cb->tbl_scope_id = parms->tbl_scope_id;
-	tbl_scope_cb->pf = pf;
-
-	for (dir = 0; dir < TF_DIR_MAX; dir++) {
-		rc = tf_msg_em_qcaps(tfp,
-				     dir,
-				     &tbl_scope_cb->em_caps[dir]);
-		if (rc) {
-			TFP_DRV_LOG(ERR,
-				    "EEM: Unable to query for EEM capability,"
-				    " rc:%s\n",
-				    strerror(-rc));
-			goto cleanup_ts;
-		}
-	}
-
-	/*
-	 * Validate and setup table sizes
-	 */
-	if (tf_em_validate_num_entries(tbl_scope_cb, parms))
-		goto cleanup_ts;
-
-	for (dir = 0; dir < TF_DIR_MAX; dir++) {
-		/*
-		 * Allocate tables and signal configuration to FW
-		 */
-		rc = tf_em_ctx_reg(tfp, tbl_scope_cb, dir);
-		if (rc) {
-			TFP_DRV_LOG(ERR,
-				    "EEM: Unable to register for EEM ctx,"
-				    " rc:%s\n",
-				    strerror(-rc));
-			goto cleanup_ts;
-		}
-
-		em_tables = tbl_scope_cb->em_ctx_info[dir].em_tables;
-		rc = tf_msg_em_cfg(tfp,
-				   em_tables[TF_KEY0_TABLE].num_entries,
-				   em_tables[TF_KEY0_TABLE].ctx_id,
-				   em_tables[TF_KEY1_TABLE].ctx_id,
-				   em_tables[TF_RECORD_TABLE].ctx_id,
-				   em_tables[TF_EFC_TABLE].ctx_id,
-				   parms->hw_flow_cache_flush_timer,
-				   dir);
-		if (rc) {
-			TFP_DRV_LOG(ERR,
-				    "TBL: Unable to configure EEM in firmware"
-				    " rc:%s\n",
-				    strerror(-rc));
-			goto cleanup_full;
-		}
-
-		rc = tf_msg_em_op(tfp,
-				  dir,
-				  HWRM_TF_EXT_EM_OP_INPUT_OP_EXT_EM_ENABLE);
-
-		if (rc) {
-			TFP_DRV_LOG(ERR,
-				    "EEM: Unable to enable EEM in firmware"
-				    " rc:%s\n",
-				    strerror(-rc));
-			goto cleanup_full;
-		}
-
-		/* Allocate the pool of offsets of the external memory.
-		 * Initially, this is a single fixed size pool for all external
-		 * actions related to a single table scope.
-		 */
-		rc = tf_create_tbl_pool_external(dir,
-					    tbl_scope_cb,
-					    em_tables[TF_RECORD_TABLE].num_entries,
-					    em_tables[TF_RECORD_TABLE].entry_size);
-		if (rc) {
-			TFP_DRV_LOG(ERR,
-				    "%s TBL: Unable to allocate idx pools %s\n",
-				    tf_dir_2_str(dir),
-				    strerror(-rc));
-			goto cleanup_full;
-		}
-	}
-
-	/* Insert into session tbl_scope list */
-	ll_insert(&ext_db->tbl_scope_ll, &tbl_scope_cb->ll_entry);
-	return 0;
-
-cleanup_full:
-	free_parms.tbl_scope_id = parms->tbl_scope_id;
-	/* Insert into session list prior to ext_free */
-	ll_insert(&ext_db->tbl_scope_ll, &tbl_scope_cb->ll_entry);
-	tf_em_ext_free(tfp, &free_parms);
-	return -EINVAL;
-
-cleanup_ts:
-	tfp_free(tbl_scope_cb);
-
-cleanup:
-	/* Free Table control block */
-	fparms.rm_db = ext_db->eem_db[TF_DIR_RX];
-	fparms.subtype = TF_EM_TBL_TYPE_TBL_SCOPE;
-	fparms.index = parms->tbl_scope_id;
-	rc = tf_rm_free(&fparms);
-	if (rc)
-		TFP_DRV_LOG(ERR, "Failed to free table scope\n");
-
-	return -EINVAL;
-}
-
-int
-tf_em_ext_free(struct tf *tfp,
-	       struct tf_free_tbl_scope_parms *parms)
-{
-	int rc = 0;
-	enum tf_dir  dir;
-	struct tf_tbl_scope_cb *tbl_scope_cb;
-	struct tf_session *tfs;
-	struct em_ext_db *ext_db = NULL;
-	void *ext_ptr = NULL;
-	struct tf_rm_free_parms aparms = { 0 };
-
-	rc = tf_session_get_session_internal(tfp, &tfs);
-	if (rc) {
-		TFP_DRV_LOG(ERR, "Failed to get tf_session, rc:%s\n",
-			    strerror(-rc));
-		return -EINVAL;
-	}
-
-	rc = tf_session_get_em_ext_db(tfp, &ext_ptr);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			"Failed to get em_ext_db from session, rc:%s\n",
-			strerror(-rc));
-		return rc;
-	}
-	ext_db = (struct em_ext_db *)ext_ptr;
-
-	tbl_scope_cb = tf_em_ext_common_tbl_scope_find(tfp, parms->tbl_scope_id);
-	if (tbl_scope_cb == NULL) {
-		TFP_DRV_LOG(ERR, "Table scope error\n");
-		return -EINVAL;
-	}
-
-	/* Free Table control block */
-	aparms.rm_db = ext_db->eem_db[TF_DIR_RX];
-	aparms.subtype = TF_EM_TBL_TYPE_TBL_SCOPE;
-	aparms.index = parms->tbl_scope_id;
-	rc = tf_rm_free(&aparms);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			    "Failed to free table scope\n");
-	}
-
-	/* free table scope locks */
-	for (dir = 0; dir < TF_DIR_MAX; dir++) {
-		/* Free associated external pools
-		 */
-		tf_destroy_tbl_pool_external(dir,
-					     tbl_scope_cb);
-		tf_msg_em_op(tfp,
-			     dir,
-			     HWRM_TF_EXT_EM_OP_INPUT_OP_EXT_EM_DISABLE);
-
-		/* free table scope and all associated resources */
-		tf_em_ctx_unreg(tfp, tbl_scope_cb, dir);
-	}
-
-	/* remove from session list and free tbl_scope */
-	ll_delete(&ext_db->tbl_scope_ll, &tbl_scope_cb->ll_entry);
-	tfp_free(tbl_scope_cb);
-	return rc;
-}
diff --git a/drivers/net/bnxt/tf_core/tf_msg.c b/drivers/net/bnxt/tf_core/tf_msg.c
index 4aa90f6b07..08e9783d52 100644
--- a/drivers/net/bnxt/tf_core/tf_msg.c
+++ b/drivers/net/bnxt/tf_core/tf_msg.c
@@ -1100,471 +1100,6 @@ tf_msg_move_em_entry(struct tf *tfp,
 	return 0;
 }
 
-int tf_msg_ext_em_ctxt_mem_alloc(struct tf *tfp,
-				struct hcapi_cfa_em_table *tbl,
-				uint64_t *dma_addr,
-				uint32_t *page_lvl,
-				uint32_t *page_size)
-{
-	struct tfp_send_msg_parms parms = { 0 };
-	struct hwrm_tf_ctxt_mem_alloc_input req = {0};
-	struct hwrm_tf_ctxt_mem_alloc_output resp = {0};
-	uint32_t mem_size_k;
-	int rc = 0;
-	struct tf_dev_info *dev;
-	struct tf_session *tfs;
-	uint32_t fw_se_id;
-
-	/* Retrieve the session information */
-	rc = tf_session_get_session_internal(tfp, &tfs);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			    "Failed to lookup session, rc:%s\n",
-			    strerror(-rc));
-		return rc;
-	}
-
-	/* Retrieve the device information */
-	rc = tf_session_get_device(tfs, &dev);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			    "Failed to lookup device, rc:%s\n",
-			    strerror(-rc));
-		return rc;
-	}
-	/* Retrieve the session information */
-	fw_se_id = tfs->session_id.internal.fw_session_id;
-
-	if (tbl->num_entries && tbl->entry_size) {
-		/* unit: kbytes */
-		mem_size_k = (tbl->num_entries / TF_KILOBYTE) * tbl->entry_size;
-		req.mem_size = tfp_cpu_to_le_32(mem_size_k);
-		req.fw_session_id = tfp_cpu_to_le_32(fw_se_id);
-		parms.tf_type = HWRM_TF_CTXT_MEM_ALLOC;
-		parms.req_data = (uint32_t *)&req;
-		parms.req_size = sizeof(req);
-		parms.resp_data = (uint32_t *)&resp;
-		parms.resp_size = sizeof(resp);
-		parms.mailbox = dev->ops->tf_dev_get_mailbox();
-		rc = tfp_send_msg_direct(tf_session_get_bp(tfp), &parms);
-		if (rc) {
-			TFP_DRV_LOG(ERR, "Failed ext_em_alloc error rc:%s\n",
-				strerror(-rc));
-			return rc;
-		}
-
-		*dma_addr = tfp_le_to_cpu_64(resp.page_dir);
-		*page_lvl = resp.page_level;
-		*page_size = resp.page_size;
-	}
-
-	return rc;
-}
-
-int tf_msg_ext_em_ctxt_mem_free(struct tf *tfp,
-				uint32_t mem_size_k,
-				uint64_t dma_addr,
-				uint8_t page_level,
-				uint8_t page_size)
-{
-	struct tfp_send_msg_parms parms = { 0 };
-	struct hwrm_tf_ctxt_mem_free_input req = {0};
-	struct hwrm_tf_ctxt_mem_free_output resp = {0};
-	int rc = 0;
-	struct tf_dev_info *dev;
-	struct tf_session *tfs;
-	uint32_t fw_se_id;
-
-	/* Retrieve the session information */
-	rc = tf_session_get_session_internal(tfp, &tfs);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			    "Failed to lookup session, rc:%s\n",
-			    strerror(-rc));
-		return rc;
-	}
-
-	/* Retrieve the device information */
-	rc = tf_session_get_device(tfs, &dev);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			    "Failed to lookup device, rc:%s\n",
-			    strerror(-rc));
-		return rc;
-	}
-	/* Retrieve the session information */
-	fw_se_id = tfs->session_id.internal.fw_session_id;
-
-	req.fw_session_id = tfp_cpu_to_le_32(fw_se_id);
-	req.mem_size = tfp_cpu_to_le_32(mem_size_k);
-	req.page_dir = tfp_cpu_to_le_64(dma_addr);
-	req.page_level = page_level;
-	req.page_size = page_size;
-	parms.tf_type = HWRM_TF_CTXT_MEM_FREE;
-	parms.req_data = (uint32_t *)&req;
-	parms.req_size = sizeof(req);
-	parms.resp_data = (uint32_t *)&resp;
-	parms.resp_size = sizeof(resp);
-	parms.mailbox = dev->ops->tf_dev_get_mailbox();
-	rc = tfp_send_msg_direct(tf_session_get_bp(tfp), &parms);
-
-	return rc;
-}
-
-int
-tf_msg_em_mem_rgtr(struct tf *tfp,
-		   int page_lvl,
-		   int page_size,
-		   uint64_t dma_addr,
-		   uint16_t *ctx_id)
-{
-	int rc;
-	struct hwrm_tf_ctxt_mem_rgtr_input req = { 0 };
-	struct hwrm_tf_ctxt_mem_rgtr_output resp = { 0 };
-	struct tfp_send_msg_parms parms = { 0 };
-	struct tf_dev_info *dev;
-	struct tf_session *tfs;
-	uint32_t fw_se_id;
-
-	/* Retrieve the session information */
-	rc = tf_session_get_session_internal(tfp, &tfs);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			    "Failed to lookup session, rc:%s\n",
-			    strerror(-rc));
-		return rc;
-	}
-
-	/* Retrieve the device information */
-	rc = tf_session_get_device(tfs, &dev);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			    "Failed to lookup device, rc:%s\n",
-			    strerror(-rc));
-		return rc;
-	}
-	fw_se_id = tfs->session_id.internal.fw_session_id;
-
-	req.fw_session_id = tfp_cpu_to_le_32(fw_se_id);
-	req.page_level = page_lvl;
-	req.page_size = page_size;
-	req.page_dir = tfp_cpu_to_le_64(dma_addr);
-
-	parms.tf_type = HWRM_TF_CTXT_MEM_RGTR;
-	parms.req_data = (uint32_t *)&req;
-	parms.req_size = sizeof(req);
-	parms.resp_data = (uint32_t *)&resp;
-	parms.resp_size = sizeof(resp);
-	parms.mailbox = dev->ops->tf_dev_get_mailbox();
-
-	rc = tfp_send_msg_direct(tf_session_get_bp(tfp),
-				 &parms);
-	if (rc)
-		return rc;
-
-	*ctx_id = tfp_le_to_cpu_16(resp.ctx_id);
-
-	return rc;
-}
-
-int
-tf_msg_em_mem_unrgtr(struct tf *tfp,
-		     uint16_t *ctx_id)
-{
-	int rc;
-	struct hwrm_tf_ctxt_mem_unrgtr_input req = {0};
-	struct hwrm_tf_ctxt_mem_unrgtr_output resp = {0};
-	struct tfp_send_msg_parms parms = { 0 };
-	struct tf_dev_info *dev;
-	struct tf_session *tfs;
-	uint32_t fw_se_id;
-
-	/* Retrieve the session information */
-	rc = tf_session_get_session_internal(tfp, &tfs);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			    "Failed to lookup session, rc:%s\n",
-			    strerror(-rc));
-		return rc;
-	}
-
-	/* Retrieve the device information */
-	rc = tf_session_get_device(tfs, &dev);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			    "Failed to lookup device, rc:%s\n",
-			    strerror(-rc));
-		return rc;
-	}
-
-	fw_se_id = tfs->session_id.internal.fw_session_id;
-	req.fw_session_id = tfp_cpu_to_le_32(fw_se_id);
-
-	req.ctx_id = tfp_cpu_to_le_32(*ctx_id);
-
-	parms.tf_type = HWRM_TF_CTXT_MEM_UNRGTR;
-	parms.req_data = (uint32_t *)&req;
-	parms.req_size = sizeof(req);
-	parms.resp_data = (uint32_t *)&resp;
-	parms.resp_size = sizeof(resp);
-	parms.mailbox = dev->ops->tf_dev_get_mailbox();
-
-	rc = tfp_send_msg_direct(tf_session_get_bp(tfp),
-				 &parms);
-	return rc;
-}
-
-int
-tf_msg_em_qcaps(struct tf *tfp,
-		int dir,
-		struct tf_em_caps *em_caps)
-{
-	int rc;
-	struct hwrm_tf_ext_em_qcaps_input  req = {0};
-	struct hwrm_tf_ext_em_qcaps_output resp = { 0 };
-	uint32_t             flags;
-	struct tfp_send_msg_parms parms = { 0 };
-	struct tf_dev_info *dev;
-	struct tf_session *tfs;
-	uint32_t fw_se_id;
-
-	/* Retrieve the session information */
-	rc = tf_session_get_session_internal(tfp, &tfs);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			    "%s: Failed to lookup session, rc:%s\n",
-			    tf_dir_2_str(dir),
-			    strerror(-rc));
-		return rc;
-	}
-	fw_se_id = tfs->session_id.internal.fw_session_id;
-
-	/* Retrieve the device information */
-	rc = tf_session_get_device(tfs, &dev);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			    "%s: Failed to lookup device, rc:%s\n",
-			    tf_dir_2_str(dir),
-			    strerror(-rc));
-		return rc;
-	}
-
-	flags = (dir == TF_DIR_TX ? HWRM_TF_EXT_EM_QCAPS_INPUT_FLAGS_DIR_TX :
-		 HWRM_TF_EXT_EM_QCAPS_INPUT_FLAGS_DIR_RX);
-	req.flags = tfp_cpu_to_le_32(flags);
-
-	parms.tf_type = HWRM_TF_EXT_EM_QCAPS;
-	req.fw_session_id = tfp_cpu_to_le_32(fw_se_id);
-	parms.req_data = (uint32_t *)&req;
-	parms.req_size = sizeof(req);
-	parms.resp_data = (uint32_t *)&resp;
-	parms.resp_size = sizeof(resp);
-	parms.mailbox = dev->ops->tf_dev_get_mailbox();
-
-	rc = tfp_send_msg_direct(tf_session_get_bp(tfp),
-				 &parms);
-	if (rc)
-		return rc;
-
-	em_caps->supported = tfp_le_to_cpu_32(resp.supported);
-	em_caps->max_entries_supported =
-		tfp_le_to_cpu_32(resp.max_entries_supported);
-	em_caps->key_entry_size = tfp_le_to_cpu_16(resp.key_entry_size);
-	em_caps->record_entry_size =
-		tfp_le_to_cpu_16(resp.record_entry_size);
-	em_caps->efc_entry_size = tfp_le_to_cpu_16(resp.efc_entry_size);
-
-	return rc;
-}
-
-int
-tf_msg_em_cfg(struct tf *tfp,
-	      uint32_t num_entries,
-	      uint16_t key0_ctx_id,
-	      uint16_t key1_ctx_id,
-	      uint16_t record_ctx_id,
-	      uint16_t efc_ctx_id,
-	      uint8_t flush_interval,
-	      int dir)
-{
-	int rc;
-	struct hwrm_tf_ext_em_cfg_input  req = {0};
-	struct hwrm_tf_ext_em_cfg_output resp = {0};
-	uint32_t flags;
-	struct tfp_send_msg_parms parms = { 0 };
-	struct tf_dev_info *dev;
-	struct tf_session *tfs;
-
-	/* Retrieve the session information */
-	rc = tf_session_get_session_internal(tfp, &tfs);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			    "%s: Failed to lookup session, rc:%s\n",
-			    tf_dir_2_str(dir),
-			    strerror(-rc));
-		return rc;
-	}
-
-	/* Retrieve the device information */
-	rc = tf_session_get_device(tfs, &dev);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			    "%s: Failed to lookup device, rc:%s\n",
-			    tf_dir_2_str(dir),
-			    strerror(-rc));
-		return rc;
-	}
-
-	flags = (dir == TF_DIR_TX ? HWRM_TF_EXT_EM_CFG_INPUT_FLAGS_DIR_TX :
-		 HWRM_TF_EXT_EM_CFG_INPUT_FLAGS_DIR_RX);
-	flags |= HWRM_TF_EXT_EM_QCAPS_INPUT_FLAGS_PREFERRED_OFFLOAD;
-
-	req.flags = tfp_cpu_to_le_32(flags);
-	req.num_entries = tfp_cpu_to_le_32(num_entries);
-
-	req.flush_interval = flush_interval;
-
-	req.key0_ctx_id = tfp_cpu_to_le_16(key0_ctx_id);
-	req.key1_ctx_id = tfp_cpu_to_le_16(key1_ctx_id);
-	req.record_ctx_id = tfp_cpu_to_le_16(record_ctx_id);
-	req.efc_ctx_id = tfp_cpu_to_le_16(efc_ctx_id);
-
-	parms.tf_type = HWRM_TF_EXT_EM_CFG;
-	parms.req_data = (uint32_t *)&req;
-	parms.req_size = sizeof(req);
-	parms.resp_data = (uint32_t *)&resp;
-	parms.resp_size = sizeof(resp);
-	parms.mailbox = dev->ops->tf_dev_get_mailbox();
-
-	rc = tfp_send_msg_direct(tf_session_get_bp(tfp),
-				 &parms);
-	return rc;
-}
-
-int
-tf_msg_ext_em_cfg(struct tf *tfp,
-		  struct tf_tbl_scope_cb *tbl_scope_cb,
-		  uint32_t st_buckets,
-		  uint8_t flush_interval,
-		  enum tf_dir dir)
-{
-	struct hcapi_cfa_em_ctx_mem_info *ctxp = &tbl_scope_cb->em_ctx_info[dir];
-	struct hcapi_cfa_em_table *lkup_tbl, *act_tbl;
-	struct hwrm_tf_ext_em_cfg_input  req = {0};
-	struct hwrm_tf_ext_em_cfg_output resp = {0};
-	struct tfp_send_msg_parms parms = { 0 };
-	uint32_t flags;
-	struct tf_dev_info *dev;
-	struct tf_session *tfs;
-	uint32_t fw_se_id;
-	int rc;
-
-	/* Retrieve the session information */
-	rc = tf_session_get_session_internal(tfp, &tfs);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			    "%s: Failed to lookup session, rc:%s\n",
-			    tf_dir_2_str(dir),
-			    strerror(-rc));
-		return rc;
-	}
-
-	/* Retrieve the device information */
-	rc = tf_session_get_device(tfs, &dev);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			    "%s: Failed to lookup device, rc:%s\n",
-			    tf_dir_2_str(dir),
-			    strerror(-rc));
-		return rc;
-	}
-	fw_se_id = tfs->session_id.internal.fw_session_id;
-
-	lkup_tbl = &ctxp->em_tables[TF_EM_LKUP_TABLE];
-	act_tbl = &ctxp->em_tables[TF_ACTION_TABLE];
-	flags = (dir == TF_DIR_TX ? HWRM_TF_EXT_EM_CFG_INPUT_FLAGS_DIR_TX :
-		 HWRM_TF_EXT_EM_CFG_INPUT_FLAGS_DIR_RX);
-	flags |= HWRM_TF_EXT_EM_QCAPS_INPUT_FLAGS_PREFERRED_OFFLOAD;
-
-	req.flags = tfp_cpu_to_le_32(flags);
-	req.num_entries = tfp_cpu_to_le_32(act_tbl->num_entries);
-	req.lkup_static_buckets = tfp_cpu_to_le_32(st_buckets);
-	req.fw_session_id = tfp_cpu_to_le_32(fw_se_id);
-	req.flush_interval = flush_interval;
-	req.action_ctx_id = tfp_cpu_to_le_16(act_tbl->ctx_id);
-	req.action_tbl_scope = tfp_cpu_to_le_16(tbl_scope_cb->tbl_scope_id);
-	req.lkup_ctx_id = tfp_cpu_to_le_16(lkup_tbl->ctx_id);
-	req.lkup_tbl_scope = tfp_cpu_to_le_16(tbl_scope_cb->tbl_scope_id);
-
-	req.enables = (HWRM_TF_EXT_EM_CFG_INPUT_ENABLES_ACTION_CTX_ID |
-		       HWRM_TF_EXT_EM_CFG_INPUT_ENABLES_ACTION_TBL_SCOPE |
-		       HWRM_TF_EXT_EM_CFG_INPUT_ENABLES_LKUP_CTX_ID |
-		       HWRM_TF_EXT_EM_CFG_INPUT_ENABLES_LKUP_TBL_SCOPE |
-		       HWRM_TF_EXT_EM_CFG_INPUT_ENABLES_LKUP_STATIC_BUCKETS |
-		       HWRM_TF_EXT_EM_CFG_INPUT_ENABLES_NUM_ENTRIES);
-
-	parms.tf_type = HWRM_TF_EXT_EM_CFG;
-	parms.req_data = (uint32_t *)&req;
-	parms.req_size = sizeof(req);
-	parms.resp_data = (uint32_t *)&resp;
-	parms.resp_size = sizeof(resp);
-	parms.mailbox = dev->ops->tf_dev_get_mailbox();
-
-	rc = tfp_send_msg_direct(tf_session_get_bp(tfp),
-				 &parms);
-	return rc;
-}
-
-int
-tf_msg_em_op(struct tf *tfp,
-	     int dir,
-	     uint16_t op)
-{
-	int rc;
-	struct hwrm_tf_ext_em_op_input req = {0};
-	struct hwrm_tf_ext_em_op_output resp = {0};
-	uint32_t flags;
-	struct tfp_send_msg_parms parms = { 0 };
-	struct tf_dev_info *dev;
-	struct tf_session *tfs;
-
-	/* Retrieve the session information */
-	rc = tf_session_get_session_internal(tfp, &tfs);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			    "%s: Failed to lookup session, rc:%s\n",
-			    tf_dir_2_str(dir),
-			    strerror(-rc));
-		return rc;
-	}
-
-	/* Retrieve the device information */
-	rc = tf_session_get_device(tfs, &dev);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			    "%s: Failed to lookup device, rc:%s\n",
-			    tf_dir_2_str(dir),
-			    strerror(-rc));
-		return rc;
-	}
-
-	flags = (dir == TF_DIR_TX ? HWRM_TF_EXT_EM_CFG_INPUT_FLAGS_DIR_TX :
-		 HWRM_TF_EXT_EM_CFG_INPUT_FLAGS_DIR_RX);
-	req.flags = tfp_cpu_to_le_32(flags);
-	req.op = tfp_cpu_to_le_16(op);
-
-	parms.tf_type = HWRM_TF_EXT_EM_OP;
-	parms.req_data = (uint32_t *)&req;
-	parms.req_size = sizeof(req);
-	parms.resp_data = (uint32_t *)&resp;
-	parms.resp_size = sizeof(resp);
-	parms.mailbox = dev->ops->tf_dev_get_mailbox();
-
-	rc = tfp_send_msg_direct(tf_session_get_bp(tfp),
-				 &parms);
-	return rc;
-}
-
 int
 tf_msg_tcam_entry_set(struct tf *tfp,
 		      struct tf_dev_info *dev,
diff --git a/drivers/net/bnxt/tf_core/tf_tcam.c b/drivers/net/bnxt/tf_core/tf_tcam.c
index 9e0671d47b..df5cad75b5 100644
--- a/drivers/net/bnxt/tf_core/tf_tcam.c
+++ b/drivers/net/bnxt/tf_core/tf_tcam.c
@@ -261,7 +261,6 @@ tf_tcam_unbind(struct tf *tfp)
 
 			tcam_db->tcam_db[i] = NULL;
 		}
-
 	}
 
 	rc = tf_tcam_mgr_unbind_msg(tfp, dev);
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 04/47] net/bnxt: tf_core: Thor TF EM key size check
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (2 preceding siblings ...)
  2024-10-01  5:57 ` [PATCH v3 03/47] net/bnxt: tf_core: External EM support cleanup Sriharsha Basavapatna
@ 2024-10-01  5:57 ` Sriharsha Basavapatna
  2024-10-01  5:57 ` [PATCH v3 05/47] net/bnxt: tf_core: flow scale improvement Sriharsha Basavapatna
                   ` (29 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:57 UTC (permalink / raw)
  To: dev
  Cc: Farah Smith, Sriharsha Basavapatna, Kishore Padmanabha,
	Shahaji Bhosle, Ajit Khaparde

From: Farah Smith <farah.smith@broadcom.com>

The maximum EM key size is 640 bits for Thor.  But the lookup record
+ the key size is 679 bits.  This value must be rounded up to a 128 bit
aligned number.  So the size check should be 96 bytes rather than 80.
This fix allows keys > 601 bits to be successfully inserted.

Fixes: 539931eab3a5 ("net/bnxt: support EM with FKB")
Signed-off-by: Farah Smith <farah.smith@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_core/tf_msg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/tf_core/tf_msg.c b/drivers/net/bnxt/tf_core/tf_msg.c
index 08e9783d52..dd5ea1c80e 100644
--- a/drivers/net/bnxt/tf_core/tf_msg.c
+++ b/drivers/net/bnxt/tf_core/tf_msg.c
@@ -25,7 +25,7 @@
  */
 #define TF_MSG_SET_GLOBAL_CFG_DATA_SIZE  16
 #define TF_MSG_EM_INSERT_KEY_SIZE        64
-#define TF_MSG_EM_INSERT_RECORD_SIZE     80
+#define TF_MSG_EM_INSERT_RECORD_SIZE     96
 #define TF_MSG_TBL_TYPE_SET_DATA_SIZE    88
 
 /* Compile check - Catch any msg changes that we depend on, like the
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 05/47] net/bnxt: tf_core: flow scale improvement
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (3 preceding siblings ...)
  2024-10-01  5:57 ` [PATCH v3 04/47] net/bnxt: tf_core: Thor TF EM key size check Sriharsha Basavapatna
@ 2024-10-01  5:57 ` Sriharsha Basavapatna
  2024-10-01  5:57 ` [PATCH v3 06/47] net/bnxt: tf_core: TF support flow scale query Sriharsha Basavapatna
                   ` (28 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:57 UTC (permalink / raw)
  To: dev
  Cc: Kishore Padmanabha, Michael Baucom, Ajit Khaparde,
	Shahaji Bhosle, Sriharsha Basavapatna

From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>

Added logic to add flows to wildcard tcam if flows fail to be added to
exact match table.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Michael Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
---
 drivers/net/bnxt/tf_core/tf_em_hash_internal.c | 4 ++--
 drivers/net/bnxt/tf_core/tf_msg.c              | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/tf_core/tf_em_hash_internal.c b/drivers/net/bnxt/tf_core/tf_em_hash_internal.c
index d72ac83295..cb8da0e370 100644
--- a/drivers/net/bnxt/tf_core/tf_em_hash_internal.c
+++ b/drivers/net/bnxt/tf_core/tf_em_hash_internal.c
@@ -65,7 +65,7 @@ tf_em_hash_insert_int_entry(struct tf *tfp,
 		PMD_DRV_LOG(ERR,
 			    "%s, EM entry index allocation failed\n",
 			    tf_dir_2_str(parms->dir));
-		return -1;
+		return -ENOMEM; /* no more space to add entries */
 	}
 
 	if (dev->ops->tf_dev_cfa_key_hash == NULL)
@@ -87,7 +87,7 @@ tf_em_hash_insert_int_entry(struct tf *tfp,
 	if (rc) {
 		/* Free the allocated index before returning */
 		dpool_free(pool, index);
-		return -1;
+		return rc;
 	}
 
 	TF_SET_GFID(gfid,
diff --git a/drivers/net/bnxt/tf_core/tf_msg.c b/drivers/net/bnxt/tf_core/tf_msg.c
index dd5ea1c80e..1ef828a1e9 100644
--- a/drivers/net/bnxt/tf_core/tf_msg.c
+++ b/drivers/net/bnxt/tf_core/tf_msg.c
@@ -925,7 +925,7 @@ tf_msg_hash_insert_em_internal_entry(struct tf *tfp,
 	if (msg_record_size > TF_MSG_EM_INSERT_RECORD_SIZE) {
 		rc = -EINVAL;
 		TFP_DRV_LOG(ERR,
-			    "%s: Record size to large, rc:%s\n",
+			    "%s: Record size too large, rc:%s\n",
 			    tf_dir_2_str(em_parms->dir),
 			    strerror(-rc));
 		return rc;
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 06/47] net/bnxt: tf_core: TF support flow scale query
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (4 preceding siblings ...)
  2024-10-01  5:57 ` [PATCH v3 05/47] net/bnxt: tf_core: flow scale improvement Sriharsha Basavapatna
@ 2024-10-01  5:57 ` Sriharsha Basavapatna
  2024-10-01  5:57 ` [PATCH v3 07/47] net/bnxt: tf_core: fix slice count in case of HA entry move Sriharsha Basavapatna
                   ` (27 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:57 UTC (permalink / raw)
  To: dev
  Cc: Shuanglin Wang, Kishore Padmanabha, Ajit Khaparde, Sriharsha Basavapatna

From: Shuanglin Wang <shuanglin.wang@broadcom.com>

TF supports the flow scale query feature for OVS application.
The resource usage is tracked when opening a TF session
or adding/deleting a flow. The resources includes WC TCAM,
EM, Action, Counter, Meter, ACT_ENCAP, ACT_ENCAP, and SP_SMAC.
User can query the resource usage using niccli.

Several improvements on flow scale query feature:
1. Some default rules require both RX and TX resources;
   need to update usage states on both direcitons.
2. Update resoure usage state for regular flows only.
3. Added a buffer dirty state to avoid unnecessary
   state sync with firmware.

This feature is disabled by default. Using the build flag
-DTF_FLOW_SCALE_QUERY to enable it.

Signed-off-by: Shuanglin Wang <shuanglin.wang@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
---
 drivers/net/bnxt/hsi_struct_def_dpdk.h        | 342 ++++++++--
 drivers/net/bnxt/tf_core/cfa_tcam_mgr.c       |  57 +-
 .../net/bnxt/tf_core/cfa_tcam_mgr_device.h    |   9 +
 .../net/bnxt/tf_core/cfa_tcam_mgr_session.c   |  13 +
 .../net/bnxt/tf_core/cfa_tcam_mgr_session.h   |   3 +
 drivers/net/bnxt/tf_core/meson.build          |   1 +
 drivers/net/bnxt/tf_core/tf_core.c            | 150 +++++
 drivers/net/bnxt/tf_core/tf_core.h            |  52 ++
 drivers/net/bnxt/tf_core/tf_device.h          |  65 ++
 drivers/net/bnxt/tf_core/tf_device_p4.c       |  10 +
 drivers/net/bnxt/tf_core/tf_device_p58.c      | 105 +++
 .../net/bnxt/tf_core/tf_em_hash_internal.c    |  28 +-
 drivers/net/bnxt/tf_core/tf_em_internal.c     |   7 +
 drivers/net/bnxt/tf_core/tf_msg.c             | 175 +++++
 drivers/net/bnxt/tf_core/tf_msg.h             |  57 ++
 drivers/net/bnxt/tf_core/tf_resources.c       | 608 ++++++++++++++++++
 drivers/net/bnxt/tf_core/tf_resources.h       | 129 ++++
 drivers/net/bnxt/tf_core/tf_rm.c              |  39 +-
 drivers/net/bnxt/tf_core/tf_session.c         |  10 +
 drivers/net/bnxt/tf_ulp/ulp_mapper.c          |  16 +
 20 files changed, 1806 insertions(+), 70 deletions(-)
 create mode 100644 drivers/net/bnxt/tf_core/tf_resources.c

diff --git a/drivers/net/bnxt/hsi_struct_def_dpdk.h b/drivers/net/bnxt/hsi_struct_def_dpdk.h
index 9beacd94aa..cec4b59d1a 100644
--- a/drivers/net/bnxt/hsi_struct_def_dpdk.h
+++ b/drivers/net/bnxt/hsi_struct_def_dpdk.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright (c) 2014-2023 Broadcom Inc.
+ * Copyright (c) 2014-2024 Broadcom Inc.
  * All rights reserved.
  *
  * DO NOT MODIFY!!! This file is automatically generated.
@@ -836,6 +836,10 @@ struct cmd_nums {
 	#define HWRM_TF_IF_TBL_SET                        UINT32_C(0x2fe)
 	/* Experimental */
 	#define HWRM_TF_IF_TBL_GET                        UINT32_C(0x2ff)
+	/* Experimental */
+	#define HWRM_TF_RESC_USAGE_SET                    UINT32_C(0x300)
+	/* Experimental */
+	#define HWRM_TF_RESC_USAGE_QUERY                  UINT32_C(0x301)
 	/* TruFlow command to check firmware table scope capabilities. */
 	#define HWRM_TFC_TBL_SCOPE_QCAPS                  UINT32_C(0x380)
 	/* TruFlow command to allocate a table scope ID and create the pools. */
@@ -14960,32 +14964,18 @@ struct hwrm_func_qcaps_output {
 	uint16_t	xid_partition_cap;
 	/*
 	 * When this bit is '1', it indicates that FW is capable of
-	 * supporting partition based XID management for KTLS TX
+	 * supporting partition based XID management for Tx crypto
 	 * key contexts.
 	 */
-	#define HWRM_FUNC_QCAPS_OUTPUT_XID_PARTITION_CAP_KTLS_TKC \
+	#define HWRM_FUNC_QCAPS_OUTPUT_XID_PARTITION_CAP_TX_CK \
 		UINT32_C(0x1)
 	/*
 	 * When this bit is '1', it indicates that FW is capable of
-	 * supporting partition based XID management for KTLS RX
+	 * supporting partition based XID management for Rx crypto
 	 * key contexts.
 	 */
-	#define HWRM_FUNC_QCAPS_OUTPUT_XID_PARTITION_CAP_KTLS_RKC \
+	#define HWRM_FUNC_QCAPS_OUTPUT_XID_PARTITION_CAP_RX_CK \
 		UINT32_C(0x2)
-	/*
-	 * When this bit is '1', it indicates that FW is capable of
-	 * supporting partition based XID management for QUIC TX
-	 * key contexts.
-	 */
-	#define HWRM_FUNC_QCAPS_OUTPUT_XID_PARTITION_CAP_QUIC_TKC \
-		UINT32_C(0x4)
-	/*
-	 * When this bit is '1', it indicates that FW is capable of
-	 * supporting partition based XID management for QUIC RX
-	 * key contexts.
-	 */
-	#define HWRM_FUNC_QCAPS_OUTPUT_XID_PARTITION_CAP_QUIC_RKC \
-		UINT32_C(0x8)
 	/*
 	 * This value uniquely identifies the hardware NIC used by the
 	 * function. The value returned will be the same for all functions.
@@ -15804,8 +15794,21 @@ struct hwrm_func_qcfg_output {
 	 * initialize_fw.
 	 */
 	uint32_t	roce_max_gid_per_vf;
-	/* Bitmap of context types that have XID partition enabled. */
+	/*
+	 * Bitmap of context types that have XID partition enabled.
+	 * Only valid for PF.
+	 */
 	uint16_t	xid_partition_cfg;
+	/*
+	 * When this bit is '1', it indicates that driver enables XID
+	 * partition on Tx crypto key contexts.
+	 */
+	#define HWRM_FUNC_QCFG_OUTPUT_XID_PARTITION_CFG_TX_CK     UINT32_C(0x1)
+	/*
+	 * When this bit is '1', it indicates that driver enables XID
+	 * partition on Rx crypto key contexts.
+	 */
+	#define HWRM_FUNC_QCFG_OUTPUT_XID_PARTITION_CFG_RX_CK     UINT32_C(0x2)
 	uint8_t	unused_7;
 	/*
 	 * This field is used in Output records to indicate that the output
@@ -16886,34 +16889,20 @@ struct hwrm_func_cfg_input {
 	/* Number of GIDs per VF. Only valid for PF. */
 	uint32_t	roce_max_gid_per_vf;
 	/*
-	 * Bitmap of context kinds that have XID partition enabled.
+	 * Bitmap of context types that have XID partition enabled.
 	 * Only valid for PF.
 	 */
 	uint16_t	xid_partition_cfg;
 	/*
 	 * When this bit is '1', it indicates that driver enables XID
-	 * partition on KTLS TX key contexts.
-	 */
-	#define HWRM_FUNC_CFG_INPUT_XID_PARTITION_CFG_KTLS_TKC \
-		UINT32_C(0x1)
-	/*
-	 * When this bit is '1', it indicates that driver enables XID
-	 * partition on KTLS RX key contexts.
+	 * partition on Tx crypto key contexts.
 	 */
-	#define HWRM_FUNC_CFG_INPUT_XID_PARTITION_CFG_KTLS_RKC \
-		UINT32_C(0x2)
+	#define HWRM_FUNC_CFG_INPUT_XID_PARTITION_CFG_TX_CK     UINT32_C(0x1)
 	/*
 	 * When this bit is '1', it indicates that driver enables XID
-	 * partition on QUIC TX key contexts.
+	 * partition on Rx crypto key contexts.
 	 */
-	#define HWRM_FUNC_CFG_INPUT_XID_PARTITION_CFG_QUIC_TKC \
-		UINT32_C(0x4)
-	/*
-	 * When this bit is '1', it indicates that driver enables XID
-	 * partition on QUIC RX key contexts.
-	 */
-	#define HWRM_FUNC_CFG_INPUT_XID_PARTITION_CFG_QUIC_RKC \
-		UINT32_C(0x8)
+	#define HWRM_FUNC_CFG_INPUT_XID_PARTITION_CFG_RX_CK     UINT32_C(0x2)
 	uint16_t	unused_2;
 } __rte_packed;
 
@@ -22737,11 +22726,11 @@ struct hwrm_func_backing_store_cfg_v2_input {
 	/* TIM. */
 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_TIM \
 		UINT32_C(0xf)
-	/* Tx key context. */
-	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_TKC \
+	/* Tx crypto key. */
+	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_TX_CK \
 		UINT32_C(0x13)
-	/* Rx key context. */
-	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_RKC \
+	/* Rx crypto key. */
+	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_RX_CK \
 		UINT32_C(0x14)
 	/* Mid-path TQM ring. */
 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_MP_TQM_RING \
@@ -22781,7 +22770,7 @@ struct hwrm_func_backing_store_cfg_v2_input {
 	 *    RE_CFA_LKUP (0), RE_CFA_ACT (1), TE_CFA_LKUP(2), TE_CFA_ACT (3)
 	 * 3. If the backing store type is XID partition, use the following
 	 *    instance value to map to context types:
-	 *    KTLS_TKC (0), KTLS_RKC (1), QUIC_TKC (2), QUIC_RKC (3)
+	 *    TX_CK (0), RX_CK (1)
 	 */
 	uint16_t	instance;
 	/* Control flags. */
@@ -22990,11 +22979,11 @@ struct hwrm_func_backing_store_qcfg_v2_input {
 	/* TIM. */
 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_TIM \
 		UINT32_C(0xf)
-	/* Tx key context. */
-	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_TKC \
+	/* Tx crypto key. */
+	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_TX_CK \
 		UINT32_C(0x13)
-	/* Rx key context. */
-	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_RKC \
+	/* Rx crypto key. */
+	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_RX_CK \
 		UINT32_C(0x14)
 	/* Mid-path TQM ring. */
 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_MP_TQM_RING \
@@ -23034,7 +23023,7 @@ struct hwrm_func_backing_store_qcfg_v2_input {
 	 *    RE_CFA_LKUP (0), RE_CFA_ACT (1), TE_CFA_LKUP(2), TE_CFA_ACT (3)
 	 * 3. If the backing store type is XID partition, use the following
 	 *    instance value to map to context types:
-	 *    KTLS_TKC (0), KTLS_RKC (1), QUIC_TKC (2), QUIC_RKC (3)
+	 *    TX_CK (0), RX_CK (1)
 	 */
 	uint16_t	instance;
 	uint8_t	rsvd[4];
@@ -23111,7 +23100,7 @@ struct hwrm_func_backing_store_qcfg_v2_output {
 	 *    RE_CFA_LKUP (0), RE_CFA_ACT (1), TE_CFA_LKUP(2), TE_CFA_ACT (3)
 	 * 3. If the backing store type is XID partition, use the following
 	 *    instance value to map to context types:
-	 *    KTLS_TKC (0), KTLS_RKC (1), QUIC_TKC (2), QUIC_RKC (3)
+	 *    TX_CK (0), RX_CK (1)
 	 */
 	uint16_t	instance;
 	/* Control flags. */
@@ -23190,6 +23179,7 @@ struct hwrm_func_backing_store_qcfg_v2_output {
 	 * | VINC |            vnic_split_entries                      |
 	 * | MRAV |            mrav_split_entries                      |
 	 * | TS   |             ts_split_entries                       |
+	 * | CK   |             ck_split_entries                       |
 	 */
 	uint32_t	split_entry_0;
 	/* Split entry #1. */
@@ -23271,6 +23261,19 @@ struct ts_split_entries {
 	uint32_t	rsvd2[2];
 } __rte_packed;
 
+/* Common structure to cast crypto key split entries. This casting is required in the following HWRM command inputs/outputs if the backing store type is TX_CK or RX_CK. 1. hwrm_func_backing_store_cfg_v2_input 2. hwrm_func_backing_store_qcfg_v2_output 3. hwrm_func_backing_store_qcaps_v2_output */
+/* ck_split_entries (size:128b/16B) */
+struct ck_split_entries {
+	/*
+	 * Number of QUIC backing store entries. That means the number of KTLS
+	 * backing store entries is the difference between this number and the
+	 * total number of crypto key entries.
+	 */
+	uint32_t	num_quic_entries;
+	uint32_t	rsvd;
+	uint32_t	rsvd2[2];
+} __rte_packed;
+
 /************************************
  * hwrm_func_backing_store_qcaps_v2 *
  ************************************/
@@ -23490,7 +23493,7 @@ struct hwrm_func_backing_store_qcaps_v2_output {
 	 *    RE_CFA_LKUP (0), RE_CFA_ACT (1), TE_CFA_LKUP(2), TE_CFA_ACT (3)
 	 * 3. If the backing store type is VF XID partition in-use table, use
 	 *    the following bits to map to context types:
-	 *    KTLS_TKC (0), KTLS_RKC (1), QUIC_TKC (2), QUIC_RKC (3)
+	 *    TX_CK (0), RX_CK (1)
 	 */
 	uint32_t	instance_bit_map;
 	/*
@@ -23587,6 +23590,7 @@ struct hwrm_func_backing_store_qcaps_v2_output {
 	 * | VINC |            vnic_split_entries                      |
 	 * | MRAV |            mrav_split_entries                      |
 	 * | TS   |             ts_split_entries                       |
+	 * | CK   |             ck_split_entries                       |
 	 */
 	uint32_t	split_entry_0;
 	/* Split entry #1. */
@@ -27288,8 +27292,14 @@ struct hwrm_port_phy_qcfg_output {
 	/* QSFP112 */
 	#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_QSFP112 \
 		(UINT32_C(0x1e) << 24)
+	/* SFP-DD CMIS */
+	#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_SFPDD \
+		(UINT32_C(0x1f) << 24)
+	/* SFP CMIS */
+	#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_CSFP \
+		(UINT32_C(0x20) << 24)
 	#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_LAST \
-		HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_QSFP112
+		HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_CSFP
 	/*
 	 * This value represents the current configuration of
 	 * Forward Error Correction (FEC) on the port.
@@ -51794,7 +51804,7 @@ struct hwrm_cfa_lag_group_member_unrgtr_output {
  *****************************/
 
 
-/* hwrm_cfa_tls_filter_alloc_input (size:704b/88B) */
+/* hwrm_cfa_tls_filter_alloc_input (size:768b/96B) */
 struct hwrm_cfa_tls_filter_alloc_input {
 	/* The HWRM command request type. */
 	uint16_t	req_type;
@@ -51892,6 +51902,12 @@ struct hwrm_cfa_tls_filter_alloc_input {
 	 */
 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_ENABLES_MIRROR_VNIC_ID \
 		UINT32_C(0x400)
+	/*
+	 * This bit must be '1' for the quic_dst_connect_id field to be
+	 * configured.
+	 */
+	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_ENABLES_QUIC_DST_CONNECT_ID \
+		UINT32_C(0x800)
 	/*
 	 * This value identifies a set of CFA data structures used for an L2
 	 * context.
@@ -51970,10 +51986,12 @@ struct hwrm_cfa_tls_filter_alloc_input {
 	 */
 	uint16_t	dst_port;
 	/*
-	 * The Key Context Identifier (KID) for use with KTLS.
+	 * The Key Context Identifier (KID) for use with KTLS or QUIC.
 	 * KID is limited to 20-bits.
 	 */
 	uint32_t	kid;
+	/* The Destination Connection ID of QUIC. */
+	uint64_t	quic_dst_connect_id;
 } __rte_packed;
 
 /* hwrm_cfa_tls_filter_alloc_output (size:192b/24B) */
@@ -55766,6 +55784,222 @@ struct hwrm_tf_session_hotup_state_get_output {
 	uint8_t	valid;
 } __rte_packed;
 
+/**************************
+ * hwrm_tf_resc_usage_set *
+ **************************/
+
+
+/* hwrm_tf_resc_usage_set_input (size:1024b/128B) */
+struct hwrm_tf_resc_usage_set_input {
+	/* The HWRM command request type. */
+	uint16_t	req_type;
+	/*
+	 * The completion ring to send the completion event on. This should
+	 * be the NQ ID returned from the `nq_alloc` HWRM command.
+	 */
+	uint16_t	cmpl_ring;
+	/*
+	 * The sequence ID is used by the driver for tracking multiple
+	 * commands. This ID is treated as opaque data by the firmware and
+	 * the value is returned in the `hwrm_resp_hdr` upon completion.
+	 */
+	uint16_t	seq_id;
+	/*
+	 * The target ID of the command:
+	 * * 0x0-0xFFF8 - The function ID
+	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
+	 * * 0xFFFD - Reserved for user-space HWRM interface
+	 * * 0xFFFF - HWRM
+	 */
+	uint16_t	target_id;
+	/*
+	 * A physical address pointer pointing to a host buffer that the
+	 * command's response data will be written. This can be either a host
+	 * physical address (HPA) or a guest physical address (GPA) and must
+	 * point to a physically contiguous block of memory.
+	 */
+	uint64_t	resp_addr;
+	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
+	uint32_t	fw_session_id;
+	/* Control flags. */
+	uint16_t	flags;
+	/* Indicates the flow direction. */
+	#define HWRM_TF_RESC_USAGE_SET_INPUT_FLAGS_DIR     UINT32_C(0x1)
+	/* If this bit set to 0, then it indicates rx flow. */
+	#define HWRM_TF_RESC_USAGE_SET_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
+	/* If this bit is set to 1, then it indicates tx flow. */
+	#define HWRM_TF_RESC_USAGE_SET_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
+	#define HWRM_TF_RESC_USAGE_SET_INPUT_FLAGS_DIR_LAST \
+		HWRM_TF_RESC_USAGE_SET_INPUT_FLAGS_DIR_TX
+	/* Indicate table data is being sent via DMA. */
+	#define HWRM_TF_RESC_USAGE_SET_INPUT_FLAGS_DMA     UINT32_C(0x2)
+	/* Types of the resource to set their usage state. */
+	uint16_t	types;
+	/* WC TCAM Pool */
+	#define HWRM_TF_RESC_USAGE_SET_INPUT_TYPES_WC_TCAM \
+		UINT32_C(0x1)
+	/* EM Internal Memory Pool */
+	#define HWRM_TF_RESC_USAGE_SET_INPUT_TYPES_EM \
+		UINT32_C(0x2)
+	/* Meter Instance */
+	#define HWRM_TF_RESC_USAGE_SET_INPUT_TYPES_METER \
+		UINT32_C(0x4)
+	/* Counter Record Table */
+	#define HWRM_TF_RESC_USAGE_SET_INPUT_TYPES_COUNTER \
+		UINT32_C(0x8)
+	/* Action Record Table */
+	#define HWRM_TF_RESC_USAGE_SET_INPUT_TYPES_ACTION \
+		UINT32_C(0x10)
+	/* ACT MODIFY/ENCAP Record Table */
+	#define HWRM_TF_RESC_USAGE_SET_INPUT_TYPES_ACT_MOD_ENCAP \
+		UINT32_C(0x20)
+	/* Source Property SMAC Record Table */
+	#define HWRM_TF_RESC_USAGE_SET_INPUT_TYPES_SP_SMAC \
+		UINT32_C(0x40)
+	/* All Resource Types */
+	#define HWRM_TF_RESC_USAGE_SET_INPUT_TYPES_ALL \
+		UINT32_C(0x80)
+	/* Size of the data to set. */
+	uint16_t	size;
+	/* unused */
+	uint8_t	unused1[6];
+	/* Data to be set. */
+	uint8_t	data[96];
+} __rte_packed;
+
+/* hwrm_tf_resc_usage_set_output (size:128b/16B) */
+struct hwrm_tf_resc_usage_set_output {
+	/* The specific error status for the command. */
+	uint16_t	error_code;
+	/* The HWRM command request type. */
+	uint16_t	req_type;
+	/* The sequence ID from the original command. */
+	uint16_t	seq_id;
+	/* The length of the response data in number of bytes. */
+	uint16_t	resp_len;
+	/* unused. */
+	uint8_t	unused0[7];
+	/*
+	 * This field is used in Output records to indicate that the output
+	 * is completely written to RAM. This field should be read as '1'
+	 * to indicate that the output has been completely written.
+	 * When writing a command completion or response to an internal
+	 * processor, the order of writes has to be such that this field
+	 * is written last.
+	 */
+	uint8_t	valid;
+} __rte_packed;
+
+/****************************
+ * hwrm_tf_resc_usage_query *
+ ****************************/
+
+
+/* hwrm_tf_resc_usage_query_input (size:256b/32B) */
+struct hwrm_tf_resc_usage_query_input {
+	/* The HWRM command request type. */
+	uint16_t	req_type;
+	/*
+	 * The completion ring to send the completion event on. This should
+	 * be the NQ ID returned from the `nq_alloc` HWRM command.
+	 */
+	uint16_t	cmpl_ring;
+	/*
+	 * The sequence ID is used by the driver for tracking multiple
+	 * commands. This ID is treated as opaque data by the firmware and
+	 * the value is returned in the `hwrm_resp_hdr` upon completion.
+	 */
+	uint16_t	seq_id;
+	/*
+	 * The target ID of the command:
+	 * * 0x0-0xFFF8 - The function ID
+	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
+	 * * 0xFFFD - Reserved for user-space HWRM interface
+	 * * 0xFFFF - HWRM
+	 */
+	uint16_t	target_id;
+	/*
+	 * A physical address pointer pointing to a host buffer that the
+	 * command's response data will be written. This can be either a host
+	 * physical address (HPA) or a guest physical address (GPA) and must
+	 * point to a physically contiguous block of memory.
+	 */
+	uint64_t	resp_addr;
+	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
+	uint32_t	fw_session_id;
+	/* Control flags. */
+	uint16_t	flags;
+	/* Indicates the flow direction. */
+	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_FLAGS_DIR     UINT32_C(0x1)
+	/* If this bit set to 0, then it indicates rx flow. */
+	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
+	/* If this bit is set to 1, then it indicates tx flow. */
+	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
+	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_FLAGS_DIR_LAST \
+		HWRM_TF_RESC_USAGE_QUERY_INPUT_FLAGS_DIR_TX
+	/* unused. */
+	uint8_t	unused0[2];
+	/* Types of the resource to retrieve their usage state. */
+	uint16_t	types;
+	/* WC TCAM Pool */
+	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_TYPES_WC_TCAM \
+		UINT32_C(0x1)
+	/* EM Internal Memory Pool */
+	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_TYPES_EM \
+		UINT32_C(0x2)
+	/* Meter Instance */
+	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_TYPES_METER \
+		UINT32_C(0x4)
+	/* Counter Record Table */
+	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_TYPES_COUNTER \
+		UINT32_C(0x8)
+	/* Action Record Table */
+	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_TYPES_ACTION \
+		UINT32_C(0x10)
+	/* ACT MODIFY/ENCAP Record Table */
+	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_TYPES_ACT_MOD_ENCAP \
+		UINT32_C(0x20)
+	/* Source Property SMAC Record Table */
+	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_TYPES_SP_SMAC \
+		UINT32_C(0x40)
+	/* All Resource Types */
+	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_TYPES_ALL \
+		UINT32_C(0x80)
+	/* unused */
+	uint8_t	unused1[6];
+} __rte_packed;
+
+/* hwrm_tf_resc_usage_query_output (size:960b/120B) */
+struct hwrm_tf_resc_usage_query_output {
+	/* The specific error status for the command. */
+	uint16_t	error_code;
+	/* The HWRM command request type. */
+	uint16_t	req_type;
+	/* The sequence ID from the original command. */
+	uint16_t	seq_id;
+	/* The length of the response data in number of bytes. */
+	uint16_t	resp_len;
+	/* Response code. */
+	uint32_t	resp_code;
+	/* Response size. */
+	uint16_t	size;
+	/* unused */
+	uint16_t	unused0;
+	/* Response data. */
+	uint8_t	data[96];
+	/* unused */
+	uint8_t	unused1[7];
+	/*
+	 * This field is used in Output records to indicate that the output
+	 * is completely written to RAM. This field should be read as '1'
+	 * to indicate that the output has been completely written.
+	 * When writing a command completion or response to an internal
+	 * processor, the order of writes has to be such that this field
+	 * is written last.
+	 */
+	uint8_t	valid;
+} __rte_packed;
+
 /****************************
  * hwrm_tfc_tbl_scope_qcaps *
  ****************************/
diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c
index 9df2d2b937..349f52caba 100644
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c
+++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c
@@ -20,15 +20,6 @@
 
 #define TF_TCAM_SLICE_INVALID (-1)
 
-/*
- * The following macros are for setting the entry status in a row entry.
- * row is (struct cfa_tcam_mgr_table_rows_0 *)
- */
-#define ROW_ENTRY_INUSE(row, entry)  ((row)->entry_inuse &   (1U << (entry)))
-#define ROW_ENTRY_SET(row, entry)    ((row)->entry_inuse |=  (1U << (entry)))
-#define ROW_ENTRY_CLEAR(row, entry)  ((row)->entry_inuse &= ~(1U << (entry)))
-#define ROW_INUSE(row)               ((row)->entry_inuse != 0)
-
 static struct cfa_tcam_mgr_entry_data *entry_data[TF_TCAM_MAX_SESSIONS];
 
 static int global_data_initialized[TF_TCAM_MAX_SESSIONS];
@@ -685,6 +676,27 @@ cfa_tcam_mgr_rows_combine(int sess_idx, struct cfa_tcam_mgr_context *context,
 				if (entry_moved)
 					break;
 			}
+
+#ifdef TF_FLOW_SCALE_QUERY
+			/* CFA update usage state when moved entries */
+			if (entry_moved) {
+				if (tf_tcam_usage_update(context->tfp->session->session_id.id,
+							 parms->dir,
+							 parms->type,
+							 to_row,
+							 TF_RESC_ALLOC)) {
+					CFA_TCAM_MGR_TRACE(DEBUG, "TF tcam usage update failed\n");
+				}
+				if (tf_tcam_usage_update(context->tfp->session->session_id.id,
+							 parms->dir,
+							 parms->type,
+							 from_row,
+							 TF_RESC_FREE)) {
+					CFA_TCAM_MGR_TRACE(DEBUG, "TF tcam usage update failed\n");
+				}
+			}
+#endif /* TF_FLOW_SCALE_QUERY */
+
 			if (ROW_INUSE(from_row))
 				entry_moved = false;
 			else
@@ -1207,6 +1219,11 @@ cfa_tcam_mgr_bind(struct cfa_tcam_mgr_context *context,
 		return rc;
 	}
 
+#ifdef TF_FLOW_SCALE_QUERY
+	/* Initialize the WC TCAM usage state */
+	tf_tcam_usage_init(tfp);
+#endif /* TF_FLOW_SCALE_QUERY */
+
 	return 0;
 }
 
@@ -1352,6 +1369,17 @@ cfa_tcam_mgr_alloc(struct cfa_tcam_mgr_context *context,
 
 	parms->id = new_entry_id;
 
+#ifdef TF_FLOW_SCALE_QUERY
+	/* CFA update usage state */
+	if (tf_tcam_usage_update(session_id,
+				 parms->dir,
+				 parms->type,
+				 row,
+				 TF_RESC_ALLOC)) {
+		CFA_TCAM_MGR_TRACE(DEBUG, "TF tcam usage update failed\n");
+	}
+#endif /* TF_FLOW_SCALE_QUERY */
+
 	return 0;
 }
 
@@ -1443,6 +1471,17 @@ cfa_tcam_mgr_free(struct cfa_tcam_mgr_context *context,
 					    table_data->max_slices);
 		ROW_ENTRY_CLEAR(row, entry->slice);
 
+#ifdef TF_FLOW_SCALE_QUERY
+		/* CFA update usage state */
+		if (tf_tcam_usage_update(session_id,
+					 parms->dir,
+					 parms->type,
+					 row,
+					 TF_RESC_FREE)) {
+			CFA_TCAM_MGR_TRACE(DEBUG, "TF tcam usage update failed\n");
+		}
+#endif /* TF_FLOW_SCALE_QUERY */
+
 		new_row_to_free = entry->row;
 		cfa_tcam_mgr_rows_combine(sess_idx, context, parms, table_data,
 					  new_row_to_free);
diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_device.h b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_device.h
index 6ab9b5e118..c24e5c8389 100644
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_device.h
+++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_device.h
@@ -42,6 +42,15 @@ TF_TCAM_TABLE_ROWS_DEF(2);
 TF_TCAM_TABLE_ROWS_DEF(4);
 TF_TCAM_TABLE_ROWS_DEF(8);
 
+/*
+ * The following macros are for setting the entry status in a row entry.
+ * row is (struct cfa_tcam_mgr_table_rows_0 *)
+ */
+#define ROW_ENTRY_INUSE(row, entry)  ((row)->entry_inuse &   (1U << (entry)))
+#define ROW_ENTRY_SET(row, entry)    ((row)->entry_inuse |=  (1U << (entry)))
+#define ROW_ENTRY_CLEAR(row, entry)  ((row)->entry_inuse &= ~(1U << (entry)))
+#define ROW_INUSE(row)               ((row)->entry_inuse != 0)
+
 #define TF_TCAM_MAX_ENTRIES (L2_CTXT_TCAM_RX_MAX_ENTRIES +	\
 			     L2_CTXT_TCAM_TX_MAX_ENTRIES +	\
 			     PROF_TCAM_RX_MAX_ENTRIES +		\
diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_session.c b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_session.c
index 3d085bc69e..40bbcc54c8 100644
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_session.c
+++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_session.c
@@ -74,6 +74,19 @@ cfa_tcam_mgr_session_find(unsigned int session_id)
 	return -CFA_TCAM_MGR_ERR_CODE(INVAL);
 }
 
+int
+cfa_tcam_mgr_session_empty(void)
+{
+	unsigned int sess_idx;
+
+	for (sess_idx = 0; sess_idx < ARRAY_SIZE(session_data); sess_idx++) {
+		if (session_data[sess_idx].session_id)
+			return 0;
+	}
+
+	return 1;
+}
+
 int
 cfa_tcam_mgr_session_add(unsigned int session_id)
 {
diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_session.h b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_session.h
index 69311b7e1d..7e75776686 100644
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_session.h
+++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_session.h
@@ -19,6 +19,9 @@ cfa_tcam_mgr_get_session_from_context(struct cfa_tcam_mgr_context *context,
 int
 cfa_tcam_mgr_session_find(unsigned int session_id);
 
+int
+cfa_tcam_mgr_session_empty(void);
+
 int
 cfa_tcam_mgr_session_add(unsigned int session_id);
 
diff --git a/drivers/net/bnxt/tf_core/meson.build b/drivers/net/bnxt/tf_core/meson.build
index 13a71738a0..7d38ab8793 100644
--- a/drivers/net/bnxt/tf_core/meson.build
+++ b/drivers/net/bnxt/tf_core/meson.build
@@ -30,6 +30,7 @@ sources += files(
         'tf_msg.c',
         'tfp.c',
         'tf_rm.c',
+        'tf_resources.c',
         'tf_session.c',
         'tf_sram_mgr.c',
         'tf_tbl.c',
diff --git a/drivers/net/bnxt/tf_core/tf_core.c b/drivers/net/bnxt/tf_core/tf_core.c
index 3a812bee3a..1c728aadd8 100644
--- a/drivers/net/bnxt/tf_core/tf_core.c
+++ b/drivers/net/bnxt/tf_core/tf_core.c
@@ -1101,6 +1101,21 @@ tf_alloc_tbl_entry(struct tf *tfp,
 
 	parms->idx = idx;
 
+#ifdef TF_FLOW_SCALE_QUERY
+	/* Update resource usage buffer */
+	if (!rc && dev->ops->tf_dev_update_tbl_usage_buffer) {
+		rc = dev->ops->tf_dev_update_tbl_usage_buffer(tfs->session_id.id,
+							      parms->dir,
+							      parms->type,
+							      TF_RESC_ALLOC);
+		if (rc) {
+			TFP_DRV_LOG(DEBUG,
+				    "%s: Table usage update failed!\n",
+				    tf_dir_2_str(parms->dir));
+		}
+	}
+#endif /* TF_FLOW_SCALE_QUERY */
+
 	return 0;
 }
 
@@ -1181,6 +1196,22 @@ tf_free_tbl_entry(struct tf *tfp,
 			return rc;
 		}
 	}
+
+#ifdef TF_FLOW_SCALE_QUERY
+	/* Update resource usage buffer */
+	if (!rc && dev->ops->tf_dev_update_tbl_usage_buffer) {
+		rc = dev->ops->tf_dev_update_tbl_usage_buffer(tfs->session_id.id,
+							      parms->dir,
+							      parms->type,
+							      TF_RESC_FREE);
+		if (rc) {
+			TFP_DRV_LOG(DEBUG,
+				    "%s: Table usage update failed!\n",
+				    tf_dir_2_str(parms->dir));
+		}
+	}
+#endif /* TF_FLOW_SCALE_QUERY */
+
 	return 0;
 }
 
@@ -2027,3 +2058,122 @@ int tf_get_session_hotup_state(struct tf *tfp,
 
 	return rc;
 }
+
+#ifdef TF_FLOW_SCALE_QUERY
+/* Update TF resource usage state with firmware */
+int tf_update_resc_usage(struct tf *tfp,
+			 enum tf_dir dir,
+			 enum tf_flow_resc_type flow_resc_type)
+{
+	int rc;
+	struct tf_session *tfs;
+	struct tf_dev_info *dev;
+	TF_CHECK_PARMS1(tfp);
+
+	/* Retrieve the session information */
+	rc = tf_session_get_session(tfp, &tfs);
+	if (rc) {
+		TFP_DRV_LOG(ERR,
+			    "%s: Failed to lookup session, rc:%s\n",
+			    tf_dir_2_str(dir),
+			    strerror(-rc));
+		return rc;
+	}
+
+	/* Retrieve the device information */
+	rc = tf_session_get_device(tfs, &dev);
+	if (rc) {
+		TFP_DRV_LOG(ERR,
+			    "%s: Failed to lookup device, rc:%s\n",
+			    tf_dir_2_str(dir),
+			    strerror(-rc));
+		return rc;
+	}
+
+	/* Support Thor(P5) on the first session */
+	if (dev->type != TF_DEVICE_TYPE_P5 || tfs->session_id.internal.fw_session_id)
+		return rc;
+
+	if (dev->ops->tf_dev_update_resc_usage == NULL) {
+		rc = -EOPNOTSUPP;
+		TFP_DRV_LOG(ERR,
+			    "%s: Operation not supported, rc:%s\n",
+			    tf_dir_2_str(dir),
+			    strerror(-rc));
+		return rc;
+	}
+
+	rc = dev->ops->tf_dev_update_resc_usage(tfp, dir, flow_resc_type);
+	if (rc) {
+		TFP_DRV_LOG(ERR,
+			    "%s: Flow resource usage update failed, rc:%s\n",
+			    tf_dir_2_str(dir),
+			    strerror(-rc));
+		return rc;
+	}
+
+	TFP_DRV_LOG(DEBUG,
+		    "%s: Flow resource usage updated: usage type %d\n",
+		    tf_dir_2_str(dir), flow_resc_type);
+
+	return 0;
+}
+
+/* Get TF resource usage state from firmware*/
+int tf_query_resc_usage(struct tf *tfp,
+			struct tf_query_resc_usage_parms *parms)
+{
+	int rc;
+	struct tf_session *tfs;
+	struct tf_dev_info *dev;
+
+	TF_CHECK_PARMS2(tfp, parms);
+
+	/* Retrieve the session information */
+	rc = tf_session_get_session(tfp, &tfs);
+	if (rc) {
+		TFP_DRV_LOG(ERR,
+			    "%s: Failed to lookup session, rc:%s\n",
+			    tf_dir_2_str(parms->dir),
+			    strerror(-rc));
+		return rc;
+	}
+
+	/* Retrieve the device information */
+	rc = tf_session_get_device(tfs, &dev);
+	if (rc) {
+		TFP_DRV_LOG(ERR,
+			    "%s: Failed to lookup device, rc:%s\n",
+			    tf_dir_2_str(parms->dir),
+			    strerror(-rc));
+		return rc;
+	}
+
+	/* Support Thor(P5) on the first session */
+	if (dev->type != TF_DEVICE_TYPE_P5 || tfs->session_id.internal.fw_session_id)
+		return rc;
+
+	if (dev->ops->tf_dev_query_resc_usage == NULL) {
+		rc = -EOPNOTSUPP;
+		TFP_DRV_LOG(ERR,
+			    "%s: Operation not supported, rc:%s\n",
+			    tf_dir_2_str(parms->dir),
+			    strerror(-rc));
+		return rc;
+	}
+
+	rc = dev->ops->tf_dev_query_resc_usage(tfp, parms);
+	if (rc) {
+		TFP_DRV_LOG(ERR,
+			    "%s: Flow resource usage query failed, rc:%s\n",
+			    tf_dir_2_str(parms->dir),
+			    strerror(-rc));
+		return rc;
+	}
+
+	TFP_DRV_LOG(DEBUG,
+		    "%s: Flow resource usage query successfully: usage type %d\n",
+		    tf_dir_2_str(parms->dir), parms->flow_resc_type);
+	return 0;
+}
+#endif /* TF_FLOW_SCALE_QUERY */
diff --git a/drivers/net/bnxt/tf_core/tf_core.h b/drivers/net/bnxt/tf_core/tf_core.h
index fd1ee2f454..90637c6508 100644
--- a/drivers/net/bnxt/tf_core/tf_core.h
+++ b/drivers/net/bnxt/tf_core/tf_core.h
@@ -2584,4 +2584,56 @@ struct tf_get_sram_policy_parms {
  */
 int tf_get_sram_policy(struct tf *tfp,
 		       struct tf_get_sram_policy_parms *parms);
+
+#ifdef TF_FLOW_SCALE_QUERY
+enum tf_flow_resc_type {
+	TF_FLOW_RESC_TYPE_WCTCAM,
+	TF_FLOW_RESC_TYPE_EM,
+	TF_FLOW_RESC_TYPE_METER,
+	TF_FLOW_RESC_TYPE_COUNTER,
+	TF_FLOW_RESC_TYPE_ACTION,
+	TF_FLOW_RESC_TYPE_ACT_MOD_ENCAP,
+	TF_FLOW_RESC_TYPE_SP_SMAC,
+	TF_FLOW_RESC_TYPE_ALL,
+};
+
+/**
+ * Update TF resource usage state with firmware
+ *
+ * Returns success or failure code.
+ */
+int tf_update_resc_usage(struct tf *tfp,
+			 enum tf_dir dir,
+			 enum tf_flow_resc_type flow_resc_type);
+
+/**
+ * tf_query_resc_usage parameter definition
+ */
+struct	tf_query_resc_usage_parms {
+	/**
+	 * [in] receive or transmit direction
+	 */
+	enum tf_dir dir;
+	/**
+	 * [in] RESC type
+	 */
+	enum tf_flow_resc_type flow_resc_type;
+	/**
+	 * [in] received buffer size
+	 */
+	uint32_t size;
+	/**
+	 * [out] buffer for query data
+	 */
+	uint8_t data[96];
+};
+/**
+ * Get TF resource usage state from firmware
+ *
+ * Returns success or failure code.
+ */
+int tf_query_resc_usage(struct tf *tfp,
+			struct tf_query_resc_usage_parms *parms);
+
+#endif /* TF_FLOW_SCALE_QUERY */
 #endif /* _TF_CORE_H_ */
diff --git a/drivers/net/bnxt/tf_core/tf_device.h b/drivers/net/bnxt/tf_core/tf_device.h
index 06c17a7212..0b0ca8b42f 100644
--- a/drivers/net/bnxt/tf_core/tf_device.h
+++ b/drivers/net/bnxt/tf_core/tf_device.h
@@ -1127,6 +1127,71 @@ struct tf_dev_ops {
 	 */
 	int (*tf_dev_get_sram_policy)(enum tf_dir dir,
 				      enum tf_sram_bank_id *bank_id);
+
+#ifdef TF_FLOW_SCALE_QUERY
+	/**
+	 * Update resource usage state with firmware
+	 *
+	 * [in] tfp
+	 *   Pointer to TF handle
+	 *
+	 * [in] dir
+	 *   Receive or transmit direction
+	 *
+	 * [in] flow_resc_type
+	 *   Resource type to update its usage state
+	 *
+	 *    returns:
+	 *    0       - Success
+	 *    -EINVAL - Error
+	 */
+	int (*tf_dev_update_resc_usage)(struct tf *tfp,
+					enum tf_dir dir,
+					enum tf_flow_resc_type flow_resc_type);
+
+	/**
+	 * Query resource usage state from firmware
+	 *
+	 * [in] tfp
+	 *   Pointer to TF handle
+	 *
+	 * [in] dir
+	 *   Receive or transmit direction
+	 *
+	 * [in] flow_resc_type
+	 *   Resource type to query its usage state
+	 *
+	 *    returns:
+	 *    0       - Success
+	 *    -EINVAL - Error
+	 */
+	int (*tf_dev_query_resc_usage)(struct tf *tfp,
+				       struct tf_query_resc_usage_parms *parms);
+
+	/**
+	 * Update buffer of table usage
+	 *
+	 * [in] session_id
+	 *   The TruFlow session id
+	 *
+	 * [in] dir
+	 *   Receive or transmit direction
+	 *
+	 * [in] tbl_type
+	 *   SRAM table type to update its usage state
+	 *
+	 * [in] resc_opt
+	 *   Alloca or free resource
+	 *
+	 *    returns:
+	 *    0       - Success
+	 *    -EINVAL - Error
+	 */
+	int (*tf_dev_update_tbl_usage_buffer)(uint32_t session_id,
+					      enum tf_dir dir,
+					      enum tf_tbl_type tbl_type,
+					      uint32_t resc_opt);
+#endif /* TF_FLOW_SCALE_QUERY */
 };
 
 /**
diff --git a/drivers/net/bnxt/tf_core/tf_device_p4.c b/drivers/net/bnxt/tf_core/tf_device_p4.c
index 4df1918bc5..6f6526e552 100644
--- a/drivers/net/bnxt/tf_core/tf_device_p4.c
+++ b/drivers/net/bnxt/tf_core/tf_device_p4.c
@@ -512,6 +512,11 @@ const struct tf_dev_ops tf_dev_ops_p4_init = {
 	.tf_dev_get_sram_resources = NULL,
 	.tf_dev_set_sram_policy = NULL,
 	.tf_dev_get_sram_policy = NULL,
+#ifdef TF_FLOW_SCALE_QUERY
+	.tf_dev_update_resc_usage = NULL,
+	.tf_dev_query_resc_usage = NULL,
+	.tf_dev_update_tbl_usage_buffer = NULL,
+#endif /* TF_FLOW_SCALE_QUERY */
 };
 
 /**
@@ -570,4 +575,9 @@ const struct tf_dev_ops tf_dev_ops_p4 = {
 	.tf_dev_get_sram_resources = NULL,
 	.tf_dev_set_sram_policy = NULL,
 	.tf_dev_get_sram_policy = NULL,
+#ifdef TF_FLOW_SCALE_QUERY
+	.tf_dev_update_resc_usage = NULL,
+	.tf_dev_query_resc_usage = NULL,
+	.tf_dev_update_tbl_usage_buffer = NULL,
+#endif /* TF_FLOW_SCALE_QUERY */
 };
diff --git a/drivers/net/bnxt/tf_core/tf_device_p58.c b/drivers/net/bnxt/tf_core/tf_device_p58.c
index 51c260b5d7..8f915744a7 100644
--- a/drivers/net/bnxt/tf_core/tf_device_p58.c
+++ b/drivers/net/bnxt/tf_core/tf_device_p58.c
@@ -15,8 +15,10 @@
 #include "tf_if_tbl.h"
 #include "tfp.h"
 #include "tf_msg_common.h"
+ #include "tf_msg.h"
 #include "tf_tbl_sram.h"
 #include "tf_util.h"
+#include "tf_resources.h"
 
 #define TF_DEV_P58_PARIF_MAX 16
 #define TF_DEV_P58_PF_MASK 0xfUL
@@ -781,6 +783,99 @@ static int tf_dev_p58_get_sram_policy(enum tf_dir dir,
 	return 0;
 }
 
+#ifdef TF_FLOW_SCALE_QUERY
+/**
+ * Update resource usage to firmware.
+ *
+ * [in] tfp
+ *   Pointer to TF handle
+ *
+ * [in] dir
+ *   Receive or transmit direction
+ *
+ * [in] flow_resc_type
+ *   Types of the resource to update their usage state.
+ *
+ * Returns
+ *   - (0) if successful.
+ *   - (-EINVAL) on failure.
+ */
+static int tf_dev_p58_update_resc_usage(struct tf *tfp,
+					enum tf_dir dir,
+					enum tf_flow_resc_type flow_resc_type)
+{
+	int rc;
+
+	struct cfa_tf_resc_usage *usage_state = &tf_resc_usage[dir];
+
+	flow_resc_type |= HWRM_TF_RESC_USAGE_SET_INPUT_TYPES_ALL;
+	rc = tf_msg_set_resc_usage(tfp,
+				   dir,
+				   flow_resc_type,
+				   sizeof(cfa_tf_resc_usage_t),
+				   (uint8_t *)usage_state);
+
+	return rc;
+}
+
+/**
+ * Query resource usage from firmware.
+ *
+ * [in] tfp
+ *   Pointer to TF handle
+ *
+ * [in/out] parms
+ *   Pointer to parms structure
+ *
+ * Returns
+ *   - (0) if successful.
+ *   - (-EINVAL) on failure.
+ */
+static int tf_dev_p58_query_resc_usage(struct tf *tfp,
+				       struct tf_query_resc_usage_parms *parms)
+{
+	int rc = 0;
+
+	parms->size = sizeof(struct cfa_tf_resc_usage);
+	rc = tf_msg_query_resc_usage(tfp,
+				     parms->dir,
+				     parms->flow_resc_type,
+				     &parms->size,
+				     (void *)parms->data);
+	return rc;
+}
+
+/**
+ * Update buffer of table usage state
+ *
+ * [in] session_id
+ *   Pointer to TF handle
+ *
+ * [in] dir
+ *   Receive or transmit direction
+ *
+ * [in] tbl_type
+ *   SRAM table type to update its usage state
+ *
+ * [in] resc_opt
+ *   Alloca or free resource
+ *
+ *    returns:
+ *    0       - Success
+ *    -EINVAL - Error
+ */
+static int
+tf_dev_p58_update_tbl_usage_buffer(uint32_t session_id,
+				   enum tf_dir dir,
+				   enum tf_tbl_type tbl_type,
+				   enum tf_resc_opt resc_opt)
+{
+	int rc;
+	rc = tf_tbl_usage_update(session_id, dir, tbl_type, resc_opt);
+	return rc;
+}
+#endif /* TF_FLOW_SCALE_QUERY */
+
 /**
  * Truflow P58 device specific functions
  */
@@ -835,6 +930,11 @@ const struct tf_dev_ops tf_dev_ops_p58_init = {
 	.tf_dev_get_sram_resources = tf_dev_p58_get_sram_resources,
 	.tf_dev_set_sram_policy = tf_dev_p58_set_sram_policy,
 	.tf_dev_get_sram_policy = tf_dev_p58_get_sram_policy,
+#ifdef TF_FLOW_SCALE_QUERY
+	.tf_dev_update_resc_usage = tf_dev_p58_update_resc_usage,
+	.tf_dev_query_resc_usage = tf_dev_p58_query_resc_usage,
+	.tf_dev_update_tbl_usage_buffer = tf_dev_p58_update_tbl_usage_buffer,
+#endif /* TF_FLOW_SCALE_QUERY */
 };
 
 /**
@@ -894,4 +994,9 @@ const struct tf_dev_ops tf_dev_ops_p58 = {
 	.tf_dev_get_sram_resources = tf_dev_p58_get_sram_resources,
 	.tf_dev_set_sram_policy = tf_dev_p58_set_sram_policy,
 	.tf_dev_get_sram_policy = tf_dev_p58_get_sram_policy,
+#ifdef TF_FLOW_SCALE_QUERY
+	.tf_dev_update_resc_usage = tf_dev_p58_update_resc_usage,
+	.tf_dev_query_resc_usage = tf_dev_p58_query_resc_usage,
+	.tf_dev_update_tbl_usage_buffer = tf_dev_p58_update_tbl_usage_buffer,
+#endif /* TF_FLOW_SCALE_QUERY */
 };
diff --git a/drivers/net/bnxt/tf_core/tf_em_hash_internal.c b/drivers/net/bnxt/tf_core/tf_em_hash_internal.c
index cb8da0e370..35589c9844 100644
--- a/drivers/net/bnxt/tf_core/tf_em_hash_internal.c
+++ b/drivers/net/bnxt/tf_core/tf_em_hash_internal.c
@@ -108,6 +108,15 @@ tf_em_hash_insert_int_entry(struct tf *tfp,
 				     rptr_entry,
 				     0);
 	dpool_set_entry_data(pool, index, parms->flow_handle);
+
+#ifdef TF_FLOW_SCALE_QUERY
+	/* Update usage state buffer for EM */
+	tf_em_usage_update(tfs->session_id.id,
+			   parms->dir,
+			   num_of_entries,
+			   TF_RESC_ALLOC);
+#endif /* TF_FLOW_SCALE_QUERY */
+
 	return 0;
 }
 
@@ -124,6 +133,10 @@ tf_em_hash_delete_int_entry(struct tf *tfp,
 	int rc = 0;
 	struct tf_session *tfs;
 	struct dpool *pool;
+#ifdef TF_FLOW_SCALE_QUERY
+	uint32_t size;
+#endif /* TF_FLOW_SCALE_QUERY */
+
 	/* Retrieve the session information */
 	rc = tf_session_get_session(tfp, &tfs);
 	if (rc) {
@@ -137,11 +150,18 @@ tf_em_hash_delete_int_entry(struct tf *tfp,
 	rc = tf_msg_delete_em_entry(tfp, parms);
 
 	/* Return resource to pool */
-	if (rc == 0) {
-		pool = (struct dpool *)tfs->em_pool[parms->dir];
-		dpool_free(pool, parms->index);
-	}
+	pool = (struct dpool *)tfs->em_pool[parms->dir];
+
+#ifdef TF_FLOW_SCALE_QUERY
+	/* Update usage state buffer for EM */
+	size = DP_FLAGS_SIZE(pool->entry[parms->index - pool->start_index].flags);
+	tf_em_usage_update(tfs->session_id.id,
+			   parms->dir,
+			   size,
+			   TF_RESC_FREE);
+#endif /* TF_FLOW_SCALE_QUERY */
 
+	dpool_free(pool, parms->index);
 	return rc;
 }
 
diff --git a/drivers/net/bnxt/tf_core/tf_em_internal.c b/drivers/net/bnxt/tf_core/tf_em_internal.c
index 46de63a9da..6dfefce2f2 100644
--- a/drivers/net/bnxt/tf_core/tf_em_internal.c
+++ b/drivers/net/bnxt/tf_core/tf_em_internal.c
@@ -293,6 +293,13 @@ tf_em_int_bind(struct tf *tfp,
 			/* Logging handled in tf_create_em_pool */
 			if (rc)
 				return rc;
+
+#ifdef TF_FLOW_SCALE_QUERY
+			/* Initialize the usage state buffer for EM */
+			tf_em_usage_init(tfs->session_id.id,
+					 i,
+					 iparms.info->entry.stride);
+#endif /* TF_FLOW_SCALE_QUERY */
 		}
 
 		if (rc) {
diff --git a/drivers/net/bnxt/tf_core/tf_msg.c b/drivers/net/bnxt/tf_core/tf_msg.c
index 1ef828a1e9..f2d2de859c 100644
--- a/drivers/net/bnxt/tf_core/tf_msg.c
+++ b/drivers/net/bnxt/tf_core/tf_msg.c
@@ -1995,3 +1995,178 @@ tf_msg_session_get_hotup_state(struct tf *tfp,
 
 	return rc;
 }
+
+#ifdef TF_FLOW_SCALE_QUERY
+/* Send set resource usage request to the firmware. */
+int
+tf_msg_set_resc_usage(struct tf *tfp,
+		      enum tf_dir dir,
+		      uint32_t resc_types,
+		      uint32_t size,
+		      uint8_t *data)
+{
+	int rc;
+	struct hwrm_tf_resc_usage_set_input req = { 0 };
+	struct hwrm_tf_resc_usage_set_output resp = { 0 };
+	struct tfp_send_msg_parms parms = { 0 };
+	struct tf_msg_dma_buf buf = { 0 };
+	uint8_t fw_session_id;
+	struct tf_dev_info *dev;
+	struct tf_session *tfs;
+
+	/* Retrieve the session information */
+	rc = tf_session_get_session_internal(tfp, &tfs);
+	if (rc) {
+		TFP_DRV_LOG(ERR,
+			    "%s: Failed to lookup session, rc:%s\n",
+			    tf_dir_2_str(dir),
+			    strerror(-rc));
+		return rc;
+	}
+
+	/* Retrieve the device information */
+	rc = tf_session_get_device(tfs, &dev);
+	if (rc) {
+		TFP_DRV_LOG(ERR,
+			    "%s: Failed to lookup device, rc:%s\n",
+			    tf_dir_2_str(dir),
+			    strerror(-rc));
+		return rc;
+	}
+
+	rc = tf_session_get_fw_session_id(tfp, &fw_session_id);
+	if (rc) {
+		TFP_DRV_LOG(ERR,
+			    "%s: Unable to lookup FW id, rc:%s\n",
+			    tf_dir_2_str(dir),
+			    strerror(-rc));
+		return rc;
+	}
+
+	/* Populate the request */
+	req.fw_session_id = tfp_cpu_to_le_32(fw_session_id);
+	req.flags = tfp_cpu_to_le_16(dir);
+	req.types = tfp_cpu_to_le_32(resc_types);
+	req.size = tfp_cpu_to_le_16(size);
+#if (TF_RM_MSG_DEBUG == 1)
+	/* Dump data */
+	dump_tf_resc_usage(dir, data, size);
+#endif /* (TF_RM_MSG_DEBUG == 1) */
+	/* Check for data size conformity */
+	if (size > sizeof(req.data)) {
+		/* use dma buffer */
+		req.flags |= HWRM_TF_RESC_USAGE_SET_INPUT_FLAGS_DMA;
+		rc = tf_msg_alloc_dma_buf(&buf, size);
+		if (rc)
+			goto exit;
+		tfp_memcpy(buf.va_addr, data, size);
+		tfp_memcpy(&req.data[0],
+			   &buf.pa_addr,
+			   sizeof(buf.pa_addr));
+	} else {
+		tfp_memcpy(&req.data, data, size);
+	}
+
+	parms.tf_type = HWRM_TF_RESC_USAGE_SET;
+	parms.req_data = (uint32_t *)&req;
+	parms.req_size = sizeof(req);
+	parms.resp_data = (uint32_t *)&resp;
+	parms.resp_size = sizeof(resp);
+	parms.mailbox = dev->ops->tf_dev_get_mailbox();
+
+	rc = tfp_send_msg_direct(tf_session_get_bp(tfp),
+				 &parms);
+
+	/* Free dma buffer */
+	if (size > sizeof(req.data))
+		tf_msg_free_dma_buf(&buf);
+exit:
+	return rc;
+}
+
+/* Send query resource usage request to the firmware. */
+int tf_msg_query_resc_usage(struct tf *tfp,
+			    enum tf_dir dir,
+			    uint32_t resc_types,
+			    uint32_t *size,
+			    uint8_t *data)
+{
+	int rc;
+	struct hwrm_tf_resc_usage_query_input req = { 0 };
+	struct hwrm_tf_resc_usage_query_output resp = { 0 };
+	struct tfp_send_msg_parms parms = { 0 };
+	uint8_t fw_session_id;
+	struct tf_dev_info *dev;
+	struct tf_session *tfs;
+	uint32_t flags = 0;
+
+	/* Retrieve the session information */
+	rc = tf_session_get_session_internal(tfp, &tfs);
+	if (rc) {
+		TFP_DRV_LOG(ERR,
+			    "%s: Failed to lookup session, rc:%s\n",
+			    tf_dir_2_str(dir),
+			    strerror(-rc));
+		return rc;
+	}
+
+	/* Retrieve the device information */
+	rc = tf_session_get_device(tfs, &dev);
+	if (rc) {
+		TFP_DRV_LOG(ERR,
+			    "%s: Failed to lookup device, rc:%s\n",
+			    tf_dir_2_str(dir),
+			    strerror(-rc));
+		return rc;
+	}
+
+	rc = tf_session_get_fw_session_id(tfp, &fw_session_id);
+	if (rc) {
+		TFP_DRV_LOG(ERR,
+			    "%s: Unable to lookup FW id, rc:%s\n",
+			    tf_dir_2_str(dir),
+			    strerror(-rc));
+		return rc;
+	}
+	flags = (dir == TF_DIR_TX ?
+		 HWRM_TF_RESC_USAGE_QUERY_INPUT_FLAGS_DIR_TX :
+		 HWRM_TF_RESC_USAGE_QUERY_INPUT_FLAGS_DIR_RX);
+
+	/* Populate the request */
+	req.fw_session_id = tfp_cpu_to_le_32(fw_session_id);
+	req.flags = tfp_cpu_to_le_16(flags);
+	req.types = tfp_cpu_to_le_32(resc_types);
+
+	parms.tf_type = HWRM_TF_RESC_USAGE_QUERY;
+	parms.req_data = (uint32_t *)&req;
+	parms.req_size = sizeof(req);
+	parms.resp_data = (uint32_t *)&resp;
+	parms.resp_size = sizeof(resp);
+	parms.mailbox = dev->ops->tf_dev_get_mailbox();
+
+	rc = tfp_send_msg_direct(tf_session_get_bp(tfp),
+				 &parms);
+	if (rc)
+		return rc;
+
+	/* The response size should be less than or equal to (<=) the input buffer size. */
+	if (resp.size > *size)
+		return -EINVAL;
+
+	*size = resp.size;
+
+	/*
+	 * Copy the requested number of bytes
+	 */
+	tfp_memcpy(data,
+		   &resp.data,
+		   resp.size);
+
+#if (TF_RM_MSG_DEBUG == 1)
+	/* dump data */
+	dump_tf_resc_usage(dir, data, resp.size);
+#endif /* (TF_RM_MSG_DEBUG == 1) */
+
+	return 0;
+}
+#endif /* TF_FLOW_SCALE_QUERY */
diff --git a/drivers/net/bnxt/tf_core/tf_msg.h b/drivers/net/bnxt/tf_core/tf_msg.h
index 24d0ae5f43..f3364c1518 100644
--- a/drivers/net/bnxt/tf_core/tf_msg.h
+++ b/drivers/net/bnxt/tf_core/tf_msg.h
@@ -797,4 +797,61 @@ int
 tf_msg_session_get_hotup_state(struct tf *tfp,
 			       uint16_t *state,
 			       uint16_t *ref_cnt);
+
+#ifdef TF_FLOW_SCALE_QUERY
+/**
+ * Send set resource usage request to the firmware.
+ *
+ * [in] tfp
+ *   Pointer to session handle
+ *
+ * [in] dir
+ *   Receive or Transmit direction
+ *
+ * [in] resc_types
+ *   Type of resource to update its usage state
+ *
+ * [in] size
+ *   The size of data buffer
+ *
+ * [in] data
+ *   Pointer of the resource usage state
+ *
+ * Returns:
+ *  0 on Success else internal Truflow error
+ */
+int tf_msg_set_resc_usage(struct tf *tfp,
+			  enum tf_dir dir,
+			  uint32_t resc_types,
+			  uint32_t size,
+			  uint8_t *data);
+
+/**
+ * Send query resource usage request to the firmware.
+ *
+ * [in] tfp
+ *   Pointer to session handle
+ *
+ * [in] dir
+ *   Receive or Transmit direction
+ *
+ * [in] resc_types
+ *   Type of resource to update its usage state
+ *
+ * [in/out] size
+ *   Pointer to the size of data buffer
+ *
+ * [out] data
+ *   Pointer of the resource usage state
+ *
+ * Returns:
+ *  0 on Success else internal Truflow error
+ */
+int tf_msg_query_resc_usage(struct tf *tfp,
+			    enum tf_dir dir,
+			    uint32_t resc_types,
+			    uint32_t *size,
+			    uint8_t *data);
+#endif /* TF_FLOW_SCALE_QUERY */
+
 #endif  /* _TF_MSG_H_ */
diff --git a/drivers/net/bnxt/tf_core/tf_resources.c b/drivers/net/bnxt/tf_core/tf_resources.c
new file mode 100644
index 0000000000..4c64d23b86
--- /dev/null
+++ b/drivers/net/bnxt/tf_core/tf_resources.c
@@ -0,0 +1,608 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2019-2023 Broadcom
+ * All rights reserved.
+ */
+
+/* Truflow Table APIs and supporting code */
+
+#include <rte_common.h>
+
+#include "tf_tbl.h"
+#include "tf_common.h"
+#include "tf_rm.h"
+#include "tf_util.h"
+#include "tf_msg.h"
+#include "tfp.h"
+#include "tf_session.h"
+#include "tf_device.h"
+#include "cfa_tcam_mgr_device.h"
+#include "cfa_tcam_mgr_session.h"
+
+#ifdef TF_FLOW_SCALE_QUERY
+
+/* Logging defines */
+#define TF_FLOW_SCALE_QUERY_DEBUG 0
+
+/* global data stored in firmware memory and TruFlow driver*/
+struct cfa_tf_resc_usage tf_resc_usage[TF_DIR_MAX];
+
+struct tf_resc_usage_buffer_control {
+	enum tf_device_type device_type;
+	bool fw_sync_paused;
+	uint32_t buffer_dirty[TF_DIR_MAX];
+};
+
+static struct tf_resc_usage_buffer_control resc_usage_control;
+
+/* Check if supporting resource usage */
+static bool tf_resc_usage_support(int session_id)
+{
+	bool support = true;
+	int sess_idx;
+
+	/* Not valid session id */
+	if (!session_id)
+		return false;
+
+	/* Support Generic template with one session */
+	sess_idx = cfa_tcam_mgr_session_find(session_id);
+	if (sess_idx < 0 && !cfa_tcam_mgr_session_empty())
+		support = false;
+
+	/* Support Thor */
+	if (resc_usage_control.device_type != TF_DEVICE_TYPE_P5)
+		support = false;
+
+#if (TF_FLOW_SCALE_QUERY_DEBUG == 1)
+	TFP_DRV_LOG(INFO, "Resc usage update sess_id: %x, idx: %d, type: %d, allow: %s\n",
+			 session_id,
+			 sess_idx,
+			 resc_usage_control.device_type,
+			 support ? "True" : "False");
+#endif /* TF_FLOW_SCALE_QUERY_DEBUG == 1 */
+	return support;
+}
+
+/* Reset the resource usage buffer */
+void tf_resc_usage_reset(enum tf_device_type type, int session_id)
+{
+	/* Check if supported on this device */
+	if (cfa_tcam_mgr_session_find(session_id) > 0)
+		return;
+
+	/* Support Thor only*/
+	if (type != TF_DEVICE_TYPE_P5)
+		return;
+
+	resc_usage_control.fw_sync_paused = false;
+	resc_usage_control.device_type = type;
+	resc_usage_control.buffer_dirty[TF_DIR_RX] = 1;
+	resc_usage_control.buffer_dirty[TF_DIR_TX] = 1;
+	memset(tf_resc_usage, 0, sizeof(tf_resc_usage));
+}
+
+/* Check the bumber of the used slices in a row */
+static int
+tf_tcam_mgr_row_entry_used(struct cfa_tcam_mgr_table_rows_0 *row,
+			    int max_slices)
+{
+	int used = 0, j;
+
+	for (j = 0; j < (max_slices / row->entry_size); j++) {
+		if (ROW_ENTRY_INUSE(row, j))
+			used++;
+	}
+	return used;
+}
+
+/* Initialize the resource usage buffer for WC-TCAM tables */
+void tf_tcam_usage_init(int session_id)
+{
+	enum tf_dir dir;
+	enum cfa_tcam_mgr_tbl_type type = CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS;
+	struct cfa_tcam_mgr_table_data *table_data = NULL;
+	struct tf_resc_wc_tcam_usage *usage_data = NULL;
+	int sess_idx = cfa_tcam_mgr_session_find(session_id);
+
+	/* Check if supported on this device */
+	if (!tf_resc_usage_support(session_id))
+		return;
+
+	/* Iterate over all directions */
+	for (dir = 0; dir < TF_DIR_MAX; dir++) {
+		table_data = &cfa_tcam_mgr_tables[sess_idx][dir][type];
+		usage_data = &tf_resc_usage[dir].wc_tcam_usage;
+
+		/* cfa_tcam_mgr_table_dump(session_id, dir, type); */
+		memset(usage_data, 0, sizeof(*usage_data));
+		if (table_data->start_row != table_data->end_row)
+			usage_data->max_row_number = table_data->end_row -
+						     table_data->start_row + 1;
+		usage_data->unused_row_number = usage_data->max_row_number;
+
+#if (TF_FLOW_SCALE_QUERY_DEBUG == 1)
+		/* dump usage data */
+		CFA_TCAM_MGR_LOG(INFO, "WC-TCAM:  1-p  1-f  2-p  2-f  4-f  free-rows\n");
+		CFA_TCAM_MGR_LOG(INFO, "%s         %-4d %-4d %-4d %-4d %-4d %-4d\n",
+				 (dir == TF_DIR_RX) ? "RX" : "TX",
+				 usage_data->slice_row_1_p_used,
+				 usage_data->slice_row_1_f_used,
+				 usage_data->slice_row_2_p_used,
+				 usage_data->slice_row_2_f_used,
+				 usage_data->slice_row_4_used,
+				 usage_data->unused_row_number);
+#endif
+	}
+}
+
+/* Update wc-tcam table resoure usage */
+int tf_tcam_usage_update(int session_id,
+			 enum tf_dir dir,
+			 int tcam_tbl_type,
+			 void *data,
+			 enum tf_resc_opt resc_opt)
+{
+	struct tf_resc_wc_tcam_usage *usage_data;
+	int used_entries;
+	struct cfa_tcam_mgr_table_rows_0 *key_row = (struct cfa_tcam_mgr_table_rows_0 *)data;
+	int key_slices = key_row->entry_size;
+
+	/* Check if supported on this device */
+	if (!tf_resc_usage_support(session_id))
+		return -1;
+
+	/* Support WC-TCAM APPs only */
+	if (tcam_tbl_type != CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS)
+		return 0;
+
+	resc_usage_control.buffer_dirty[dir] = 1;
+	usage_data = &tf_resc_usage[dir].wc_tcam_usage;
+	if (resc_opt == TF_RESC_ALLOC) {
+		switch (key_slices) {
+		case 4:
+			usage_data->unused_row_number -= 1;
+			usage_data->slice_row_4_used += 1;
+			break;
+		case 2:
+			used_entries = tf_tcam_mgr_row_entry_used(key_row, 4);
+			if (used_entries == 2) {
+				usage_data->slice_row_2_p_used -= 1;
+				usage_data->slice_row_2_f_used += 1;
+			} else {
+				usage_data->unused_row_number -= 1;
+				usage_data->slice_row_2_p_used += 1;
+			}
+			break;
+		case 1:
+			used_entries = tf_tcam_mgr_row_entry_used(key_row, 4);
+			if (used_entries == 4) {
+				usage_data->slice_row_1_p_used -= 1;
+				usage_data->slice_row_1_f_used += 1;
+			} else if (used_entries == 1) {
+				usage_data->slice_row_1_p_used += 1;
+				usage_data->unused_row_number -= 1;
+			}
+			break;
+		default:
+			CFA_TCAM_MGR_LOG(ERR, "CFA invalid size of key slices: %d\n", key_slices);
+			break;
+		}
+	} else { /* free one entry */
+		switch (key_slices) {
+		case 4:
+			usage_data->unused_row_number += 1;
+			usage_data->slice_row_4_used -= 1;
+			break;
+		case 2:
+			if (!ROW_INUSE(key_row)) {  /* empty */
+				usage_data->unused_row_number += 1;
+				usage_data->slice_row_2_p_used -= 1;
+			} else {
+				usage_data->slice_row_2_p_used += 1;
+				usage_data->slice_row_2_f_used -= 1;
+			}
+			break;
+		case 1:
+			used_entries = tf_tcam_mgr_row_entry_used(key_row, 4);
+			if (!ROW_INUSE(key_row)) {  /* empty */
+				usage_data->unused_row_number += 1;
+				usage_data->slice_row_1_p_used -= 1;
+			} else if (used_entries == 3) {
+				usage_data->slice_row_1_f_used -= 1;
+				usage_data->slice_row_1_p_used += 1;
+			}
+			break;
+		default:
+			CFA_TCAM_MGR_LOG(ERR, "CFA invalid size of key slices: %d\n", key_slices);
+			break;
+		}
+	}
+
+#if (TF_FLOW_SCALE_QUERY_DEBUG == 1)
+	/* dump usage data*/
+	CFA_TCAM_MGR_LOG(INFO, "WC-TCAM:  1-p  1-f  2-p  2-f  4-f  free-rows\n");
+	CFA_TCAM_MGR_LOG(INFO, "          %-4d %-4d %-4d %-4d %-4d %-4d\n",
+			 usage_data->slice_row_1_p_used,
+			 usage_data->slice_row_1_f_used,
+			 usage_data->slice_row_2_p_used,
+			 usage_data->slice_row_2_f_used,
+			 usage_data->slice_row_4_used,
+			 usage_data->unused_row_number);
+#endif
+	return 0;
+}
+
+/* Initialize the EM usage table */
+void tf_em_usage_init(uint32_t session_id, enum tf_dir dir, uint16_t max_entries)
+{
+	struct tf_resc_em_usage *em;
+
+	/* Check if supported on this device */
+	if (!tf_resc_usage_support(session_id))
+		return;
+
+	em = &tf_resc_usage[dir].em_int_usage;
+	em->max_entries = max_entries;
+	em->used_entries = 0;
+}
+
+/* Update the EM usage table */
+int tf_em_usage_update(uint32_t session_id,
+		       enum tf_dir dir,
+		       uint16_t size,
+		       enum tf_resc_opt resc_opt)
+{
+	struct tf_resc_em_usage *em;
+
+#if (TF_FLOW_SCALE_QUERY_DEBUG == 1)
+	CFA_TCAM_MGR_LOG(INFO, "%s: %s: EM record size: %d, %s\n",
+			 __func__,
+			 dir ? "TX" : "RX",
+			 size,
+			 resc_opt == TF_RESC_ALLOC ? "Alloc" : "Free");
+#endif /* TF_FLOW_SCALE_QUERY_DEBUG == 1 */
+
+	/* Check if supported on this device */
+	if (!tf_resc_usage_support(session_id))
+		return -1;
+
+	/* not valid size */
+	if (!size)
+		return 0;
+
+	resc_usage_control.buffer_dirty[dir] = 1;
+	em = &tf_resc_usage[dir].em_int_usage;
+	if (resc_opt == TF_RESC_ALLOC) {
+		em->used_entries += size;
+		assert(em->used_entries <= em->max_entries);
+	} else {
+		assert(em->used_entries >= size);
+		em->used_entries -= size;
+	}
+	return 0;
+}
+
+/* Initialize the usage buffer for all kinds of sram tables */
+void tf_tbl_usage_init(uint32_t session_id,
+		       enum tf_dir dir,
+		       uint32_t tbl_type,
+		       uint16_t max_entries)
+{
+	struct tf_rm_element_cfg *tbl_cfg = tf_tbl_p58[dir];
+
+#if (TF_FLOW_SCALE_QUERY_DEBUG == 1)
+	CFA_TCAM_MGR_LOG(INFO, "%s: %s: tbl_type: %d[%s], max entries: [%d]:[0x%x]\n",
+			 __func__,
+			 dir ? "TX" : "RX",
+			 tbl_type,
+			 tf_tbl_type_2_str(tbl_type),
+			 max_entries,
+			 max_entries);
+#endif /* TF_FLOW_SCALE_QUERY_DEBUG == 1 */
+
+	/* Check if supported on this device */
+	if (!tf_resc_usage_support(session_id))
+		return;
+
+	/* Convert to entries */
+	if (tbl_cfg[tbl_type].slices)
+		max_entries *= (16 / tbl_cfg[tbl_type].slices);
+
+	switch (tbl_type) {
+	/* Counter Action */
+	case TF_TBL_TYPE_ACT_STATS_64:
+	{
+		struct tf_resc_cnt_usage *cnt;
+		cnt = &tf_resc_usage[dir].cnt_usage;
+		cnt->max_entries = max_entries;
+		cnt->used_entries = 0;
+		break;
+	}
+	/* Action Recrod */
+	case TF_TBL_TYPE_COMPACT_ACT_RECORD:
+	case TF_TBL_TYPE_FULL_ACT_RECORD:
+	{
+		struct tf_resc_act_usage *act;
+		act = &tf_resc_usage[dir].act_usage;
+		act->max_entries += max_entries;
+		act->free_entries += max_entries;
+		act->num_compact_act_records = 0;
+		act->num_full_act_records = 0;
+		break;
+	}
+	/* ACT_ENCAP adn ACT_MODIFY Records */
+	case TF_TBL_TYPE_ACT_ENCAP_8B:
+	case TF_TBL_TYPE_ACT_ENCAP_16B:
+	case TF_TBL_TYPE_ACT_ENCAP_32B:
+	case TF_TBL_TYPE_ACT_ENCAP_64B:
+	case TF_TBL_TYPE_ACT_ENCAP_128B:
+	case TF_TBL_TYPE_ACT_MODIFY_8B:
+	case TF_TBL_TYPE_ACT_MODIFY_16B:
+	case TF_TBL_TYPE_ACT_MODIFY_32B:
+	case TF_TBL_TYPE_ACT_MODIFY_64B:
+	{
+		struct tf_resc_act_mod_enc_usage *mod_encap;
+		mod_encap = &tf_resc_usage[dir].mod_encap_usage;
+		mod_encap->max_entries += max_entries;
+		mod_encap->free_entries += max_entries;
+		break;
+	}
+	/* SP_SMAC Record */
+	case TF_TBL_TYPE_ACT_SP_SMAC:
+	case TF_TBL_TYPE_ACT_SP_SMAC_IPV4:
+	case TF_TBL_TYPE_ACT_SP_SMAC_IPV6:
+	{
+		struct tf_resc_act_sp_smac_usage *sp_smac;
+		sp_smac = &tf_resc_usage[dir].sp_smac_usage;
+		sp_smac->max_entries += max_entries;
+		sp_smac->free_entries += max_entries;
+		break;
+	}
+	/** Meter Profiles */
+	case TF_TBL_TYPE_METER_PROF:
+		tf_resc_usage[dir].meter_usage.max_meter_profile = max_entries;
+		break;
+	/** Meter Instance */
+	case TF_TBL_TYPE_METER_INST:
+		tf_resc_usage[dir].meter_usage.max_meter_instance = max_entries;
+		break;
+	default:
+		break;
+	}
+}
+
+/* Update the usage buffer for sram tables: add or free one entry */
+int tf_tbl_usage_update(uint32_t session_id,
+			 enum tf_dir dir,
+			 uint32_t tbl_type,
+			 enum tf_resc_opt resc_opt)
+{
+	struct tf_rm_element_cfg *tbl_cfg = tf_tbl_p58[dir];
+	struct tf_resc_cnt_usage *cnt;
+	int inc = (resc_opt == TF_RESC_ALLOC) ? 1 : -1;
+	int slices = tbl_cfg[tbl_type].slices;
+	int entries = 0;
+
+	/* Check if supported on this device */
+	if (!tf_resc_usage_support(session_id))
+		return -1;
+
+	/* Convert to entries */
+	if (slices)
+		entries = inc * (16 / slices);
+
+#if (TF_FLOW_SCALE_QUERY_DEBUG == 1)
+	TFP_DRV_LOG(INFO, "%s: %s: tbl_type: %d[%s] %s, Entries: %d\n", __func__,
+			 dir ? "TX" : "RX",
+			 tbl_type,
+			 tf_tbl_type_2_str(tbl_type),
+			 resc_opt ? "Alloc" : "Free",
+			 entries);
+#endif /* TF_FLOW_SCALE_QUERY_DEBUG == 1 */
+
+	resc_usage_control.buffer_dirty[dir] = 1;
+	switch (tbl_type) {
+	/* Counter Action */
+	case TF_TBL_TYPE_ACT_STATS_64:
+		cnt = &tf_resc_usage[dir].cnt_usage;
+		cnt->used_entries += inc;
+		break;
+	/* ACTION Record */
+	case TF_TBL_TYPE_FULL_ACT_RECORD:
+	case TF_TBL_TYPE_COMPACT_ACT_RECORD:
+	{
+		struct tf_resc_act_usage *act;
+		act = &tf_resc_usage[dir].act_usage;
+		if (tbl_type == TF_TBL_TYPE_COMPACT_ACT_RECORD)
+			act->num_compact_act_records += inc;
+		else
+			act->num_full_act_records += inc;
+		act->free_entries -= entries;
+		break;
+	}
+	/* ACT_ENCAP and ACT_MODIFY Records */
+	case TF_TBL_TYPE_ACT_ENCAP_8B:
+	case TF_TBL_TYPE_ACT_ENCAP_16B:
+	case TF_TBL_TYPE_ACT_ENCAP_32B:
+	case TF_TBL_TYPE_ACT_ENCAP_64B:
+	case TF_TBL_TYPE_ACT_ENCAP_128B:
+	case TF_TBL_TYPE_ACT_MODIFY_8B:
+	case TF_TBL_TYPE_ACT_MODIFY_16B:
+	case TF_TBL_TYPE_ACT_MODIFY_32B:
+	case TF_TBL_TYPE_ACT_MODIFY_64B:
+	{
+		struct tf_resc_act_mod_enc_usage *mod_encap;
+		mod_encap = &tf_resc_usage[dir].mod_encap_usage;
+		switch (slices) {
+		case 1:
+			mod_encap->data.num_128b_records += inc;
+			break;
+		case 2:
+			mod_encap->data.num_64b_records += inc;
+			break;
+		case 4:
+			mod_encap->data.num_32b_records += inc;
+			break;
+		case 8:
+			mod_encap->data.num_16b_records += inc;
+			break;
+		case 16:
+			mod_encap->data.num_8b_records += inc;
+			break;
+		default:
+			break;
+		}
+		mod_encap->free_entries -= entries;
+		break;
+	}
+	/* SP SMAC table */
+	case TF_TBL_TYPE_ACT_SP_SMAC:
+	case TF_TBL_TYPE_ACT_SP_SMAC_IPV4:
+	case TF_TBL_TYPE_ACT_SP_SMAC_IPV6:
+	{
+		struct tf_resc_act_sp_smac_usage *sp_smac;
+		sp_smac = &tf_resc_usage[dir].sp_smac_usage;
+		if (tbl_type == TF_TBL_TYPE_ACT_SP_SMAC)
+			sp_smac->num_sp_smac_records += inc;
+		else if (tbl_type == TF_TBL_TYPE_ACT_SP_SMAC_IPV4)
+			sp_smac->num_sp_smac_ipv4_records += inc;
+		else if (tbl_type == TF_TBL_TYPE_ACT_SP_SMAC_IPV6)
+			sp_smac->num_sp_smac_ipv6_records += inc;
+		sp_smac->free_entries -= entries;
+		break;
+	}
+	/* Meter Profiles */
+	case TF_TBL_TYPE_METER_PROF:
+		tf_resc_usage[dir].meter_usage.used_meter_profile += inc;
+		break;
+	/* Meter Instance */
+	case TF_TBL_TYPE_METER_INST:
+		tf_resc_usage[dir].meter_usage.used_meter_instance += inc;
+		break;
+	default:
+	/* not support types */
+		break;
+	}
+	return 0;
+}
+
+/* pause usage state update with firmware */
+void tf_resc_pause_usage_update(void)
+{
+	resc_usage_control.fw_sync_paused = true;
+}
+
+/* resume usage state update with firmware */
+void tf_resc_resume_usage_update(void)
+{
+	resc_usage_control.fw_sync_paused = false;
+}
+
+/* check if paused the resource usage update with firmware */
+static bool tf_resc_usage_update_paused(void)
+{
+	return resc_usage_control.fw_sync_paused;
+}
+
+/* resync all resource usage state with firmware for both direction */
+void tf_resc_usage_update_all(struct bnxt *bp)
+{
+	struct tf *tfp;
+	enum tf_dir dir;
+
+	/* When paused state update with firmware, do nothing */
+	if (tf_resc_usage_update_paused())
+		return;
+
+	tfp = bnxt_ulp_bp_tfp_get(bp, BNXT_ULP_SESSION_TYPE_DEFAULT);
+	if (!tfp || !tfp->session) {
+		BNXT_DRV_DBG(ERR, "Failed to get truflow or session pointer\n");
+		return;
+	}
+
+	/* Check if supported on this device */
+	if (!tf_resc_usage_support(tfp->session->session_id.id))
+		return;
+
+	/* update usage state with firmware for each direction */
+	for (dir = 0; dir < TF_DIR_MAX; dir++) {
+		if (resc_usage_control.buffer_dirty[dir]) {
+			tf_update_resc_usage(tfp, dir, TF_FLOW_RESC_TYPE_ALL);
+			resc_usage_control.buffer_dirty[dir] = 0;
+		}
+	}
+}
+
+#if (TF_FLOW_SCALE_QUERY_DEBUG == 0)
+void dump_tf_resc_usage(__rte_unused enum tf_dir dir,
+			__rte_unused void *data,
+			__rte_unused uint32_t size)
+{
+	/* empty routine */
+}
+#else
+void dump_tf_resc_usage(enum tf_dir dir, void *data, uint32_t size)
+{
+	struct cfa_tf_resc_usage *state = (struct cfa_tf_resc_usage *)data;
+	struct tf_resc_act_sp_smac_usage *sp_smac;
+	const unsigned char *bytebuffer = (const unsigned char *)data;
+
+	printf("\n%s: Buffer Dump: Size: %u bytes\n", dir ? "TX" : "RX", size);
+	for (size_t i = 0; i < size; i++) {
+		printf("%02X ", bytebuffer[i]);
+
+		/* Print a newline after every 16 bytes for better readability */
+		if ((i + 1) % 16 == 0 || i == size - 1)
+			printf("\n");
+	}
+
+	printf("EM-----------------------------------------------------------------------\n");
+	printf("          %4d:  %4d\n",
+		state->em_int_usage.max_entries,
+		state->em_int_usage.used_entries);
+	printf("WC TCAM------------------------------------------------------------------\n");
+	printf("          %4d(row): %4d %4d  %4d %4d  %4d     %4d(free row)\n",
+		state->wc_tcam_usage.max_row_number,
+		state->wc_tcam_usage.slice_row_1_p_used,
+		state->wc_tcam_usage.slice_row_1_f_used,
+		state->wc_tcam_usage.slice_row_2_p_used,
+		state->wc_tcam_usage.slice_row_2_f_used,
+		state->wc_tcam_usage.slice_row_4_used,
+		state->wc_tcam_usage.unused_row_number);
+	printf("COUNTER------------------------------------------------------------------\n");
+	printf("          %4d: %4d\n",
+		state->cnt_usage.max_entries,
+		state->cnt_usage.used_entries);
+	printf("METER------------------------------------------------------------------\n");
+	printf("          %4d(Inst): %4d,    %4d(Prof): %4d\n",
+		state->meter_usage.max_meter_instance,
+		state->meter_usage.used_meter_instance,
+		state->meter_usage.max_meter_profile,
+		state->meter_usage.used_meter_profile);
+	printf("ACTION-------------------------------------------------------------------\n");
+	printf("          %4d(MAX): %4d(compact)  %4d(full)    %4d(free)\n",
+		state->act_usage.max_entries,
+		state->act_usage.num_compact_act_records,
+		state->act_usage.num_full_act_records,
+		state->act_usage.free_entries);
+	printf("SP SMAC------------------------------------------------------------------\n");
+	sp_smac = &state->sp_smac_usage;
+	printf("          %4d(Max):  %4d(8B) %4d(IPv4=16B) %4d(IPv6=32B)   %4d(free)\n",
+		sp_smac->max_entries,
+		sp_smac->num_sp_smac_records,
+		sp_smac->num_sp_smac_ipv4_records,
+		sp_smac->num_sp_smac_ipv6_records,
+		sp_smac->free_entries);
+	printf("ACT MOD/ENCAP------------------------------------------------------------\n");
+	printf("          %4d: %4d(8B) %4d(16B) %4d(32B) %4d(64B) %4d(128B) %4d(free)\n\n\n",
+		state->mod_encap_usage.max_entries,
+		state->mod_encap_usage.data.num_8b_records,
+		state->mod_encap_usage.data.num_16b_records,
+		state->mod_encap_usage.data.num_32b_records,
+		state->mod_encap_usage.data.num_64b_records,
+		state->mod_encap_usage.data.num_128b_records,
+		state->mod_encap_usage.free_entries);
+}
+#endif /* #if (TF_FLOW_SCALE_QUERY_DEBUG == 0) */
+
+#endif /* TF_FLOW_SCALE_QUERY */
diff --git a/drivers/net/bnxt/tf_core/tf_resources.h b/drivers/net/bnxt/tf_core/tf_resources.h
index 8c28d3dc68..715c9e0d94 100644
--- a/drivers/net/bnxt/tf_core/tf_resources.h
+++ b/drivers/net/bnxt/tf_core/tf_resources.h
@@ -5,6 +5,135 @@
 
 #ifndef _TF_RESOURCES_H_
 #define _TF_RESOURCES_H_
+#include <rte_common.h>
+#include <tf_rm.h>
+#include "bnxt.h"
 
 #define TF_NUM_TBL_SCOPE           16      /* < Number of TBL scopes */
+
+#ifdef TF_FLOW_SCALE_QUERY
+/* Feature of flow scale query */
+enum tf_resc_opt {
+	TF_RESC_FREE,
+	TF_RESC_ALLOC
+};
+
+/**
+ *  WC TCAM includes a set of rows, and each row have 4-slices;
+ *  each slice has 160bit
+ */
+typedef struct tf_resc_wc_tcam_usage {
+	uint16_t max_row_number;      /* Max number of rows (excluding AFM), 160bit row */
+	uint16_t slice_row_1_p_used;  /* 1-slice rows partially used */
+	uint16_t slice_row_1_f_used;  /* 1-slice rows fully used */
+	uint16_t slice_row_2_p_used;  /* 2-slice rows partially used */
+	uint16_t slice_row_2_f_used;  /* 2-slice rows fully used */
+	uint16_t slice_row_4_used;    /* 4-slice rows fully used */
+	uint16_t unused_row_number;   /* number of unused rows */
+	uint8_t  reserved[2];
+} __rte_packed tf_resc_wc_tcam_usage_t;
+
+/* Resource Internal EM memory pool; vary size records */
+typedef struct tf_resc_em_usage {
+	uint16_t max_entries;   /* Max 16-Bytes entries */
+	uint16_t used_entries;  /* each record takes up to 7 entries by design */
+} __rte_packed tf_resc_em_usage_t;
+
+/* Resource Meter */
+typedef struct tf_resc_meter_usage {
+	uint16_t max_meter_instance;    /* 1023 for Thor, app can reserve some entries */
+	uint16_t max_meter_profile;     /* 256 for Thor, app can reserve some profiles  */
+	uint16_t used_meter_instance;   /* meter instance: fixed size record */
+	uint16_t used_meter_profile;    /* meter profile: fixed size record */
+} __rte_packed tf_resc_meter_usage_t;
+
+/* Resource Counter */
+typedef struct tf_resc_cnt_usage {
+	uint16_t max_entries;           /* each counter take 64-Bytes */
+	uint16_t used_entries;          /* each record uses one entry */
+} __rte_packed tf_resc_cnt_usage_t;
+
+/* Resource Action */
+typedef struct tf_resc_act_usage {
+	uint16_t max_entries;              /* Max 8-Bytes entries */
+	uint16_t num_compact_act_records;  /* 8-Bytes records */
+	uint16_t num_full_act_records;     /* 16-Bytes records */
+	uint16_t free_entries;             /* unused entries */
+} __rte_packed tf_resc_act_usage_t;
+
+/* Resource SP SMAC  */
+typedef struct tf_resc_act_sp_smac_usage {
+	uint16_t max_entries;              /* Max 8-Bytes entries */
+	uint16_t num_sp_smac_records;      /* 8-Bytes records */
+	uint16_t num_sp_smac_ipv4_records; /* 8-Bytes records */
+	uint16_t num_sp_smac_ipv6_records; /* 16-Bytes records */
+	uint16_t free_entries;             /* unused entries */
+} __rte_packed tf_resc_act_sp_smac_usage_t;
+
+/* Resource ACT MODIFY and ACT ENCAP */
+typedef struct tf_resc_act_mod_enc_usage {
+	uint16_t max_entries;	            /* Max 8-Bytes entries */
+	struct {
+		uint16_t num_8b_records;    /* 8-bytes records */
+		uint16_t num_16b_records;   /* 16-bytes records  */
+		uint16_t num_32b_records;   /* 32-bytes records  */
+		uint16_t num_64b_records;   /* 64-bytes records  */
+		uint16_t num_128b_records;  /* 128-bytes records  */
+	} data;
+	int16_t free_entries; /* unused entries */
+} __rte_packed tf_resc_act_mod_enc_usage_t;
+
+/* All types of resource usage on both direction */
+typedef struct cfa_tf_resc_usage {
+	tf_resc_em_usage_t           em_int_usage;
+	tf_resc_wc_tcam_usage_t      wc_tcam_usage;
+	tf_resc_cnt_usage_t          cnt_usage;
+	tf_resc_act_usage_t          act_usage;
+	tf_resc_meter_usage_t        meter_usage;
+	tf_resc_act_mod_enc_usage_t  mod_encap_usage;
+	tf_resc_act_sp_smac_usage_t  sp_smac_usage;
+} __rte_packed cfa_tf_resc_usage_t;
+
+/* global data stored in firmware memory and TruFlow driver */
+extern cfa_tf_resc_usage_t tf_resc_usage[TF_DIR_MAX];
+
+void tf_resc_usage_reset(enum tf_device_type type, int session_id);
+
+void tf_tcam_usage_init(int session_id);
+
+int tf_tcam_usage_update(int session_id,
+			 enum tf_dir dir,
+			 int tcam_tbl_type,
+			 void *key_row,
+			 enum tf_resc_opt resc_opt);
+
+void tf_em_usage_init(uint32_t session_id, enum tf_dir dir, uint16_t max_entries);
+
+int tf_em_usage_update(uint32_t session_id,
+		       enum tf_dir dir,
+		       uint16_t size,
+		       enum tf_resc_opt resc_opt);
+
+void tf_tbl_usage_init(uint32_t session_id,
+		       enum tf_dir dir,
+		       uint32_t tbl_type,
+		       uint16_t max_entries);
+
+int tf_tbl_usage_update(uint32_t session_id,
+			enum tf_dir dir,
+			uint32_t tbl_type,
+			enum tf_resc_opt resc_opt);
+
+void dump_tf_resc_usage(enum tf_dir dir, void *data, uint32_t size);
+
+extern struct tf_rm_element_cfg tf_tbl_p58[TF_DIR_MAX][TF_TBL_TYPE_MAX];
+
+void tf_resc_pause_usage_update(void);
+
+void tf_resc_resume_usage_update(void);
+
+void tf_resc_usage_update_all(struct bnxt *bp);
+
+#endif /* TF_FLOW_SCALE_QUERY */
+
 #endif /* _TF_RESOURCES_H_ */
diff --git a/drivers/net/bnxt/tf_core/tf_rm.c b/drivers/net/bnxt/tf_core/tf_rm.c
index 9b85f5397d..e38bfcf4f6 100644
--- a/drivers/net/bnxt/tf_core/tf_rm.c
+++ b/drivers/net/bnxt/tf_core/tf_rm.c
@@ -364,7 +364,8 @@ tf_rm_update_parent_reservations(struct tf *tfp,
 				 struct tf_rm_element_cfg *cfg,
 				 uint16_t *alloc_cnt,
 				 uint16_t num_elements,
-				 uint16_t *req_cnt)
+				 uint16_t *req_cnt,
+				 __rte_unused enum tf_dir dir)
 {
 	int parent, child;
 	const char *type_str = NULL;
@@ -388,6 +389,13 @@ tf_rm_update_parent_reservations(struct tf *tfp,
 				dev->ops->tf_dev_get_resource_str(tfp,
 							 cfg[parent].hcapi_type,
 							 &type_str);
+#ifdef TF_FLOW_SCALE_QUERY
+				/* Initialize the usage buffer for SRAM tables */
+				tf_tbl_usage_init(tfp,
+						  dir,
+						  parent,
+						  alloc_cnt[parent]);
+#endif /* TF_FLOW_SCALE_QUERY */
 			}
 
 			/* Search again through all the elements */
@@ -418,6 +426,13 @@ tf_rm_update_parent_reservations(struct tf *tfp,
 					combined_cnt += cnt;
 					/* Clear the requested child count */
 					req_cnt[child] = 0;
+#ifdef TF_FLOW_SCALE_QUERY
+					/* Initialize the usage buffer for SRAM tables */
+					tf_tbl_usage_init(tfp->session->session_id.id,
+							  dir,
+							  child,
+							  alloc_cnt[child]);
+#endif /* TF_FLOW_SCALE_QUERY */
 				}
 			}
 			/* Save the parent count to be requested */
@@ -501,7 +516,8 @@ tf_rm_create_db(struct tf *tfp,
 	tf_rm_update_parent_reservations(tfp, dev, parms->cfg,
 					 parms->alloc_cnt,
 					 parms->num_elements,
-					 req_cnt);
+					 req_cnt,
+					 parms->dir);
 
 	/* Process capabilities against DB requirements. However, as a
 	 * DB can hold elements that are not HCAPI we can reduce the
@@ -672,6 +688,22 @@ tf_rm_create_db(struct tf *tfp,
 				}
 			}
 			j++;
+
+#ifdef TF_FLOW_SCALE_QUERY
+			/* Initialize the usage buffer for Meter tables */
+			if (cfg->hcapi_type == CFA_RESOURCE_TYPE_P58_METER ||
+			    cfg->hcapi_type == CFA_RESOURCE_TYPE_P58_METER_PROF) {
+				uint32_t tbl_type;
+				if (cfg->hcapi_type == CFA_RESOURCE_TYPE_P58_METER)
+					tbl_type = TF_TBL_TYPE_METER_INST;
+				else
+					tbl_type = TF_TBL_TYPE_METER_PROF;
+				tf_tbl_usage_init(tfp->session->session_id.id,
+						  parms->dir,
+						  tbl_type,
+						  req_cnt[i]);
+			}
+#endif /* TF_FLOW_SCALE_QUERY */
 		} else {
 			/* Bail out as we want what we requested for
 			 * all elements, not any less.
@@ -755,7 +787,8 @@ tf_rm_create_db_no_reservation(struct tf *tfp,
 	tf_rm_update_parent_reservations(tfp, dev, parms->cfg,
 					 parms->alloc_cnt,
 					 parms->num_elements,
-					 req_cnt);
+					 req_cnt,
+					 parms->dir);
 
 	/* Process capabilities against DB requirements. However, as a
 	 * DB can hold elements that are not HCAPI we can reduce the
diff --git a/drivers/net/bnxt/tf_core/tf_session.c b/drivers/net/bnxt/tf_core/tf_session.c
index 253d716572..7545974c93 100644
--- a/drivers/net/bnxt/tf_core/tf_session.c
+++ b/drivers/net/bnxt/tf_core/tf_session.c
@@ -197,6 +197,11 @@ tf_session_create(struct tf *tfp,
 		parms->open_cfg->shared_session_creator = true;
 	}
 
+#ifdef TF_FLOW_SCALE_QUERY
+	/* Reset the resource usage buffer before binding a device */
+	tf_resc_usage_reset(parms->open_cfg->device_type, tfp->session->session_id.id);
+#endif /* TF_FLOW_SCALE_QUERY */
+
 	rc = tf_dev_bind(tfp,
 			 parms->open_cfg->device_type,
 			 &parms->open_cfg->resources,
@@ -216,6 +221,11 @@ tf_session_create(struct tf *tfp,
 
 	session->dev_init = true;
 
+#ifdef TF_FLOW_SCALE_QUERY
+	/* Sync the initial resource usage with firmware */
+	tf_resc_usage_update_all(parms->open_cfg->bp);
+#endif /* TF_FLOW_SCALE_QUERY */
+
 	return 0;
 
  cleanup:
diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.c b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
index 6d345e12c7..1e95905e21 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
@@ -4410,6 +4410,22 @@ ulp_mapper_flow_create(struct bnxt_ulp_context *ulp_ctx,
 			goto flow_error;
 	}
 
+#ifdef TF_FLOW_SCALE_QUERY
+	tfp = bnxt_ulp_cntxt_tfp_get(ulp_ctx, BNXT_ULP_SESSION_TYPE_DEFAULT);
+	if (!tfp) {
+		BNXT_DRV_DBG(ERR, "Failed to get truflow pointer\n");
+		return -EINVAL;
+	}
+
+	if (parms->act_bitmap->bits & BNXT_ULP_FLOW_DIR_BITMASK_EGR)
+		dir = TF_DIR_TX;
+	else
+		dir = TF_DIR_RX;
+
+	/* sync resource usage state with firmware */
+	tf_update_resc_usage(tfp, dir, TF_FLOW_RESC_TYPE_ALL);
+#endif /* TF_FLOW_SCALE_QUERY */
+
 	return rc;
 
 flow_error:
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 07/47] net/bnxt: tf_core: fix slice count in case of HA entry move
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (5 preceding siblings ...)
  2024-10-01  5:57 ` [PATCH v3 06/47] net/bnxt: tf_core: TF support flow scale query Sriharsha Basavapatna
@ 2024-10-01  5:57 ` Sriharsha Basavapatna
  2024-10-01  5:57 ` [PATCH v3 08/47] net/bnxt: tf_core: convert priority based TCAM manager to dynamic allocation Sriharsha Basavapatna
                   ` (26 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:57 UTC (permalink / raw)
  To: dev; +Cc: Sangtani Parag Satishbhai, Sriharsha Basavapatna, Ajit Khaparde

From: Sangtani Parag Satishbhai <parag-satishbhai.sangtani@broadcom.com>

When entries are moved during HA, a shared move function transfers
TCAM entries by using get/set message APIs, and the slice number of the
entry is required to accomplish the movement. The slice number is
calculated as the product of row_slice and entry size. Before calling
get/set message APIs, the source entry size should be updated with the
destination entry size; otherwise, it might corrupt the slice number field,
which may result in writing an incorrect entry. A fix is made which now
copies the entry size from the source to the destination before calling
get/set message APIs, ensuring the correct slice number is modified.

Signed-off-by: Sangtani Parag Satishbhai <parag-satishbhai.sangtani@broadcom.com>
Reviewed-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_core/cfa_tcam_mgr.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c
index 349f52caba..33b1e4121e 100644
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c
+++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c
@@ -1717,6 +1717,11 @@ cfa_tcam_mgr_shared_entry_move(int sess_idx, struct cfa_tcam_mgr_context *contex
 	uint8_t  key[CFA_TCAM_MGR_MAX_KEY_SIZE];
 	uint8_t  mask[CFA_TCAM_MGR_MAX_KEY_SIZE];
 	uint8_t  result[CFA_TCAM_MGR_MAX_KEY_SIZE];
+	/*
+	 * Copy entry size before moving else if
+	 * slice number is non zero and entry size is zero it will cause issues
+	 */
+	dst_row->entry_size = src_row->entry_size;
 
 	int rc;
 
@@ -1791,7 +1796,6 @@ cfa_tcam_mgr_shared_entry_move(int sess_idx, struct cfa_tcam_mgr_context *contex
 
 	ROW_ENTRY_SET(dst_row, dst_row_slice);
 	dst_row->entries[dst_row_slice] = entry_id;
-	dst_row->entry_size = src_row->entry_size;
 	dst_row->priority = src_row->priority;
 	ROW_ENTRY_CLEAR(src_row, entry->slice);
 	entry->row = dst_row_index;
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 08/47] net/bnxt: tf_core: convert priority based TCAM manager to dynamic allocation
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (6 preceding siblings ...)
  2024-10-01  5:57 ` [PATCH v3 07/47] net/bnxt: tf_core: fix slice count in case of HA entry move Sriharsha Basavapatna
@ 2024-10-01  5:57 ` Sriharsha Basavapatna
  2024-10-01  5:57 ` [PATCH v3 09/47] net/bnxt: tf_core: remove dead AFM code from session-based priority TCAM mgr Sriharsha Basavapatna
                   ` (25 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:57 UTC (permalink / raw)
  To: dev
  Cc: Randy Schacher, Sriharsha Basavapatna, Farah Smith,
	Shuanglin Wang, Shahaji Bhosle, Ajit Khaparde

From: Randy Schacher <stuart.schacher@broadcom.com>

Previously, TCAM entries were allocated statically, but this takes
up too much stack memory. Change the identifier for TCAM entries
from an index which is tied to the HW location,
to an abstract entry ID associated with the session.

Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Shuanglin Wang <shuanglin.wang@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_core/cfa_tcam_mgr.c       | 1363 ++++++++++-------
 drivers/net/bnxt/tf_core/cfa_tcam_mgr.h       |   58 +-
 .../net/bnxt/tf_core/cfa_tcam_mgr_device.h    |   86 +-
 .../net/bnxt/tf_core/cfa_tcam_mgr_hwop_msg.c  |  135 +-
 .../net/bnxt/tf_core/cfa_tcam_mgr_hwop_msg.h  |   18 +-
 drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.c    |  596 ++++---
 drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.h    |    9 +-
 drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.c   |  586 ++++---
 drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.h   |   10 +-
 .../net/bnxt/tf_core/cfa_tcam_mgr_session.h   |   57 -
 drivers/net/bnxt/tf_core/meson.build          |    3 +-
 drivers/net/bnxt/tf_core/tf_core.c            |    6 +-
 drivers/net/bnxt/tf_core/tf_device.h          |    4 +-
 drivers/net/bnxt/tf_core/tf_device_p58.c      |    6 +-
 .../net/bnxt/tf_core/tf_em_hash_internal.c    |    6 +-
 drivers/net/bnxt/tf_core/tf_em_internal.c     |    4 +-
 drivers/net/bnxt/tf_core/tf_resources.c       |  185 ++-
 drivers/net/bnxt/tf_core/tf_resources.h       |   16 +-
 drivers/net/bnxt/tf_core/tf_rm.c              |    6 +-
 drivers/net/bnxt/tf_core/tf_session.c         |    4 +-
 drivers/net/bnxt/tf_core/tf_session.h         |    6 +-
 drivers/net/bnxt/tf_core/tf_tcam.c            |    4 +-
 drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c    |   55 +-
 23 files changed, 1884 insertions(+), 1339 deletions(-)
 delete mode 100644 drivers/net/bnxt/tf_core/cfa_tcam_mgr_session.h

diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c
index 33b1e4121e..165376182e 100644
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c
+++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2021-2023 Broadcom
+ * Copyright(c) 2021-2024 Broadcom
  * All rights reserved.
  */
 
@@ -12,22 +12,13 @@
 #include "tf_session.h"
 #include "tf_util.h"
 #include "cfa_tcam_mgr.h"
-#include "cfa_tcam_mgr_hwop_msg.h"
 #include "cfa_tcam_mgr_device.h"
-#include "cfa_tcam_mgr_session.h"
+#include "cfa_tcam_mgr_hwop_msg.h"
 #include "cfa_tcam_mgr_p58.h"
 #include "cfa_tcam_mgr_p4.h"
 
 #define TF_TCAM_SLICE_INVALID (-1)
 
-static struct cfa_tcam_mgr_entry_data *entry_data[TF_TCAM_MAX_SESSIONS];
-
-static int global_data_initialized[TF_TCAM_MAX_SESSIONS];
-int cfa_tcam_mgr_max_entries[TF_TCAM_MAX_SESSIONS];
-
-struct cfa_tcam_mgr_table_data
-cfa_tcam_mgr_tables[TF_TCAM_MAX_SESSIONS][TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX];
-
 static int physical_table_types[CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 	[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_APPS] =
 		TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
@@ -109,7 +100,7 @@ cfa_tcam_mgr_get_num_slices(unsigned int key_size, unsigned int slice_width)
 {
 	int num_slices = 0;
 
-	if (key_size == 0)
+	if (!key_size)
 		return -CFA_TCAM_MGR_ERR_CODE(INVAL);
 
 	num_slices = ((key_size - 1U) / slice_width) + 1U;
@@ -132,36 +123,43 @@ cfa_tcam_mgr_get_num_slices(unsigned int key_size, unsigned int slice_width)
 }
 
 static struct cfa_tcam_mgr_entry_data *
-cfa_tcam_mgr_entry_get(int sess_idx, uint16_t id)
+cfa_tcam_mgr_entry_get(struct cfa_tcam_mgr_data *tcam_mgr_data, uint16_t id)
 {
-	if (id > cfa_tcam_mgr_max_entries[sess_idx])
+	if (id > tcam_mgr_data->cfa_tcam_mgr_max_entries)
 		return NULL;
 
-	return &entry_data[sess_idx][id];
+	return &tcam_mgr_data->entry_data[id];
 }
 
 /* Insert an entry into the entry table */
 static int
-cfa_tcam_mgr_entry_insert(int sess_idx, uint16_t id,
+cfa_tcam_mgr_entry_insert(struct cfa_tcam_mgr_data *tcam_mgr_data,
+			  struct tf *tfp __rte_unused, uint16_t id,
 			  struct cfa_tcam_mgr_entry_data *entry)
 {
-	if (id > cfa_tcam_mgr_max_entries[sess_idx])
+	if (id > tcam_mgr_data->cfa_tcam_mgr_max_entries)
 		return -CFA_TCAM_MGR_ERR_CODE(INVAL);
 
-	memcpy(&entry_data[sess_idx][id], entry,
-	       sizeof(entry_data[sess_idx][id]));
+	memcpy(&tcam_mgr_data->entry_data[id], entry,
+	       sizeof(tcam_mgr_data->entry_data[id]));
+
+	CFA_TCAM_MGR_TRACE(INFO, "Added entry %d to table\n", id);
 
 	return 0;
 }
 
 /* Delete an entry from the entry table */
 static int
-cfa_tcam_mgr_entry_delete(int sess_idx, uint16_t id)
+cfa_tcam_mgr_entry_delete(struct cfa_tcam_mgr_data *tcam_mgr_data,
+			  struct tf *tfp __rte_unused, uint16_t id)
 {
-	if (id > cfa_tcam_mgr_max_entries[sess_idx])
+	if (id > tcam_mgr_data->cfa_tcam_mgr_max_entries)
 		return -CFA_TCAM_MGR_ERR_CODE(INVAL);
 
-	memset(&entry_data[sess_idx][id], 0, sizeof(entry_data[sess_idx][id]));
+	memset(&tcam_mgr_data->entry_data[id], 0,
+	       sizeof(tcam_mgr_data->entry_data[id]));
+
+	CFA_TCAM_MGR_TRACE(INFO, "Deleted entry %d from table.\n", id);
 
 	return 0;
 }
@@ -170,11 +168,12 @@ cfa_tcam_mgr_entry_delete(int sess_idx, uint16_t id)
  * TCAM supports.
  */
 static int
-cfa_tcam_mgr_row_size_get(int sess_idx, enum tf_dir dir,
+cfa_tcam_mgr_row_size_get(struct cfa_tcam_mgr_data *tcam_mgr_data,
+			  enum tf_dir dir,
 			  enum cfa_tcam_mgr_tbl_type type)
 {
 	return sizeof(struct cfa_tcam_mgr_table_rows_0) +
-		(cfa_tcam_mgr_tables[sess_idx][dir][type].max_slices *
+		(tcam_mgr_data->cfa_tcam_mgr_tables[dir][type].max_slices *
 		 sizeof(((struct cfa_tcam_mgr_table_rows_0 *)0)->entries[0]));
 }
 
@@ -188,18 +187,19 @@ cfa_tcam_mgr_row_ptr_get(void *base, int index, int row_size)
  * Searches a table to find the direction and type of an entry.
  */
 static int
-cfa_tcam_mgr_entry_find_in_table(int sess_idx, int id, enum tf_dir dir,
+cfa_tcam_mgr_entry_find_in_table(struct cfa_tcam_mgr_data *tcam_mgr_data,
+				 int id, enum tf_dir dir,
 				 enum cfa_tcam_mgr_tbl_type type)
 {
 	struct cfa_tcam_mgr_table_data *table_data;
-	struct cfa_tcam_mgr_table_rows_0 *row;
 	int max_slices, row_idx, row_size, slice;
+	struct cfa_tcam_mgr_table_rows_0 *row;
 
-	table_data = &cfa_tcam_mgr_tables[sess_idx][dir][type];
+	table_data = &tcam_mgr_data->cfa_tcam_mgr_tables[dir][type];
 	if (table_data->max_entries > 0 &&
 	    table_data->hcapi_type > 0) {
 		max_slices = table_data->max_slices;
-		row_size = cfa_tcam_mgr_row_size_get(sess_idx, dir, type);
+		row_size = cfa_tcam_mgr_row_size_get(tcam_mgr_data, dir, type);
 		for (row_idx = table_data->start_row;
 		     row_idx <= table_data->end_row;
 		     row_idx++) {
@@ -225,19 +225,24 @@ cfa_tcam_mgr_entry_find_in_table(int sess_idx, int id, enum tf_dir dir,
  * Searches all the tables to find the direction and type of an entry.
  */
 static int
-cfa_tcam_mgr_entry_find(int sess_idx, int id, enum tf_dir *tbl_dir,
+cfa_tcam_mgr_entry_find(struct cfa_tcam_mgr_data *tcam_mgr_data, int id,
+			enum tf_dir *tbl_dir,
 			enum cfa_tcam_mgr_tbl_type *tbl_type)
 {
-	enum tf_dir dir;
 	enum cfa_tcam_mgr_tbl_type type;
 	int rc = -CFA_TCAM_MGR_ERR_CODE(NOENT);
+	enum tf_dir dir;
 
-	for (dir = TF_DIR_RX; dir < ARRAY_SIZE(cfa_tcam_mgr_tables[sess_idx]); dir++) {
+	for (dir = TF_DIR_RX; dir <
+			ARRAY_SIZE(tcam_mgr_data->cfa_tcam_mgr_tables);
+			dir++) {
 		for (type = CFA_TCAM_MGR_TBL_TYPE_START;
-		     type < ARRAY_SIZE(cfa_tcam_mgr_tables[sess_idx][dir]);
+		     type <
+			ARRAY_SIZE(tcam_mgr_data->cfa_tcam_mgr_tables[dir]);
 		     type++) {
-			rc = cfa_tcam_mgr_entry_find_in_table(sess_idx, id, dir, type);
-			if (rc == 0) {
+			rc = cfa_tcam_mgr_entry_find_in_table(tcam_mgr_data,
+							      id, dir, type);
+			if (!rc) {
 				*tbl_dir  = dir;
 				*tbl_type = type;
 				return rc;
@@ -262,11 +267,11 @@ cfa_tcam_mgr_row_is_entry_free(struct cfa_tcam_mgr_table_rows_0 *row,
 				return j;
 		}
 	}
-	return -1;
+	return -CFA_TCAM_MGR_ERR_CODE(INVAL);
 }
 
 static int
-cfa_tcam_mgr_entry_move(int sess_idx, struct cfa_tcam_mgr_context *context,
+cfa_tcam_mgr_entry_move(struct cfa_tcam_mgr_data *tcam_mgr_data, struct tf *tfp,
 		       enum tf_dir dir, enum cfa_tcam_mgr_tbl_type type,
 		       int entry_id,
 		       struct cfa_tcam_mgr_table_data *table_data,
@@ -280,15 +285,15 @@ cfa_tcam_mgr_entry_move(int sess_idx, struct cfa_tcam_mgr_context *context,
 	struct cfa_tcam_mgr_set_parms sparms = { 0 };
 	struct cfa_tcam_mgr_free_parms fparms = { 0 };
 	struct cfa_tcam_mgr_entry_data *entry;
-	uint8_t  key[CFA_TCAM_MGR_MAX_KEY_SIZE];
-	uint8_t  mask[CFA_TCAM_MGR_MAX_KEY_SIZE];
 	uint8_t  result[CFA_TCAM_MGR_MAX_KEY_SIZE];
+	uint8_t  mask[CFA_TCAM_MGR_MAX_KEY_SIZE];
+	uint8_t  key[CFA_TCAM_MGR_MAX_KEY_SIZE];
 
 	int j, rc;
 
-	entry = cfa_tcam_mgr_entry_get(sess_idx, entry_id);
-	if (entry == NULL)
-		return -1;
+	entry = cfa_tcam_mgr_entry_get(tcam_mgr_data, entry_id);
+	if (!entry)
+		return -CFA_TCAM_MGR_ERR_CODE(INVAL);
 
 	gparms.dir	   = dir;
 	gparms.type	   = type;
@@ -300,11 +305,11 @@ cfa_tcam_mgr_entry_move(int sess_idx, struct cfa_tcam_mgr_context *context,
 	gparms.key_size	   = sizeof(key);
 	gparms.result_size = sizeof(result);
 
-	rc = cfa_tcam_mgr_entry_get_msg(sess_idx, context, &gparms,
+	rc = cfa_tcam_mgr_entry_get_msg(tcam_mgr_data, tfp, &gparms,
 					source_row_index,
 					entry->slice * source_row->entry_size,
 					table_data->max_slices);
-	if (rc != 0)
+	if (rc)
 		return rc;
 
 	sparms.dir	   = dir;
@@ -332,18 +337,19 @@ cfa_tcam_mgr_entry_move(int sess_idx, struct cfa_tcam_mgr_context *context,
 	if (dest_row_slice < 0)
 		return -CFA_TCAM_MGR_ERR_CODE(PERM);
 
-	rc = cfa_tcam_mgr_entry_set_msg(sess_idx, context, &sparms,
+	rc = cfa_tcam_mgr_entry_set_msg(tcam_mgr_data, tfp, &sparms,
 					dest_row_index,
 					dest_row_slice * dest_row->entry_size,
 					table_data->max_slices);
-	if (rc != 0)
+	if (rc)
 		return rc;
 
 	if (free_source_entry) {
 		fparms.dir	  = dir;
 		fparms.type	  = type;
 		fparms.hcapi_type = table_data->hcapi_type;
-		rc = cfa_tcam_mgr_entry_free_msg(sess_idx, context, &fparms,
+		rc = cfa_tcam_mgr_entry_free_msg(tcam_mgr_data,
+						 tfp, &fparms,
 						 source_row_index,
 						 entry->slice *
 						 dest_row->entry_size,
@@ -352,15 +358,15 @@ cfa_tcam_mgr_entry_move(int sess_idx, struct cfa_tcam_mgr_context *context,
 						 source_row->entry_size,
 						 table_data->result_size,
 						 table_data->max_slices);
-		if (rc != 0) {
+		if (rc) {
 			CFA_TCAM_MGR_LOG_DIR_TYPE(ERR,
 						  dir, type,
-						 "Failed to free entry ID %d at"
-						 " row %d, slice %d for sess_idx %d. rc: %d.\n",
+						  "Failed to free entry ID:%d"
+						  " at row:%d slice:%d"
+						  " rc:%d\n",
 						  gparms.id,
 						  source_row_index,
 						  entry->slice,
-						  sess_idx,
 						  -rc);
 		}
 	}
@@ -371,13 +377,17 @@ cfa_tcam_mgr_entry_move(int sess_idx, struct cfa_tcam_mgr_context *context,
 	entry->row   = dest_row_index;
 	entry->slice = dest_row_slice;
 
+#ifdef CFA_TCAM_MGR_TRACING
+	cfa_tcam_mgr_rows_dump(tfp, dir, type);
+#endif
+
 	return 0;
 }
 
 static int
-cfa_tcam_mgr_row_move(int sess_idx, struct cfa_tcam_mgr_context *context,
+cfa_tcam_mgr_row_move(struct cfa_tcam_mgr_data *tcam_mgr_data, struct tf *tfp,
 		      enum tf_dir dir, enum cfa_tcam_mgr_tbl_type type,
-		      struct cfa_tcam_mgr_table_data *table_data,
+		      struct cfa_tcam_mgr_table_data *tbl_data,
 		      int dest_row_index,
 		      struct cfa_tcam_mgr_table_rows_0 *dest_row,
 		      int source_row_index,
@@ -392,30 +402,32 @@ cfa_tcam_mgr_row_move(int sess_idx, struct cfa_tcam_mgr_context *context,
 
 	fparms.dir	  = dir;
 	fparms.type	  = type;
-	fparms.hcapi_type = table_data->hcapi_type;
+	fparms.hcapi_type = tbl_data->hcapi_type;
 
 	for (j = 0;
-	     j < (table_data->max_slices / source_row->entry_size);
+	     j < (tbl_data->max_slices / source_row->entry_size);
 	     j++) {
 		if (ROW_ENTRY_INUSE(source_row, j)) {
-			cfa_tcam_mgr_entry_move(sess_idx, context, dir, type,
+			cfa_tcam_mgr_entry_move(tcam_mgr_data, tfp,
+						dir, type,
 						source_row->entries[j],
-						table_data,
+						tbl_data,
 						dest_row_index, j, dest_row,
 						source_row_index, source_row,
 						true);
 		} else {
 			/* Slice not in use, write an empty slice. */
-			rc = cfa_tcam_mgr_entry_free_msg(sess_idx, context, &fparms,
-							dest_row_index,
-							j *
-							dest_row->entry_size,
-							table_data->row_width /
-							table_data->max_slices *
-							dest_row->entry_size,
-							table_data->result_size,
-							table_data->max_slices);
-			if (rc != 0)
+			rc = cfa_tcam_mgr_entry_free_msg(tcam_mgr_data,
+							 tfp, &fparms,
+							 dest_row_index,
+							 j *
+							 dest_row->entry_size,
+							 tbl_data->row_width /
+							 tbl_data->max_slices *
+							 dest_row->entry_size,
+							 tbl_data->result_size,
+							 tbl_data->max_slices);
+			if (rc)
 				return rc;
 		}
 	}
@@ -425,7 +437,7 @@ cfa_tcam_mgr_row_move(int sess_idx, struct cfa_tcam_mgr_context *context,
 
 /* Install entry into in-memory tables, not into TCAM (yet). */
 static void
-cfa_tcam_mgr_row_entry_install(int sess_idx,
+cfa_tcam_mgr_row_entry_install(struct tf *tfp __rte_unused,
 			       struct cfa_tcam_mgr_table_rows_0 *row,
 			       struct cfa_tcam_mgr_alloc_parms *parms,
 			       struct cfa_tcam_mgr_entry_data *entry,
@@ -433,12 +445,6 @@ cfa_tcam_mgr_row_entry_install(int sess_idx,
 			       int key_slices,
 			       int row_index, int slice)
 {
-	if (global_data_initialized[sess_idx] == 0) {
-		CFA_TCAM_MGR_LOG(INFO, "PANIC: No TCAM data created for sess_idx %d\n",
-				 sess_idx);
-		return;
-	}
-
 	if (slice == TF_TCAM_SLICE_INVALID) {
 		slice = 0;
 		row->entry_size = key_slices;
@@ -449,36 +455,55 @@ cfa_tcam_mgr_row_entry_install(int sess_idx,
 	row->entries[slice] = id;
 	entry->row = row_index;
 	entry->slice = slice;
+
+	CFA_TCAM_MGR_TRACE(INFO,
+			   "Entry %d installed row:%d slice:%d prio:%d\n",
+			   id, row_index, slice, row->priority);
+#ifdef CFA_TCAM_MGR_TRACING
+	cfa_tcam_mgr_rows_dump(tfp, parms->dir, parms->type);
+#endif
 }
 
 /* Finds an empty row that can be used and reserve for entry.  If necessary,
  * entries will be shuffled in order to make room.
  */
 static struct cfa_tcam_mgr_table_rows_0 *
-cfa_tcam_mgr_empty_row_alloc(int sess_idx, struct cfa_tcam_mgr_context *context,
+cfa_tcam_mgr_empty_row_alloc(struct cfa_tcam_mgr_data *tcam_mgr_data,
+			     struct tf *tfp,
 			     struct cfa_tcam_mgr_alloc_parms *parms,
 			     struct cfa_tcam_mgr_entry_data *entry,
-			     uint16_t id,
-			     int key_slices)
+			     uint16_t id, int key_slices)
 {
+	int to_row_idx, from_row_idx, slice, start_row, end_row;
 	struct cfa_tcam_mgr_table_rows_0 *tcam_rows;
+	struct cfa_tcam_mgr_table_data *table_data;
 	struct cfa_tcam_mgr_table_rows_0 *from_row;
 	struct cfa_tcam_mgr_table_rows_0 *to_row;
 	struct cfa_tcam_mgr_table_rows_0 *row;
-	struct cfa_tcam_mgr_table_data *table_data;
 	int i, max_slices, row_size;
-	int to_row_idx, from_row_idx, slice, start_row, end_row;
-	int empty_row = -1;
 	int target_row = -1;
+	int empty_row = -1;
 
-	table_data = &cfa_tcam_mgr_tables[sess_idx][parms->dir][parms->type];
+	table_data =
+		&tcam_mgr_data->cfa_tcam_mgr_tables[parms->dir][parms->type];
 
-	start_row  = table_data->start_row;
-	end_row	   = table_data->end_row;
+	start_row = table_data->start_row;
+	end_row = table_data->end_row;
 	max_slices = table_data->max_slices;
-	tcam_rows  = table_data->tcam_rows;
+	tcam_rows = table_data->tcam_rows;
 
-	row_size   = cfa_tcam_mgr_row_size_get(sess_idx, parms->dir, parms->type);
+	row_size = cfa_tcam_mgr_row_size_get(tcam_mgr_data, parms->dir,
+					     parms->type);
+	/*
+	 * Note: The rows are ordered from highest priority to lowest priority.
+	 * That is, the first row in the table will have the highest priority
+	 * and the last row in the table will have the lowest priority.
+	 */
+
+	CFA_TCAM_MGR_TRACE(INFO, "Trying to alloc space for entry with "
+			   "priority %d and width %d slices.\n",
+			   parms->priority,
+			   key_slices);
 
 	/*
 	 * First check for partially used entries, but only if the key needs
@@ -497,10 +522,11 @@ cfa_tcam_mgr_empty_row_alloc(int sess_idx, struct cfa_tcam_mgr_context *context,
 							       max_slices,
 							       key_slices);
 			if (slice >= 0) {
-				cfa_tcam_mgr_row_entry_install(sess_idx, row, parms,
+				cfa_tcam_mgr_row_entry_install(tfp,
+							       row, parms,
 							       entry, id,
-							       key_slices,
-							       i, slice);
+							       key_slices, i,
+							       slice);
 				return row;
 			}
 		}
@@ -519,11 +545,10 @@ cfa_tcam_mgr_empty_row_alloc(int sess_idx, struct cfa_tcam_mgr_context *context,
 		for (i = start_row; i <= end_row; i++) {
 			row = cfa_tcam_mgr_row_ptr_get(tcam_rows, i, row_size);
 			if (!ROW_INUSE(row)) {
-				cfa_tcam_mgr_row_entry_install(sess_idx,
+				cfa_tcam_mgr_row_entry_install(tfp,
 							       row, parms,
-							       entry,
-							       id, key_slices,
-							       i,
+							       entry, id,
+							       key_slices, i,
 							 TF_TCAM_SLICE_INVALID);
 				return row;
 			}
@@ -563,7 +588,7 @@ cfa_tcam_mgr_empty_row_alloc(int sess_idx, struct cfa_tcam_mgr_context *context,
 		 * just install new entry in empty_row.
 		 */
 		row = cfa_tcam_mgr_row_ptr_get(tcam_rows, empty_row, row_size);
-		cfa_tcam_mgr_row_entry_install(sess_idx, row, parms, entry, id,
+		cfa_tcam_mgr_row_entry_install(tfp, row, parms, entry, id,
 					       key_slices, empty_row,
 					       TF_TCAM_SLICE_INVALID);
 		return row;
@@ -587,15 +612,19 @@ cfa_tcam_mgr_empty_row_alloc(int sess_idx, struct cfa_tcam_mgr_context *context,
 			from_row_idx = i;
 			from_row = row;
 		}
-		cfa_tcam_mgr_row_move(sess_idx, context, parms->dir, parms->type,
+		cfa_tcam_mgr_row_move(tcam_mgr_data, tfp, parms->dir,
+				      parms->type,
 				      table_data, to_row_idx, to_row,
 				      from_row_idx, from_row);
+		CFA_TCAM_MGR_TRACE(INFO, "Moved row %d to row %d.\n",
+				   from_row_idx, to_row_idx);
+
 		to_row = from_row;
 		to_row_idx = from_row_idx;
 	}
 	to_row = cfa_tcam_mgr_row_ptr_get(tcam_rows, target_row, row_size);
 	memset(to_row, 0, row_size);
-	cfa_tcam_mgr_row_entry_install(sess_idx, to_row, parms, entry, id,
+	cfa_tcam_mgr_row_entry_install(tfp, to_row, parms, entry, id,
 				       key_slices, target_row,
 				       TF_TCAM_SLICE_INVALID);
 
@@ -607,24 +636,26 @@ cfa_tcam_mgr_empty_row_alloc(int sess_idx, struct cfa_tcam_mgr_context *context,
  * used necessary for the entries that are installed.
  */
 static void
-cfa_tcam_mgr_rows_combine(int sess_idx, struct cfa_tcam_mgr_context *context,
+cfa_tcam_mgr_rows_combine(struct cfa_tcam_mgr_data *tcam_mgr_data,
+			  struct tf *tfp,
 			  struct cfa_tcam_mgr_free_parms *parms,
 			  struct cfa_tcam_mgr_table_data *table_data,
 			  int changed_row_index)
 {
+	int  to_row_idx, from_row_idx, start_row, end_row, max_slices;
 	struct cfa_tcam_mgr_table_rows_0 *from_row = NULL;
-	struct cfa_tcam_mgr_table_rows_0 *to_row;
 	struct cfa_tcam_mgr_table_rows_0 *tcam_rows;
-	int  i, j, row_size;
-	int  to_row_idx, from_row_idx, start_row, end_row, max_slices;
+	struct cfa_tcam_mgr_table_rows_0 *to_row;
 	bool entry_moved = false;
+	int  i, j, row_size;
 
 	start_row  = table_data->start_row;
 	end_row	   = table_data->end_row;
 	max_slices = table_data->max_slices;
 	tcam_rows  = table_data->tcam_rows;
 
-	row_size   = cfa_tcam_mgr_row_size_get(sess_idx, parms->dir, parms->type);
+	row_size   = cfa_tcam_mgr_row_size_get(tcam_mgr_data, parms->dir,
+					       parms->type);
 
 	from_row_idx = changed_row_index;
 	from_row = cfa_tcam_mgr_row_ptr_get(tcam_rows, from_row_idx, row_size);
@@ -658,8 +689,8 @@ cfa_tcam_mgr_rows_combine(int sess_idx, struct cfa_tcam_mgr_context *context,
 				     j++) {
 					if (!ROW_ENTRY_INUSE(to_row, j)) {
 						cfa_tcam_mgr_entry_move
-							(sess_idx,
-							 context,
+							(tcam_mgr_data,
+							 tfp,
 							 parms->dir,
 							 parms->type,
 							 from_row->entries[i],
@@ -680,14 +711,14 @@ cfa_tcam_mgr_rows_combine(int sess_idx, struct cfa_tcam_mgr_context *context,
 #ifdef TF_FLOW_SCALE_QUERY
 			/* CFA update usage state when moved entries */
 			if (entry_moved) {
-				if (tf_tcam_usage_update(context->tfp->session->session_id.id,
+				if (tf_tcam_usage_update(tfp,
 							 parms->dir,
 							 parms->type,
 							 to_row,
 							 TF_RESC_ALLOC)) {
 					CFA_TCAM_MGR_TRACE(DEBUG, "TF tcam usage update failed\n");
 				}
-				if (tf_tcam_usage_update(context->tfp->session->session_id.id,
+				if (tf_tcam_usage_update(tfp,
 							 parms->dir,
 							 parms->type,
 							 from_row,
@@ -707,29 +738,28 @@ cfa_tcam_mgr_rows_combine(int sess_idx, struct cfa_tcam_mgr_context *context,
 
 /*
  * This function will ensure that all rows, except those of the highest
- * priority, at the end of the table.  When this function is finished, all the
+ * priority, are at the end of the table.  When this function is finished, all
  * empty rows should be between the highest priority rows at the beginning of
  * the table and the rest of the rows with lower priorities.
- */
-/*
- * Will need to free the row left newly empty as a result of moving.
  *
+ * Will need to free the row left newly empty as a result of moving.
  * Return row to free to caller.  If new_row_to_free < 0, then no new row to
  * free.
  */
 static void
-cfa_tcam_mgr_rows_compact(int sess_idx, struct cfa_tcam_mgr_context *context,
+cfa_tcam_mgr_rows_compact(struct cfa_tcam_mgr_data *tcam_mgr_data,
+			  struct tf *tfp,
 			  struct cfa_tcam_mgr_free_parms *parms,
 			  struct cfa_tcam_mgr_table_data *table_data,
 			  int *new_row_to_free,
 			  int changed_row_index)
 {
+	int  to_row_idx = 0, from_row_idx = 0, start_row = 0, end_row = 0;
 	struct cfa_tcam_mgr_table_rows_0 *from_row = NULL;
+	struct cfa_tcam_mgr_table_rows_0 *tcam_rows;
 	struct cfa_tcam_mgr_table_rows_0 *to_row;
 	struct cfa_tcam_mgr_table_rows_0 *row;
-	struct cfa_tcam_mgr_table_rows_0 *tcam_rows;
 	int  i, row_size, priority;
-	int  to_row_idx = 0, from_row_idx = 0, start_row = 0, end_row = 0;
 
 	*new_row_to_free = -1;
 
@@ -737,7 +767,8 @@ cfa_tcam_mgr_rows_compact(int sess_idx, struct cfa_tcam_mgr_context *context,
 	end_row	   = table_data->end_row;
 	tcam_rows  = table_data->tcam_rows;
 
-	row_size   = cfa_tcam_mgr_row_size_get(sess_idx, parms->dir, parms->type);
+	row_size   = cfa_tcam_mgr_row_size_get(tcam_mgr_data, parms->dir,
+					       parms->type);
 
 	/*
 	 * The row is no longer in use, so see if rows need to be moved in order
@@ -791,14 +822,21 @@ cfa_tcam_mgr_rows_compact(int sess_idx, struct cfa_tcam_mgr_context *context,
 				 * to fill the newly empty (by free or by move)
 				 * row.
 				 */
-				if (from_row != NULL) {
-					cfa_tcam_mgr_row_move(sess_idx, context,
+				if (from_row) {
+					cfa_tcam_mgr_row_move(tcam_mgr_data,
+							      tfp,
 							      parms->dir,
 							      parms->type,
 							      table_data,
-							     to_row_idx, to_row,
+							      to_row_idx,
+							      to_row,
 							      from_row_idx,
 							      from_row);
+					CFA_TCAM_MGR_TRACE(INFO,
+							   "Moved row %d "
+							   "to row %d.\n",
+							   from_row_idx,
+							   to_row_idx);
 					*new_row_to_free = from_row_idx;
 					to_row	   = from_row;
 					to_row_idx = from_row_idx;
@@ -811,11 +849,12 @@ cfa_tcam_mgr_rows_compact(int sess_idx, struct cfa_tcam_mgr_context *context,
 		}
 	}
 
-	if (from_row != NULL) {
-		cfa_tcam_mgr_row_move(sess_idx, context, parms->dir, parms->type,
-				      table_data,
-				      to_row_idx, to_row,
-				      from_row_idx, from_row);
+	if (from_row) {
+		cfa_tcam_mgr_row_move(tcam_mgr_data, tfp, parms->dir,
+				      parms->type, table_data, to_row_idx,
+				      to_row, from_row_idx, from_row);
+		CFA_TCAM_MGR_TRACE(INFO, "Moved row %d to row %d.\n",
+				   from_row_idx, to_row_idx);
 		*new_row_to_free = from_row_idx;
 	}
 }
@@ -824,46 +863,51 @@ cfa_tcam_mgr_rows_compact(int sess_idx, struct cfa_tcam_mgr_context *context,
  * This function is to set table limits for the logical TCAM tables.
  */
 static int
-cfa_tcam_mgr_table_limits_set(int sess_idx, struct cfa_tcam_mgr_init_parms *parms)
+cfa_tcam_mgr_table_limits_set(struct cfa_tcam_mgr_data *tcam_mgr_data,
+			      struct cfa_tcam_mgr_init_parms *parms)
 {
 	struct cfa_tcam_mgr_table_data *table_data;
 	unsigned int dir, type;
 	int start, stride;
 
-	if (parms == NULL)
+	if (!parms)
 		return 0;
 
-	for (dir = 0; dir < ARRAY_SIZE(cfa_tcam_mgr_tables[sess_idx]); dir++)
+	for (dir = 0; dir < ARRAY_SIZE(tcam_mgr_data->cfa_tcam_mgr_tables);
+	     dir++)
 		for (type = 0;
-		     type < ARRAY_SIZE(cfa_tcam_mgr_tables[sess_idx][dir]);
+		     type <
+			ARRAY_SIZE(tcam_mgr_data->cfa_tcam_mgr_tables[dir]);
 		     type++) {
-			table_data = &cfa_tcam_mgr_tables[sess_idx][dir][type];
+			table_data =
+				&tcam_mgr_data->cfa_tcam_mgr_tables[dir][type];
 			/*
 			 * If num_rows is zero, then TCAM Manager did not
 			 * allocate any row storage for that table so cannot
 			 * manage it.
 			 */
-			if (table_data->num_rows == 0)
+			if (!table_data->num_rows)
 				continue;
 			start  = parms->resc[dir][type].start;
 			stride = parms->resc[dir][type].stride;
 			if (start % table_data->max_slices > 0) {
 				CFA_TCAM_MGR_LOG_DIR_TYPE(ERR, dir, type,
-							  "Start of resources (%d) for table (%d) "
-							  "does not begin on row boundary.\n",
-							  start, sess_idx);
+							  "Start of resources"
+							  " (%d) does not begin"
+							  " on row boundary.\n",
+							  start);
 				CFA_TCAM_MGR_LOG_DIR(ERR, dir,
-						     "Start is %d, number of slices "
-						     "is %d.\n",
+						     "Start is %d, number of"
+						     " slices is %d.\n",
 						     start,
 						     table_data->max_slices);
 				return -CFA_TCAM_MGR_ERR_CODE(INVAL);
 			}
 			if (stride % table_data->max_slices > 0) {
 				CFA_TCAM_MGR_LOG_DIR_TYPE(ERR, dir, type,
-							  "Stride of resources (%d) for table (%d)"
+							  "Stride of resources (%d) "
 							  " does not end on row boundary.\n",
-							  stride, sess_idx);
+							  stride);
 				CFA_TCAM_MGR_LOG_DIR(ERR, dir,
 						     "Stride is %d, number of "
 						     "slices is %d.\n",
@@ -871,7 +915,7 @@ cfa_tcam_mgr_table_limits_set(int sess_idx, struct cfa_tcam_mgr_init_parms *parm
 						     table_data->max_slices);
 				return -CFA_TCAM_MGR_ERR_CODE(INVAL);
 			}
-			if (stride == 0) {
+			if (!stride) {
 				table_data->start_row	= 0;
 				table_data->end_row	= 0;
 				table_data->max_entries = 0;
@@ -890,49 +934,123 @@ cfa_tcam_mgr_table_limits_set(int sess_idx, struct cfa_tcam_mgr_init_parms *parm
 	return 0;
 }
 
+static int
+cfa_tcam_mgr_bitmap_alloc(struct tf *tfp __rte_unused,
+			  struct cfa_tcam_mgr_data *tcam_mgr_data)
+{
+	struct tfp_calloc_parms cparms;
+	uint64_t session_bmp_size;
+	struct bitalloc *session_bmp;
+	int32_t first_idx;
+	int max_entries;
+	int rc;
+
+	if (!tcam_mgr_data->cfa_tcam_mgr_max_entries)
+		return -CFA_TCAM_MGR_ERR_CODE(INVAL);
+
+	max_entries = tcam_mgr_data->cfa_tcam_mgr_max_entries;
+	session_bmp_size = (sizeof(uint64_t) *
+				(((max_entries - 1) / sizeof(uint64_t)) + 1));
+
+	cparms.nitems = 1;
+	cparms.size = session_bmp_size;
+	cparms.alignment = 0;
+	rc = tfp_calloc(&cparms);
+	if (rc) {
+		/* Log error */
+		TFP_DRV_LOG(ERR,
+			    "Failed to allocate session bmp, rc:%s\n",
+			    strerror(-rc));
+		return -CFA_TCAM_MGR_ERR_CODE(NOMEM);
+	}
+
+	session_bmp = (struct bitalloc *)cparms.mem_va;
+	rc = ba_init(session_bmp, max_entries, true);
+
+	tcam_mgr_data->session_bmp = session_bmp;
+	tcam_mgr_data->session_bmp_size = max_entries;
+
+	/* Allocate first index to avoid idx 0 */
+	first_idx = ba_alloc(tcam_mgr_data->session_bmp);
+	if (first_idx == BA_FAIL)
+		return -CFA_TCAM_MGR_ERR_CODE(NOSPC);
+
+	TFP_DRV_LOG(INFO,
+		    "session bitmap size is %" PRIX64 "\n",
+		    tcam_mgr_data->session_bmp_size);
+
+	return 0;
+}
+
+static void
+cfa_tcam_mgr_uninit(struct tf *tfp,
+				enum cfa_tcam_mgr_device_type type)
+{
+	switch (type) {
+	case CFA_TCAM_MGR_DEVICE_TYPE_P4:
+		cfa_tcam_mgr_uninit_p4(tfp);
+		break;
+	case CFA_TCAM_MGR_DEVICE_TYPE_P5:
+		cfa_tcam_mgr_uninit_p58(tfp);
+		break;
+	default:
+		CFA_TCAM_MGR_LOG(ERR, "No such device %d\n", type);
+		return;
+	}
+}
+
 int
-cfa_tcam_mgr_init(int sess_idx, enum cfa_tcam_mgr_device_type type,
+cfa_tcam_mgr_init(struct tf *tfp, enum cfa_tcam_mgr_device_type type,
 		  struct cfa_tcam_mgr_init_parms *parms)
 {
 	struct cfa_tcam_mgr_table_data *table_data;
+	struct cfa_tcam_mgr_data *tcam_mgr_data;
 	unsigned int dir, tbl_type;
+	struct tf_session *tfs;
 	int rc;
 
+	rc = tf_session_get_session_internal(tfp, &tfs);
+	if (rc)
+		return rc;
+
 	switch (type) {
 	case CFA_TCAM_MGR_DEVICE_TYPE_P4:
-	case CFA_TCAM_MGR_DEVICE_TYPE_SR:
-		rc = cfa_tcam_mgr_init_p4(sess_idx, &entry_data[sess_idx]);
+		rc = cfa_tcam_mgr_init_p4(tfp);
 		break;
 	case CFA_TCAM_MGR_DEVICE_TYPE_P5:
-		rc = cfa_tcam_mgr_init_p58(sess_idx, &entry_data[sess_idx]);
+		rc = cfa_tcam_mgr_init_p58(tfp);
 		break;
 	default:
-		CFA_TCAM_MGR_LOG(ERR, "No such device %d for sess_idx %d\n",
-				 type, sess_idx);
+		CFA_TCAM_MGR_LOG(ERR, "No such device %d\n", type);
 		return -CFA_TCAM_MGR_ERR_CODE(NODEV);
 	}
-	if (rc < 0)
+	if (rc)
 		return rc;
 
-	rc = cfa_tcam_mgr_table_limits_set(sess_idx, parms);
-	if (rc < 0)
+	tcam_mgr_data = tfs->tcam_mgr_handle;
+	rc = cfa_tcam_mgr_table_limits_set(tcam_mgr_data, parms);
+	if (rc)
 		return rc;
 
 	/* Now calculate the max entries per table and global max entries based
 	 * on the updated table limits.
 	 */
-	cfa_tcam_mgr_max_entries[sess_idx] = 0;
-	for (dir = 0; dir < ARRAY_SIZE(cfa_tcam_mgr_tables[sess_idx]); dir++)
+	tcam_mgr_data->cfa_tcam_mgr_max_entries = 0;
+	for (dir = 0; dir < ARRAY_SIZE(tcam_mgr_data->cfa_tcam_mgr_tables);
+	     dir++)
 		for (tbl_type = 0;
-		     tbl_type < ARRAY_SIZE(cfa_tcam_mgr_tables[sess_idx][dir]);
+		     tbl_type <
+			ARRAY_SIZE(tcam_mgr_data->cfa_tcam_mgr_tables[dir]);
 		     tbl_type++) {
-			table_data = &cfa_tcam_mgr_tables[sess_idx][dir][tbl_type];
+			table_data =
+				&tcam_mgr_data->cfa_tcam_mgr_tables[dir]
+								[tbl_type];
 			/*
 			 * If num_rows is zero, then TCAM Manager did not
 			 * allocate any row storage for that table so cannot
 			 * manage it.
 			 */
-			if (table_data->num_rows == 0) {
+			if (!table_data->num_rows) {
 				table_data->start_row = 0;
 				table_data->end_row = 0;
 				table_data->max_entries = 0;
@@ -940,14 +1058,13 @@ cfa_tcam_mgr_init(int sess_idx, enum cfa_tcam_mgr_device_type type,
 				   table_data->num_rows) {
 				CFA_TCAM_MGR_LOG_DIR_TYPE(EMERG, dir, tbl_type,
 							  "End row is out of "
-							  "range (%d >= %d) for sess_idx %d\n",
+							  "range (%d >= %d)\n",
 							  table_data->end_row,
-							  table_data->num_rows,
-							  sess_idx);
+							  table_data->num_rows);
 				return -CFA_TCAM_MGR_ERR_CODE(FAULT);
-			} else if (table_data->max_entries == 0 &&
-				   table_data->start_row == 0 &&
-				   table_data->end_row == 0) {
+			} else if (!table_data->max_entries &&
+				   !table_data->start_row &&
+				   !table_data->end_row) {
 				/* Nothing to do */
 			} else {
 				table_data->max_entries =
@@ -955,51 +1072,45 @@ cfa_tcam_mgr_init(int sess_idx, enum cfa_tcam_mgr_device_type type,
 					(table_data->end_row -
 					 table_data->start_row + 1);
 			}
-			cfa_tcam_mgr_max_entries[sess_idx] += table_data->max_entries;
+			tcam_mgr_data->cfa_tcam_mgr_max_entries +=
+				table_data->max_entries;
 		}
 
-	rc = cfa_tcam_mgr_hwops_init(type);
-	if (rc < 0)
+	rc = cfa_tcam_mgr_hwops_init(tcam_mgr_data, type);
+	if (rc)
 		return rc;
 
-	rc = cfa_tcam_mgr_session_init(sess_idx, type);
-	if (rc < 0)
+	rc = cfa_tcam_mgr_bitmap_alloc(tfp, tcam_mgr_data);
+	if (rc)
 		return rc;
 
-	global_data_initialized[sess_idx] = 1;
-
-	if (parms != NULL)
-		parms->max_entries = cfa_tcam_mgr_max_entries[sess_idx];
+	if (parms)
+		parms->max_entries = tcam_mgr_data->cfa_tcam_mgr_max_entries;
 
-	CFA_TCAM_MGR_LOG(DEBUG, "Global TCAM table initialized for sess_idx %d max entries %d.\n",
-			 sess_idx, cfa_tcam_mgr_max_entries[sess_idx]);
+	CFA_TCAM_MGR_LOG(DEBUG, "Global TCAM tbl initialized max entries %d\n",
+			 tcam_mgr_data->cfa_tcam_mgr_max_entries);
 
 	return 0;
 }
 
 int
-cfa_tcam_mgr_qcaps(struct cfa_tcam_mgr_context *context __rte_unused,
+cfa_tcam_mgr_qcaps(struct tf *tfp __rte_unused,
 		   struct cfa_tcam_mgr_qcaps_parms *parms)
 {
+	struct cfa_tcam_mgr_data *tcam_mgr_data;
+	struct tf_session *tfs;
 	unsigned int type;
-	int rc, sess_idx;
-	uint32_t session_id;
+	int rc;
 
-	CFA_TCAM_MGR_CHECK_PARMS2(context, parms);
+	CFA_TCAM_MGR_CHECK_PARMS2(tfp, parms);
 
-	rc = cfa_tcam_mgr_get_session_from_context(context, &session_id);
-	if (rc < 0)
+	rc = tf_session_get_session_internal(tfp, &tfs);
+	if (rc)
 		return rc;
 
-	sess_idx = cfa_tcam_mgr_session_find(session_id);
-	if (sess_idx < 0) {
-		CFA_TCAM_MGR_LOG_0(ERR, "Session not found.\n");
-		return sess_idx;
-	}
-
-	if (global_data_initialized[sess_idx] == 0) {
-		CFA_TCAM_MGR_LOG(ERR, "PANIC: No TCAM data created for sess_idx %d\n",
-				 sess_idx);
+	tcam_mgr_data = tfs->tcam_mgr_handle;
+	if (!tcam_mgr_data) {
+		CFA_TCAM_MGR_LOG_0(ERR, "No TCAM data created for session.\n");
 		return -CFA_TCAM_MGR_ERR_CODE(PERM);
 	}
 
@@ -1011,12 +1122,91 @@ cfa_tcam_mgr_qcaps(struct cfa_tcam_mgr_context *context __rte_unused,
 	parms->rx_tcam_supported = 0;
 	parms->tx_tcam_supported = 0;
 	for (type = 0; type < CFA_TCAM_MGR_TBL_TYPE_MAX; type++) {
-		if (cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX][type].max_entries > 0 &&
-		    cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX][type].hcapi_type > 0)
-			parms->rx_tcam_supported |= 1 << cfa_tcam_mgr_get_phys_table_type(type);
-		if (cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX][type].max_entries > 0 &&
-		    cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX][type].hcapi_type > 0)
-			parms->tx_tcam_supported |= 1 << cfa_tcam_mgr_get_phys_table_type(type);
+		if (tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
+				[type].max_entries > 0 &&
+		    tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
+				[type].hcapi_type > 0)
+			parms->rx_tcam_supported |=
+				1 << cfa_tcam_mgr_get_phys_table_type(type);
+		if (tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
+				[type].max_entries > 0 &&
+		    tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
+				[type].hcapi_type > 0)
+			parms->tx_tcam_supported |=
+				1 << cfa_tcam_mgr_get_phys_table_type(type);
+	}
+
+	return 0;
+}
+
+static
+int cfa_tcam_mgr_validate_tcam_cnt(struct tf *tfp  __rte_unused,
+				   struct cfa_tcam_mgr_data *tcam_mgr_data,
+				   uint16_t tcam_cnt[]
+						[CFA_TCAM_MGR_TBL_TYPE_MAX])
+{
+	struct cfa_tcam_mgr_table_data *table_data;
+	unsigned int dir, type;
+	uint16_t requested_cnt;
+
+	/* Validate session request */
+	for (dir = 0; dir < ARRAY_SIZE(tcam_mgr_data->cfa_tcam_mgr_tables);
+			dir++) {
+		for (type = 0;
+		     type < ARRAY_SIZE(tcam_mgr_data->cfa_tcam_mgr_tables[dir]);
+		     type++) {
+			table_data =
+				&tcam_mgr_data->cfa_tcam_mgr_tables[dir][type];
+			requested_cnt = tcam_cnt[dir][type];
+			/* Only check if table supported (max_entries > 0). */
+			if (table_data->max_entries > 0 &&
+			    requested_cnt > table_data->max_entries) {
+				CFA_TCAM_MGR_TRACE(ERR,
+						   "%s: %s Requested %d, available %d\n",
+						   tf_dir_2_str(dir),
+						   cfa_tcam_mgr_tbl_2_str(type),
+						   requested_cnt,
+						   table_data->max_entries);
+				return -CFA_TCAM_MGR_ERR_CODE(NOSPC);
+			}
+		}
+	}
+
+	return 0;
+}
+
+static int cfa_tcam_mgr_free_entries(struct tf *tfp)
+{
+	struct cfa_tcam_mgr_free_parms free_parms;
+	struct cfa_tcam_mgr_data *tcam_mgr_data;
+	struct tf_session *tfs;
+	int entry_id = 0;
+	int rc = 0;
+
+	CFA_TCAM_MGR_TRACE(DEBUG, "%s: Unbinding session\n", __func__);
+
+	rc = tf_session_get_session_internal(tfp, &tfs);
+	if (rc)
+		return rc;
+
+	tcam_mgr_data = tfs->tcam_mgr_handle;
+	memset(&free_parms, 0, sizeof(free_parms));
+
+	/*
+	 * Since we are freeing all pending TCAM entries (which is typically
+	 * done during tcam_unbind), we don't know the type of each entry.
+	 * So we set the type to MAX as a hint to cfa_tcam_mgr_free() to
+	 * figure out the actual type. We need to set it through each
+	 * iteration in the loop below; otherwise, the type determined for
+	 * the first entry would be used for subsequent entries that may or
+	 * may not be of the same type, resulting in errors.
+	 */
+
+	while ((entry_id = ba_find_next_inuse_free(tcam_mgr_data->session_bmp,
+						   0)) >= 0) {
+		free_parms.id = entry_id;
+		free_parms.type = CFA_TCAM_MGR_TBL_TYPE_MAX;
+		cfa_tcam_mgr_free(tfp, &free_parms);
 	}
 
 	return 0;
@@ -1027,7 +1217,7 @@ cfa_tcam_mgr_qcaps(struct cfa_tcam_mgr_context *context __rte_unused,
  * and also update the sizes in the tcam count array
  */
 static int
-cfa_tcam_mgr_shared_wc_bind(uint32_t sess_idx, bool dual_ha_app,
+cfa_tcam_mgr_shared_wc_bind(struct tf *tfp, bool dual_ha_app,
 			    uint16_t tcam_cnt[][CFA_TCAM_MGR_TBL_TYPE_MAX])
 {
 	uint16_t start_row, end_row, max_entries, slices;
@@ -1036,13 +1226,13 @@ cfa_tcam_mgr_shared_wc_bind(uint32_t sess_idx, bool dual_ha_app,
 	int rc;
 
 	for (dir = 0; dir < TF_DIR_MAX; dir++) {
-		rc = cfa_tcam_mgr_tables_get(sess_idx, dir,
+		rc = cfa_tcam_mgr_tables_get(tfp, dir,
 					     CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS,
 					     &start_row, &end_row, &max_entries, &slices);
 		if (rc)
 			return rc;
 		if (max_entries) {
-			rc = cfa_tcam_mgr_tables_set(sess_idx, dir,
+			rc = cfa_tcam_mgr_tables_set(tfp, dir,
 						     CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS,
 						     start_row,
 						     start_row +
@@ -1050,7 +1240,7 @@ cfa_tcam_mgr_shared_wc_bind(uint32_t sess_idx, bool dual_ha_app,
 						     max_entries / num_pools);
 			if (rc)
 				return rc;
-			rc = cfa_tcam_mgr_tables_set(sess_idx, dir,
+			rc = cfa_tcam_mgr_tables_set(tfp, dir,
 						     CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS,
 						     start_row +
 						     ((max_entries / slices) / num_pools),
@@ -1059,7 +1249,7 @@ cfa_tcam_mgr_shared_wc_bind(uint32_t sess_idx, bool dual_ha_app,
 						     max_entries / num_pools);
 			if (rc)
 				return rc;
-			rc = cfa_tcam_mgr_tables_set(sess_idx, dir,
+			rc = cfa_tcam_mgr_tables_set(tfp, dir,
 						     CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS,
 						     0, 0, 0);
 			if (rc)
@@ -1076,24 +1266,24 @@ cfa_tcam_mgr_shared_wc_bind(uint32_t sess_idx, bool dual_ha_app,
 }
 
 int
-cfa_tcam_mgr_bind(struct cfa_tcam_mgr_context *context,
+cfa_tcam_mgr_bind(struct tf *tfp,
 		  struct cfa_tcam_mgr_cfg_parms *parms)
 {
-	struct cfa_tcam_mgr_table_data   *table_data;
+	struct cfa_tcam_mgr_table_data *table_data;
+	enum cfa_tcam_mgr_device_type device_type;
+	struct cfa_tcam_mgr_data *tcam_mgr_data;
 	struct tf_dev_info *dev;
-	unsigned int dir;
-	int rc, sess_idx;
-	uint32_t session_id;
 	struct tf_session *tfs;
-	unsigned int type;
 	int prev_max_entries;
+	unsigned int type;
 	int start, stride;
-	enum cfa_tcam_mgr_device_type device_type;
+	unsigned int dir;
+	int rc;
 
-	CFA_TCAM_MGR_CHECK_PARMS2(context, parms);
+	CFA_TCAM_MGR_CHECK_PARMS2(tfp, parms);
 
 	/* Retrieve the session information */
-	rc = tf_session_get_session_internal(context->tfp, &tfs);
+	rc = tf_session_get_session_internal(tfp, &tfs);
 	if (rc)
 		return rc;
 
@@ -1106,9 +1296,6 @@ cfa_tcam_mgr_bind(struct cfa_tcam_mgr_context *context,
 	case TF_DEVICE_TYPE_P4:
 		device_type = CFA_TCAM_MGR_DEVICE_TYPE_P4;
 		break;
-	case TF_DEVICE_TYPE_SR:
-		device_type = CFA_TCAM_MGR_DEVICE_TYPE_SR;
-		break;
 	case TF_DEVICE_TYPE_P5:
 		device_type = CFA_TCAM_MGR_DEVICE_TYPE_P5;
 		break;
@@ -1117,27 +1304,21 @@ cfa_tcam_mgr_bind(struct cfa_tcam_mgr_context *context,
 		return -CFA_TCAM_MGR_ERR_CODE(NODEV);
 	}
 
-	rc = cfa_tcam_mgr_get_session_from_context(context, &session_id);
-	if (rc < 0)
-		return rc;
-
-	sess_idx = cfa_tcam_mgr_session_add(session_id);
-	if (sess_idx < 0)
-		return sess_idx;
-
-	if (global_data_initialized[sess_idx] == 0) {
-		rc = cfa_tcam_mgr_init(sess_idx, device_type, NULL);
-		if (rc < 0)
+	tcam_mgr_data = tfs->tcam_mgr_handle;
+	if (!tcam_mgr_data) {
+		rc = cfa_tcam_mgr_init(tfp, device_type, NULL);
+		if (rc)
 			return rc;
+		tcam_mgr_data = tfs->tcam_mgr_handle;
 	}
 
-	if (parms->num_elements != ARRAY_SIZE(cfa_tcam_mgr_tables[sess_idx][dir])) {
+	if (parms->num_elements !=
+		ARRAY_SIZE(tcam_mgr_data->cfa_tcam_mgr_tables[dir])) {
 		CFA_TCAM_MGR_LOG(ERR,
 				 "Session element count (%d) differs "
-				 "from table count (%zu) for sess_idx %d.\n",
+				 "from table count (%zu)\n",
 				 parms->num_elements,
-				 ARRAY_SIZE(cfa_tcam_mgr_tables[sess_idx][dir]),
-				 sess_idx);
+			ARRAY_SIZE(tcam_mgr_data->cfa_tcam_mgr_tables[dir]));
 		return -CFA_TCAM_MGR_ERR_CODE(INVAL);
 	}
 
@@ -1145,48 +1326,51 @@ cfa_tcam_mgr_bind(struct cfa_tcam_mgr_context *context,
 	 * Only managing one session. resv_res contains the resources allocated
 	 * to this session by the resource manager.  Update the limits on TCAMs.
 	 */
-	for (dir = 0; dir < ARRAY_SIZE(cfa_tcam_mgr_tables[sess_idx]); dir++) {
+	for (dir = 0; dir < ARRAY_SIZE(tcam_mgr_data->cfa_tcam_mgr_tables);
+		dir++) {
 		for (type = 0;
-		     type < ARRAY_SIZE(cfa_tcam_mgr_tables[sess_idx][dir]);
+		     type <
+			ARRAY_SIZE(tcam_mgr_data->cfa_tcam_mgr_tables[dir]);
 		     type++) {
-			table_data = &cfa_tcam_mgr_tables[sess_idx][dir][type];
+			table_data =
+				&tcam_mgr_data->cfa_tcam_mgr_tables[dir][type];
 			prev_max_entries = table_data->max_entries;
 			/*
 			 * In AFM logical tables, max_entries is initialized to
 			 * zero.  These logical tables are not used when TCAM
 			 * Manager is in the core so skip.
 			 */
-			if (prev_max_entries == 0)
+			if (!prev_max_entries)
 				continue;
 			start  = parms->resv_res[dir][type].start;
 			stride = parms->resv_res[dir][type].stride;
 			if (start % table_data->max_slices > 0) {
 				CFA_TCAM_MGR_LOG_DIR_TYPE(ERR, dir, type,
-					 "Start of resources (%d) for table(%d) "
-					 "does not begin on row boundary.\n",
-					 start, sess_idx);
+					 "%s: %s Resource:%d not row bounded\n",
+					 tf_dir_2_str(dir),
+					 cfa_tcam_mgr_tbl_2_str(type),
+					 start);
 				CFA_TCAM_MGR_LOG_DIR(ERR, dir,
-					    "Start is %d, number of slices "
-					    "is %d.\n",
-					    start,
+					    "%s: Start:%d, num slices:%d\n",
+					    tf_dir_2_str(dir), start,
 					    table_data->max_slices);
-				(void)cfa_tcam_mgr_session_free(session_id, context);
+				cfa_tcam_mgr_free_entries(tfp);
 				return -CFA_TCAM_MGR_ERR_CODE(INVAL);
 			}
 			if (stride % table_data->max_slices > 0) {
 				CFA_TCAM_MGR_LOG_DIR_TYPE(ERR, dir, type,
-					   "Stride of resources (%d) for table(%d) "
-					   "does not end on row boundary.\n",
-					   stride, sess_idx);
+					   "%s: %s Resource:%d not row bound\n",
+					   tf_dir_2_str(dir),
+					   cfa_tcam_mgr_tbl_2_str(type),
+					   stride);
 				CFA_TCAM_MGR_LOG_DIR(ERR, dir,
-					    "Stride is %d, number of "
-					    "slices is %d.\n",
-					    stride,
+					    "%s: Stride:%d num slices:%d\n",
+					    tf_dir_2_str(dir), stride,
 					    table_data->max_slices);
-				(void)cfa_tcam_mgr_session_free(session_id, context);
+				cfa_tcam_mgr_free_entries(tfp);
 				return -CFA_TCAM_MGR_ERR_CODE(INVAL);
 			}
-			if (stride == 0) {
+			if (!stride) {
 				table_data->start_row	= 0;
 				table_data->end_row	= 0;
 				table_data->max_entries = 0;
@@ -1200,25 +1384,34 @@ cfa_tcam_mgr_bind(struct cfa_tcam_mgr_context *context,
 					(table_data->end_row -
 					 table_data->start_row + 1);
 			}
-			cfa_tcam_mgr_max_entries[sess_idx] += (table_data->max_entries -
-						     prev_max_entries);
+			tcam_mgr_data->cfa_tcam_mgr_max_entries +=
+				(table_data->max_entries - prev_max_entries);
 		}
 	}
 
+	CFA_TCAM_MGR_LOG(DEBUG, "TCAM table bind for max entries %d.\n",
+			 tcam_mgr_data->cfa_tcam_mgr_max_entries);
+
 	if (tf_session_is_shared_hotup_session(tfs)) {
-		rc = cfa_tcam_mgr_shared_wc_bind(sess_idx, false, parms->tcam_cnt);
+		rc = cfa_tcam_mgr_shared_wc_bind(tfp, false,
+						 parms->tcam_cnt);
 		if (rc) {
-			(void)cfa_tcam_mgr_session_free(session_id, context);
+			cfa_tcam_mgr_free_entries(tfp);
 			return rc;
 		}
 	}
 
-	rc = cfa_tcam_mgr_session_cfg(session_id, parms->tcam_cnt);
-	if (rc < 0) {
-		(void)cfa_tcam_mgr_session_free(session_id, context);
+	rc = cfa_tcam_mgr_validate_tcam_cnt(tfp, tcam_mgr_data,
+					    parms->tcam_cnt);
+	if (rc) {
+		cfa_tcam_mgr_free_entries(tfp);
 		return rc;
 	}
 
+#ifdef CFA_TCAM_MGR_TRACING
+	cfa_tcam_mgr_tables_dump(tfp, TF_DIR_MAX, CFA_TCAM_MGR_TBL_TYPE_MAX);
+#endif
+
 #ifdef TF_FLOW_SCALE_QUERY
 	/* Initialize the WC TCAM usage state */
 	tf_tcam_usage_init(tfp);
@@ -1228,48 +1421,106 @@ cfa_tcam_mgr_bind(struct cfa_tcam_mgr_context *context,
 }
 
 int
-cfa_tcam_mgr_unbind(struct cfa_tcam_mgr_context *context)
+cfa_tcam_mgr_unbind(struct tf *tfp)
 {
-	int rc, sess_idx;
-	uint32_t session_id;
+	enum cfa_tcam_mgr_device_type device_type;
+	struct cfa_tcam_mgr_data *tcam_mgr_data;
+	struct tf_dev_info *dev;
+	struct tf_session *tfs;
+	int rc;
 
-	CFA_TCAM_MGR_CHECK_PARMS1(context);
+	CFA_TCAM_MGR_CHECK_PARMS1(tfp);
 
-	rc = cfa_tcam_mgr_get_session_from_context(context, &session_id);
-	if (rc < 0)
+	rc = tf_session_get_session_internal(tfp, &tfs);
+	if (rc)
+		return rc;
+
+	/* Retrieve the device information */
+	rc = tf_session_get_device(tfs, &dev);
+	if (rc)
 		return rc;
 
-	sess_idx = cfa_tcam_mgr_session_find(session_id);
-	if (sess_idx < 0) {
-		CFA_TCAM_MGR_LOG_0(ERR, "Session not found.\n");
-		return sess_idx;
+	switch (dev->type) {
+	case TF_DEVICE_TYPE_P4:
+		device_type = CFA_TCAM_MGR_DEVICE_TYPE_P4;
+		break;
+	case TF_DEVICE_TYPE_P5:
+		device_type = CFA_TCAM_MGR_DEVICE_TYPE_P5;
+		break;
+	default:
+		CFA_TCAM_MGR_TRACE(DEBUG,
+				   "%s: TF tcam get dev type failed\n",
+				   __func__);
+		return -CFA_TCAM_MGR_ERR_CODE(NODEV);
 	}
 
-	if (global_data_initialized[sess_idx] == 0) {
-		CFA_TCAM_MGR_LOG(INFO, "PANIC: No TCAM data created for sess_idx %d\n",
-				 sess_idx);
+	tcam_mgr_data = tfs->tcam_mgr_handle;
+	if (!tcam_mgr_data) {
+		CFA_TCAM_MGR_TRACE(ERROR,
+				   "%s: No TCAM data created for session\n",
+				   __func__);
 		return -CFA_TCAM_MGR_ERR_CODE(PERM);
 	}
 
-	(void)cfa_tcam_mgr_session_free(session_id, context);
+	cfa_tcam_mgr_free_entries(tfp);
+	cfa_tcam_mgr_uninit(tfp, device_type);
+
+	return 0;
+}
+
+static int cfa_tcam_mgr_alloc_entry(struct tf *tfp __rte_unused,
+				    struct cfa_tcam_mgr_data *tcam_mgr_data,
+				    enum tf_dir dir __rte_unused)
+{
+	int32_t free_idx;
+
+	/* Scan bitmap to get the free pool */
+	free_idx = ba_alloc(tcam_mgr_data->session_bmp);
+	if (free_idx == BA_FAIL) {
+		CFA_TCAM_MGR_TRACE(ERROR,
+				   "%s: Table full (session)\n", __func__);
+		return -CFA_TCAM_MGR_ERR_CODE(NOSPC);
+	}
+
+	return free_idx;
+}
+
+static int cfa_tcam_mgr_free_entry(struct tf *tfp __rte_unused,
+				   struct cfa_tcam_mgr_data *tcam_mgr_data,
+				   unsigned int entry_id,
+				   enum tf_dir dir __rte_unused,
+				   enum cfa_tcam_mgr_tbl_type type __rte_unused)
+{
+	int rc = 0;
+
+	if (entry_id >= tcam_mgr_data->session_bmp_size)
+		return -CFA_TCAM_MGR_ERR_CODE(INVAL);
+
+	rc = ba_free(tcam_mgr_data->session_bmp, entry_id);
+	if (rc)
+		return rc;
+
+	CFA_TCAM_MGR_TRACE(INFO,
+			   "%s: Remove session from entry %d\n",
+			   __func__, entry_id);
 
-	global_data_initialized[sess_idx] = 0;
 	return 0;
 }
 
 int
-cfa_tcam_mgr_alloc(struct cfa_tcam_mgr_context *context,
+cfa_tcam_mgr_alloc(struct tf *tfp,
 		   struct cfa_tcam_mgr_alloc_parms *parms)
 {
-	struct cfa_tcam_mgr_entry_data    entry;
+	struct cfa_tcam_mgr_table_data *table_data;
+	struct cfa_tcam_mgr_data *tcam_mgr_data;
 	struct cfa_tcam_mgr_table_rows_0 *row;
-	struct cfa_tcam_mgr_table_data   *table_data;
+	struct cfa_tcam_mgr_entry_data entry;
+	struct tf_session *tfs;
+	int key_slices, rc;
 	int dir, tbl_type;
-	int key_slices, rc, sess_idx;
 	int new_entry_id;
-	uint32_t session_id;
 
-	CFA_TCAM_MGR_CHECK_PARMS2(context, parms);
+	CFA_TCAM_MGR_CHECK_PARMS2(tfp, parms);
 
 	dir = parms->dir;
 	tbl_type = parms->type;
@@ -1289,40 +1540,31 @@ cfa_tcam_mgr_alloc(struct cfa_tcam_mgr_context *context,
 #if TF_TCAM_PRIORITY_MAX < UINT16_MAX
 	if (parms->priority > TF_TCAM_PRIORITY_MAX) {
 		CFA_TCAM_MGR_LOG_DIR(ERR, dir,
-				     "Priority (%u) out of range (%u -%u).\n",
-				     parms->priority,
+				     "%s: Priority:%u out of range (%u-%u).\n",
+				     tf_dir_2_str(dir), parms->priority,
 				     TF_TCAM_PRIORITY_MIN,
 				     TF_TCAM_PRIORITY_MAX);
 	}
 #endif
 
-	/* Check for session limits */
-	rc = cfa_tcam_mgr_get_session_from_context(context, &session_id);
-	if (rc < 0)
+	rc = tf_session_get_session_internal(tfp, &tfs);
+	if (rc)
 		return rc;
 
-	sess_idx = cfa_tcam_mgr_session_find(session_id);
-	if (sess_idx < 0) {
-		CFA_TCAM_MGR_LOG(ERR, "Session 0x%08x not found.\n",
-				 session_id);
-		return -CFA_TCAM_MGR_ERR_CODE(NODEV);
-	}
-
-	if (global_data_initialized[sess_idx] == 0) {
-		CFA_TCAM_MGR_LOG(ERR, "PANIC: No TCAM data created for sess_idx %d\n",
-				 sess_idx);
+	tcam_mgr_data = tfs->tcam_mgr_handle;
+	if (!tcam_mgr_data) {
+		CFA_TCAM_MGR_LOG(ERR, "No TCAM data created for session\n");
 		return -CFA_TCAM_MGR_ERR_CODE(PERM);
 	}
 
-	table_data = &cfa_tcam_mgr_tables[sess_idx][dir][tbl_type];
+	table_data = &tcam_mgr_data->cfa_tcam_mgr_tables[dir][tbl_type];
 
-	if (parms->key_size == 0 ||
+	if (!parms->key_size ||
 	    parms->key_size > table_data->row_width) {
 		CFA_TCAM_MGR_LOG_DIR(ERR, dir,
-				     "Invalid key size:%d (range 1-%d) sess_idx %d.\n",
+				     "Invalid key size:%d (range 1-%d).\n",
 				     parms->key_size,
-				     table_data->row_width,
-				     sess_idx);
+				     table_data->row_width);
 		return -CFA_TCAM_MGR_ERR_CODE(INVAL);
 	}
 
@@ -1330,48 +1572,46 @@ cfa_tcam_mgr_alloc(struct cfa_tcam_mgr_context *context,
 	if (table_data->used_entries >=
 	    table_data->max_entries) {
 		CFA_TCAM_MGR_LOG_DIR_TYPE(ERR, dir, tbl_type,
-					    "Table full sess_idx %d.\n",
-					    sess_idx);
+					    "Table full.\n");
 		return -CFA_TCAM_MGR_ERR_CODE(NOSPC);
 	}
 
 	/* There is room, now increment counts and allocate an entry. */
-	new_entry_id = cfa_tcam_mgr_session_entry_alloc(session_id,
-							parms->dir,
-							parms->type);
+	new_entry_id = cfa_tcam_mgr_alloc_entry(tfp, tcam_mgr_data, parms->dir);
 	if (new_entry_id < 0)
 		return new_entry_id;
 
 	memset(&entry, 0, sizeof(entry));
 	entry.ref_cnt++;
 
+	CFA_TCAM_MGR_TRACE(INFO, "Allocated entry ID %d.\n", new_entry_id);
+
 	key_slices = cfa_tcam_mgr_get_num_slices(parms->key_size,
 						 (table_data->row_width /
 						  table_data->max_slices));
 
-	row = cfa_tcam_mgr_empty_row_alloc(sess_idx, context, parms, &entry,
+	row = cfa_tcam_mgr_empty_row_alloc(tcam_mgr_data, tfp, parms, &entry,
 					   new_entry_id, key_slices);
-	if (row == NULL) {
+	if (!row) {
 		CFA_TCAM_MGR_LOG_DIR_TYPE(ERR, parms->dir, parms->type,
-					    "Table full (HW) sess_idx %d.\n",
-					    sess_idx);
-		(void)cfa_tcam_mgr_session_entry_free(session_id, new_entry_id,
-						      parms->dir, parms->type);
+					    "Table full (HW).\n");
+		cfa_tcam_mgr_free_entry(tfp, tcam_mgr_data, new_entry_id,
+					parms->dir, parms->type);
 		return -CFA_TCAM_MGR_ERR_CODE(NOSPC);
 	}
 
-	memcpy(&entry_data[sess_idx][new_entry_id],
+	memcpy(&tcam_mgr_data->entry_data[new_entry_id],
 	       &entry,
-	       sizeof(entry_data[sess_idx][new_entry_id]));
+	       sizeof(tcam_mgr_data->entry_data[new_entry_id]));
 	table_data->used_entries += 1;
 
-	cfa_tcam_mgr_entry_insert(sess_idx, new_entry_id, &entry);
+	cfa_tcam_mgr_entry_insert(tcam_mgr_data, tfp, new_entry_id, &entry);
 
 	parms->id = new_entry_id;
 
 #ifdef TF_FLOW_SCALE_QUERY
 	/* CFA update usage state */
-	if (tf_tcam_usage_update(session_id,
+	if (tf_tcam_usage_update(tfp,
 				 parms->dir,
 				 parms->type,
 				 row,
@@ -1384,46 +1624,38 @@ cfa_tcam_mgr_alloc(struct cfa_tcam_mgr_context *context,
 }
 
 int
-cfa_tcam_mgr_free(struct cfa_tcam_mgr_context *context,
+cfa_tcam_mgr_free(struct tf *tfp,
 		  struct cfa_tcam_mgr_free_parms *parms)
 {
+	struct cfa_tcam_mgr_table_data *table_data;
+	struct cfa_tcam_mgr_data *tcam_mgr_data;
 	struct cfa_tcam_mgr_entry_data *entry;
 	struct cfa_tcam_mgr_table_rows_0 *row;
-	struct cfa_tcam_mgr_table_data *table_data;
-	int row_size, rc, sess_idx, new_row_to_free;
-	uint32_t session_id;
+	int row_size, rc, new_row_to_free;
+	struct tf_session *tfs;
 	uint16_t id;
 
-	CFA_TCAM_MGR_CHECK_PARMS2(context, parms);
+	CFA_TCAM_MGR_CHECK_PARMS2(tfp, parms);
 
-	rc = cfa_tcam_mgr_get_session_from_context(context, &session_id);
-	if (rc < 0)
+	rc = tf_session_get_session_internal(tfp, &tfs);
+	if (rc)
 		return rc;
 
-	sess_idx = cfa_tcam_mgr_session_find(session_id);
-	if (sess_idx < 0) {
-		CFA_TCAM_MGR_LOG(ERR, "Session 0x%08x not found.\n",
-				 session_id);
-		return sess_idx;
-	}
-
-	if (global_data_initialized[sess_idx] == 0) {
-		CFA_TCAM_MGR_LOG(INFO, "PANIC: No TCAM data created for sess_idx %d\n",
-				 sess_idx);
+	tcam_mgr_data = tfs->tcam_mgr_handle;
+	if (!tcam_mgr_data) {
+		CFA_TCAM_MGR_LOG(ERR, "No TCAM data created for session\n");
 		return -CFA_TCAM_MGR_ERR_CODE(PERM);
 	}
 
 	id = parms->id;
-	entry = cfa_tcam_mgr_entry_get(sess_idx, id);
-	if (entry == NULL) {
-		CFA_TCAM_MGR_LOG(INFO, "Entry %d not found for sess_idx %d.\n",
-				 id, sess_idx);
+	entry = cfa_tcam_mgr_entry_get(tcam_mgr_data, id);
+	if (!entry) {
+		CFA_TCAM_MGR_LOG(INFO, "Entry %d not found\n", id);
 		return -CFA_TCAM_MGR_ERR_CODE(INVAL);
 	}
 
-	if (entry->ref_cnt == 0) {
-		CFA_TCAM_MGR_LOG(ERR, "Entry %d not in use for sess_idx %d.\n",
-				 id, sess_idx);
+	if (!entry->ref_cnt) {
+		CFA_TCAM_MGR_LOG(ERR, "Entry %d not in use.\n", id);
 		return -CFA_TCAM_MGR_ERR_CODE(INVAL);
 	}
 
@@ -1439,30 +1671,38 @@ cfa_tcam_mgr_free(struct cfa_tcam_mgr_context *context,
 	 */
 	if (parms->type == CFA_TCAM_MGR_TBL_TYPE_MAX) {
 		/* Need to search for the entry in the tables */
-		rc = cfa_tcam_mgr_entry_find(sess_idx, id, &parms->dir, &parms->type);
-		if (rc < 0) {
-			CFA_TCAM_MGR_LOG(ERR, "Entry %d not in tables for sess_idx %d.\n",
-					 id, sess_idx);
+		rc = cfa_tcam_mgr_entry_find(tcam_mgr_data, id, &parms->dir,
+					     &parms->type);
+		if (rc) {
+			CFA_TCAM_MGR_LOG(ERR,
+					 "Entry %d not in tables\n", id);
 			return rc;
 		}
+		CFA_TCAM_MGR_TRACE(INFO, "%s: id: %d dir: 0x%x type: 0x%x\n",
+				   __func__, id, parms->dir, parms->type);
 	}
 
-	table_data = &cfa_tcam_mgr_tables[sess_idx][parms->dir][parms->type];
+	table_data =
+		&tcam_mgr_data->cfa_tcam_mgr_tables[parms->dir][parms->type];
 	parms->hcapi_type = table_data->hcapi_type;
 
-	row_size = cfa_tcam_mgr_row_size_get(sess_idx, parms->dir, parms->type);
+	row_size = cfa_tcam_mgr_row_size_get(tcam_mgr_data, parms->dir,
+					     parms->type);
 
 	row = cfa_tcam_mgr_row_ptr_get(table_data->tcam_rows, entry->row,
 				       row_size);
 
 	entry->ref_cnt--;
 
-	(void)cfa_tcam_mgr_session_entry_free(session_id, id,
-					      parms->dir, parms->type);
+	cfa_tcam_mgr_free_entry(tfp, tcam_mgr_data, id, parms->dir,
+				parms->type);
 
-	if (entry->ref_cnt == 0) {
-		cfa_tcam_mgr_entry_free_msg(sess_idx, context, parms,
-					    entry->row,
+	if (!entry->ref_cnt) {
+		CFA_TCAM_MGR_TRACE(INFO,
+				   "Freeing entry %d, row %d, slice %d.\n",
+				   id, entry->row, entry->slice);
+		cfa_tcam_mgr_entry_free_msg(tcam_mgr_data, tfp,
+					    parms, entry->row,
 					    entry->slice * row->entry_size,
 					    table_data->row_width /
 					    table_data->max_slices *
@@ -1473,7 +1713,7 @@ cfa_tcam_mgr_free(struct cfa_tcam_mgr_context *context,
 
 #ifdef TF_FLOW_SCALE_QUERY
 		/* CFA update usage state */
-		if (tf_tcam_usage_update(session_id,
+		if (tf_tcam_usage_update(tfp,
 					 parms->dir,
 					 parms->type,
 					 row,
@@ -1483,71 +1723,72 @@ cfa_tcam_mgr_free(struct cfa_tcam_mgr_context *context,
 #endif /* TF_FLOW_SCALE_QUERY */
 
 		new_row_to_free = entry->row;
-		cfa_tcam_mgr_rows_combine(sess_idx, context, parms, table_data,
-					  new_row_to_free);
+		cfa_tcam_mgr_rows_combine(tcam_mgr_data, tfp, parms,
+					  table_data, new_row_to_free);
 
 		if (!ROW_INUSE(row)) {
-			cfa_tcam_mgr_rows_compact(sess_idx, context,
+			cfa_tcam_mgr_rows_compact(tcam_mgr_data, tfp,
 						  parms, table_data,
 						  &new_row_to_free,
 						  new_row_to_free);
 			if (new_row_to_free >= 0)
-				cfa_tcam_mgr_entry_free_msg(sess_idx, context, parms,
+				cfa_tcam_mgr_entry_free_msg(tcam_mgr_data,
+						   tfp, parms,
 						   new_row_to_free, 0,
 						   table_data->row_width,
 						   table_data->result_size,
 						   table_data->max_slices);
 		}
 
-		cfa_tcam_mgr_entry_delete(sess_idx, id);
+		cfa_tcam_mgr_entry_delete(tcam_mgr_data, tfp, id);
 		table_data->used_entries -= 1;
+		CFA_TCAM_MGR_TRACE(INFO, "Freed entry %d.\n", id);
+	} else {
+		CFA_TCAM_MGR_TRACE(INFO, "Entry %d ref cnt = %d.\n",
+				   id,
+				   entry->ref_cnt);
 	}
 
 	return 0;
 }
 
 int
-cfa_tcam_mgr_set(struct cfa_tcam_mgr_context *context,
+cfa_tcam_mgr_set(struct tf *tfp,
 		 struct cfa_tcam_mgr_set_parms *parms)
 {
+	struct cfa_tcam_mgr_table_data *table_data;
+	struct cfa_tcam_mgr_data *tcam_mgr_data;
 	struct cfa_tcam_mgr_entry_data *entry;
 	struct cfa_tcam_mgr_table_rows_0 *row;
-	struct cfa_tcam_mgr_table_data *table_data;
-	int rc;
-	int row_size, sess_idx;
 	int entry_size_in_bytes;
-	uint32_t session_id;
+	struct tf_session *tfs;
+	int row_size;
+	int rc;
 
-	CFA_TCAM_MGR_CHECK_PARMS2(context, parms);
+	CFA_TCAM_MGR_CHECK_PARMS2(tfp, parms);
 
-	rc = cfa_tcam_mgr_get_session_from_context(context, &session_id);
-	if (rc < 0)
+	rc = tf_session_get_session_internal(tfp, &tfs);
+	if (rc)
 		return rc;
 
-	sess_idx = cfa_tcam_mgr_session_find(session_id);
-	if (sess_idx < 0) {
-		CFA_TCAM_MGR_LOG(ERR, "Session 0x%08x not found.\n",
-				 session_id);
-		return sess_idx;
-	}
-
-	if (global_data_initialized[sess_idx] == 0) {
-		CFA_TCAM_MGR_LOG(ERR, "PANIC: No TCAM data created for sess_idx %d\n",
-				 sess_idx);
+	tcam_mgr_data = tfs->tcam_mgr_handle;
+	if (!tcam_mgr_data) {
+		CFA_TCAM_MGR_LOG(ERR, "No TCAM data created for session\n");
 		return -CFA_TCAM_MGR_ERR_CODE(PERM);
 	}
 
-	entry = cfa_tcam_mgr_entry_get(sess_idx, parms->id);
-	if (entry == NULL) {
-		CFA_TCAM_MGR_LOG(ERR, "Entry %d not found for sess_idx %d.\n",
-				 parms->id, sess_idx);
+	entry = cfa_tcam_mgr_entry_get(tcam_mgr_data, parms->id);
+	if (!entry) {
+		CFA_TCAM_MGR_LOG(ERR, "Entry %d not found.\n", parms->id);
 		return -CFA_TCAM_MGR_ERR_CODE(INVAL);
 	}
 
-	table_data = &cfa_tcam_mgr_tables[sess_idx][parms->dir][parms->type];
+	table_data =
+		&tcam_mgr_data->cfa_tcam_mgr_tables[parms->dir][parms->type];
 	parms->hcapi_type = table_data->hcapi_type;
 
-	row_size = cfa_tcam_mgr_row_size_get(sess_idx, parms->dir, parms->type);
+	row_size = cfa_tcam_mgr_row_size_get(tcam_mgr_data, parms->dir,
+					     parms->type);
 	row = cfa_tcam_mgr_row_ptr_get(table_data->tcam_rows, entry->row,
 				       row_size);
 
@@ -1558,71 +1799,68 @@ cfa_tcam_mgr_set(struct cfa_tcam_mgr_context *context,
 		CFA_TCAM_MGR_LOG(ERR,
 				"Key size(%d) is different from entry "
 				"size(%d).\n",
-				parms->key_size,
-				entry_size_in_bytes);
+				parms->key_size, entry_size_in_bytes);
 		return -CFA_TCAM_MGR_ERR_CODE(INVAL);
 	}
 
-	rc = cfa_tcam_mgr_entry_set_msg(sess_idx, context, parms,
+	rc = cfa_tcam_mgr_entry_set_msg(tcam_mgr_data, tfp, parms,
 					entry->row,
 					entry->slice * row->entry_size,
 					table_data->max_slices);
-	if (rc < 0) {
+	if (rc) {
 		CFA_TCAM_MGR_LOG_0(ERR, "Failed to set TCAM data.\n");
 		return rc;
 	}
 
+	CFA_TCAM_MGR_TRACE(INFO, "Set data for entry %d\n", parms->id);
+
 	return 0;
 }
 
 int
-cfa_tcam_mgr_get(struct cfa_tcam_mgr_context *context __rte_unused,
+cfa_tcam_mgr_get(struct tf *tfp __rte_unused,
 		 struct cfa_tcam_mgr_get_parms *parms)
 {
+	struct cfa_tcam_mgr_table_data *table_data;
+	struct cfa_tcam_mgr_data *tcam_mgr_data;
 	struct cfa_tcam_mgr_entry_data *entry;
 	struct cfa_tcam_mgr_table_rows_0 *row;
-	struct cfa_tcam_mgr_table_data *table_data;
+	struct tf_session *tfs;
+	int row_size;
 	int rc;
-	int row_size, sess_idx;
-	uint32_t session_id;
 
-	CFA_TCAM_MGR_CHECK_PARMS2(context, parms);
+	CFA_TCAM_MGR_CHECK_PARMS2(tfp, parms);
 
-	rc = cfa_tcam_mgr_get_session_from_context(context, &session_id);
-	if (rc < 0)
+	rc = tf_session_get_session_internal(tfp, &tfs);
+	if (rc)
 		return rc;
 
-	sess_idx = cfa_tcam_mgr_session_find(session_id);
-	if (sess_idx < 0) {
-		CFA_TCAM_MGR_LOG(ERR, "Session 0x%08x not found.\n",
-				 session_id);
-		return sess_idx;
-	}
-
-	if (global_data_initialized[sess_idx] == 0) {
-		CFA_TCAM_MGR_LOG(ERR, "PANIC: No TCAM data created for sess_idx %d\n",
-				 sess_idx);
+	tcam_mgr_data = tfs->tcam_mgr_handle;
+	if (!tcam_mgr_data) {
+		CFA_TCAM_MGR_LOG(ERR, "No TCAM data created for session\n");
 		return -CFA_TCAM_MGR_ERR_CODE(PERM);
 	}
 
-	entry = cfa_tcam_mgr_entry_get(sess_idx, parms->id);
-	if (entry == NULL) {
+	entry = cfa_tcam_mgr_entry_get(tcam_mgr_data, parms->id);
+	if (!entry) {
 		CFA_TCAM_MGR_LOG(ERR, "Entry %d not found.\n", parms->id);
 		return -CFA_TCAM_MGR_ERR_CODE(INVAL);
 	}
 
-	table_data = &cfa_tcam_mgr_tables[sess_idx][parms->dir][parms->type];
+	table_data =
+		&tcam_mgr_data->cfa_tcam_mgr_tables[parms->dir][parms->type];
 	parms->hcapi_type = table_data->hcapi_type;
 
-	row_size = cfa_tcam_mgr_row_size_get(sess_idx, parms->dir, parms->type);
+	row_size = cfa_tcam_mgr_row_size_get(tcam_mgr_data, parms->dir,
+					     parms->type);
 	row = cfa_tcam_mgr_row_ptr_get(table_data->tcam_rows, entry->row,
 				       row_size);
 
-	rc = cfa_tcam_mgr_entry_get_msg(sess_idx, context, parms,
+	rc = cfa_tcam_mgr_entry_get_msg(tcam_mgr_data, tfp, parms,
 					entry->row,
 					entry->slice * row->entry_size,
 					table_data->max_slices);
-	if (rc < 0) {
+	if (rc) {
 		CFA_TCAM_MGR_LOG_0(ERR, "Failed to read from TCAM.\n");
 		return rc;
 	}
@@ -1630,49 +1868,44 @@ cfa_tcam_mgr_get(struct cfa_tcam_mgr_context *context __rte_unused,
 	return 0;
 }
 
-int cfa_tcam_mgr_shared_clear(struct cfa_tcam_mgr_context *context,
-		     struct cfa_tcam_mgr_shared_clear_parms *parms)
+int cfa_tcam_mgr_shared_clear(struct tf *tfp,
+			      struct cfa_tcam_mgr_shared_clear_parms *parms)
 {
-	int rc;
-	uint16_t row, slice = 0;
-	int sess_idx;
-	uint32_t session_id;
-	struct cfa_tcam_mgr_free_parms fparms;
-	struct cfa_tcam_mgr_table_data *table_data;
 	uint16_t start_row, end_row, max_entries, max_slices;
+	struct cfa_tcam_mgr_table_data *table_data;
+	struct cfa_tcam_mgr_data *tcam_mgr_data;
+	struct cfa_tcam_mgr_free_parms fparms;
+	uint16_t row, slice = 0;
+	struct tf_session *tfs;
+	int rc;
 
-	CFA_TCAM_MGR_CHECK_PARMS2(context, parms);
+	CFA_TCAM_MGR_CHECK_PARMS2(tfp, parms);
 
-	rc = cfa_tcam_mgr_get_session_from_context(context, &session_id);
-	if (rc < 0)
+	rc = tf_session_get_session_internal(tfp, &tfs);
+	if (rc)
 		return rc;
 
-	sess_idx = cfa_tcam_mgr_session_find(session_id);
-	if (sess_idx < 0) {
-		CFA_TCAM_MGR_LOG(ERR, "Session 0x%08x not found.\n",
-				 session_id);
-		return sess_idx;
-	}
-
-	if (global_data_initialized[sess_idx] == 0) {
-		CFA_TCAM_MGR_LOG(ERR, "PANIC: No TCAM data created for sess_idx %d\n",
-				 sess_idx);
+	tcam_mgr_data = tfs->tcam_mgr_handle;
+	if (!tcam_mgr_data) {
+		CFA_TCAM_MGR_LOG(ERR, "No TCAM data created for session\n");
 		return -CFA_TCAM_MGR_ERR_CODE(PERM);
 	}
 
-	table_data = &cfa_tcam_mgr_tables[sess_idx][parms->dir][parms->type];
+	table_data =
+		&tcam_mgr_data->cfa_tcam_mgr_tables[parms->dir][parms->type];
 	fparms.dir = parms->dir;
 	fparms.type = parms->type;
 	fparms.hcapi_type = table_data->hcapi_type;
 	fparms.id = 0;
 
-	rc = cfa_tcam_mgr_tables_get(sess_idx, parms->dir, parms->type,
-				&start_row, &end_row, &max_entries, &max_slices);
+	rc = cfa_tcam_mgr_tables_get(tfp, parms->dir, parms->type,
+				     &start_row, &end_row, &max_entries,
+				     &max_slices);
 	if (rc)
 		return rc;
 
 	for (row = start_row; row <= end_row; row++) {
-		cfa_tcam_mgr_entry_free_msg(sess_idx, context, &fparms,
+		cfa_tcam_mgr_entry_free_msg(tcam_mgr_data, tfp, &fparms,
 					    row,
 					    slice,
 					    table_data->row_width,
@@ -1683,16 +1916,11 @@ int cfa_tcam_mgr_shared_clear(struct cfa_tcam_mgr_context *context,
 }
 
 static void
-cfa_tcam_mgr_mv_used_entries_cnt(int sess_idx, enum tf_dir dir,
-				 struct cfa_tcam_mgr_table_data *dst_table_data,
+cfa_tcam_mgr_mv_used_entries_cnt(struct cfa_tcam_mgr_table_data *dst_table_data,
 				 struct cfa_tcam_mgr_table_data *src_table_data)
 {
 	dst_table_data->used_entries++;
 	src_table_data->used_entries--;
-
-	cfa_tcam_mgr_mv_session_used_entries_cnt(sess_idx, dir,
-						 CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS,
-						 CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS);
 }
 
 /*
@@ -1700,33 +1928,34 @@ cfa_tcam_mgr_mv_used_entries_cnt(int sess_idx, enum tf_dir dir,
  * This happens when secondary is becoming primary
  */
 static int
-cfa_tcam_mgr_shared_entry_move(int sess_idx, struct cfa_tcam_mgr_context *context,
-		       enum tf_dir dir, enum cfa_tcam_mgr_tbl_type type,
-		       int entry_id,
-		       struct cfa_tcam_mgr_table_data *dst_table_data,
-		       struct cfa_tcam_mgr_table_data *table_data,
-		       int dst_row_index, int dst_row_slice,
-		       struct cfa_tcam_mgr_table_rows_0 *dst_row,
-		       int src_row_index,
-		       struct cfa_tcam_mgr_table_rows_0 *src_row)
+cfa_tcam_mgr_shared_entry_move(struct cfa_tcam_mgr_data *tcam_mgr_data,
+			       struct tf *tfp,
+			       enum tf_dir dir, enum cfa_tcam_mgr_tbl_type type,
+			       int entry_id,
+			       struct cfa_tcam_mgr_table_data *dst_table_data,
+			       struct cfa_tcam_mgr_table_data *table_data,
+			       int dst_row_index, int dst_row_slice,
+			       struct cfa_tcam_mgr_table_rows_0 *dst_row,
+			       int src_row_index,
+			       struct cfa_tcam_mgr_table_rows_0 *src_row)
 {
+	struct cfa_tcam_mgr_free_parms fparms = { 0 };
 	struct cfa_tcam_mgr_get_parms gparms = { 0 };
 	struct cfa_tcam_mgr_set_parms sparms = { 0 };
-	struct cfa_tcam_mgr_free_parms fparms = { 0 };
-	struct cfa_tcam_mgr_entry_data *entry;
-	uint8_t  key[CFA_TCAM_MGR_MAX_KEY_SIZE];
-	uint8_t  mask[CFA_TCAM_MGR_MAX_KEY_SIZE];
 	uint8_t  result[CFA_TCAM_MGR_MAX_KEY_SIZE];
+	uint8_t  mask[CFA_TCAM_MGR_MAX_KEY_SIZE];
+	uint8_t  key[CFA_TCAM_MGR_MAX_KEY_SIZE];
+	struct cfa_tcam_mgr_entry_data *entry;
+	int rc;
+
 	/*
 	 * Copy entry size before moving else if
 	 * slice number is non zero and entry size is zero it will cause issues
 	 */
 	dst_row->entry_size = src_row->entry_size;
 
-	int rc;
-
-	entry = cfa_tcam_mgr_entry_get(sess_idx, entry_id);
-	if (entry == NULL)
+	entry = cfa_tcam_mgr_entry_get(tcam_mgr_data, entry_id);
+	if (!entry)
 		return -1;
 
 	gparms.dir	   = dir;
@@ -1739,11 +1968,11 @@ cfa_tcam_mgr_shared_entry_move(int sess_idx, struct cfa_tcam_mgr_context *contex
 	gparms.key_size	   = sizeof(key);
 	gparms.result_size = sizeof(result);
 
-	rc = cfa_tcam_mgr_entry_get_msg(sess_idx, context, &gparms,
+	rc = cfa_tcam_mgr_entry_get_msg(tcam_mgr_data, tfp, &gparms,
 					src_row_index,
 					entry->slice * src_row->entry_size,
 					table_data->max_slices);
-	if (rc != 0)
+	if (rc)
 		return rc;
 
 	sparms.dir	   = dir;
@@ -1756,17 +1985,17 @@ cfa_tcam_mgr_shared_entry_move(int sess_idx, struct cfa_tcam_mgr_context *contex
 	sparms.key_size	   = gparms.key_size;
 	sparms.result_size = gparms.result_size;
 
-	rc = cfa_tcam_mgr_entry_set_msg(sess_idx, context, &sparms,
+	rc = cfa_tcam_mgr_entry_set_msg(tcam_mgr_data, tfp, &sparms,
 					dst_row_index,
 					dst_row_slice * dst_row->entry_size,
 					table_data->max_slices);
-	if (rc != 0)
+	if (rc)
 		return rc;
 
 	fparms.dir	  = dir;
 	fparms.type	  = type;
 	fparms.hcapi_type = table_data->hcapi_type;
-	rc = cfa_tcam_mgr_entry_free_msg(sess_idx, context, &fparms,
+	rc = cfa_tcam_mgr_entry_free_msg(tcam_mgr_data, tfp, &fparms,
 					 src_row_index,
 					 entry->slice *
 					 dst_row->entry_size,
@@ -1775,17 +2004,15 @@ cfa_tcam_mgr_shared_entry_move(int sess_idx, struct cfa_tcam_mgr_context *contex
 					 src_row->entry_size,
 					 table_data->result_size,
 					 table_data->max_slices);
-	if (rc != 0) {
+	if (rc)
 		CFA_TCAM_MGR_LOG_DIR_TYPE(ERR,
 					  dir, type,
 					  "Failed to free entry ID %d at"
-					  " row %d, slice %d for sess_idx %d. rc: %d.\n",
+					  " row %d, slice %d. rc: %d.\n",
 					  gparms.id,
 					  src_row_index,
 					  entry->slice,
-					  sess_idx,
 					  -rc);
-	}
 
 #ifdef CFA_TCAM_MGR_TRACING
 	CFA_TCAM_MGR_TRACE(INFO, "Moved entry %d from row %d, slice %d to "
@@ -1801,54 +2028,50 @@ cfa_tcam_mgr_shared_entry_move(int sess_idx, struct cfa_tcam_mgr_context *contex
 	entry->row = dst_row_index;
 	entry->slice = dst_row_slice;
 
-	cfa_tcam_mgr_mv_used_entries_cnt(sess_idx, dir, dst_table_data, table_data);
+	cfa_tcam_mgr_mv_used_entries_cnt(dst_table_data, table_data);
 
 #ifdef CFA_TCAM_MGR_TRACING
-	cfa_tcam_mgr_rows_dump(sess_idx, dir, type);
-	cfa_tcam_mgr_rows_dump(sess_idx, dir, CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS);
+	cfa_tcam_mgr_rows_dump(tfp, dir, type);
+	cfa_tcam_mgr_rows_dump(tfp, dir,
+			       CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS);
 #endif
 
 	return 0;
 }
 
-int cfa_tcam_mgr_shared_move(struct cfa_tcam_mgr_context *context,
-		     struct cfa_tcam_mgr_shared_move_parms *parms)
+int cfa_tcam_mgr_shared_move(struct tf *tfp,
+			     struct cfa_tcam_mgr_shared_move_parms *parms)
 {
-	int rc;
-	int sess_idx;
-	uint32_t session_id;
-	uint16_t src_row, dst_row, row_size, slice;
 	struct cfa_tcam_mgr_table_rows_0 *src_table_row;
 	struct cfa_tcam_mgr_table_rows_0 *dst_table_row;
 	struct cfa_tcam_mgr_table_data *src_table_data;
 	struct cfa_tcam_mgr_table_data *dst_table_data;
+	uint16_t src_row, dst_row, row_size, slice;
+	struct cfa_tcam_mgr_data *tcam_mgr_data;
+	struct tf_session *tfs;
+	int rc;
 
-	CFA_TCAM_MGR_CHECK_PARMS2(context, parms);
+	CFA_TCAM_MGR_CHECK_PARMS2(tfp, parms);
 
-	rc = cfa_tcam_mgr_get_session_from_context(context, &session_id);
+	rc = tf_session_get_session_internal(tfp, &tfs);
 	if (rc < 0)
 		return rc;
 
-	sess_idx = cfa_tcam_mgr_session_find(session_id);
-	if (sess_idx < 0) {
-		CFA_TCAM_MGR_LOG(ERR, "Session 0x%08x not found.\n",
-				 session_id);
-		return sess_idx;
-	}
-
-	if (global_data_initialized[sess_idx] == 0) {
-		CFA_TCAM_MGR_LOG(ERR, "PANIC: No TCAM data created for sess_idx %d\n",
-				 sess_idx);
+	tcam_mgr_data = tfs->tcam_mgr_handle;
+	if (!tcam_mgr_data) {
+		CFA_TCAM_MGR_LOG(ERR, "No TCAM data created for session\n");
 		return -CFA_TCAM_MGR_ERR_CODE(PERM);
 	}
 
 	src_table_data =
-		&cfa_tcam_mgr_tables[sess_idx][parms->dir][CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS];
+		&tcam_mgr_data->cfa_tcam_mgr_tables[parms->dir]
+			[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS];
 	dst_table_data =
-		&cfa_tcam_mgr_tables[sess_idx][parms->dir][CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS];
+		&tcam_mgr_data->cfa_tcam_mgr_tables[parms->dir]
+			[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS];
 
 	row_size =
-		cfa_tcam_mgr_row_size_get(sess_idx,
+		cfa_tcam_mgr_row_size_get(tcam_mgr_data,
 					  parms->dir,
 					  CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS);
 
@@ -1868,13 +2091,13 @@ int cfa_tcam_mgr_shared_move(struct cfa_tcam_mgr_context *context,
 #ifdef CFA_TCAM_MGR_TRACING
 					CFA_TCAM_MGR_TRACE(INFO, "Move entry id %d "
 							   "from src_row %d, slice %d "
-							   "to dst_row %d, slice %d.\n",
+							   "to dst_row %d, slice %d\n",
 							   src_table_row->entries[slice],
 							   src_row, slice,
 							   dst_row, slice);
 #endif
-					rc = cfa_tcam_mgr_shared_entry_move(sess_idx,
-							context,
+			rc = cfa_tcam_mgr_shared_entry_move(tcam_mgr_data,
+							tfp,
 							parms->dir,
 							CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS,
 							src_table_row->entries[slice],
@@ -1893,15 +2116,15 @@ int cfa_tcam_mgr_shared_move(struct cfa_tcam_mgr_context *context,
 }
 
 static void
-cfa_tcam_mgr_tbl_get(int sess_idx, enum tf_dir dir,
-			enum cfa_tcam_mgr_tbl_type type,
-				uint16_t *start_row,
-				uint16_t *end_row,
-				uint16_t *max_entries,
-				uint16_t *slices)
+cfa_tcam_mgr_tbl_get(struct cfa_tcam_mgr_data *tcam_mgr_data, enum tf_dir dir,
+		     enum cfa_tcam_mgr_tbl_type type,
+		     uint16_t *start_row,
+		     uint16_t *end_row,
+		     uint16_t *max_entries,
+		     uint16_t *slices)
 {
 	struct cfa_tcam_mgr_table_data *table_data =
-		&cfa_tcam_mgr_tables[sess_idx][dir][type];
+		&tcam_mgr_data->cfa_tcam_mgr_tables[dir][type];
 
 	/* Get start, end and max for tcam type*/
 	*start_row = table_data->start_row;
@@ -1911,51 +2134,59 @@ cfa_tcam_mgr_tbl_get(int sess_idx, enum tf_dir dir,
 }
 
 int
-cfa_tcam_mgr_tables_get(int sess_idx, enum tf_dir dir,
+cfa_tcam_mgr_tables_get(struct tf *tfp, enum tf_dir dir,
 			enum cfa_tcam_mgr_tbl_type type,
 			uint16_t *start_row,
 			uint16_t *end_row,
 			uint16_t *max_entries,
 			uint16_t *slices)
 {
+	struct cfa_tcam_mgr_data *tcam_mgr_data;
+	struct tf_session *tfs;
+	int rc;
+
 	CFA_TCAM_MGR_CHECK_PARMS3(start_row, end_row, max_entries);
 
-	if (global_data_initialized[sess_idx] == 0) {
-		CFA_TCAM_MGR_LOG(ERR, "PANIC: TCAM not initialized for sess_idx %d.\n",
-				 sess_idx);
-		return -CFA_TCAM_MGR_ERR_CODE(INVAL);
+	rc = tf_session_get_session_internal(tfp, &tfs);
+	if (rc)
+		return rc;
+
+	tcam_mgr_data = tfs->tcam_mgr_handle;
+	if (!tcam_mgr_data) {
+		CFA_TCAM_MGR_LOG_0(ERR, "No TCAM data created for session.\n");
+		return -CFA_TCAM_MGR_ERR_CODE(PERM);
 	}
 
 	if (dir >= TF_DIR_MAX) {
-		CFA_TCAM_MGR_LOG(ERR, "Must specify valid dir (0-%d) forsess_idx %d.\n",
-				 TF_DIR_MAX - 1, sess_idx);
+		CFA_TCAM_MGR_LOG(ERR, "Must specify valid dir (0-%d).\n",
+				 TF_DIR_MAX - 1);
 		return -CFA_TCAM_MGR_ERR_CODE(INVAL);
 	}
 
 	if (type >= CFA_TCAM_MGR_TBL_TYPE_MAX) {
-		CFA_TCAM_MGR_LOG(ERR, "Must specify valid tbl type (0-%d) forsess_idx %d.\n",
-				 CFA_TCAM_MGR_TBL_TYPE_MAX - 1, sess_idx);
+		CFA_TCAM_MGR_LOG(ERR, "Must specify valid tbl type (0-%d).\n",
+				 CFA_TCAM_MGR_TBL_TYPE_MAX - 1);
 		return -CFA_TCAM_MGR_ERR_CODE(INVAL);
 	}
 
-	cfa_tcam_mgr_tbl_get(sess_idx, dir,
-				  type,
-				  start_row,
-				  end_row,
-				  max_entries,
-				  slices);
+	cfa_tcam_mgr_tbl_get(tcam_mgr_data, dir,
+			     type,
+			     start_row,
+			     end_row,
+			     max_entries,
+			     slices);
 	return 0;
 }
 
 static void
-cfa_tcam_mgr_tbl_set(int sess_idx, enum tf_dir dir,
-			enum cfa_tcam_mgr_tbl_type type,
-				uint16_t start_row,
-				uint16_t end_row,
-				uint16_t max_entries)
+cfa_tcam_mgr_tbl_set(struct cfa_tcam_mgr_data *tcam_mgr_data, enum tf_dir dir,
+		     enum cfa_tcam_mgr_tbl_type type,
+		     uint16_t start_row,
+		     uint16_t end_row,
+		     uint16_t max_entries)
 {
 	struct cfa_tcam_mgr_table_data *table_data =
-		&cfa_tcam_mgr_tables[sess_idx][dir][type];
+		&tcam_mgr_data->cfa_tcam_mgr_tables[dir][type];
 
 	/* Update start, end and max for tcam type*/
 	table_data->start_row = start_row;
@@ -1964,52 +2195,58 @@ cfa_tcam_mgr_tbl_set(int sess_idx, enum tf_dir dir,
 }
 
 int
-cfa_tcam_mgr_tables_set(int sess_idx, enum tf_dir dir,
+cfa_tcam_mgr_tables_set(struct tf *tfp, enum tf_dir dir,
 			enum cfa_tcam_mgr_tbl_type type,
 			uint16_t start_row,
 			uint16_t end_row,
 			uint16_t max_entries)
 {
-	if (global_data_initialized[sess_idx] == 0) {
-		CFA_TCAM_MGR_LOG(ERR, "PANIC: TCAM not initialized for sess_idx %d.\n",
-				 sess_idx);
-		return -CFA_TCAM_MGR_ERR_CODE(INVAL);
+	struct cfa_tcam_mgr_data *tcam_mgr_data;
+	struct tf_session *tfs;
+	int rc;
+
+	rc = tf_session_get_session_internal(tfp, &tfs);
+	if (rc)
+		return rc;
+
+	tcam_mgr_data = tfs->tcam_mgr_handle;
+	if (!tcam_mgr_data) {
+		CFA_TCAM_MGR_LOG_0(ERR, "No TCAM data created for session.\n");
+		return -CFA_TCAM_MGR_ERR_CODE(PERM);
 	}
 
 	if (dir >= TF_DIR_MAX) {
-		CFA_TCAM_MGR_LOG(ERR, "Must specify valid dir (0-%d) forsess_idx %d.\n",
-				 TF_DIR_MAX - 1, sess_idx);
+		CFA_TCAM_MGR_LOG(ERR, "Must specify valid dir (0-%d).\n",
+				 TF_DIR_MAX - 1);
 		return -CFA_TCAM_MGR_ERR_CODE(INVAL);
 	}
 
 	if (type >= CFA_TCAM_MGR_TBL_TYPE_MAX) {
-		CFA_TCAM_MGR_LOG(ERR, "Must specify valid tbl type (0-%d) forsess_idx %d.\n",
-				 CFA_TCAM_MGR_TBL_TYPE_MAX - 1, sess_idx);
+		CFA_TCAM_MGR_LOG(ERR, "Must specify valid tbl type (0-%d).\n",
+				 CFA_TCAM_MGR_TBL_TYPE_MAX - 1);
 		return -CFA_TCAM_MGR_ERR_CODE(INVAL);
 	}
 
-	cfa_tcam_mgr_tbl_set(sess_idx, dir,
-				  type,
-				  start_row,
-				  end_row,
-				  max_entries);
+	cfa_tcam_mgr_tbl_set(tcam_mgr_data, dir,
+			     type,
+			     start_row,
+			     end_row,
+			     max_entries);
 	return 0;
 }
 
 void
-cfa_tcam_mgr_rows_dump(int sess_idx, enum tf_dir dir,
+cfa_tcam_mgr_rows_dump(struct tf *tfp, enum tf_dir dir,
 		       enum cfa_tcam_mgr_tbl_type type)
 {
-	struct cfa_tcam_mgr_table_data *table_data;
 	struct cfa_tcam_mgr_table_rows_0 *table_row;
-	int i, row, row_size;
+	struct cfa_tcam_mgr_table_data *table_data;
+	struct cfa_tcam_mgr_data *tcam_mgr_data;
+	struct tf_session *tfs;
 	bool row_found = false;
 	bool empty_row = false;
-
-	if (global_data_initialized[sess_idx] == 0) {
-		printf("PANIC: TCAM not initialized for sess_idx %d.\n", sess_idx);
-		return;
-	}
+	int i, row, row_size;
+	int rc;
 
 	if (dir >= TF_DIR_MAX) {
 		printf("Must specify a valid direction (0-%d).\n",
@@ -2022,14 +2259,24 @@ cfa_tcam_mgr_rows_dump(int sess_idx, enum tf_dir dir,
 		return;
 	}
 
-	table_data = &cfa_tcam_mgr_tables[sess_idx][dir][type];
-	row_size = cfa_tcam_mgr_row_size_get(sess_idx, dir, type);
+	rc = tf_session_get_session_internal(tfp, &tfs);
+	if (rc)
+		return;
+
+	tcam_mgr_data = tfs->tcam_mgr_handle;
+	if (!tcam_mgr_data) {
+		printf("No TCAM data created for session\n");
+		return;
+	}
+
+	table_data = &tcam_mgr_data->cfa_tcam_mgr_tables[dir][type];
+	row_size = cfa_tcam_mgr_row_size_get(tcam_mgr_data, dir, type);
 
 	printf("\nTCAM Rows:\n");
 	printf("Rows for direction %s, Logical table type %s\n",
 	       tf_dir_2_str(dir), cfa_tcam_mgr_tbl_2_str(type));
-	printf("Managed rows %d-%d for sess_idx %d:\n",
-	       table_data->start_row, table_data->end_row, sess_idx);
+	printf("Managed rows %d-%d:\n",
+	       table_data->start_row, table_data->end_row);
 
 	printf("Index Pri   Size  Entry IDs\n");
 	printf("                  Sl 0");
@@ -2066,11 +2313,12 @@ cfa_tcam_mgr_rows_dump(int sess_idx, enum tf_dir dir,
 }
 
 static void
-cfa_tcam_mgr_table_dump(int sess_idx, enum tf_dir dir,
+cfa_tcam_mgr_table_dump(struct cfa_tcam_mgr_data *tcam_mgr_data,
+			struct tf *tfp __rte_unused, enum tf_dir dir,
 			enum cfa_tcam_mgr_tbl_type type)
 {
 	struct cfa_tcam_mgr_table_data *table_data =
-		&cfa_tcam_mgr_tables[sess_idx][dir][type];
+		&tcam_mgr_data->cfa_tcam_mgr_tables[dir][type];
 
 	printf("%3s %-22s %5u %5u %5u %5u %6u %7u %2u\n",
 	       tf_dir_2_str(dir),
@@ -2089,16 +2337,26 @@ cfa_tcam_mgr_table_dump(int sess_idx, enum tf_dir dir,
 	"MaxEnt UsedEnt Slices\n"
 
 void
-cfa_tcam_mgr_tables_dump(int sess_idx, enum tf_dir dir,
+cfa_tcam_mgr_tables_dump(struct tf *tfp, enum tf_dir dir,
 			 enum cfa_tcam_mgr_tbl_type type)
 {
-	if (global_data_initialized[sess_idx] == 0) {
-		printf("PANIC: TCAM not initialized for sess_idx %d.\n", sess_idx);
+	struct cfa_tcam_mgr_data *tcam_mgr_data;
+	struct tf_session *tfs;
+	int rc;
+
+	printf("\nTCAM Table(s):\n");
+	printf(TABLE_DUMP_HEADER);
+
+	rc = tf_session_get_session_internal(tfp, &tfs);
+	if (rc)
+		return;
+
+	tcam_mgr_data = tfs->tcam_mgr_handle;
+	if (!tcam_mgr_data) {
+		printf("No TCAM data created for session\n");
 		return;
 	}
 
-	printf("\nTCAM Table(s) for sess_idx %d:\n", sess_idx);
-	printf(TABLE_DUMP_HEADER);
 	if (dir >= TF_DIR_MAX) {
 		/* Iterate over all directions */
 		for (dir = 0; dir < TF_DIR_MAX; dir++) {
@@ -2107,44 +2365,53 @@ cfa_tcam_mgr_tables_dump(int sess_idx, enum tf_dir dir,
 				for (type = 0;
 				     type < CFA_TCAM_MGR_TBL_TYPE_MAX;
 				     type++) {
-					cfa_tcam_mgr_table_dump(sess_idx, dir, type);
+					cfa_tcam_mgr_table_dump(tcam_mgr_data,
+								tfp, dir, type);
 				}
 			} else {
 				/* Display a specific type */
-				cfa_tcam_mgr_table_dump(sess_idx, dir, type);
+				cfa_tcam_mgr_table_dump(tcam_mgr_data, tfp,
+							dir, type);
 			}
 		}
 	} else if (type >= CFA_TCAM_MGR_TBL_TYPE_MAX) {
 		/* Iterate over all types for a direction */
 		for (type = 0; type < CFA_TCAM_MGR_TBL_TYPE_MAX; type++)
-			cfa_tcam_mgr_table_dump(sess_idx, dir, type);
+			cfa_tcam_mgr_table_dump(tcam_mgr_data, tfp, dir, type);
 	} else {
 		/* Display a specific direction and type */
-		cfa_tcam_mgr_table_dump(sess_idx, dir, type);
+		cfa_tcam_mgr_table_dump(tcam_mgr_data, tfp, dir, type);
 	}
 }
 
 #define ENTRY_DUMP_HEADER "Entry RefCnt  Row Slice\n"
 
 void
-cfa_tcam_mgr_entries_dump(int sess_idx)
+cfa_tcam_mgr_entries_dump(struct tf *tfp)
 {
+	struct cfa_tcam_mgr_data *tcam_mgr_data;
 	struct cfa_tcam_mgr_entry_data *entry;
 	bool entry_found = false;
+	struct tf_session *tfs;
 	uint16_t id;
+	int rc;
+
+	rc = tf_session_get_session_internal(tfp, &tfs);
+	if (rc)
+		return;
 
-	if (global_data_initialized[sess_idx] == 0) {
-		CFA_TCAM_MGR_LOG(INFO, "PANIC: No TCAM data created for sess_idx %d\n",
-				 sess_idx);
+	tcam_mgr_data = tfs->tcam_mgr_handle;
+	if (!tcam_mgr_data) {
+		printf("No TCAM data created for session\n");
 		return;
 	}
 
 	printf("\nGlobal Maximum Entries: %d\n\n",
-	       cfa_tcam_mgr_max_entries[sess_idx]);
+	       tcam_mgr_data->cfa_tcam_mgr_max_entries);
 	printf("TCAM Entry Table:\n");
-	for (id = 0; id < cfa_tcam_mgr_max_entries[sess_idx]; id++) {
-		if (entry_data[sess_idx][id].ref_cnt > 0) {
-			entry = &entry_data[sess_idx][id];
+	for (id = 0; id < tcam_mgr_data->cfa_tcam_mgr_max_entries; id++) {
+		if (tcam_mgr_data->entry_data[id].ref_cnt > 0) {
+			entry = &tcam_mgr_data->entry_data[id];
 			if (!entry_found)
 				printf(ENTRY_DUMP_HEADER);
 			printf("%5u %5u %5u %5u",
diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.h b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.h
index e6d81cb95a..d4f8512d2a 100644
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.h
+++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2021-2023 Broadcom
+ * Copyright(c) 2021-2024 Broadcom
  * All rights reserved.
  */
 
@@ -15,10 +15,6 @@
  * The TCAM module provides processing of Internal TCAM types.
  */
 
-#ifndef TF_TCAM_MAX_SESSIONS
-#define TF_TCAM_MAX_SESSIONS 16
-#endif
-
 #define ENTRY_ID_INVALID UINT16_MAX
 
 #define TF_TCAM_PRIORITY_MIN 0
@@ -45,6 +41,15 @@
 	TFP_DRV_LOG(level, "%s: %s " fmt, tf_dir_2_str(dir),	\
 		    cfa_tcam_mgr_tbl_2_str(type))
 
+/* #define CFA_TCAM_MGR_TRACING */
+
+#ifdef CFA_TCAM_MGR_TRACING
+#define CFA_TCAM_MGR_TRACE(level, fmt, args...) \
+	printf("%s: " fmt, __func__, ## args)
+#else
+#define CFA_TCAM_MGR_TRACE(level, fmt, args...)
+#endif
+
 #define CFA_TCAM_MGR_ERR_CODE(type) E ## type
 
 /**
@@ -79,9 +84,10 @@
 		}							\
 	} while (0)
 
+#define CFA_TCAM_MGR_TBL_TYPE_START 0
+
+/* Logical TCAM tables */
 enum cfa_tcam_mgr_tbl_type {
-	/* Logical TCAM tables */
-	CFA_TCAM_MGR_TBL_TYPE_START,
 	CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_AFM =
 		CFA_TCAM_MGR_TBL_TYPE_START,
 	CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_APPS,
@@ -106,15 +112,10 @@ enum cfa_tcam_mgr_tbl_type {
 
 enum cfa_tcam_mgr_device_type {
 	CFA_TCAM_MGR_DEVICE_TYPE_P4 = 0,
-	CFA_TCAM_MGR_DEVICE_TYPE_SR,
 	CFA_TCAM_MGR_DEVICE_TYPE_P5,
 	CFA_TCAM_MGR_DEVICE_TYPE_MAX
 };
 
-struct cfa_tcam_mgr_context {
-	struct tf *tfp;
-};
-
 /**
  * TCAM Manager initialization parameters
  */
@@ -361,7 +362,7 @@ cfa_tcam_mgr_tbl_2_str(enum cfa_tcam_mgr_tbl_type tcam_type);
  *   - (<0) on failure.
  */
 int
-cfa_tcam_mgr_init(int sess_idx, enum cfa_tcam_mgr_device_type type,
+cfa_tcam_mgr_init(struct tf *tfp, enum cfa_tcam_mgr_device_type type,
 		  struct cfa_tcam_mgr_init_parms *parms);
 
 /**
@@ -391,7 +392,7 @@ cfa_tcam_mgr_get_phys_table_type(enum cfa_tcam_mgr_tbl_type type);
  *   - (<0) on failure.
  */
 int
-cfa_tcam_mgr_qcaps(struct cfa_tcam_mgr_context *context __rte_unused,
+cfa_tcam_mgr_qcaps(struct tf *tfp __rte_unused,
 		   struct cfa_tcam_mgr_qcaps_parms *parms);
 
 /**
@@ -408,7 +409,7 @@ cfa_tcam_mgr_qcaps(struct cfa_tcam_mgr_context *context __rte_unused,
  *   - (0) if successful.
  *   - (-EINVAL) on failure.
  */
-int cfa_tcam_mgr_bind(struct cfa_tcam_mgr_context *context,
+int cfa_tcam_mgr_bind(struct tf *tfp,
 		      struct cfa_tcam_mgr_cfg_parms *parms);
 
 /**
@@ -424,7 +425,7 @@ int cfa_tcam_mgr_bind(struct cfa_tcam_mgr_context *context,
  *   - (0) if successful.
  *   - (-EINVAL) on failure.
  */
-int cfa_tcam_mgr_unbind(struct cfa_tcam_mgr_context *context);
+int cfa_tcam_mgr_unbind(struct tf *tfp);
 
 /**
  * Allocates the requested tcam type from the internal RM DB.
@@ -439,7 +440,7 @@ int cfa_tcam_mgr_unbind(struct cfa_tcam_mgr_context *context);
  *   - (0) if successful.
  *   - (-EINVAL) on failure.
  */
-int cfa_tcam_mgr_alloc(struct cfa_tcam_mgr_context *context,
+int cfa_tcam_mgr_alloc(struct tf *tfp,
 		       struct cfa_tcam_mgr_alloc_parms *parms);
 
 /**
@@ -456,7 +457,7 @@ int cfa_tcam_mgr_alloc(struct cfa_tcam_mgr_context *context,
  *   - (0) if successful.
  *   - (-EINVAL) on failure.
  */
-int cfa_tcam_mgr_free(struct cfa_tcam_mgr_context *context,
+int cfa_tcam_mgr_free(struct tf *tfp,
 		      struct cfa_tcam_mgr_free_parms *parms);
 
 /**
@@ -473,7 +474,7 @@ int cfa_tcam_mgr_free(struct cfa_tcam_mgr_context *context,
  *   - (0) if successful.
  *   - (-EINVAL) on failure.
  */
-int cfa_tcam_mgr_set(struct cfa_tcam_mgr_context *context,
+int cfa_tcam_mgr_set(struct tf *tfp,
 		     struct cfa_tcam_mgr_set_parms *parms);
 
 /**
@@ -490,30 +491,33 @@ int cfa_tcam_mgr_set(struct cfa_tcam_mgr_context *context,
  *   - (0) if successful.
  *   - (-EINVAL) on failure.
  */
-int cfa_tcam_mgr_get(struct cfa_tcam_mgr_context *context,
+int cfa_tcam_mgr_get(struct tf *tfp,
 		     struct cfa_tcam_mgr_get_parms *parms);
 
 int
-cfa_tcam_mgr_tables_get(int sess_idx, enum tf_dir dir,
+cfa_tcam_mgr_tables_get(struct tf *tfp, enum tf_dir dir,
 			enum cfa_tcam_mgr_tbl_type type,
 			uint16_t *start_row,
 			uint16_t *end_row,
 			uint16_t *max_entries,
 			uint16_t *slices);
 int
-cfa_tcam_mgr_tables_set(int sess_idx, enum tf_dir dir,
+cfa_tcam_mgr_tables_set(struct tf *tfp, enum tf_dir dir,
 			enum cfa_tcam_mgr_tbl_type type,
 			uint16_t start_row,
 			uint16_t end_row,
 			uint16_t max_entries);
 
-int cfa_tcam_mgr_shared_clear(struct cfa_tcam_mgr_context *context,
+int cfa_tcam_mgr_shared_clear(struct tf *tfp,
 		     struct cfa_tcam_mgr_shared_clear_parms *parms);
 
-int cfa_tcam_mgr_shared_move(struct cfa_tcam_mgr_context *context,
+int cfa_tcam_mgr_shared_move(struct tf *tfp,
 		     struct cfa_tcam_mgr_shared_move_parms *parms);
 
-void cfa_tcam_mgr_rows_dump(int sess_idx, enum tf_dir dir, enum cfa_tcam_mgr_tbl_type type);
-void cfa_tcam_mgr_tables_dump(int sess_idx, enum tf_dir dir, enum cfa_tcam_mgr_tbl_type type);
-void cfa_tcam_mgr_entries_dump(int sess_idx);
+void cfa_tcam_mgr_rows_dump(struct tf *tfp, enum tf_dir dir,
+			    enum cfa_tcam_mgr_tbl_type type);
+void cfa_tcam_mgr_tables_dump(struct tf *tfp, enum tf_dir dir,
+			      enum cfa_tcam_mgr_tbl_type type);
+void cfa_tcam_mgr_entries_dump(struct tf *tfp);
+
 #endif /* _CFA_TCAM_MGR_H */
diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_device.h b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_device.h
index c24e5c8389..9d7f560e7b 100644
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_device.h
+++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_device.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2021-2023 Broadcom
+ * Copyright(c) 2021-2024 Broadcom
  * All rights reserved.
  */
 
@@ -8,6 +8,34 @@
 
 #include <inttypes.h>
 #include "cfa_tcam_mgr.h"
+#include "bitalloc.h"
+
+struct cfa_tcam_mgr_data;
+
+/* HW OP definitions */
+typedef int (*cfa_tcam_mgr_hwop_set_func_t)(struct cfa_tcam_mgr_data
+					    *tcam_mgr_data,
+					    struct cfa_tcam_mgr_set_parms
+					    *parms, int row, int slice,
+					    int max_slices);
+typedef int (*cfa_tcam_mgr_hwop_get_func_t)(struct cfa_tcam_mgr_data
+					    *tcam_mgr_data,
+					    struct cfa_tcam_mgr_get_parms
+					    *parms, int row, int slice,
+					    int max_slices);
+typedef int (*cfa_tcam_mgr_hwop_free_func_t)(struct cfa_tcam_mgr_data
+					     *tcam_mgr_data,
+					     struct cfa_tcam_mgr_free_parms
+					     *parms, int row, int slice,
+					     int max_slices);
+
+struct cfa_tcam_mgr_hwops_funcs {
+	cfa_tcam_mgr_hwop_set_func_t set;
+	cfa_tcam_mgr_hwop_get_func_t get;
+	cfa_tcam_mgr_hwop_free_func_t free;
+};
+
+/* End: HW OP definitions */
 
 /*
  * This identifier is to be used for one-off variable sizes.  Do not use it for
@@ -42,8 +70,7 @@ TF_TCAM_TABLE_ROWS_DEF(2);
 TF_TCAM_TABLE_ROWS_DEF(4);
 TF_TCAM_TABLE_ROWS_DEF(8);
 
-/*
- * The following macros are for setting the entry status in a row entry.
+/* The following macros are for setting the entry status in a row entry.
  * row is (struct cfa_tcam_mgr_table_rows_0 *)
  */
 #define ROW_ENTRY_INUSE(row, entry)  ((row)->entry_inuse &   (1U << (entry)))
@@ -64,6 +91,13 @@ TF_TCAM_TABLE_ROWS_DEF(8);
 			     VEB_TCAM_RX_MAX_ENTRIES +		\
 			     VEB_TCAM_TX_MAX_ENTRIES)
 
+#define	TCAM_SET_END_ROW(n) ((n) ? (n) - 1 : 0)
+
+#define L2_CTXT_TCAM_RX_APP_LO_START	(L2_CTXT_TCAM_RX_NUM_ROWS / 2)
+#define L2_CTXT_TCAM_RX_APP_HI_END	(L2_CTXT_TCAM_RX_APP_LO_START - 1)
+#define L2_CTXT_TCAM_TX_APP_LO_START	(L2_CTXT_TCAM_TX_NUM_ROWS / 2)
+#define L2_CTXT_TCAM_TX_APP_HI_END	(L2_CTXT_TCAM_TX_APP_LO_START - 1)
+
 struct cfa_tcam_mgr_entry_data {
 	uint16_t row;
 	uint8_t slice;
@@ -73,38 +107,28 @@ struct cfa_tcam_mgr_entry_data {
 struct cfa_tcam_mgr_table_data {
 	struct cfa_tcam_mgr_table_rows_0 *tcam_rows;
 	uint16_t hcapi_type;
-	uint16_t num_rows;		/* Rows in physical TCAM */
-	uint16_t start_row;		/* Where the logical TCAM starts */
-	uint16_t end_row;		/* Where the logical TCAM ends */
+	uint16_t num_rows;	/* Rows in physical TCAM */
+	uint16_t start_row;	/* Where the logical TCAM starts */
+	uint16_t end_row;	/* Where the logical TCAM ends */
 	uint16_t max_entries;
 	uint16_t used_entries;
-	uint8_t  row_width;		/* bytes */
-	uint8_t  result_size;		/* bytes */
+	uint8_t  row_width;	/* bytes */
+	uint8_t  result_size;	/* bytes */
 	uint8_t  max_slices;
 };
 
-extern int cfa_tcam_mgr_max_entries[TF_TCAM_MAX_SESSIONS];
-
-extern struct cfa_tcam_mgr_table_data
-cfa_tcam_mgr_tables[TF_TCAM_MAX_SESSIONS][TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX];
-
-/* HW OP definitions begin here */
-typedef int (*cfa_tcam_mgr_hwop_set_func_t)(int sess_idx,
-					    struct cfa_tcam_mgr_set_parms
-					    *parms, int row, int slice,
-					    int max_slices);
-typedef int (*cfa_tcam_mgr_hwop_get_func_t)(int sess_idx,
-					    struct cfa_tcam_mgr_get_parms
-					    *parms, int row, int slice,
-					    int max_slices);
-typedef int (*cfa_tcam_mgr_hwop_free_func_t)(int sess_idx,
-					     struct cfa_tcam_mgr_free_parms
-					     *parms, int row, int slice,
-					     int max_slices);
-
-struct cfa_tcam_mgr_hwops_funcs {
-	cfa_tcam_mgr_hwop_set_func_t set;
-	cfa_tcam_mgr_hwop_get_func_t get;
-	cfa_tcam_mgr_hwop_free_func_t free;
+struct cfa_tcam_mgr_data {
+	int cfa_tcam_mgr_max_entries;
+	struct cfa_tcam_mgr_table_data
+		cfa_tcam_mgr_tables[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX];
+	void *table_rows;
+	struct cfa_tcam_mgr_entry_data *entry_data;
+	struct bitalloc *session_bmp;
+	uint64_t session_bmp_size;
+	void *row_tables[TF_DIR_MAX][TF_TCAM_TBL_TYPE_MAX];
+	void *rx_row_data;
+	void *tx_row_data;
+	struct cfa_tcam_mgr_hwops_funcs hwop_funcs;
 };
+
 #endif /* CFA_TCAM_MGR_DEVICE_H */
diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_hwop_msg.c b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_hwop_msg.c
index 0fb5563cc3..b421309e89 100644
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_hwop_msg.c
+++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_hwop_msg.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2021-2023 Broadcom
+ * Copyright(c) 2021-2024 Broadcom
  * All rights reserved.
  */
 
@@ -14,8 +14,8 @@
 #include "tf_tcam.h"
 #include "hcapi_cfa_defs.h"
 #include "cfa_tcam_mgr.h"
-#include "cfa_tcam_mgr_hwop_msg.h"
 #include "cfa_tcam_mgr_device.h"
+#include "cfa_tcam_mgr_hwop_msg.h"
 #include "cfa_tcam_mgr_p58.h"
 #include "cfa_tcam_mgr_p4.h"
 #include "tf_session.h"
@@ -23,20 +23,18 @@
 #include "tfp.h"
 #include "tf_util.h"
 
-/*
- * The free hwop will free more than a single slice so cannot be used.
- */
-struct cfa_tcam_mgr_hwops_funcs hwop_funcs;
-
 int
-cfa_tcam_mgr_hwops_init(enum cfa_tcam_mgr_device_type type)
+cfa_tcam_mgr_hwops_init(struct cfa_tcam_mgr_data *tcam_mgr_data,
+			enum cfa_tcam_mgr_device_type type)
 {
+	struct cfa_tcam_mgr_hwops_funcs *hwop_funcs =
+			&tcam_mgr_data->hwop_funcs;
+
 	switch (type) {
 	case CFA_TCAM_MGR_DEVICE_TYPE_P4:
-	case CFA_TCAM_MGR_DEVICE_TYPE_SR:
-		return cfa_tcam_mgr_hwops_get_funcs_p4(&hwop_funcs);
+		return cfa_tcam_mgr_hwops_get_funcs_p4(hwop_funcs);
 	case CFA_TCAM_MGR_DEVICE_TYPE_P5:
-		return cfa_tcam_mgr_hwops_get_funcs_p58(&hwop_funcs);
+		return cfa_tcam_mgr_hwops_get_funcs_p58(hwop_funcs);
 	default:
 		CFA_TCAM_MGR_LOG(ERR, "No such device\n");
 		return -CFA_TCAM_MGR_ERR_CODE(NODEV);
@@ -51,27 +49,27 @@ cfa_tcam_mgr_hwops_init(enum cfa_tcam_mgr_device_type type)
  */
 
 int
-cfa_tcam_mgr_entry_set_msg(int sess_idx, struct cfa_tcam_mgr_context *context
-			   __rte_unused,
+cfa_tcam_mgr_entry_set_msg(struct cfa_tcam_mgr_data *tcam_mgr_data,
+			   struct tf *tfp __rte_unused,
 			   struct cfa_tcam_mgr_set_parms *parms,
 			   int row, int slice,
 			   int max_slices __rte_unused)
 {
+	enum tf_tcam_tbl_type type =
+		cfa_tcam_mgr_get_phys_table_type(parms->type);
 	cfa_tcam_mgr_hwop_set_func_t set_func;
-
-	set_func = hwop_funcs.set;
-	if (set_func == NULL)
-		return -CFA_TCAM_MGR_ERR_CODE(PERM);
-
 	struct tf_tcam_set_parms sparms;
-	struct tf_session *tfs;
 	struct tf_dev_info *dev;
+	struct tf_session *tfs;
 	int rc;
-	enum tf_tcam_tbl_type type =
-		cfa_tcam_mgr_get_phys_table_type(parms->type);
+
+	set_func = tcam_mgr_data->hwop_funcs.set;
+	if (!set_func)
+		return -CFA_TCAM_MGR_ERR_CODE(INVAL);
+
 
 	/* Retrieve the session information */
-	rc = tf_session_get_session_internal(context->tfp, &tfs);
+	rc = tf_session_get_session_internal(tfp, &tfs);
 	if (rc)
 		return rc;
 
@@ -91,63 +89,75 @@ cfa_tcam_mgr_entry_set_msg(int sess_idx, struct cfa_tcam_mgr_context *context
 	sparms.result	   = parms->result;
 	sparms.result_size = parms->result_size;
 
-	rc = tf_msg_tcam_entry_set(context->tfp, dev, &sparms);
+#ifdef CFA_TCAM_MGR_TRACING
+	CFA_TCAM_MGR_LOG_DIR_TYPE(INFO, parms->dir, parms->type,
+				  "%s: %s row:%d slice:%d "
+				  "set tcam physical idx 0x%x\n",
+				  tf_dir_2_str(parms->dir),
+				  cfa_tcam_mgr_tbl_2_str(parms->type),
+				  row, slice, sparms.idx);
+#endif
+
+	rc = tf_msg_tcam_entry_set(tfp, dev, &sparms);
 	if (rc) {
-		/* Log error */
 		CFA_TCAM_MGR_LOG_DIR_TYPE(ERR, parms->dir, parms->type,
-					  "Entry %d set failed, rc:%d\n",
+					  "%s: %s entry:%d "
+					  "set tcam failed, rc:%d\n",
+					  tf_dir_2_str(parms->dir),
+					  cfa_tcam_mgr_tbl_2_str(parms->type),
 					  parms->id, -rc);
 		return rc;
 	}
 
-	return set_func(sess_idx, parms, row, slice, max_slices);
+	return set_func(tcam_mgr_data, parms, row, slice, max_slices);
 }
 
 int
-cfa_tcam_mgr_entry_get_msg(int sess_idx, struct cfa_tcam_mgr_context *context
-			   __rte_unused,
+cfa_tcam_mgr_entry_get_msg(struct cfa_tcam_mgr_data *tcam_mgr_data,
+			   struct tf *tfp __rte_unused,
 			   struct cfa_tcam_mgr_get_parms *parms,
 			   int row, int slice,
 			   int max_slices __rte_unused)
 {
 	cfa_tcam_mgr_hwop_get_func_t get_func;
 
-	get_func = hwop_funcs.get;
-	if (get_func == NULL)
+	get_func = tcam_mgr_data->hwop_funcs.get;
+	if (!get_func)
 		return -CFA_TCAM_MGR_ERR_CODE(PERM);
 
-	return get_func(sess_idx, parms, row, slice, max_slices);
+	return get_func(tcam_mgr_data, parms, row, slice, max_slices);
 }
 
 int
-cfa_tcam_mgr_entry_free_msg(int sess_idx, struct cfa_tcam_mgr_context *context
-			    __rte_unused,
+cfa_tcam_mgr_entry_free_msg(struct cfa_tcam_mgr_data *tcam_mgr_data,
+			    struct tf *tfp __rte_unused,
 			    struct cfa_tcam_mgr_free_parms *parms,
 			    int row, int slice,
 			    int key_size,
 			    int result_size,
 			    int max_slices)
 {
+	enum tf_tcam_tbl_type type =
+		cfa_tcam_mgr_get_phys_table_type(parms->type);
+	uint8_t mask[CFA_TCAM_MGR_MAX_KEY_SIZE] = { 0 };
+	uint8_t key[CFA_TCAM_MGR_MAX_KEY_SIZE] = { 0 };
 	cfa_tcam_mgr_hwop_free_func_t free_func;
-
-	free_func = hwop_funcs.free;
-	if (free_func == NULL)
-		return -CFA_TCAM_MGR_ERR_CODE(PERM);
-
+	struct tf_tcam_set_parms sparms;
 	struct tf_dev_info *dev;
 	struct tf_session *tfs;
 	int rc;
-	enum tf_tcam_tbl_type type =
-		cfa_tcam_mgr_get_phys_table_type(parms->type);
 
-	/* Free will clear an entire row. */
-	/* Use set message to clear an individual entry */
-	struct tf_tcam_set_parms sparms;
-	uint8_t key[CFA_TCAM_MGR_MAX_KEY_SIZE] = { 0 };
-	uint8_t mask[CFA_TCAM_MGR_MAX_KEY_SIZE] = { 0 };
+	free_func = tcam_mgr_data->hwop_funcs.free;
+	if (!free_func)
+		return -CFA_TCAM_MGR_ERR_CODE(PERM);
+
+	/*
+	 * The free hwop will free more than a single slice (an entire row),
+	 * so cannot be used. Use set message to clear an individual entry
+	 */
 
 	/* Retrieve the session information */
-	rc = tf_session_get_session_internal(context->tfp, &tfs);
+	rc = tf_session_get_session_internal(tfp, &tfs);
 	if (rc)
 		return rc;
 
@@ -158,7 +168,9 @@ cfa_tcam_mgr_entry_free_msg(int sess_idx, struct cfa_tcam_mgr_context *context
 
 	if (key_size > CFA_TCAM_MGR_MAX_KEY_SIZE) {
 		CFA_TCAM_MGR_LOG_DIR_TYPE(ERR, parms->dir, parms->type,
-					  "Entry %d key size is %d greater than:%d\n",
+					  "%s: %s entry:%d key size:%d > %d\n",
+					  tf_dir_2_str(parms->dir),
+					  cfa_tcam_mgr_tbl_2_str(parms->type),
 					  parms->id, key_size,
 					  CFA_TCAM_MGR_MAX_KEY_SIZE);
 		return -EINVAL;
@@ -166,7 +178,9 @@ cfa_tcam_mgr_entry_free_msg(int sess_idx, struct cfa_tcam_mgr_context *context
 
 	if (result_size > CFA_TCAM_MGR_MAX_KEY_SIZE) {
 		CFA_TCAM_MGR_LOG_DIR_TYPE(ERR, parms->dir, parms->type,
-					  "Entry %d result size is %d greater than:%d\n",
+					  "%s: %s entry:%d res size:%d > %d\n",
+					  tf_dir_2_str(parms->dir),
+					  cfa_tcam_mgr_tbl_2_str(parms->type),
 					  parms->id, result_size,
 					  CFA_TCAM_MGR_MAX_KEY_SIZE);
 		return -EINVAL;
@@ -186,16 +200,27 @@ cfa_tcam_mgr_entry_free_msg(int sess_idx, struct cfa_tcam_mgr_context *context
 	sparms.key_size	   = key_size;
 	sparms.result_size = result_size;
 
-	rc = tf_msg_tcam_entry_set(context->tfp, dev, &sparms);
+#ifdef CFA_TCAM_MGR_TRACING
+	CFA_TCAM_MGR_LOG_DIR_TYPE(INFO, parms->dir, parms->type,
+				  "%s: %s row:%d slice:%d free idx:%d "
+				  "key_sz:%d result_sz:%d\n",
+				  tf_dir_2_str(parms->dir),
+				  cfa_tcam_mgr_tbl_2_str(parms->type),
+				  row, slice, sparms.idx, key_size,
+				  result_size);
+#endif
+
+	rc = tf_msg_tcam_entry_set(tfp, dev, &sparms);
 	if (rc) {
 		/* Log error */
 		CFA_TCAM_MGR_LOG_DIR_TYPE(ERR, parms->dir, parms->type,
-					  "Row %d, slice %d set failed, "
-					  "rc:%d.\n",
-					  row,
-					  slice,
-					  rc);
+					  "%s: %s row:%d slice:%d set failed, "
+					  "rc:%d\n",
+					  tf_dir_2_str(parms->dir),
+					  cfa_tcam_mgr_tbl_2_str(parms->type),
+					  row, slice, rc);
 		return rc;
 	}
-	return free_func(sess_idx, parms, row, slice, max_slices);
+
+	return free_func(tcam_mgr_data, parms, row, slice, max_slices);
 }
diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_hwop_msg.h b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_hwop_msg.h
index f7ba625c07..3b896d4548 100644
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_hwop_msg.h
+++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_hwop_msg.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2021-2023 Broadcom
+ * Copyright(c) 2021-2024 Broadcom
  * All rights reserved.
  */
 
@@ -7,22 +7,24 @@
 #define CFA_TCAM_MGR_HWOP_MSG_H
 
 int
-cfa_tcam_mgr_hwops_init(enum cfa_tcam_mgr_device_type type);
+cfa_tcam_mgr_hwops_init(struct cfa_tcam_mgr_data *tcam_mgr_data,
+			enum cfa_tcam_mgr_device_type type);
 
 int
-cfa_tcam_mgr_entry_set_msg(int sess_idx,
-			   struct cfa_tcam_mgr_context *context,
+cfa_tcam_mgr_entry_set_msg(struct cfa_tcam_mgr_data *tcam_mgr_data,
+			   struct tf *tfp,
 			   struct cfa_tcam_mgr_set_parms *parms,
 			   int row, int slice, int max_slices);
 int
-cfa_tcam_mgr_entry_get_msg(int sess_idx,
-			   struct cfa_tcam_mgr_context *context,
+cfa_tcam_mgr_entry_get_msg(struct cfa_tcam_mgr_data *tcam_mgr_data,
+			   struct tf *tfp,
 			   struct cfa_tcam_mgr_get_parms *parms,
 			   int row, int slice, int max_slices);
 int
-cfa_tcam_mgr_entry_free_msg(int sess_idx,
-			    struct cfa_tcam_mgr_context *context,
+cfa_tcam_mgr_entry_free_msg(struct cfa_tcam_mgr_data *tcam_mgr_data,
+			    struct tf *tfp,
 			    struct cfa_tcam_mgr_free_parms *parms,
 			    int row, int slice, int key_size,
 			    int result_size, int max_slices);
+
 #endif  /* CFA_TCAM_MGR_HWOP_MSG_H */
diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.c b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.c
index 63c84c5938..b2eadde61e 100644
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.c
+++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2021-2023 Broadcom
+ * Copyright(c) 2021-2024 Broadcom
  * All rights reserved.
  */
 
@@ -12,6 +12,7 @@
 #include "tfp.h"
 #include "assert.h"
 #include "tf_util.h"
+#include "tf_session.h"
 
 /*
  * Sizings of the TCAMs on P4
@@ -126,38 +127,40 @@
  * Array sizes have 1 added to avoid zero length arrays.
  */
 
-static struct cfa_tcam_mgr_table_rows_1
-	cfa_tcam_mgr_table_rows_L2_CTXT_TCAM_RX[TF_TCAM_MAX_SESSIONS][L2_CTXT_TCAM_RX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_1
-	cfa_tcam_mgr_table_rows_L2_CTXT_TCAM_TX[TF_TCAM_MAX_SESSIONS][L2_CTXT_TCAM_TX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_1
-	cfa_tcam_mgr_table_rows_PROF_TCAM_RX[TF_TCAM_MAX_SESSIONS][PROF_TCAM_RX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_1
-	cfa_tcam_mgr_table_rows_PROF_TCAM_TX[TF_TCAM_MAX_SESSIONS][PROF_TCAM_TX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_4
-	cfa_tcam_mgr_table_rows_WC_TCAM_RX[TF_TCAM_MAX_SESSIONS][WC_TCAM_RX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_4
-	cfa_tcam_mgr_table_rows_WC_TCAM_TX[TF_TCAM_MAX_SESSIONS][WC_TCAM_TX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_1
-	cfa_tcam_mgr_table_rows_SP_TCAM_RX[TF_TCAM_MAX_SESSIONS][SP_TCAM_RX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_1
-	cfa_tcam_mgr_table_rows_SP_TCAM_TX[TF_TCAM_MAX_SESSIONS][SP_TCAM_TX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_1
-	cfa_tcam_mgr_table_rows_CT_RULE_TCAM_RX[TF_TCAM_MAX_SESSIONS][CT_RULE_TCAM_RX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_1
-	cfa_tcam_mgr_table_rows_CT_RULE_TCAM_TX[TF_TCAM_MAX_SESSIONS][CT_RULE_TCAM_TX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_1
-	cfa_tcam_mgr_table_rows_VEB_TCAM_RX[TF_TCAM_MAX_SESSIONS][VEB_TCAM_RX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_1
-	cfa_tcam_mgr_table_rows_VEB_TCAM_TX[TF_TCAM_MAX_SESSIONS][VEB_TCAM_TX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_4
-	cfa_tcam_mgr_table_rows_WC_TCAM_RX_HIGH[TF_TCAM_MAX_SESSIONS][WC_TCAM_RX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_4
-	cfa_tcam_mgr_table_rows_WC_TCAM_RX_LOW[TF_TCAM_MAX_SESSIONS][WC_TCAM_RX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_4
-	cfa_tcam_mgr_table_rows_WC_TCAM_TX_HIGH[TF_TCAM_MAX_SESSIONS][WC_TCAM_TX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_4
-	cfa_tcam_mgr_table_rows_WC_TCAM_TX_LOW[TF_TCAM_MAX_SESSIONS][WC_TCAM_TX_NUM_ROWS + 1];
+struct cfa_tcam_mgr_table_rows_p4 {
+	struct cfa_tcam_mgr_table_rows_1
+		table_rows_L2_CTXT_TCAM_RX[L2_CTXT_TCAM_RX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_1
+		table_rows_L2_CTXT_TCAM_TX[L2_CTXT_TCAM_TX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_1
+		table_rows_PROF_TCAM_RX[PROF_TCAM_RX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_1
+		table_rows_PROF_TCAM_TX[PROF_TCAM_TX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_4
+		table_rows_WC_TCAM_RX[WC_TCAM_RX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_4
+		table_rows_WC_TCAM_TX[WC_TCAM_TX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_1
+		table_rows_SP_TCAM_RX[SP_TCAM_RX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_1
+		table_rows_SP_TCAM_TX[SP_TCAM_TX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_1
+		table_rows_CT_RULE_TCAM_RX[CT_RULE_TCAM_RX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_1
+		table_rows_CT_RULE_TCAM_TX[CT_RULE_TCAM_TX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_1
+		table_rows_VEB_TCAM_RX[VEB_TCAM_RX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_1
+		table_rows_VEB_TCAM_TX[VEB_TCAM_TX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_4
+		table_rows_WC_TCAM_RX_HIGH[WC_TCAM_RX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_4
+		table_rows_WC_TCAM_RX_LOW[WC_TCAM_RX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_4
+		table_rows_WC_TCAM_TX_HIGH[WC_TCAM_TX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_4
+		table_rows_WC_TCAM_TX_LOW[WC_TCAM_TX_NUM_ROWS + 1];
+};
 
 struct cfa_tcam_mgr_table_data
 cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
@@ -177,7 +180,7 @@ cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.row_width   = L2_CTXT_TCAM_RX_ROW_WIDTH,
 			.num_rows    = L2_CTXT_TCAM_RX_NUM_ROWS,
 			.start_row   = 0,
-			.end_row     = (L2_CTXT_TCAM_RX_NUM_ROWS / 2) - 1,
+			.end_row     = L2_CTXT_TCAM_RX_APP_HI_END,
 			.max_entries = (L2_CTXT_TCAM_RX_MAX_ENTRIES / 2),
 			.result_size = L2_CTXT_TCAM_RX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P4_L2_CTXT_TCAM_HIGH,
@@ -196,7 +199,7 @@ cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.max_slices  = L2_CTXT_TCAM_RX_MAX_SLICES,
 			.row_width   = L2_CTXT_TCAM_RX_ROW_WIDTH,
 			.num_rows    = L2_CTXT_TCAM_RX_NUM_ROWS,
-			.start_row   = (L2_CTXT_TCAM_RX_NUM_ROWS / 2),
+			.start_row   = L2_CTXT_TCAM_RX_APP_LO_START,
 			.end_row     = L2_CTXT_TCAM_RX_NUM_ROWS - 1,
 			.max_entries = (L2_CTXT_TCAM_RX_MAX_ENTRIES / 2),
 			.result_size = L2_CTXT_TCAM_RX_RESULT_SIZE,
@@ -277,7 +280,8 @@ cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.num_rows    = CT_RULE_TCAM_RX_NUM_ROWS,
 			.start_row   = 0,
 #if CT_RULE_TCAM_RX_NUM_ROWS > 0
-			.end_row     = CT_RULE_TCAM_RX_NUM_ROWS - 1,
+			.end_row     =
+				TCAM_SET_END_ROW(CT_RULE_TCAM_RX_NUM_ROWS),
 #else
 			.end_row     = CT_RULE_TCAM_RX_NUM_ROWS,
 #endif
@@ -299,7 +303,8 @@ cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.num_rows    = VEB_TCAM_RX_NUM_ROWS,
 			.start_row   = 0,
 #if VEB_TCAM_RX_NUM_ROWS > 0
-			.end_row     = VEB_TCAM_RX_NUM_ROWS - 1,
+			.end_row     =
+				TCAM_SET_END_ROW(VEB_TCAM_RX_NUM_ROWS),
 #else
 			.end_row     = VEB_TCAM_RX_NUM_ROWS,
 #endif
@@ -363,7 +368,7 @@ cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.row_width   = L2_CTXT_TCAM_TX_ROW_WIDTH,
 			.num_rows    = L2_CTXT_TCAM_TX_NUM_ROWS,
 			.start_row   = 0,
-			.end_row     = (L2_CTXT_TCAM_TX_NUM_ROWS / 2) - 1,
+			.end_row     = L2_CTXT_TCAM_TX_APP_HI_END,
 			.max_entries = (L2_CTXT_TCAM_TX_MAX_ENTRIES / 2),
 			.result_size = L2_CTXT_TCAM_TX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P4_L2_CTXT_TCAM_HIGH,
@@ -382,7 +387,7 @@ cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.max_slices  = L2_CTXT_TCAM_TX_MAX_SLICES,
 			.row_width   = L2_CTXT_TCAM_TX_ROW_WIDTH,
 			.num_rows    = L2_CTXT_TCAM_TX_NUM_ROWS,
-			.start_row   = (L2_CTXT_TCAM_TX_NUM_ROWS / 2),
+			.start_row   = L2_CTXT_TCAM_TX_APP_LO_START,
 			.end_row     = L2_CTXT_TCAM_TX_NUM_ROWS - 1,
 			.max_entries = (L2_CTXT_TCAM_TX_MAX_ENTRIES / 2),
 			.result_size = L2_CTXT_TCAM_TX_RESULT_SIZE,
@@ -463,7 +468,8 @@ cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.num_rows    = CT_RULE_TCAM_TX_NUM_ROWS,
 			.start_row   = 0,
 #if CT_RULE_TCAM_TX_NUM_ROWS > 0
-			.end_row     = CT_RULE_TCAM_TX_NUM_ROWS - 1,
+			.end_row     =
+				TCAM_SET_END_ROW(CT_RULE_TCAM_TX_NUM_ROWS),
 #else
 			.end_row     = CT_RULE_TCAM_TX_NUM_ROWS,
 #endif
@@ -487,6 +493,7 @@ cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.end_row     = VEB_TCAM_TX_NUM_ROWS - 1,
 			.max_entries = VEB_TCAM_TX_MAX_ENTRIES,
 			.result_size = VEB_TCAM_RX_RESULT_SIZE,
+/*			.hcapi_type  = */
 		},
 		{			/* AFM */
 			.max_slices  = WC_TCAM_TX_MAX_SLICES,
@@ -531,221 +538,311 @@ cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 	},
 };
 
-static struct cfa_tcam_mgr_entry_data entry_data_p4[TF_TCAM_MAX_SESSIONS][TF_TCAM_MAX_ENTRIES];
-
-static struct sbmp session_bmp_p4[TF_TCAM_MAX_SESSIONS][TF_TCAM_MAX_ENTRIES];
+static int cfa_tcam_mgr_row_data_alloc(struct cfa_tcam_mgr_data *tcam_mgr_data);
+static void cfa_tcam_mgr_row_data_free(struct cfa_tcam_mgr_data *tcam_mgr_data);
 
-int
-cfa_tcam_mgr_sess_table_get_p4(int sess_idx, struct sbmp **session_bmp)
+static void cfa_tcam_mgr_data_free(struct tf_session *tfs)
 {
-	*session_bmp = session_bmp_p4[sess_idx];
-	return 0;
+	struct cfa_tcam_mgr_data *tcam_mgr_data = tfs->tcam_mgr_handle;
+
+	if (!tcam_mgr_data)
+		return;
+
+	tfp_free(tcam_mgr_data->table_rows);
+	tfp_free(tcam_mgr_data->entry_data);
+	tfp_free(tcam_mgr_data->session_bmp);
+	cfa_tcam_mgr_row_data_free(tcam_mgr_data);
+
+	tfp_free(tcam_mgr_data);
+	tfs->tcam_mgr_handle = NULL;
 }
 
 int
-cfa_tcam_mgr_init_p4(int sess_idx, struct cfa_tcam_mgr_entry_data **global_entry_data)
+cfa_tcam_mgr_init_p4(struct tf *tfp)
 {
-	int max_row_width = 0;
+	struct cfa_tcam_mgr_table_rows_p4 *table_rows;
+	struct cfa_tcam_mgr_data *tcam_mgr_data;
+	struct tfp_calloc_parms cparms;
 	int max_result_size = 0;
+	struct tf_session *tfs;
+	int max_row_width = 0;
 	int dir, type;
+	int rc;
+
+	rc = tf_session_get_session_internal(tfp, &tfs);
+	if (rc)
+		return rc;
+
+	cparms.nitems = 1;
+	cparms.size = sizeof(struct cfa_tcam_mgr_data);
+	cparms.alignment = 0;
+	rc = tfp_calloc(&cparms);
+	if (rc) {
+		/* Log error */
+		TFP_DRV_LOG(ERR,
+			    "Failed to allocate block, rc:%s\n",
+			    strerror(-rc));
+		return rc;
+	}
 
-	*global_entry_data = entry_data_p4[sess_idx];
+	tfs->tcam_mgr_handle = (struct cfa_tcam_mgr_data *)cparms.mem_va;
+	tcam_mgr_data = tfs->tcam_mgr_handle;
 
-	memcpy(&cfa_tcam_mgr_tables[sess_idx],
+	cparms.nitems = 1;
+	cparms.size = sizeof(struct cfa_tcam_mgr_table_rows_p4);
+	cparms.alignment = 0;
+	rc = tfp_calloc(&cparms);
+	if (rc) {
+		/* Log error */
+		TFP_DRV_LOG(ERR,
+			    "Failed to allocate block, rc:%s\n",
+			    strerror(-rc));
+		tfp_free(tfs->tcam_mgr_handle);
+		tfs->tcam_mgr_handle = NULL;
+		return rc;
+	}
+	tcam_mgr_data->table_rows =
+			(struct cfa_tcam_mgr_table_rows_p4 *)cparms.mem_va;
+	table_rows = tcam_mgr_data->table_rows;
+
+	cparms.nitems = TF_TCAM_MAX_ENTRIES;
+	cparms.size = sizeof(struct cfa_tcam_mgr_entry_data);
+	cparms.alignment = 0;
+	rc = tfp_calloc(&cparms);
+	if (rc) {
+		/* Log error */
+		TFP_DRV_LOG(ERR,
+			    "Failed to allocate block, rc:%s\n",
+			    strerror(-rc));
+		goto fail;
+	}
+	tcam_mgr_data->entry_data =
+			(struct cfa_tcam_mgr_entry_data *)cparms.mem_va;
+
+	rc = cfa_tcam_mgr_row_data_alloc(tcam_mgr_data);
+	if (rc) {
+		/* Log error */
+		TFP_DRV_LOG(ERR,
+			    "Failed to allocate tcam_mgr_row_data, rc:%s\n",
+			    strerror(-rc));
+		goto fail;
+	}
+
+	memcpy(&tcam_mgr_data->cfa_tcam_mgr_tables,
 	       &cfa_tcam_mgr_tables_p4,
-	       sizeof(cfa_tcam_mgr_tables[sess_idx]));
+	       sizeof(tcam_mgr_data->cfa_tcam_mgr_tables));
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_L2_CTXT_TCAM_RX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+		&table_rows->table_rows_L2_CTXT_TCAM_RX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_L2_CTXT_TCAM_RX[sess_idx];
+		&table_rows->table_rows_L2_CTXT_TCAM_RX[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_L2_CTXT_TCAM_TX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+		&table_rows->table_rows_L2_CTXT_TCAM_TX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_L2_CTXT_TCAM_TX[sess_idx];
+		&table_rows->table_rows_L2_CTXT_TCAM_TX[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_L2_CTXT_TCAM_RX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+		&table_rows->table_rows_L2_CTXT_TCAM_RX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_L2_CTXT_TCAM_RX[sess_idx];
+		&table_rows->table_rows_L2_CTXT_TCAM_RX[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_L2_CTXT_TCAM_TX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+		&table_rows->table_rows_L2_CTXT_TCAM_TX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_L2_CTXT_TCAM_TX[sess_idx];
+		&table_rows->table_rows_L2_CTXT_TCAM_TX[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_PROF_TCAM_RX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+		&table_rows->table_rows_PROF_TCAM_RX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_PROF_TCAM_RX[sess_idx];
+		&table_rows->table_rows_PROF_TCAM_RX[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_PROF_TCAM_TX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+		&table_rows->table_rows_PROF_TCAM_TX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_PROF_TCAM_TX[sess_idx];
+		&table_rows->table_rows_PROF_TCAM_TX[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_WC_TCAM_RX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+		&table_rows->table_rows_WC_TCAM_RX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_WC_TCAM_RX[sess_idx];
+		&table_rows->table_rows_WC_TCAM_RX[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_WC_TCAM_TX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+		&table_rows->table_rows_WC_TCAM_TX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_WC_TCAM_TX[sess_idx];
+		&table_rows->table_rows_WC_TCAM_TX[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_SP_TCAM_RX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+		&table_rows->table_rows_SP_TCAM_RX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_SP_TCAM_RX[sess_idx];
+		&table_rows->table_rows_SP_TCAM_RX[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_SP_TCAM_TX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+		&table_rows->table_rows_SP_TCAM_TX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_SP_TCAM_TX[sess_idx];
+		&table_rows->table_rows_SP_TCAM_TX[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_CT_RULE_TCAM_RX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+		&table_rows->table_rows_CT_RULE_TCAM_RX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_CT_RULE_TCAM_RX[sess_idx];
+		&table_rows->table_rows_CT_RULE_TCAM_RX[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_CT_RULE_TCAM_TX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+		&table_rows->table_rows_CT_RULE_TCAM_TX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_CT_RULE_TCAM_TX[sess_idx];
+		&table_rows->table_rows_CT_RULE_TCAM_TX[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_VEB_TCAM_RX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+		&table_rows->table_rows_VEB_TCAM_RX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_VEB_TCAM_RX[sess_idx];
+		&table_rows->table_rows_VEB_TCAM_RX[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_VEB_TCAM_TX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+		&table_rows->table_rows_VEB_TCAM_TX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_VEB_TCAM_TX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+		&table_rows->table_rows_VEB_TCAM_TX[0];
+
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_WC_TCAM_RX_HIGH[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+		&table_rows->table_rows_WC_TCAM_RX_HIGH[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_WC_TCAM_RX_HIGH[sess_idx];
+		&table_rows->table_rows_WC_TCAM_RX_HIGH[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_WC_TCAM_TX_HIGH[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+		&table_rows->table_rows_WC_TCAM_TX_HIGH[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_WC_TCAM_TX_HIGH[sess_idx];
+		&table_rows->table_rows_WC_TCAM_TX_HIGH[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_WC_TCAM_RX_LOW[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+		&table_rows->table_rows_WC_TCAM_RX_LOW[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_WC_TCAM_RX_LOW[sess_idx];
+		&table_rows->table_rows_WC_TCAM_RX_LOW[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_WC_TCAM_TX_LOW[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+		&table_rows->table_rows_WC_TCAM_TX_LOW[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_WC_TCAM_TX_LOW[sess_idx];
+		&table_rows->table_rows_WC_TCAM_TX_LOW[0];
 
 	for (dir = 0; dir < TF_DIR_MAX; dir++) {
 		for (type = 0; type < CFA_TCAM_MGR_TBL_TYPE_MAX; type++) {
-			if (cfa_tcam_mgr_tables[sess_idx][dir][type].row_width >
-			    max_row_width)
+			if (tcam_mgr_data->cfa_tcam_mgr_tables[dir]
+							[type].row_width >
+								max_row_width)
 				max_row_width =
-				       cfa_tcam_mgr_tables[sess_idx][dir][type].row_width;
-			if (cfa_tcam_mgr_tables[sess_idx][dir][type].result_size >
-			    max_result_size)
+				       tcam_mgr_data->cfa_tcam_mgr_tables[dir]
+							[type].row_width;
+			if (tcam_mgr_data->cfa_tcam_mgr_tables[dir]
+							[type].result_size >
+								max_result_size)
 				max_result_size =
-				     cfa_tcam_mgr_tables[sess_idx][dir][type].result_size;
+				     tcam_mgr_data->cfa_tcam_mgr_tables[dir]
+							[type].result_size;
 		}
 	}
 
 	if (max_row_width != MAX_ROW_WIDTH) {
 		CFA_TCAM_MGR_LOG(ERR,
-				 "MAX_ROW_WIDTH (%d) does not match actual "
-				 "value (%d).\n",
-				 MAX_ROW_WIDTH,
-				 max_row_width);
-		return -CFA_TCAM_MGR_ERR_CODE(INVAL);
+				 "MAX_ROW_WIDTH:%d does not match val:%d\n",
+				 MAX_ROW_WIDTH, max_row_width);
+		rc = -CFA_TCAM_MGR_ERR_CODE(INVAL);
+		goto fail;
 	}
 	if (max_result_size != MAX_RESULT_SIZE) {
 		CFA_TCAM_MGR_LOG(ERR,
-				 "MAX_RESULT_SIZE (%d) does not match actual "
-				 "value (%d).\n",
-				 MAX_RESULT_SIZE,
-				 max_result_size);
-		return -CFA_TCAM_MGR_ERR_CODE(INVAL);
+				 "MAX_RESULT_SIZE:%d does not match val:%d\n",
+				 MAX_RESULT_SIZE, max_result_size);
+		rc = -CFA_TCAM_MGR_ERR_CODE(INVAL);
+		goto fail;
 	}
+
 	return 0;
+
+fail:
+	cfa_tcam_mgr_data_free(tfs);
+	return rc;
+}
+
+void cfa_tcam_mgr_uninit_p4(struct tf *tfp)
+{
+	struct tf_session *tfs;
+	int rc;
+
+	rc = tf_session_get_session_internal(tfp, &tfs);
+	if (rc)
+		return;
+
+	cfa_tcam_mgr_data_free(tfs);
 }
 
 /* HW OP declarations begin here */
@@ -776,133 +873,182 @@ struct cfa_tcam_mgr_TCAM_row_data {
 	(CT_RULE_TCAM_TX_MAX_SLICES * CT_RULE_TCAM_TX_NUM_ROWS)
 #define VEB_TX_MAX_ROWS	    (VEB_TCAM_TX_MAX_SLICES * VEB_TCAM_TX_NUM_ROWS)
 
-static int cfa_tcam_mgr_max_rows[TF_TCAM_TBL_TYPE_MAX] = {
-	L2_CTXT_RX_MAX_ROWS,
-	L2_CTXT_RX_MAX_ROWS,
-	PROF_RX_MAX_ROWS,
-	WC_RX_MAX_ROWS,
-	SP_RX_MAX_ROWS,
-	CT_RULE_RX_MAX_ROWS,
-	VEB_RX_MAX_ROWS,
-	WC_RX_MAX_ROWS,
-	WC_RX_MAX_ROWS
+struct cfa_tcam_mgr_rx_row_data {
+	struct cfa_tcam_mgr_TCAM_row_data
+		cfa_tcam_mgr_L2_CTXT_TCAM_RX_row_data[L2_CTXT_RX_MAX_ROWS + 1];
+	struct cfa_tcam_mgr_TCAM_row_data
+		cfa_tcam_mgr_PROF_TCAM_RX_row_data[PROF_RX_MAX_ROWS + 1];
+	struct cfa_tcam_mgr_TCAM_row_data
+		cfa_tcam_mgr_WC_TCAM_RX_row_data[WC_RX_MAX_ROWS + 1];
+	struct cfa_tcam_mgr_TCAM_row_data
+		cfa_tcam_mgr_SP_TCAM_RX_row_data[SP_RX_MAX_ROWS + 1];
+	struct cfa_tcam_mgr_TCAM_row_data
+		cfa_tcam_mgr_CT_RULE_TCAM_RX_row_data[CT_RULE_RX_MAX_ROWS + 1];
+	struct cfa_tcam_mgr_TCAM_row_data
+		cfa_tcam_mgr_VEB_TCAM_RX_row_data[VEB_RX_MAX_ROWS + 1];
 };
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_L2_CTXT_TCAM_RX_row_data[TF_TCAM_MAX_SESSIONS][L2_CTXT_RX_MAX_ROWS];
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_PROF_TCAM_RX_row_data[TF_TCAM_MAX_SESSIONS][PROF_RX_MAX_ROWS];
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_WC_TCAM_RX_row_data[TF_TCAM_MAX_SESSIONS][WC_RX_MAX_ROWS];
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_SP_TCAM_RX_row_data[TF_TCAM_MAX_SESSIONS][SP_RX_MAX_ROWS];
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_CT_RULE_TCAM_RX_row_data[TF_TCAM_MAX_SESSIONS][CT_RULE_RX_MAX_ROWS];
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_VEB_TCAM_RX_row_data[TF_TCAM_MAX_SESSIONS][VEB_RX_MAX_ROWS];
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_WC_TCAM_RX_row_data[TF_TCAM_MAX_SESSIONS][WC_RX_MAX_ROWS];
-
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_L2_CTXT_TCAM_TX_row_data[TF_TCAM_MAX_SESSIONS][L2_CTXT_TX_MAX_ROWS];
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_PROF_TCAM_TX_row_data[TF_TCAM_MAX_SESSIONS][PROF_TX_MAX_ROWS];
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_WC_TCAM_TX_row_data[TF_TCAM_MAX_SESSIONS][WC_TX_MAX_ROWS];
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_SP_TCAM_TX_row_data[TF_TCAM_MAX_SESSIONS][SP_TX_MAX_ROWS];
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_CT_RULE_TCAM_TX_row_data[TF_TCAM_MAX_SESSIONS][CT_RULE_TX_MAX_ROWS];
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_VEB_TCAM_TX_row_data[TF_TCAM_MAX_SESSIONS][VEB_TX_MAX_ROWS];
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_WC_TCAM_TX_row_data[TF_TCAM_MAX_SESSIONS][WC_TX_MAX_ROWS];
-
-static struct cfa_tcam_mgr_TCAM_row_data *
-row_tables[TF_DIR_MAX][TF_TCAM_TBL_TYPE_MAX] = {
-	{
-		cfa_tcam_mgr_L2_CTXT_TCAM_RX_row_data[0],
-		cfa_tcam_mgr_L2_CTXT_TCAM_RX_row_data[0],
-		cfa_tcam_mgr_PROF_TCAM_RX_row_data[0],
-		cfa_tcam_mgr_WC_TCAM_RX_row_data[0],
-		cfa_tcam_mgr_SP_TCAM_RX_row_data[0],
-		cfa_tcam_mgr_CT_RULE_TCAM_RX_row_data[0],
-		cfa_tcam_mgr_VEB_TCAM_RX_row_data[0],
-		cfa_tcam_mgr_WC_TCAM_RX_row_data[0],
-		cfa_tcam_mgr_WC_TCAM_RX_row_data[0],
-	},
-	{
-		cfa_tcam_mgr_L2_CTXT_TCAM_TX_row_data[0],
-		cfa_tcam_mgr_L2_CTXT_TCAM_TX_row_data[0],
-		cfa_tcam_mgr_PROF_TCAM_TX_row_data[0],
-		cfa_tcam_mgr_WC_TCAM_TX_row_data[0],
-		cfa_tcam_mgr_SP_TCAM_TX_row_data[0],
-		cfa_tcam_mgr_CT_RULE_TCAM_TX_row_data[0],
-		cfa_tcam_mgr_VEB_TCAM_TX_row_data[0],
-		cfa_tcam_mgr_WC_TCAM_TX_row_data[0],
-		cfa_tcam_mgr_WC_TCAM_TX_row_data[0],
-	}
+
+struct cfa_tcam_mgr_tx_row_data {
+	struct cfa_tcam_mgr_TCAM_row_data
+		cfa_tcam_mgr_L2_CTXT_TCAM_TX_row_data[L2_CTXT_TX_MAX_ROWS + 1];
+	struct cfa_tcam_mgr_TCAM_row_data
+		cfa_tcam_mgr_PROF_TCAM_TX_row_data[PROF_TX_MAX_ROWS + 1];
+	struct cfa_tcam_mgr_TCAM_row_data
+		cfa_tcam_mgr_WC_TCAM_TX_row_data[WC_TX_MAX_ROWS + 1];
+	struct cfa_tcam_mgr_TCAM_row_data
+		cfa_tcam_mgr_SP_TCAM_TX_row_data[SP_TX_MAX_ROWS + 1];
+	struct cfa_tcam_mgr_TCAM_row_data
+		cfa_tcam_mgr_CT_RULE_TCAM_TX_row_data[CT_RULE_TX_MAX_ROWS + 1];
+	struct cfa_tcam_mgr_TCAM_row_data
+		cfa_tcam_mgr_VEB_TCAM_TX_row_data[VEB_TX_MAX_ROWS + 1];
 };
 
-static int cfa_tcam_mgr_get_max_rows(enum tf_tcam_tbl_type type)
+#define TF_TCAM_L2_CTX_HI       TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH
+#define TF_TCAM_L2_CTX_LO       TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW
+#define TF_TCAM_PROF	    TF_TCAM_TBL_TYPE_PROF_TCAM
+#define TF_TCAM_WC	      TF_TCAM_TBL_TYPE_WC_TCAM
+#define TF_TCAM_SP	      TF_TCAM_TBL_TYPE_SP_TCAM
+#define TF_TCAM_CT	      TF_TCAM_TBL_TYPE_CT_RULE_TCAM
+#define TF_TCAM_VEB	     TF_TCAM_TBL_TYPE_VEB_TCAM
+#define TF_TCAM_WC_HI	   TF_TCAM_TBL_TYPE_WC_TCAM_HIGH
+#define TF_TCAM_WC_LO	   TF_TCAM_TBL_TYPE_WC_TCAM_LOW
+
+static int cfa_tcam_mgr_row_data_alloc(struct cfa_tcam_mgr_data *tcam_mgr_data)
 {
-	if (type >= TF_TCAM_TBL_TYPE_MAX)
-		assert(0);
-	else
-		return cfa_tcam_mgr_max_rows[type];
+	struct cfa_tcam_mgr_rx_row_data *rx_row_data;
+	struct cfa_tcam_mgr_tx_row_data *tx_row_data;
+	struct tfp_calloc_parms cparms;
+	int rc;
+
+	cparms.nitems = 1;
+	cparms.size = sizeof(struct cfa_tcam_mgr_rx_row_data);
+	cparms.alignment = 0;
+	rc = tfp_calloc(&cparms);
+	if (rc) {
+		/* Log error */
+		TFP_DRV_LOG(ERR,
+			    "Failed to allocate rx_row_data, rc:%s\n",
+			    strerror(-rc));
+		return -ENOMEM;
+	}
+
+	rx_row_data = (struct cfa_tcam_mgr_rx_row_data *)cparms.mem_va;
+
+	cparms.nitems = 1;
+	cparms.size = sizeof(struct cfa_tcam_mgr_tx_row_data);
+	cparms.alignment = 0;
+	rc = tfp_calloc(&cparms);
+	if (rc) {
+		/* Log error */
+		TFP_DRV_LOG(ERR,
+			    "Failed to allocate tx_row_data, rc:%s\n",
+			    strerror(-rc));
+		tfp_free(rx_row_data);
+		return -ENOMEM;
+	}
+
+	tx_row_data = (struct cfa_tcam_mgr_tx_row_data *)cparms.mem_va;
+
+	tcam_mgr_data->rx_row_data = rx_row_data;
+	tcam_mgr_data->tx_row_data = tx_row_data;
+
+	tcam_mgr_data->row_tables[TF_DIR_RX][TF_TCAM_L2_CTX_HI] =
+		&rx_row_data->cfa_tcam_mgr_L2_CTXT_TCAM_RX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_RX][TF_TCAM_L2_CTX_LO] =
+		&rx_row_data->cfa_tcam_mgr_L2_CTXT_TCAM_RX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_RX][TF_TCAM_PROF] =
+		&rx_row_data->cfa_tcam_mgr_PROF_TCAM_RX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_RX][TF_TCAM_WC] =
+		&rx_row_data->cfa_tcam_mgr_WC_TCAM_RX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_RX][TF_TCAM_SP] =
+		&rx_row_data->cfa_tcam_mgr_SP_TCAM_RX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_RX][TF_TCAM_CT] =
+		&rx_row_data->cfa_tcam_mgr_CT_RULE_TCAM_RX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_RX][TF_TCAM_VEB] =
+		&rx_row_data->cfa_tcam_mgr_VEB_TCAM_RX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_RX][TF_TCAM_WC_HI] =
+		&rx_row_data->cfa_tcam_mgr_WC_TCAM_RX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_RX][TF_TCAM_WC_LO] =
+		&rx_row_data->cfa_tcam_mgr_WC_TCAM_RX_row_data[0];
+
+	tcam_mgr_data->row_tables[TF_DIR_TX][TF_TCAM_L2_CTX_HI] =
+		&tx_row_data->cfa_tcam_mgr_L2_CTXT_TCAM_TX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_TX][TF_TCAM_L2_CTX_LO] =
+		&tx_row_data->cfa_tcam_mgr_L2_CTXT_TCAM_TX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_TX][TF_TCAM_PROF] =
+		&tx_row_data->cfa_tcam_mgr_PROF_TCAM_TX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_TX][TF_TCAM_WC] =
+		&tx_row_data->cfa_tcam_mgr_WC_TCAM_TX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_TX][TF_TCAM_SP] =
+		&tx_row_data->cfa_tcam_mgr_SP_TCAM_TX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_TX][TF_TCAM_CT] =
+		&tx_row_data->cfa_tcam_mgr_CT_RULE_TCAM_TX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_TX][TF_TCAM_VEB] =
+		&tx_row_data->cfa_tcam_mgr_VEB_TCAM_TX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_TX][TF_TCAM_WC_HI] =
+		&tx_row_data->cfa_tcam_mgr_WC_TCAM_TX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_TX][TF_TCAM_WC_LO] =
+		&tx_row_data->cfa_tcam_mgr_WC_TCAM_TX_row_data[0];
+
+	return 0;
 }
 
-static int cfa_tcam_mgr_hwop_set(int sess_idx,
+static void cfa_tcam_mgr_row_data_free(struct cfa_tcam_mgr_data
+				       *tcam_mgr_data)
+{
+	tfp_free(tcam_mgr_data->rx_row_data);
+	tfp_free(tcam_mgr_data->tx_row_data);
+}
+
+static int cfa_tcam_mgr_hwop_set(struct cfa_tcam_mgr_data *tcam_mgr_data,
 				 struct cfa_tcam_mgr_set_parms *parms, int row,
 				 int slice, int max_slices)
 {
 	struct cfa_tcam_mgr_TCAM_row_data *this_table;
 	struct cfa_tcam_mgr_TCAM_row_data *this_row;
-	this_table = row_tables[parms->dir]
+
+	this_table = tcam_mgr_data->row_tables[parms->dir]
 		[cfa_tcam_mgr_get_phys_table_type(parms->type)];
-	this_table += (sess_idx *
-		       cfa_tcam_mgr_get_max_rows(cfa_tcam_mgr_get_phys_table_type(parms->type)));
 	this_row   = &this_table[row * max_slices + slice];
 	this_row->key_size = parms->key_size;
 	memcpy(&this_row->key, parms->key, parms->key_size);
 	memcpy(&this_row->mask, parms->mask, parms->key_size);
 	this_row->result_size = parms->result_size;
-	if (parms->result != ((void *)0))
+	if (parms->result)
 		memcpy(&this_row->result, parms->result, parms->result_size);
 	return 0;
 };
 
-static int cfa_tcam_mgr_hwop_get(int sess_idx,
+static int cfa_tcam_mgr_hwop_get(struct cfa_tcam_mgr_data *tcam_mgr_data,
 				 struct cfa_tcam_mgr_get_parms *parms, int row,
 				 int slice, int max_slices)
 {
 	struct cfa_tcam_mgr_TCAM_row_data *this_table;
 	struct cfa_tcam_mgr_TCAM_row_data *this_row;
-	this_table = row_tables[parms->dir]
+
+	this_table = tcam_mgr_data->row_tables[parms->dir]
 		[cfa_tcam_mgr_get_phys_table_type(parms->type)];
-	this_table += (sess_idx *
-		       cfa_tcam_mgr_get_max_rows(cfa_tcam_mgr_get_phys_table_type(parms->type)));
 	this_row   = &this_table[row * max_slices + slice];
 	parms->key_size = this_row->key_size;
 	parms->result_size = this_row->result_size;
-	if (parms->key != ((void *)0))
+	if (parms->key)
 		memcpy(parms->key, &this_row->key, parms->key_size);
-	if (parms->mask != ((void *)0))
+	if (parms->mask)
 		memcpy(parms->mask, &this_row->mask, parms->key_size);
-	if (parms->result != ((void *)0))
+	if (parms->result)
 		memcpy(parms->result, &this_row->result, parms->result_size);
 	return 0;
 };
 
-static int cfa_tcam_mgr_hwop_free(int sess_idx,
+static int cfa_tcam_mgr_hwop_free(struct cfa_tcam_mgr_data *tcam_mgr_data,
 				  struct cfa_tcam_mgr_free_parms *parms,
 				  int row, int slice, int max_slices)
 {
 	struct cfa_tcam_mgr_TCAM_row_data *this_table;
 	struct cfa_tcam_mgr_TCAM_row_data *this_row;
-	this_table = row_tables[parms->dir]
+
+	this_table = tcam_mgr_data->row_tables[parms->dir]
 		[cfa_tcam_mgr_get_phys_table_type(parms->type)];
-	this_table += (sess_idx *
-		       cfa_tcam_mgr_get_max_rows(cfa_tcam_mgr_get_phys_table_type(parms->type)));
 	this_row   = &this_table[row * max_slices + slice];
 	memset(&this_row->key, 0, sizeof(this_row->key));
 	memset(&this_row->mask, 0, sizeof(this_row->mask));
diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.h b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.h
index 3ca59b2aeb..acf3029578 100644
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.h
+++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2021-2023 Broadcom
+ * Copyright(c) 2021-2024 Broadcom
  * All rights reserved.
  */
 
@@ -7,13 +7,12 @@
 #define CFA_TCAM_MGR_P4_H
 
 #include "cfa_tcam_mgr_device.h"
-#include "cfa_tcam_mgr_sbmp.h"
 
 int
-cfa_tcam_mgr_init_p4(int sess_idx, struct cfa_tcam_mgr_entry_data **global_entry_data);
+cfa_tcam_mgr_init_p4(struct tf *tfp);
 
-int
-cfa_tcam_mgr_sess_table_get_p4(int sess_idx, struct sbmp **session_bmp);
+void
+cfa_tcam_mgr_uninit_p4(struct tf *tfp);
 
 int
 cfa_tcam_mgr_hwops_get_funcs_p4(struct cfa_tcam_mgr_hwops_funcs *hwop_funcs);
diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.c b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.c
index 656b10641e..aa322b4452 100644
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.c
+++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2021-2023 Broadcom
+ * Copyright(c) 2021-2024 Broadcom
  * All rights reserved.
  */
 
@@ -12,6 +12,7 @@
 #include "tfp.h"
 #include "assert.h"
 #include "tf_util.h"
+#include "tf_session.h"
 
 /*
  * Sizings of the TCAMs on P5
@@ -126,38 +127,40 @@
  * Array sizes have 1 added to avoid zero length arrays.
  */
 
-static struct cfa_tcam_mgr_table_rows_1
-	cfa_tcam_mgr_table_rows_L2_CTXT_TCAM_RX[TF_TCAM_MAX_SESSIONS][L2_CTXT_TCAM_RX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_1
-	cfa_tcam_mgr_table_rows_L2_CTXT_TCAM_TX[TF_TCAM_MAX_SESSIONS][L2_CTXT_TCAM_TX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_1
-	cfa_tcam_mgr_table_rows_PROF_TCAM_RX[TF_TCAM_MAX_SESSIONS][PROF_TCAM_RX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_1
-	cfa_tcam_mgr_table_rows_PROF_TCAM_TX[TF_TCAM_MAX_SESSIONS][PROF_TCAM_TX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_4
-	cfa_tcam_mgr_table_rows_WC_TCAM_RX[TF_TCAM_MAX_SESSIONS][WC_TCAM_RX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_4
-	cfa_tcam_mgr_table_rows_WC_TCAM_TX[TF_TCAM_MAX_SESSIONS][WC_TCAM_TX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_1
-	cfa_tcam_mgr_table_rows_SP_TCAM_RX[TF_TCAM_MAX_SESSIONS][SP_TCAM_RX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_1
-	cfa_tcam_mgr_table_rows_SP_TCAM_TX[TF_TCAM_MAX_SESSIONS][SP_TCAM_TX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_1
-	cfa_tcam_mgr_table_rows_CT_RULE_TCAM_RX[TF_TCAM_MAX_SESSIONS][CT_RULE_TCAM_RX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_1
-	cfa_tcam_mgr_table_rows_CT_RULE_TCAM_TX[TF_TCAM_MAX_SESSIONS][CT_RULE_TCAM_TX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_1
-	cfa_tcam_mgr_table_rows_VEB_TCAM_RX[TF_TCAM_MAX_SESSIONS][VEB_TCAM_RX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_1
-	cfa_tcam_mgr_table_rows_VEB_TCAM_TX[TF_TCAM_MAX_SESSIONS][VEB_TCAM_TX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_4
-	cfa_tcam_mgr_table_rows_WC_TCAM_RX_HIGH[TF_TCAM_MAX_SESSIONS][WC_TCAM_RX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_4
-	cfa_tcam_mgr_table_rows_WC_TCAM_RX_LOW[TF_TCAM_MAX_SESSIONS][WC_TCAM_RX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_4
-	cfa_tcam_mgr_table_rows_WC_TCAM_TX_HIGH[TF_TCAM_MAX_SESSIONS][WC_TCAM_TX_NUM_ROWS + 1];
-static struct cfa_tcam_mgr_table_rows_4
-	cfa_tcam_mgr_table_rows_WC_TCAM_TX_LOW[TF_TCAM_MAX_SESSIONS][WC_TCAM_TX_NUM_ROWS + 1];
+struct cfa_tcam_mgr_table_rows_p58 {
+	struct cfa_tcam_mgr_table_rows_1
+		table_rows_L2_CTXT_TCAM_RX[L2_CTXT_TCAM_RX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_1
+		table_rows_L2_CTXT_TCAM_TX[L2_CTXT_TCAM_TX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_1
+		table_rows_PROF_TCAM_RX[PROF_TCAM_RX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_1
+		table_rows_PROF_TCAM_TX[PROF_TCAM_TX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_4
+		table_rows_WC_TCAM_RX[WC_TCAM_RX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_4
+		table_rows_WC_TCAM_TX[WC_TCAM_TX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_1
+		table_rows_SP_TCAM_RX[SP_TCAM_RX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_1
+		table_rows_SP_TCAM_TX[SP_TCAM_TX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_1
+		table_rows_CT_RULE_TCAM_RX[CT_RULE_TCAM_RX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_1
+		table_rows_CT_RULE_TCAM_TX[CT_RULE_TCAM_TX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_1
+		table_rows_VEB_TCAM_RX[VEB_TCAM_RX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_1
+		table_rows_VEB_TCAM_TX[VEB_TCAM_TX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_4
+		table_rows_WC_TCAM_RX_HIGH[WC_TCAM_RX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_4
+		table_rows_WC_TCAM_RX_LOW[WC_TCAM_RX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_4
+		table_rows_WC_TCAM_TX_HIGH[WC_TCAM_TX_NUM_ROWS + 1];
+	struct cfa_tcam_mgr_table_rows_4
+		table_rows_WC_TCAM_TX_LOW[WC_TCAM_TX_NUM_ROWS + 1];
+};
 
 struct cfa_tcam_mgr_table_data
 cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
@@ -177,7 +180,7 @@ cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.row_width   = L2_CTXT_TCAM_RX_ROW_WIDTH,
 			.num_rows    = L2_CTXT_TCAM_RX_NUM_ROWS,
 			.start_row   = 0,
-			.end_row     = (L2_CTXT_TCAM_RX_NUM_ROWS / 2) - 1,
+			.end_row     = L2_CTXT_TCAM_RX_APP_HI_END,
 			.max_entries = (L2_CTXT_TCAM_RX_MAX_ENTRIES / 2),
 			.result_size = L2_CTXT_TCAM_RX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P58_L2_CTXT_TCAM_HIGH,
@@ -196,7 +199,7 @@ cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.max_slices  = L2_CTXT_TCAM_RX_MAX_SLICES,
 			.row_width   = L2_CTXT_TCAM_RX_ROW_WIDTH,
 			.num_rows    = L2_CTXT_TCAM_RX_NUM_ROWS,
-			.start_row   = (L2_CTXT_TCAM_RX_NUM_ROWS / 2),
+			.start_row   = L2_CTXT_TCAM_RX_APP_LO_START,
 			.end_row     = L2_CTXT_TCAM_RX_NUM_ROWS - 1,
 			.max_entries = (L2_CTXT_TCAM_RX_MAX_ENTRIES / 2),
 			.result_size = L2_CTXT_TCAM_RX_RESULT_SIZE,
@@ -275,7 +278,8 @@ cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.num_rows    = CT_RULE_TCAM_RX_NUM_ROWS,
 			.start_row   = 0,
 #if CT_RULE_TCAM_RX_NUM_ROWS > 0
-			.end_row     = CT_RULE_TCAM_RX_NUM_ROWS - 1,
+			.end_row     =
+				TCAM_SET_END_ROW(CT_RULE_TCAM_RX_NUM_ROWS),
 #else
 			.end_row     = CT_RULE_TCAM_RX_NUM_ROWS,
 #endif
@@ -298,7 +302,7 @@ cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.num_rows    = VEB_TCAM_RX_NUM_ROWS,
 			.start_row   = 0,
 #if VEB_TCAM_RX_NUM_ROWS > 0
-			.end_row     = VEB_TCAM_RX_NUM_ROWS - 1,
+			.end_row     = TCAM_SET_END_ROW(VEB_TCAM_RX_NUM_ROWS),
 #else
 			.end_row     = VEB_TCAM_RX_NUM_ROWS,
 #endif
@@ -363,7 +367,7 @@ cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.row_width   = L2_CTXT_TCAM_TX_ROW_WIDTH,
 			.num_rows    = L2_CTXT_TCAM_TX_NUM_ROWS,
 			.start_row   = 0,
-			.end_row     = (L2_CTXT_TCAM_TX_NUM_ROWS / 2) - 1,
+			.end_row     = L2_CTXT_TCAM_TX_APP_HI_END,
 			.max_entries = (L2_CTXT_TCAM_TX_MAX_ENTRIES / 2),
 			.result_size = L2_CTXT_TCAM_TX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P58_L2_CTXT_TCAM_HIGH,
@@ -382,7 +386,7 @@ cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.max_slices  = L2_CTXT_TCAM_TX_MAX_SLICES,
 			.row_width   = L2_CTXT_TCAM_TX_ROW_WIDTH,
 			.num_rows    = L2_CTXT_TCAM_TX_NUM_ROWS,
-			.start_row   = (L2_CTXT_TCAM_TX_NUM_ROWS / 2),
+			.start_row   = L2_CTXT_TCAM_TX_APP_LO_START,
 			.end_row     = L2_CTXT_TCAM_TX_NUM_ROWS - 1,
 			.max_entries = (L2_CTXT_TCAM_TX_MAX_ENTRIES / 2),
 			.result_size = L2_CTXT_TCAM_TX_RESULT_SIZE,
@@ -461,7 +465,8 @@ cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.num_rows    = CT_RULE_TCAM_TX_NUM_ROWS,
 			.start_row   = 0,
 #if CT_RULE_TCAM_TX_NUM_ROWS > 0
-			.end_row     = CT_RULE_TCAM_TX_NUM_ROWS - 1,
+			.end_row     =
+				TCAM_SET_END_ROW(CT_RULE_TCAM_TX_NUM_ROWS),
 #else
 			.end_row     = CT_RULE_TCAM_TX_NUM_ROWS,
 #endif
@@ -531,222 +536,305 @@ cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 	},
 };
 
-static struct cfa_tcam_mgr_entry_data entry_data_p58[TF_TCAM_MAX_SESSIONS][TF_TCAM_MAX_ENTRIES];
-
-static struct sbmp session_bmp_p58[TF_TCAM_MAX_SESSIONS][TF_TCAM_MAX_ENTRIES];
+static int cfa_tcam_mgr_row_data_alloc(struct cfa_tcam_mgr_data *tcam_mgr_data);
+static void cfa_tcam_mgr_row_data_free(struct cfa_tcam_mgr_data *tcam_mgr_data);
 
-int
-cfa_tcam_mgr_sess_table_get_p58(int sess_idx, struct sbmp **session_bmp)
+static void cfa_tcam_mgr_data_free(struct tf_session *tfs)
 {
-	*session_bmp = session_bmp_p58[sess_idx];
-	return 0;
+	struct cfa_tcam_mgr_data *tcam_mgr_data = tfs->tcam_mgr_handle;
+
+	if (!tcam_mgr_data)
+		return;
+
+	tfp_free(tcam_mgr_data->table_rows);
+	tfp_free(tcam_mgr_data->entry_data);
+	tfp_free(tcam_mgr_data->session_bmp);
+	cfa_tcam_mgr_row_data_free(tcam_mgr_data);
+
+	tfp_free(tcam_mgr_data);
+	tfs->tcam_mgr_handle = NULL;
 }
 
 int
-cfa_tcam_mgr_init_p58(int sess_idx, struct cfa_tcam_mgr_entry_data **global_entry_data)
+cfa_tcam_mgr_init_p58(struct tf *tfp)
 {
-	int max_row_width = 0;
+	struct cfa_tcam_mgr_table_rows_p58 *table_rows;
+	struct cfa_tcam_mgr_data *tcam_mgr_data;
+	struct tfp_calloc_parms cparms;
 	int max_result_size = 0;
+	struct tf_session *tfs;
+	int max_row_width = 0;
 	int dir, type;
+	int rc;
+
+	rc = tf_session_get_session_internal(tfp, &tfs);
+	if (rc)
+		return rc;
+
+	cparms.nitems = 1;
+	cparms.size = sizeof(struct cfa_tcam_mgr_data);
+	cparms.alignment = 0;
+	rc = tfp_calloc(&cparms);
+	if (rc) {
+		/* Log error */
+		TFP_DRV_LOG(ERR,
+			    "Failed to allocate block, rc:%s\n",
+			    strerror(-rc));
+		return rc;
+	}
+	tcam_mgr_data = (struct cfa_tcam_mgr_data *)cparms.mem_va;
+	tfs->tcam_mgr_handle = tcam_mgr_data;
+
+	cparms.nitems = 1;
+	cparms.size = sizeof(struct cfa_tcam_mgr_table_rows_p58);
+	cparms.alignment = 0;
+	rc = tfp_calloc(&cparms);
+	if (rc) {
+		/* Log error */
+		TFP_DRV_LOG(ERR,
+			    "Failed to allocate block, rc:%s\n",
+			    strerror(-rc));
+		tfp_free(tfs->tcam_mgr_handle);
+		tfs->tcam_mgr_handle = NULL;
+		return rc;
+	}
+	table_rows = (struct cfa_tcam_mgr_table_rows_p58 *)cparms.mem_va;
+	tcam_mgr_data->table_rows = table_rows;
 
-	*global_entry_data = entry_data_p58[sess_idx];
+	cparms.nitems = TF_TCAM_MAX_ENTRIES;
+	cparms.size = sizeof(struct cfa_tcam_mgr_entry_data);
+	cparms.alignment = 0;
+	rc = tfp_calloc(&cparms);
+	if (rc) {
+		/* Log error */
+		TFP_DRV_LOG(ERR,
+			    "Failed to allocate block, rc:%s\n",
+			    strerror(-rc));
+		goto fail;
+	}
+	tcam_mgr_data->entry_data =
+			(struct cfa_tcam_mgr_entry_data *)cparms.mem_va;
+
+	rc = cfa_tcam_mgr_row_data_alloc(tcam_mgr_data);
+	if (rc)
+		goto fail;
 
-	memcpy(&cfa_tcam_mgr_tables[sess_idx],
+	memcpy(tcam_mgr_data->cfa_tcam_mgr_tables,
 	       &cfa_tcam_mgr_tables_p58,
-	       sizeof(cfa_tcam_mgr_tables[sess_idx]));
+	       sizeof(tcam_mgr_data->cfa_tcam_mgr_tables));
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_L2_CTXT_TCAM_RX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+		&table_rows->table_rows_L2_CTXT_TCAM_RX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_L2_CTXT_TCAM_RX[sess_idx];
+		&table_rows->table_rows_L2_CTXT_TCAM_RX[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_L2_CTXT_TCAM_TX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+		&table_rows->table_rows_L2_CTXT_TCAM_TX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_L2_CTXT_TCAM_TX[sess_idx];
+		&table_rows->table_rows_L2_CTXT_TCAM_TX[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_L2_CTXT_TCAM_RX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+		&table_rows->table_rows_L2_CTXT_TCAM_RX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_L2_CTXT_TCAM_RX[sess_idx];
+		&table_rows->table_rows_L2_CTXT_TCAM_RX[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_L2_CTXT_TCAM_TX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+		&table_rows->table_rows_L2_CTXT_TCAM_TX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_L2_CTXT_TCAM_TX[sess_idx];
+		&table_rows->table_rows_L2_CTXT_TCAM_TX[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_PROF_TCAM_RX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+		&table_rows->table_rows_PROF_TCAM_RX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_PROF_TCAM_RX[sess_idx];
+		&table_rows->table_rows_PROF_TCAM_RX[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_PROF_TCAM_TX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+		&table_rows->table_rows_PROF_TCAM_TX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_PROF_TCAM_TX[sess_idx];
+		&table_rows->table_rows_PROF_TCAM_TX[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_WC_TCAM_RX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+		&table_rows->table_rows_WC_TCAM_RX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_WC_TCAM_RX[sess_idx];
+		&table_rows->table_rows_WC_TCAM_RX[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_WC_TCAM_TX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+		&table_rows->table_rows_WC_TCAM_TX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_WC_TCAM_TX[sess_idx];
+		&table_rows->table_rows_WC_TCAM_TX[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_SP_TCAM_RX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+		&table_rows->table_rows_SP_TCAM_RX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_SP_TCAM_RX[sess_idx];
+		&table_rows->table_rows_SP_TCAM_RX[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_SP_TCAM_TX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+		&table_rows->table_rows_SP_TCAM_TX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_SP_TCAM_TX[sess_idx];
+		&table_rows->table_rows_SP_TCAM_TX[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_CT_RULE_TCAM_RX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+		&table_rows->table_rows_CT_RULE_TCAM_RX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_CT_RULE_TCAM_RX[sess_idx];
+		&table_rows->table_rows_CT_RULE_TCAM_RX[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_CT_RULE_TCAM_TX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+		&table_rows->table_rows_CT_RULE_TCAM_TX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_CT_RULE_TCAM_TX[sess_idx];
+		&table_rows->table_rows_CT_RULE_TCAM_TX[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_VEB_TCAM_RX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+		&table_rows->table_rows_VEB_TCAM_RX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_VEB_TCAM_RX[sess_idx];
+		&table_rows->table_rows_VEB_TCAM_RX[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_VEB_TCAM_TX[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+		&table_rows->table_rows_VEB_TCAM_TX[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_VEB_TCAM_TX[sess_idx];
+		&table_rows->table_rows_VEB_TCAM_TX[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_WC_TCAM_RX_HIGH[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+		&table_rows->table_rows_WC_TCAM_RX_HIGH[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_WC_TCAM_RX_HIGH[sess_idx];
+		&table_rows->table_rows_WC_TCAM_RX_HIGH[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_WC_TCAM_TX_HIGH[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+		&table_rows->table_rows_WC_TCAM_TX_HIGH[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_WC_TCAM_TX_HIGH[sess_idx];
+		&table_rows->table_rows_WC_TCAM_TX_HIGH[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_WC_TCAM_RX_LOW[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_RX]
+		&table_rows->table_rows_WC_TCAM_RX_LOW[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
 		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_WC_TCAM_RX_LOW[sess_idx];
+		&table_rows->table_rows_WC_TCAM_RX_LOW[0];
 
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_AFM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_WC_TCAM_TX_LOW[sess_idx];
-	cfa_tcam_mgr_tables[sess_idx][TF_DIR_TX]
+		&table_rows->table_rows_WC_TCAM_TX_LOW[0];
+	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
 		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
-		&cfa_tcam_mgr_table_rows_WC_TCAM_TX_LOW[sess_idx];
+		&table_rows->table_rows_WC_TCAM_TX_LOW[0];
+
 
 	for (dir = 0; dir < TF_DIR_MAX; dir++) {
 		for (type = 0; type < CFA_TCAM_MGR_TBL_TYPE_MAX; type++) {
-			if (cfa_tcam_mgr_tables[sess_idx][dir][type].row_width >
+			if (tcam_mgr_data->cfa_tcam_mgr_tables[dir]
+							[type].row_width >
 			    max_row_width)
 				max_row_width =
-				       cfa_tcam_mgr_tables[sess_idx][dir][type].row_width;
-			if (cfa_tcam_mgr_tables[sess_idx][dir][type].result_size >
+				       tcam_mgr_data->cfa_tcam_mgr_tables[dir]
+							[type].row_width;
+			if (tcam_mgr_data->cfa_tcam_mgr_tables[dir]
+							[type].result_size >
 			    max_result_size)
 				max_result_size =
-				     cfa_tcam_mgr_tables[sess_idx][dir][type].result_size;
+				     tcam_mgr_data->cfa_tcam_mgr_tables[dir]
+							[type].result_size;
 		}
 	}
 
 	if (max_row_width != MAX_ROW_WIDTH) {
-		CFA_TCAM_MGR_LOG(ERR,
-				 "MAX_ROW_WIDTH (%d) does not match actual "
-				 "value (%d).\n",
-				 MAX_ROW_WIDTH,
-				 max_row_width);
-		return -CFA_TCAM_MGR_ERR_CODE(INVAL);
+		TFP_DRV_LOG(ERR,
+			    "MAX_ROW_WIDTH:%d does not match actual val:%d\n",
+			    MAX_ROW_WIDTH, max_row_width);
+		rc = -EINVAL;
+		goto fail;
 	}
 	if (max_result_size != MAX_RESULT_SIZE) {
-		CFA_TCAM_MGR_LOG(ERR,
-				 "MAX_RESULT_SIZE (%d) does not match actual "
-				 "value (%d).\n",
-				 MAX_RESULT_SIZE,
-				 max_result_size);
-		return -CFA_TCAM_MGR_ERR_CODE(INVAL);
+		TFP_DRV_LOG(ERR,
+			    "MAX_RESULT_SIZE:%d does not match actual val:%d\n",
+			    MAX_RESULT_SIZE, max_result_size);
+		rc = -EINVAL;
+		goto fail;
 	}
+
 	return 0;
+
+fail:
+	cfa_tcam_mgr_data_free(tfs);
+	return rc;
+}
+
+void cfa_tcam_mgr_uninit_p58(struct tf *tfp)
+{
+	struct tf_session *tfs;
+	int rc;
+
+	rc = tf_session_get_session_internal(tfp, &tfs);
+	if (rc)
+		return;
+
+	cfa_tcam_mgr_data_free(tfs);
 }
 
 /* HW OP declarations begin here */
@@ -778,134 +866,182 @@ struct cfa_tcam_mgr_TCAM_row_data {
 	(CT_RULE_TCAM_TX_MAX_SLICES * CT_RULE_TCAM_TX_NUM_ROWS)
 #define VEB_TX_MAX_ROWS	    (VEB_TCAM_TX_MAX_SLICES * VEB_TCAM_TX_NUM_ROWS)
 
-static int cfa_tcam_mgr_max_rows[TF_TCAM_TBL_TYPE_MAX] = {
-	L2_CTXT_RX_MAX_ROWS,
-	L2_CTXT_RX_MAX_ROWS,
-	PROF_RX_MAX_ROWS,
-	WC_RX_MAX_ROWS,
-	SP_RX_MAX_ROWS,
-	CT_RULE_RX_MAX_ROWS,
-	VEB_RX_MAX_ROWS,
-	WC_RX_MAX_ROWS,
-	WC_RX_MAX_ROWS
+struct cfa_tcam_mgr_rx_row_data {
+	struct cfa_tcam_mgr_TCAM_row_data
+		cfa_tcam_mgr_L2_CTXT_TCAM_RX_row_data[L2_CTXT_RX_MAX_ROWS + 1];
+	struct cfa_tcam_mgr_TCAM_row_data
+		cfa_tcam_mgr_PROF_TCAM_RX_row_data[PROF_RX_MAX_ROWS + 1];
+	struct cfa_tcam_mgr_TCAM_row_data
+		cfa_tcam_mgr_WC_TCAM_RX_row_data[WC_TX_MAX_ROWS + 1];
+	struct cfa_tcam_mgr_TCAM_row_data
+		cfa_tcam_mgr_SP_TCAM_RX_row_data[SP_RX_MAX_ROWS + 1];
+	struct cfa_tcam_mgr_TCAM_row_data
+		cfa_tcam_mgr_CT_RULE_TCAM_RX_row_data[CT_RULE_RX_MAX_ROWS + 1];
+	struct cfa_tcam_mgr_TCAM_row_data
+		cfa_tcam_mgr_VEB_TCAM_RX_row_data[VEB_RX_MAX_ROWS + 1];
 };
 
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_L2_CTXT_TCAM_RX_row_data[TF_TCAM_MAX_SESSIONS][L2_CTXT_RX_MAX_ROWS];
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_PROF_TCAM_RX_row_data[TF_TCAM_MAX_SESSIONS][PROF_RX_MAX_ROWS];
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_WC_TCAM_RX_row_data[TF_TCAM_MAX_SESSIONS][WC_RX_MAX_ROWS];
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_SP_TCAM_RX_row_data[TF_TCAM_MAX_SESSIONS][SP_RX_MAX_ROWS];
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_CT_RULE_TCAM_RX_row_data[TF_TCAM_MAX_SESSIONS][CT_RULE_RX_MAX_ROWS];
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_VEB_TCAM_RX_row_data[TF_TCAM_MAX_SESSIONS][VEB_RX_MAX_ROWS];
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_WC_TCAM_RX_row_data[TF_TCAM_MAX_SESSIONS][WC_RX_MAX_ROWS];
-
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_L2_CTXT_TCAM_TX_row_data[TF_TCAM_MAX_SESSIONS][L2_CTXT_TX_MAX_ROWS];
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_PROF_TCAM_TX_row_data[TF_TCAM_MAX_SESSIONS][PROF_TX_MAX_ROWS];
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_WC_TCAM_TX_row_data[TF_TCAM_MAX_SESSIONS][WC_TX_MAX_ROWS];
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_SP_TCAM_TX_row_data[TF_TCAM_MAX_SESSIONS][SP_TX_MAX_ROWS];
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_CT_RULE_TCAM_TX_row_data[TF_TCAM_MAX_SESSIONS][CT_RULE_TX_MAX_ROWS];
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_VEB_TCAM_TX_row_data[TF_TCAM_MAX_SESSIONS][VEB_TX_MAX_ROWS];
-static struct cfa_tcam_mgr_TCAM_row_data
-	cfa_tcam_mgr_WC_TCAM_TX_row_data[TF_TCAM_MAX_SESSIONS][WC_TX_MAX_ROWS];
-
-static struct cfa_tcam_mgr_TCAM_row_data *
-row_tables[TF_DIR_MAX][TF_TCAM_TBL_TYPE_MAX] = {
-	{
-		cfa_tcam_mgr_L2_CTXT_TCAM_RX_row_data[0],
-		cfa_tcam_mgr_L2_CTXT_TCAM_RX_row_data[0],
-		cfa_tcam_mgr_PROF_TCAM_RX_row_data[0],
-		cfa_tcam_mgr_WC_TCAM_RX_row_data[0],
-		cfa_tcam_mgr_SP_TCAM_RX_row_data[0],
-		cfa_tcam_mgr_CT_RULE_TCAM_RX_row_data[0],
-		cfa_tcam_mgr_VEB_TCAM_RX_row_data[0],
-		cfa_tcam_mgr_WC_TCAM_RX_row_data[0],
-		cfa_tcam_mgr_WC_TCAM_RX_row_data[0],
-	},
-	{
-		cfa_tcam_mgr_L2_CTXT_TCAM_TX_row_data[0],
-		cfa_tcam_mgr_L2_CTXT_TCAM_TX_row_data[0],
-		cfa_tcam_mgr_PROF_TCAM_TX_row_data[0],
-		cfa_tcam_mgr_WC_TCAM_TX_row_data[0],
-		cfa_tcam_mgr_SP_TCAM_TX_row_data[0],
-		cfa_tcam_mgr_CT_RULE_TCAM_TX_row_data[0],
-		cfa_tcam_mgr_VEB_TCAM_TX_row_data[0],
-		cfa_tcam_mgr_WC_TCAM_TX_row_data[0],
-		cfa_tcam_mgr_WC_TCAM_TX_row_data[0],
-	}
+struct cfa_tcam_mgr_tx_row_data {
+	struct cfa_tcam_mgr_TCAM_row_data
+		cfa_tcam_mgr_L2_CTXT_TCAM_TX_row_data[L2_CTXT_TX_MAX_ROWS + 1];
+	struct cfa_tcam_mgr_TCAM_row_data
+		cfa_tcam_mgr_PROF_TCAM_TX_row_data[PROF_TX_MAX_ROWS + 1];
+	struct cfa_tcam_mgr_TCAM_row_data
+		cfa_tcam_mgr_WC_TCAM_TX_row_data[WC_TX_MAX_ROWS + 1];
+	struct cfa_tcam_mgr_TCAM_row_data
+		cfa_tcam_mgr_SP_TCAM_TX_row_data[SP_TX_MAX_ROWS + 1];
+	struct cfa_tcam_mgr_TCAM_row_data
+		cfa_tcam_mgr_CT_RULE_TCAM_TX_row_data[CT_RULE_TX_MAX_ROWS + 1];
+	struct cfa_tcam_mgr_TCAM_row_data
+		cfa_tcam_mgr_VEB_TCAM_TX_row_data[VEB_TX_MAX_ROWS + 1];
 };
 
-static int cfa_tcam_mgr_get_max_rows(enum tf_tcam_tbl_type type)
+#define TF_TCAM_L2_CTX_HI	TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH
+#define TF_TCAM_L2_CTX_LO	TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW
+#define TF_TCAM_PROF		TF_TCAM_TBL_TYPE_PROF_TCAM
+#define	TF_TCAM_WC		TF_TCAM_TBL_TYPE_WC_TCAM
+#define	TF_TCAM_SP		TF_TCAM_TBL_TYPE_SP_TCAM
+#define	TF_TCAM_CT		TF_TCAM_TBL_TYPE_CT_RULE_TCAM
+#define	TF_TCAM_VEB		TF_TCAM_TBL_TYPE_VEB_TCAM
+#define	TF_TCAM_WC_HI		TF_TCAM_TBL_TYPE_WC_TCAM_HIGH
+#define	TF_TCAM_WC_LO		TF_TCAM_TBL_TYPE_WC_TCAM_LOW
+
+static int cfa_tcam_mgr_row_data_alloc(struct cfa_tcam_mgr_data *tcam_mgr_data)
+{
+	struct cfa_tcam_mgr_rx_row_data *rx_row_data;
+	struct cfa_tcam_mgr_tx_row_data *tx_row_data;
+	struct tfp_calloc_parms cparms;
+	int rc;
+
+	cparms.nitems = 1;
+	cparms.size = sizeof(struct cfa_tcam_mgr_rx_row_data);
+	cparms.alignment = 0;
+	rc = tfp_calloc(&cparms);
+	if (rc) {
+		/* Log error */
+		TFP_DRV_LOG(ERR,
+			    "Failed to allocate rx_row_data, rc:%s\n",
+			    strerror(-rc));
+		return -ENOMEM;
+	}
+
+	rx_row_data = (struct cfa_tcam_mgr_rx_row_data *)cparms.mem_va;
+
+	cparms.nitems = 1;
+	cparms.size = sizeof(struct cfa_tcam_mgr_tx_row_data);
+	cparms.alignment = 0;
+	rc = tfp_calloc(&cparms);
+	if (rc) {
+		/* Log error */
+		TFP_DRV_LOG(ERR,
+			    "Failed to allocate tx_row_data, rc:%s\n",
+			    strerror(-rc));
+		tfp_free(rx_row_data);
+		return -ENOMEM;
+	}
+
+	tx_row_data = (struct cfa_tcam_mgr_tx_row_data *)cparms.mem_va;
+
+	tcam_mgr_data->rx_row_data = rx_row_data;
+	tcam_mgr_data->tx_row_data = tx_row_data;
+
+	tcam_mgr_data->row_tables[TF_DIR_RX][TF_TCAM_L2_CTX_HI] =
+		&rx_row_data->cfa_tcam_mgr_L2_CTXT_TCAM_RX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_RX][TF_TCAM_L2_CTX_LO] =
+		&rx_row_data->cfa_tcam_mgr_L2_CTXT_TCAM_RX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_RX][TF_TCAM_PROF] =
+		&rx_row_data->cfa_tcam_mgr_PROF_TCAM_RX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_RX][TF_TCAM_WC] =
+		&rx_row_data->cfa_tcam_mgr_WC_TCAM_RX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_RX][TF_TCAM_SP] =
+		&rx_row_data->cfa_tcam_mgr_SP_TCAM_RX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_RX][TF_TCAM_CT] =
+		&rx_row_data->cfa_tcam_mgr_CT_RULE_TCAM_RX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_RX][TF_TCAM_VEB] =
+		&rx_row_data->cfa_tcam_mgr_VEB_TCAM_RX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_RX][TF_TCAM_WC_HI] =
+		&rx_row_data->cfa_tcam_mgr_WC_TCAM_RX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_RX][TF_TCAM_WC_LO] =
+		&rx_row_data->cfa_tcam_mgr_WC_TCAM_RX_row_data[0];
+
+	tcam_mgr_data->row_tables[TF_DIR_TX][TF_TCAM_L2_CTX_HI] =
+		&tx_row_data->cfa_tcam_mgr_L2_CTXT_TCAM_TX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_TX][TF_TCAM_L2_CTX_LO] =
+		&tx_row_data->cfa_tcam_mgr_L2_CTXT_TCAM_TX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_TX][TF_TCAM_PROF] =
+		&tx_row_data->cfa_tcam_mgr_PROF_TCAM_TX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_TX][TF_TCAM_WC] =
+		&tx_row_data->cfa_tcam_mgr_WC_TCAM_TX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_TX][TF_TCAM_SP] =
+		&tx_row_data->cfa_tcam_mgr_SP_TCAM_TX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_TX][TF_TCAM_CT] =
+		&tx_row_data->cfa_tcam_mgr_CT_RULE_TCAM_TX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_TX][TF_TCAM_VEB] =
+		&tx_row_data->cfa_tcam_mgr_VEB_TCAM_TX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_TX][TF_TCAM_WC_HI] =
+		&tx_row_data->cfa_tcam_mgr_WC_TCAM_TX_row_data[0];
+	tcam_mgr_data->row_tables[TF_DIR_TX][TF_TCAM_WC_LO] =
+		&tx_row_data->cfa_tcam_mgr_WC_TCAM_TX_row_data[0];
+
+	return 0;
+}
+
+static void cfa_tcam_mgr_row_data_free(struct cfa_tcam_mgr_data
+				       *tcam_mgr_data)
 {
-	if (type >= TF_TCAM_TBL_TYPE_MAX)
-		assert(0);
-	else
-		return cfa_tcam_mgr_max_rows[type];
+	tfp_free(tcam_mgr_data->rx_row_data);
+	tfp_free(tcam_mgr_data->tx_row_data);
 }
 
-static int cfa_tcam_mgr_hwop_set(int sess_idx,
+static int cfa_tcam_mgr_hwop_set(struct cfa_tcam_mgr_data *tcam_mgr_data,
 				 struct cfa_tcam_mgr_set_parms *parms, int row,
 				 int slice, int max_slices)
 {
 	struct cfa_tcam_mgr_TCAM_row_data *this_table;
 	struct cfa_tcam_mgr_TCAM_row_data *this_row;
-	this_table = row_tables[parms->dir]
+
+	this_table = tcam_mgr_data->row_tables[parms->dir]
 		[cfa_tcam_mgr_get_phys_table_type(parms->type)];
-	this_table += (sess_idx *
-		       cfa_tcam_mgr_get_max_rows(cfa_tcam_mgr_get_phys_table_type(parms->type)));
 	this_row   = &this_table[row * max_slices + slice];
 	this_row->key_size = parms->key_size;
 	memcpy(&this_row->key, parms->key, parms->key_size);
 	memcpy(&this_row->mask, parms->mask, parms->key_size);
 	this_row->result_size = parms->result_size;
-	if (parms->result != ((void *)0))
+	if (parms->result)
 		memcpy(&this_row->result, parms->result, parms->result_size);
 	return 0;
 };
 
-static int cfa_tcam_mgr_hwop_get(int sess_idx,
+static int cfa_tcam_mgr_hwop_get(struct cfa_tcam_mgr_data *tcam_mgr_data,
 				 struct cfa_tcam_mgr_get_parms *parms, int row,
 				 int slice, int max_slices)
 {
 	struct cfa_tcam_mgr_TCAM_row_data *this_table;
 	struct cfa_tcam_mgr_TCAM_row_data *this_row;
-	this_table = row_tables[parms->dir]
+
+	this_table = tcam_mgr_data->row_tables[parms->dir]
 		[cfa_tcam_mgr_get_phys_table_type(parms->type)];
-	this_table += (sess_idx *
-		       cfa_tcam_mgr_get_max_rows(cfa_tcam_mgr_get_phys_table_type(parms->type)));
 	this_row   = &this_table[row * max_slices + slice];
 	parms->key_size = this_row->key_size;
 	parms->result_size = this_row->result_size;
-	if (parms->key != ((void *)0))
+	if (parms->key)
 		memcpy(parms->key, &this_row->key, parms->key_size);
-	if (parms->mask != ((void *)0))
+	if (parms->mask)
 		memcpy(parms->mask, &this_row->mask, parms->key_size);
-	if (parms->result != ((void *)0))
+	if (parms->result)
 		memcpy(parms->result, &this_row->result, parms->result_size);
 	return 0;
 };
 
-static int cfa_tcam_mgr_hwop_free(int sess_idx,
+static int cfa_tcam_mgr_hwop_free(struct cfa_tcam_mgr_data *tcam_mgr_data,
 				  struct cfa_tcam_mgr_free_parms *parms,
 				  int row, int slice, int max_slices)
 {
 	struct cfa_tcam_mgr_TCAM_row_data *this_table;
 	struct cfa_tcam_mgr_TCAM_row_data *this_row;
-	this_table = row_tables[parms->dir]
+
+	this_table = tcam_mgr_data->row_tables[parms->dir]
 		[cfa_tcam_mgr_get_phys_table_type(parms->type)];
-	this_table += (sess_idx *
-		       cfa_tcam_mgr_get_max_rows(cfa_tcam_mgr_get_phys_table_type(parms->type)));
 	this_row   = &this_table[row * max_slices + slice];
 	memset(&this_row->key, 0, sizeof(this_row->key));
 	memset(&this_row->mask, 0, sizeof(this_row->mask));
diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.h b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.h
index 7640f91911..0fa5e06898 100644
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.h
+++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2021-2023 Broadcom
+ * Copyright(c) 2021-2024 Broadcom
  * All rights reserved.
  */
 
@@ -7,14 +7,14 @@
 #define CFA_TCAM_MGR_P58_H
 
 #include "cfa_tcam_mgr_device.h"
-#include "cfa_tcam_mgr_sbmp.h"
 
 int
-cfa_tcam_mgr_init_p58(int sess_idx, struct cfa_tcam_mgr_entry_data **global_entry_data);
+cfa_tcam_mgr_init_p58(struct tf *tfp);
 
-int
-cfa_tcam_mgr_sess_table_get_p58(int sess_idx, struct sbmp **session_bmp);
+void
+cfa_tcam_mgr_uninit_p58(struct tf *tfp);
 
 int
 cfa_tcam_mgr_hwops_get_funcs_p58(struct cfa_tcam_mgr_hwops_funcs *hwop_funcs);
+
 #endif /* CFA_TCAM_MGR_P58_H */
diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_session.h b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_session.h
deleted file mode 100644
index 7e75776686..0000000000
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_session.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2019-2023 Broadcom
- * All rights reserved.
- */
-
-#ifndef CFA_TCAM_MGR_SESSION_H
-#define CFA_TCAM_MGR_SESSION_H
-
-#include <inttypes.h>
-#include "cfa_tcam_mgr.h"
-
-int
-cfa_tcam_mgr_session_init(int sess_idx, enum cfa_tcam_mgr_device_type type);
-
-int
-cfa_tcam_mgr_get_session_from_context(struct cfa_tcam_mgr_context *context,
-				      uint32_t *session_id);
-
-int
-cfa_tcam_mgr_session_find(unsigned int session_id);
-
-int
-cfa_tcam_mgr_session_empty(void);
-
-int
-cfa_tcam_mgr_session_add(unsigned int session_id);
-
-int
-cfa_tcam_mgr_session_free(unsigned int session_id,
-		struct cfa_tcam_mgr_context *context);
-
-int
-cfa_tcam_mgr_session_cfg(unsigned int session_id,
-			 uint16_t tcam_cnt[][CFA_TCAM_MGR_TBL_TYPE_MAX]);
-
-int
-cfa_tcam_mgr_session_entry_alloc(unsigned int session_id,
-				 enum tf_dir dir,
-				 enum cfa_tcam_mgr_tbl_type type);
-int
-cfa_tcam_mgr_session_entry_free(unsigned int session_id,
-				unsigned int entry_id,
-				enum tf_dir dir,
-				enum cfa_tcam_mgr_tbl_type type);
-
-void
-cfa_tcam_mgr_sessions_dump(void);
-void
-cfa_tcam_mgr_entry_sessions_dump(int sess_idx, uint16_t id);
-void
-cfa_tcam_mgr_session_entries_dump(int sess_idx);
-
-void
-cfa_tcam_mgr_mv_session_used_entries_cnt(int sess_idx, enum tf_dir dir,
-					 enum cfa_tcam_mgr_tbl_type dst_type,
-					 enum cfa_tcam_mgr_tbl_type src_type);
-#endif  /* CFA_TCAM_MGR_SESSION_H */
diff --git a/drivers/net/bnxt/tf_core/meson.build b/drivers/net/bnxt/tf_core/meson.build
index 7d38ab8793..803a89cbb5 100644
--- a/drivers/net/bnxt/tf_core/meson.build
+++ b/drivers/net/bnxt/tf_core/meson.build
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
-# Copyright(c) 2023 Broadcom
+# Copyright(c) 2024 Broadcom
 
 #Include the folder for headers
 includes += include_directories('.')
@@ -12,7 +12,6 @@ sources += files(
         'cfa_tcam_mgr_hwop_msg.c',
         'cfa_tcam_mgr_p4.c',
         'cfa_tcam_mgr_p58.c',
-        'cfa_tcam_mgr_session.c',
         'dpool.c',
         'll.c',
         'rand.c',
diff --git a/drivers/net/bnxt/tf_core/tf_core.c b/drivers/net/bnxt/tf_core/tf_core.c
index 1c728aadd8..f1b3be48aa 100644
--- a/drivers/net/bnxt/tf_core/tf_core.c
+++ b/drivers/net/bnxt/tf_core/tf_core.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2019-2023 Broadcom
+ * Copyright(c) 2019-2024 Broadcom
  * All rights reserved.
  */
 
@@ -1104,7 +1104,7 @@ tf_alloc_tbl_entry(struct tf *tfp,
 #ifdef TF_FLOW_SCALE_QUERY
 	/* Update resource usage buffer */
 	if (!rc && dev->ops->tf_dev_update_tbl_usage_buffer) {
-		rc = dev->ops->tf_dev_update_tbl_usage_buffer(tfs->session_id.id,
+		rc = dev->ops->tf_dev_update_tbl_usage_buffer(tfp,
 							      parms->dir,
 							      parms->type,
 							      TF_RESC_ALLOC);
@@ -1200,7 +1200,7 @@ tf_free_tbl_entry(struct tf *tfp,
 #ifdef TF_FLOW_SCALE_QUERY
 	/* Update resource usage buffer */
 	if (!rc && dev->ops->tf_dev_update_tbl_usage_buffer) {
-		rc = dev->ops->tf_dev_update_tbl_usage_buffer(tfs->session_id.id,
+		rc = dev->ops->tf_dev_update_tbl_usage_buffer(tfp,
 							      parms->dir,
 							      parms->type,
 							      TF_RESC_FREE);
diff --git a/drivers/net/bnxt/tf_core/tf_device.h b/drivers/net/bnxt/tf_core/tf_device.h
index 0b0ca8b42f..e58c53000e 100644
--- a/drivers/net/bnxt/tf_core/tf_device.h
+++ b/drivers/net/bnxt/tf_core/tf_device.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2019-2023 Broadcom
+ * Copyright(c) 2019-2024 Broadcom
  * All rights reserved.
  */
 
@@ -1187,7 +1187,7 @@ struct tf_dev_ops {
 	 *    0       - Success
 	 *    -EINVAL - Error
 	 */
-	int (*tf_dev_update_tbl_usage_buffer)(uint32_t session_id,
+	int (*tf_dev_update_tbl_usage_buffer)(struct tf *tfp,
 					      enum tf_dir dir,
 					      enum tf_tbl_type tbl_type,
 					      uint32_t resc_opt);
diff --git a/drivers/net/bnxt/tf_core/tf_device_p58.c b/drivers/net/bnxt/tf_core/tf_device_p58.c
index 8f915744a7..fb4123eb80 100644
--- a/drivers/net/bnxt/tf_core/tf_device_p58.c
+++ b/drivers/net/bnxt/tf_core/tf_device_p58.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2019-2023 Broadcom
+ * Copyright(c) 2019-2024 Broadcom
  * All rights reserved.
  */
 
@@ -865,13 +865,13 @@ static int tf_dev_p58_query_resc_usage(struct tf *tfp,
  *    -EINVAL - Error
  */
 static int
-tf_dev_p58_update_tbl_usage_buffer(uint32_t session_id,
+tf_dev_p58_update_tbl_usage_buffer(struct tf *tfp,
 				   enum tf_dir dir,
 				   enum tf_tbl_type tbl_type,
 				   enum tf_resc_opt resc_opt)
 {
 	int rc;
-	rc = tf_tbl_usage_update(session_id, dir, tbl_type, resc_opt);
+	rc = tf_tbl_usage_update(tfp, dir, tbl_type, resc_opt);
 	return rc;
 }
 #endif /* TF_FLOW_SCALE_QUERY */
diff --git a/drivers/net/bnxt/tf_core/tf_em_hash_internal.c b/drivers/net/bnxt/tf_core/tf_em_hash_internal.c
index 35589c9844..7c38fa6076 100644
--- a/drivers/net/bnxt/tf_core/tf_em_hash_internal.c
+++ b/drivers/net/bnxt/tf_core/tf_em_hash_internal.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2019-2023 Broadcom
+ * Copyright(c) 2019-2024 Broadcom
  * All rights reserved.
  */
 
@@ -111,7 +111,7 @@ tf_em_hash_insert_int_entry(struct tf *tfp,
 
 #ifdef TF_FLOW_SCALE_QUERY
 	/* Update usage state buffer for EM */
-	tf_em_usage_update(tfs->session_id.id,
+	tf_em_usage_update(tfp,
 			   parms->dir,
 			   num_of_entries,
 			   TF_RESC_ALLOC);
@@ -155,7 +155,7 @@ tf_em_hash_delete_int_entry(struct tf *tfp,
 #ifdef TF_FLOW_SCALE_QUERY
 	/* Update usage state buffer for EM */
 	size = DP_FLAGS_SIZE(pool->entry[parms->index - pool->start_index].flags);
-	tf_em_usage_update(tfs->session_id.id,
+	tf_em_usage_update(tfp,
 			   parms->dir,
 			   size,
 			   TF_RESC_FREE);
diff --git a/drivers/net/bnxt/tf_core/tf_em_internal.c b/drivers/net/bnxt/tf_core/tf_em_internal.c
index 6dfefce2f2..f620002cc0 100644
--- a/drivers/net/bnxt/tf_core/tf_em_internal.c
+++ b/drivers/net/bnxt/tf_core/tf_em_internal.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2019-2023 Broadcom
+ * Copyright(c) 2019-2024 Broadcom
  * All rights reserved.
  */
 
@@ -296,7 +296,7 @@ tf_em_int_bind(struct tf *tfp,
 
 #ifdef TF_FLOW_SCALE_QUERY
 			/* Initialize the usage state buffer for EM */
-			tf_em_usage_init(tfs->session_id.id,
+			tf_em_usage_init(tfp,
 					 i,
 					 iparms.info->entry.stride);
 #endif /* TF_FLOW_SCALE_QUERY */
diff --git a/drivers/net/bnxt/tf_core/tf_resources.c b/drivers/net/bnxt/tf_core/tf_resources.c
index 4c64d23b86..d4fd3c2333 100644
--- a/drivers/net/bnxt/tf_core/tf_resources.c
+++ b/drivers/net/bnxt/tf_core/tf_resources.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2019-2023 Broadcom
+ * Copyright(c) 2019-2024 Broadcom
  * All rights reserved.
  */
 
@@ -16,7 +16,6 @@
 #include "tf_session.h"
 #include "tf_device.h"
 #include "cfa_tcam_mgr_device.h"
-#include "cfa_tcam_mgr_session.h"
 
 #ifdef TF_FLOW_SCALE_QUERY
 
@@ -35,41 +34,32 @@ struct tf_resc_usage_buffer_control {
 static struct tf_resc_usage_buffer_control resc_usage_control;
 
 /* Check if supporting resource usage */
-static bool tf_resc_usage_support(int session_id)
+static bool tf_resc_usage_support(struct tf *tfp)
 {
+	struct tf_session *tfs;
 	bool support = true;
-	int sess_idx;
+	int rc;
 
 	/* Not valid session id */
-	if (!session_id)
+	rc = tf_session_get_session_internal(tfp, &tfs);
+	if (rc)
 		return false;
 
-	/* Support Generic template with one session */
-	sess_idx = cfa_tcam_mgr_session_find(session_id);
-	if (sess_idx < 0 && !cfa_tcam_mgr_session_empty())
-		support = false;
-
 	/* Support Thor */
-	if (resc_usage_control.device_type != TF_DEVICE_TYPE_P5)
+	if (resc_usage_control.device_type != tfs->dev.type)
 		support = false;
 
 #if (TF_FLOW_SCALE_QUERY_DEBUG == 1)
-	TFP_DRV_LOG(INFO, "Resc usage update sess_id: %x, idx: %d, type: %d, allow: %s\n",
-			 session_id,
-			 sess_idx,
-			 resc_usage_control.device_type,
-			 support ? "True" : "False");
+	TFP_DRV_LOG(INFO, "Resc usage update on device type: %d, allow: %s\n",
+		    resc_usage_control.device_type,
+		    support ? "True" : "False");
 #endif /* TF_FLOW_SCALE_QUERY_DEBUG == 1 */
 	return support;
 }
 
 /* Reset the resource usage buffer */
-void tf_resc_usage_reset(enum tf_device_type type, int session_id)
+void tf_resc_usage_reset(struct tf *tfp __rte_unused, enum tf_device_type type)
 {
-	/* Check if supported on this device */
-	if (cfa_tcam_mgr_session_find(session_id) > 0)
-		return;
-
 	/* Support Thor only*/
 	if (type != TF_DEVICE_TYPE_P5)
 		return;
@@ -96,24 +86,35 @@ tf_tcam_mgr_row_entry_used(struct cfa_tcam_mgr_table_rows_0 *row,
 }
 
 /* Initialize the resource usage buffer for WC-TCAM tables */
-void tf_tcam_usage_init(int session_id)
+void tf_tcam_usage_init(struct tf *tfp)
 {
-	enum tf_dir dir;
 	enum cfa_tcam_mgr_tbl_type type = CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS;
 	struct cfa_tcam_mgr_table_data *table_data = NULL;
 	struct tf_resc_wc_tcam_usage *usage_data = NULL;
-	int sess_idx = cfa_tcam_mgr_session_find(session_id);
+	struct cfa_tcam_mgr_data *tcam_mgr_data;
+	struct tf_session *tfs;
+	enum tf_dir dir;
+	int rc;
 
 	/* Check if supported on this device */
-	if (!tf_resc_usage_support(session_id))
+	rc = tf_session_get_session_internal(tfp, &tfs);
+	if (rc)
 		return;
 
+	tcam_mgr_data = tfs->tcam_mgr_handle;
+	if (!tcam_mgr_data) {
+		TFP_DRV_LOG(ERR,
+			    "%s: No TCAM data created for session\n",
+			    __func__);
+		return;
+	}
+
 	/* Iterate over all directions */
 	for (dir = 0; dir < TF_DIR_MAX; dir++) {
-		table_data = &cfa_tcam_mgr_tables[sess_idx][dir][type];
+		table_data = &tcam_mgr_data->cfa_tcam_mgr_tables[dir][type];
 		usage_data = &tf_resc_usage[dir].wc_tcam_usage;
 
-		/* cfa_tcam_mgr_table_dump(session_id, dir, type); */
+		/* cfa_tcam_mgr_table_dump(tfs->session_id.id, dir, type); */
 		memset(usage_data, 0, sizeof(*usage_data));
 		if (table_data->start_row != table_data->end_row)
 			usage_data->max_row_number = table_data->end_row -
@@ -122,33 +123,49 @@ void tf_tcam_usage_init(int session_id)
 
 #if (TF_FLOW_SCALE_QUERY_DEBUG == 1)
 		/* dump usage data */
-		CFA_TCAM_MGR_LOG(INFO, "WC-TCAM:  1-p  1-f  2-p  2-f  4-f  free-rows\n");
-		CFA_TCAM_MGR_LOG(INFO, "%s         %-4d %-4d %-4d %-4d %-4d %-4d\n",
-				 (dir == TF_DIR_RX) ? "RX" : "TX",
-				 usage_data->slice_row_1_p_used,
-				 usage_data->slice_row_1_f_used,
-				 usage_data->slice_row_2_p_used,
-				 usage_data->slice_row_2_f_used,
-				 usage_data->slice_row_4_used,
-				 usage_data->unused_row_number);
+		TFP_DRV_LOG(INFO, "WC-TCAM:  1-p  1-f  2-p  2-f  4-f  free-rows\n");
+		TFP_DRV_LOG(INFO, "%s	 %-4d %-4d %-4d %-4d %-4d %-4d\n",
+			    (dir == TF_DIR_RX) ? "RX" : "TX",
+			    usage_data->slice_row_1_p_used,
+			    usage_data->slice_row_1_f_used,
+			    usage_data->slice_row_2_p_used,
+			    usage_data->slice_row_2_f_used,
+			    usage_data->slice_row_4_used,
+			    usage_data->unused_row_number);
 #endif
 	}
 }
 
 /* Update wc-tcam table resoure usage */
-int tf_tcam_usage_update(int session_id,
+int tf_tcam_usage_update(struct tf *tfp,
 			 enum tf_dir dir,
 			 int tcam_tbl_type,
 			 void *data,
 			 enum tf_resc_opt resc_opt)
 {
-	struct tf_resc_wc_tcam_usage *usage_data;
-	int used_entries;
 	struct cfa_tcam_mgr_table_rows_0 *key_row = (struct cfa_tcam_mgr_table_rows_0 *)data;
+	struct tf_resc_wc_tcam_usage *usage_data;
+	struct cfa_tcam_mgr_data *tcam_mgr_data;
 	int key_slices = key_row->entry_size;
+	struct tf_session *tfs;
+	int used_entries;
+	int rc;
+
+	/* Check if supported on this device */
+	rc = tf_session_get_session_internal(tfp, &tfs);
+	if (rc)
+		return rc;
+
+	tcam_mgr_data = tfs->tcam_mgr_handle;
+	if (!tcam_mgr_data) {
+		TFP_DRV_LOG(ERR,
+			    "%s: No TCAM data created for session\n",
+			    __func__);
+		return -CFA_TCAM_MGR_ERR_CODE(PERM);
+	}
 
 	/* Check if supported on this device */
-	if (!tf_resc_usage_support(session_id))
+	if (!tf_resc_usage_support(tfp))
 		return -1;
 
 	/* Support WC-TCAM APPs only */
@@ -184,7 +201,8 @@ int tf_tcam_usage_update(int session_id,
 			}
 			break;
 		default:
-			CFA_TCAM_MGR_LOG(ERR, "CFA invalid size of key slices: %d\n", key_slices);
+			TFP_DRV_LOG(ERR, "CFA invalid size of key slices: %d\n",
+				    key_slices);
 			break;
 		}
 	} else { /* free one entry */
@@ -213,32 +231,33 @@ int tf_tcam_usage_update(int session_id,
 			}
 			break;
 		default:
-			CFA_TCAM_MGR_LOG(ERR, "CFA invalid size of key slices: %d\n", key_slices);
+			TFP_DRV_LOG(ERR, "CFA invalid size of key slices: %d\n",
+				    key_slices);
 			break;
 		}
 	}
 
 #if (TF_FLOW_SCALE_QUERY_DEBUG == 1)
 	/* dump usage data*/
-	CFA_TCAM_MGR_LOG(INFO, "WC-TCAM:  1-p  1-f  2-p  2-f  4-f  free-rows\n");
-	CFA_TCAM_MGR_LOG(INFO, "          %-4d %-4d %-4d %-4d %-4d %-4d\n",
-			 usage_data->slice_row_1_p_used,
-			 usage_data->slice_row_1_f_used,
-			 usage_data->slice_row_2_p_used,
-			 usage_data->slice_row_2_f_used,
-			 usage_data->slice_row_4_used,
-			 usage_data->unused_row_number);
+	TFP_DRV_LOG(INFO, "WC-TCAM:  1-p  1-f  2-p  2-f  4-f  free-rows\n");
+	TFP_DRV_LOG(INFO, "	  %-4d %-4d %-4d %-4d %-4d %-4d\n",
+		    usage_data->slice_row_1_p_used,
+		    usage_data->slice_row_1_f_used,
+		    usage_data->slice_row_2_p_used,
+		    usage_data->slice_row_2_f_used,
+		    usage_data->slice_row_4_used,
+		    usage_data->unused_row_number);
 #endif
 	return 0;
 }
 
 /* Initialize the EM usage table */
-void tf_em_usage_init(uint32_t session_id, enum tf_dir dir, uint16_t max_entries)
+void tf_em_usage_init(struct tf *tfp, enum tf_dir dir, uint16_t max_entries)
 {
 	struct tf_resc_em_usage *em;
 
 	/* Check if supported on this device */
-	if (!tf_resc_usage_support(session_id))
+	if (!tf_resc_usage_support(tfp))
 		return;
 
 	em = &tf_resc_usage[dir].em_int_usage;
@@ -247,7 +266,7 @@ void tf_em_usage_init(uint32_t session_id, enum tf_dir dir, uint16_t max_entries
 }
 
 /* Update the EM usage table */
-int tf_em_usage_update(uint32_t session_id,
+int tf_em_usage_update(struct tf *tfp,
 		       enum tf_dir dir,
 		       uint16_t size,
 		       enum tf_resc_opt resc_opt)
@@ -255,15 +274,15 @@ int tf_em_usage_update(uint32_t session_id,
 	struct tf_resc_em_usage *em;
 
 #if (TF_FLOW_SCALE_QUERY_DEBUG == 1)
-	CFA_TCAM_MGR_LOG(INFO, "%s: %s: EM record size: %d, %s\n",
-			 __func__,
-			 dir ? "TX" : "RX",
-			 size,
-			 resc_opt == TF_RESC_ALLOC ? "Alloc" : "Free");
+	TFP_DRV_LOG(INFO, "%s: %s: EM record size: %d, %s\n",
+		    __func__,
+		    dir ? "TX" : "RX",
+		    size,
+		    resc_opt == TF_RESC_ALLOC ? "Alloc" : "Free");
 #endif /* TF_FLOW_SCALE_QUERY_DEBUG == 1 */
 
 	/* Check if supported on this device */
-	if (!tf_resc_usage_support(session_id))
+	if (!tf_resc_usage_support(tfp))
 		return -1;
 
 	/* not valid size */
@@ -283,7 +302,7 @@ int tf_em_usage_update(uint32_t session_id,
 }
 
 /* Initialize the usage buffer for all kinds of sram tables */
-void tf_tbl_usage_init(uint32_t session_id,
+void tf_tbl_usage_init(struct tf *tfp,
 		       enum tf_dir dir,
 		       uint32_t tbl_type,
 		       uint16_t max_entries)
@@ -291,17 +310,17 @@ void tf_tbl_usage_init(uint32_t session_id,
 	struct tf_rm_element_cfg *tbl_cfg = tf_tbl_p58[dir];
 
 #if (TF_FLOW_SCALE_QUERY_DEBUG == 1)
-	CFA_TCAM_MGR_LOG(INFO, "%s: %s: tbl_type: %d[%s], max entries: [%d]:[0x%x]\n",
-			 __func__,
-			 dir ? "TX" : "RX",
-			 tbl_type,
-			 tf_tbl_type_2_str(tbl_type),
-			 max_entries,
-			 max_entries);
+	TFP_DRV_LOG(INFO, "%s: %s: tbl_type: %d[%s], max entries: [%d]:[0x%x]\n",
+		    __func__,
+		    dir ? "TX" : "RX",
+		    tbl_type,
+		    tf_tbl_type_2_str(tbl_type),
+		    max_entries,
+		    max_entries);
 #endif /* TF_FLOW_SCALE_QUERY_DEBUG == 1 */
 
 	/* Check if supported on this device */
-	if (!tf_resc_usage_support(session_id))
+	if (!tf_resc_usage_support(tfp))
 		return;
 
 	/* Convert to entries */
@@ -372,7 +391,7 @@ void tf_tbl_usage_init(uint32_t session_id,
 }
 
 /* Update the usage buffer for sram tables: add or free one entry */
-int tf_tbl_usage_update(uint32_t session_id,
+int tf_tbl_usage_update(struct tf *tfp,
 			 enum tf_dir dir,
 			 uint32_t tbl_type,
 			 enum tf_resc_opt resc_opt)
@@ -384,7 +403,7 @@ int tf_tbl_usage_update(uint32_t session_id,
 	int entries = 0;
 
 	/* Check if supported on this device */
-	if (!tf_resc_usage_support(session_id))
+	if (!tf_resc_usage_support(tfp))
 		return -1;
 
 	/* Convert to entries */
@@ -393,11 +412,11 @@ int tf_tbl_usage_update(uint32_t session_id,
 
 #if (TF_FLOW_SCALE_QUERY_DEBUG == 1)
 	TFP_DRV_LOG(INFO, "%s: %s: tbl_type: %d[%s] %s, Entries: %d\n", __func__,
-			 dir ? "TX" : "RX",
-			 tbl_type,
-			 tf_tbl_type_2_str(tbl_type),
-			 resc_opt ? "Alloc" : "Free",
-			 entries);
+		    dir ? "TX" : "RX",
+		    tbl_type,
+		    tf_tbl_type_2_str(tbl_type),
+		    resc_opt ? "Alloc" : "Free",
+		    entries);
 #endif /* TF_FLOW_SCALE_QUERY_DEBUG == 1 */
 
 	resc_usage_control.buffer_dirty[dir] = 1;
@@ -521,7 +540,7 @@ void tf_resc_usage_update_all(struct bnxt *bp)
 	}
 
 	/* Check if supported on this device */
-	if (!tf_resc_usage_support(tfp->session->session_id.id))
+	if (!tf_resc_usage_support(tfp))
 		return;
 
 	/* update usage state with firmware for each direction */
@@ -557,11 +576,11 @@ void dump_tf_resc_usage(enum tf_dir dir, void *data, uint32_t size)
 	}
 
 	printf("EM-----------------------------------------------------------------------\n");
-	printf("          %4d:  %4d\n",
+	printf("	  %4d:  %4d\n",
 		state->em_int_usage.max_entries,
 		state->em_int_usage.used_entries);
 	printf("WC TCAM------------------------------------------------------------------\n");
-	printf("          %4d(row): %4d %4d  %4d %4d  %4d     %4d(free row)\n",
+	printf("	  %4d(row): %4d %4d  %4d %4d  %4d     %4d(free row)\n",
 		state->wc_tcam_usage.max_row_number,
 		state->wc_tcam_usage.slice_row_1_p_used,
 		state->wc_tcam_usage.slice_row_1_f_used,
@@ -570,31 +589,31 @@ void dump_tf_resc_usage(enum tf_dir dir, void *data, uint32_t size)
 		state->wc_tcam_usage.slice_row_4_used,
 		state->wc_tcam_usage.unused_row_number);
 	printf("COUNTER------------------------------------------------------------------\n");
-	printf("          %4d: %4d\n",
+	printf("	  %4d: %4d\n",
 		state->cnt_usage.max_entries,
 		state->cnt_usage.used_entries);
 	printf("METER------------------------------------------------------------------\n");
-	printf("          %4d(Inst): %4d,    %4d(Prof): %4d\n",
+	printf("	  %4d(Inst): %4d,    %4d(Prof): %4d\n",
 		state->meter_usage.max_meter_instance,
 		state->meter_usage.used_meter_instance,
 		state->meter_usage.max_meter_profile,
 		state->meter_usage.used_meter_profile);
 	printf("ACTION-------------------------------------------------------------------\n");
-	printf("          %4d(MAX): %4d(compact)  %4d(full)    %4d(free)\n",
+	printf("	  %4d(MAX): %4d(compact)  %4d(full)    %4d(free)\n",
 		state->act_usage.max_entries,
 		state->act_usage.num_compact_act_records,
 		state->act_usage.num_full_act_records,
 		state->act_usage.free_entries);
 	printf("SP SMAC------------------------------------------------------------------\n");
 	sp_smac = &state->sp_smac_usage;
-	printf("          %4d(Max):  %4d(8B) %4d(IPv4=16B) %4d(IPv6=32B)   %4d(free)\n",
+	printf("	  %4d(Max):  %4d(8B) %4d(IPv4=16B) %4d(IPv6=32B)   %4d(free)\n",
 		sp_smac->max_entries,
 		sp_smac->num_sp_smac_records,
 		sp_smac->num_sp_smac_ipv4_records,
 		sp_smac->num_sp_smac_ipv6_records,
 		sp_smac->free_entries);
 	printf("ACT MOD/ENCAP------------------------------------------------------------\n");
-	printf("          %4d: %4d(8B) %4d(16B) %4d(32B) %4d(64B) %4d(128B) %4d(free)\n\n\n",
+	printf("	  %4d: %4d(8B) %4d(16B) %4d(32B) %4d(64B) %4d(128B) %4d(free)\n\n\n",
 		state->mod_encap_usage.max_entries,
 		state->mod_encap_usage.data.num_8b_records,
 		state->mod_encap_usage.data.num_16b_records,
diff --git a/drivers/net/bnxt/tf_core/tf_resources.h b/drivers/net/bnxt/tf_core/tf_resources.h
index 715c9e0d94..e77e882b70 100644
--- a/drivers/net/bnxt/tf_core/tf_resources.h
+++ b/drivers/net/bnxt/tf_core/tf_resources.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2019-2023 Broadcom
+ * Copyright(c) 2019-2024 Broadcom
  * All rights reserved.
  */
 
@@ -97,29 +97,29 @@ typedef struct cfa_tf_resc_usage {
 /* global data stored in firmware memory and TruFlow driver */
 extern cfa_tf_resc_usage_t tf_resc_usage[TF_DIR_MAX];
 
-void tf_resc_usage_reset(enum tf_device_type type, int session_id);
+void tf_resc_usage_reset(struct tf *tfp, enum tf_device_type type);
 
-void tf_tcam_usage_init(int session_id);
+void tf_tcam_usage_init(struct tf *tfp);
 
-int tf_tcam_usage_update(int session_id,
+int tf_tcam_usage_update(struct tf *tfp,
 			 enum tf_dir dir,
 			 int tcam_tbl_type,
 			 void *key_row,
 			 enum tf_resc_opt resc_opt);
 
-void tf_em_usage_init(uint32_t session_id, enum tf_dir dir, uint16_t max_entries);
+void tf_em_usage_init(struct tf *tfp, enum tf_dir dir, uint16_t max_entries);
 
-int tf_em_usage_update(uint32_t session_id,
+int tf_em_usage_update(struct tf *tfp,
 		       enum tf_dir dir,
 		       uint16_t size,
 		       enum tf_resc_opt resc_opt);
 
-void tf_tbl_usage_init(uint32_t session_id,
+void tf_tbl_usage_init(struct tf *tfp,
 		       enum tf_dir dir,
 		       uint32_t tbl_type,
 		       uint16_t max_entries);
 
-int tf_tbl_usage_update(uint32_t session_id,
+int tf_tbl_usage_update(struct tf *tfp,
 			enum tf_dir dir,
 			uint32_t tbl_type,
 			enum tf_resc_opt resc_opt);
diff --git a/drivers/net/bnxt/tf_core/tf_rm.c b/drivers/net/bnxt/tf_core/tf_rm.c
index e38bfcf4f6..e9a2fbd851 100644
--- a/drivers/net/bnxt/tf_core/tf_rm.c
+++ b/drivers/net/bnxt/tf_core/tf_rm.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2019-2023 Broadcom
+ * Copyright(c) 2019-2024 Broadcom
  * All rights reserved.
  */
 
@@ -428,7 +428,7 @@ tf_rm_update_parent_reservations(struct tf *tfp,
 					req_cnt[child] = 0;
 #ifdef TF_FLOW_SCALE_QUERY
 					/* Initialize the usage buffer for SRAM tables */
-					tf_tbl_usage_init(tfp->session->session_id.id,
+					tf_tbl_usage_init(tfp,
 							  dir,
 							  child,
 							  alloc_cnt[child]);
@@ -698,7 +698,7 @@ tf_rm_create_db(struct tf *tfp,
 					tbl_type = TF_TBL_TYPE_METER_INST;
 				else
 					tbl_type = TF_TBL_TYPE_METER_PROF;
-				tf_tbl_usage_init(tfp->session->session_id.id,
+				tf_tbl_usage_init(tfp,
 						  parms->dir,
 						  tbl_type,
 						  req_cnt[i]);
diff --git a/drivers/net/bnxt/tf_core/tf_session.c b/drivers/net/bnxt/tf_core/tf_session.c
index 7545974c93..1c14378d11 100644
--- a/drivers/net/bnxt/tf_core/tf_session.c
+++ b/drivers/net/bnxt/tf_core/tf_session.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2019-2023 Broadcom
+ * Copyright(c) 2019-2024 Broadcom
  * All rights reserved.
  */
 
@@ -199,7 +199,7 @@ tf_session_create(struct tf *tfp,
 
 #ifdef TF_FLOW_SCALE_QUERY
 	/* Reset the resource usage buffer before binding a device */
-	tf_resc_usage_reset(parms->open_cfg->device_type, tfp->session->session_id.id);
+	tf_resc_usage_reset(tfp, parms->open_cfg->device_type);
 #endif /* TF_FLOW_SCALE_QUERY */
 
 	rc = tf_dev_bind(tfp,
diff --git a/drivers/net/bnxt/tf_core/tf_session.h b/drivers/net/bnxt/tf_core/tf_session.h
index 9bbbccf125..d46d89e9e9 100644
--- a/drivers/net/bnxt/tf_core/tf_session.h
+++ b/drivers/net/bnxt/tf_core/tf_session.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2019-2023 Broadcom
+ * Copyright(c) 2019-2024 Broadcom
  * All rights reserved.
  */
 
@@ -179,6 +179,10 @@ struct tf_session {
 	 */
 	int tcam_mgr_control[TF_DIR_MAX][TF_TCAM_TBL_TYPE_MAX];
 
+	/**
+	 * TCAM Manager handle pointing to session based tcam memory
+	 */
+	void *tcam_mgr_handle;
 };
 
 /**
diff --git a/drivers/net/bnxt/tf_core/tf_tcam.c b/drivers/net/bnxt/tf_core/tf_tcam.c
index df5cad75b5..fa8f60777d 100644
--- a/drivers/net/bnxt/tf_core/tf_tcam.c
+++ b/drivers/net/bnxt/tf_core/tf_tcam.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2019-2023 Broadcom
+ * Copyright(c) 2019-2024 Broadcom
  * All rights reserved.
  */
 
@@ -27,7 +27,7 @@ tf_tcam_bind(struct tf *tfp,
 	int d, t;
 	struct tf_rm_alloc_info info;
 	struct tf_rm_free_db_parms fparms;
-	struct tf_rm_create_db_parms db_cfg;
+	struct tf_rm_create_db_parms db_cfg = { 0 };
 	struct tf_tcam_resources local_tcam_cnt[TF_DIR_MAX];
 	struct tf_tcam_resources *tcam_cnt;
 	struct tf_rm_get_alloc_info_parms ainfo;
diff --git a/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c b/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c
index c535f4f4f6..8c1e6d2e0f 100644
--- a/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c
+++ b/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2021-2023 Broadcom
+ * Copyright(c) 2021-2024 Broadcom
  * All rights reserved.
  */
 
@@ -8,6 +8,7 @@
 #include "tfp.h"
 #include "tf_tcam.h"
 #include "cfa_tcam_mgr.h"
+#include "cfa_tcam_mgr_device.h"
 #include "tf_tcam_mgr_msg.h"
 
 /*
@@ -53,13 +54,11 @@ tf_tcam_mgr_qcaps_msg(struct tf *tfp,
 		      uint32_t *rx_tcam_supported,
 		      uint32_t *tx_tcam_supported)
 {
-	struct cfa_tcam_mgr_context   context;
 	struct cfa_tcam_mgr_qcaps_parms mgr_parms;
 	int rc;
 
-	context.tfp = tfp;
 	memset(&mgr_parms, 0, sizeof(mgr_parms));
-	rc = cfa_tcam_mgr_qcaps(&context, &mgr_parms);
+	rc = cfa_tcam_mgr_qcaps(tfp, &mgr_parms);
 	if (rc >= 0) {
 		*rx_tcam_supported = mgr_parms.rx_tcam_supported;
 		*tx_tcam_supported = mgr_parms.tx_tcam_supported;
@@ -75,7 +74,10 @@ tf_tcam_mgr_bind_msg(struct tf *tfp,
 		     __rte_unused
 	)
 {
-	/* Common Code */
+	struct tf_rm_resc_entry
+		mgr_resv_res[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX];
+	struct cfa_tcam_mgr_cfg_parms mgr_parms;
+	int dir, rc;
 	int type;
 
 	if (parms->num_elements != TF_TCAM_TBL_TYPE_MAX) {
@@ -91,14 +93,6 @@ tf_tcam_mgr_bind_msg(struct tf *tfp,
 	for (type = 0; type < TF_TCAM_TBL_TYPE_MAX; type++)
 		hcapi_type[type] = parms->cfg[type].hcapi_type;
 
-	struct cfa_tcam_mgr_context   context;
-	struct cfa_tcam_mgr_cfg_parms mgr_parms;
-	struct tf_rm_resc_entry
-		mgr_resv_res[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX];
-	int dir, rc;
-
-	context.tfp = tfp;
-
 	memset(&mgr_parms, 0, sizeof(mgr_parms));
 
 	mgr_parms.num_elements = CFA_TCAM_MGR_TBL_TYPE_MAX;
@@ -116,7 +110,7 @@ tf_tcam_mgr_bind_msg(struct tf *tfp,
 	}
 	mgr_parms.resv_res = mgr_resv_res;
 
-	rc = cfa_tcam_mgr_bind(&context, &mgr_parms);
+	rc = cfa_tcam_mgr_bind(tfp, &mgr_parms);
 
 	return rc;
 }
@@ -125,11 +119,7 @@ int
 tf_tcam_mgr_unbind_msg(struct tf *tfp,
 		       struct tf_dev_info *dev __rte_unused)
 {
-	struct cfa_tcam_mgr_context context;
-
-	context.tfp = tfp;
-
-	return cfa_tcam_mgr_unbind(&context);
+	return cfa_tcam_mgr_unbind(tfp);
 }
 
 int
@@ -137,7 +127,6 @@ tf_tcam_mgr_alloc_msg(struct tf *tfp,
 		      struct tf_dev_info *dev __rte_unused,
 		      struct tf_tcam_alloc_parms *parms)
 {
-	struct cfa_tcam_mgr_context context;
 	struct cfa_tcam_mgr_alloc_parms mgr_parms;
 	int rc;
 
@@ -148,8 +137,6 @@ tf_tcam_mgr_alloc_msg(struct tf *tfp,
 		return -EINVAL;
 	}
 
-	context.tfp = tfp;
-
 	mgr_parms.dir	     = parms->dir;
 	mgr_parms.type	     = tcam_types[parms->type];
 	mgr_parms.hcapi_type = hcapi_type[parms->type];
@@ -159,7 +146,7 @@ tf_tcam_mgr_alloc_msg(struct tf *tfp,
 	else
 		mgr_parms.priority = TF_TCAM_PRIORITY_MAX - parms->priority - 1;
 
-	rc = cfa_tcam_mgr_alloc(&context, &mgr_parms);
+	rc = cfa_tcam_mgr_alloc(tfp, &mgr_parms);
 	if (rc)
 		return rc;
 
@@ -172,7 +159,6 @@ tf_tcam_mgr_free_msg(struct tf *tfp,
 		     struct tf_dev_info *dev __rte_unused,
 		     struct tf_tcam_free_parms *parms)
 {
-	struct cfa_tcam_mgr_context context;
 	struct cfa_tcam_mgr_free_parms mgr_parms;
 
 	if (parms->type >= TF_TCAM_TBL_TYPE_MAX) {
@@ -182,13 +168,12 @@ tf_tcam_mgr_free_msg(struct tf *tfp,
 		return -EINVAL;
 	}
 
-	context.tfp = tfp;
 	mgr_parms.dir	     = parms->dir;
 	mgr_parms.type	     = tcam_types[parms->type];
 	mgr_parms.hcapi_type = hcapi_type[parms->type];
 	mgr_parms.id	     = parms->idx;
 
-	return cfa_tcam_mgr_free(&context, &mgr_parms);
+	return cfa_tcam_mgr_free(tfp, &mgr_parms);
 }
 
 int
@@ -196,7 +181,6 @@ tf_tcam_mgr_set_msg(struct tf *tfp,
 		    struct tf_dev_info *dev __rte_unused,
 		    struct tf_tcam_set_parms *parms)
 {
-	struct cfa_tcam_mgr_context context;
 	struct cfa_tcam_mgr_set_parms mgr_parms;
 
 	if (parms->type >= TF_TCAM_TBL_TYPE_MAX) {
@@ -206,7 +190,6 @@ tf_tcam_mgr_set_msg(struct tf *tfp,
 		return -EINVAL;
 	}
 
-	context.tfp = tfp;
 	mgr_parms.dir	      = parms->dir;
 	mgr_parms.type	      = tcam_types[parms->type];
 	mgr_parms.hcapi_type  = hcapi_type[parms->type];
@@ -217,7 +200,7 @@ tf_tcam_mgr_set_msg(struct tf *tfp,
 	mgr_parms.result      = parms->result;
 	mgr_parms.result_size = parms->result_size;
 
-	return cfa_tcam_mgr_set(&context, &mgr_parms);
+	return cfa_tcam_mgr_set(tfp, &mgr_parms);
 }
 
 int
@@ -225,9 +208,8 @@ tf_tcam_mgr_get_msg(struct tf *tfp,
 		    struct tf_dev_info *dev __rte_unused,
 		    struct tf_tcam_get_parms *parms)
 {
-	int rc;
-	struct cfa_tcam_mgr_context context;
 	struct cfa_tcam_mgr_get_parms mgr_parms;
+	int rc;
 
 	if (parms->type >= TF_TCAM_TBL_TYPE_MAX) {
 		TFP_DRV_LOG(ERR,
@@ -236,7 +218,6 @@ tf_tcam_mgr_get_msg(struct tf *tfp,
 		return -EINVAL;
 	}
 
-	context.tfp = tfp;
 	mgr_parms.dir	      = parms->dir;
 	mgr_parms.type	      = tcam_types[parms->type];
 	mgr_parms.hcapi_type  = hcapi_type[parms->type];
@@ -247,7 +228,7 @@ tf_tcam_mgr_get_msg(struct tf *tfp,
 	mgr_parms.result      = parms->result;
 	mgr_parms.result_size = parms->result_size;
 
-	rc = cfa_tcam_mgr_get(&context, &mgr_parms);
+	rc = cfa_tcam_mgr_get(tfp, &mgr_parms);
 	if (rc)
 		return rc;
 
@@ -261,26 +242,22 @@ int
 tf_tcam_mgr_shared_clear_msg(struct tf *tfp,
 		     struct tf_clear_tcam_shared_entries_parms *parms)
 {
-	struct cfa_tcam_mgr_context context;
 	struct cfa_tcam_mgr_shared_clear_parms mgr_parms;
 
-	context.tfp = tfp;
 	mgr_parms.dir = parms->dir;
 	mgr_parms.type = tcam_types[parms->tcam_tbl_type];
 
-	return cfa_tcam_mgr_shared_clear(&context, &mgr_parms);
+	return cfa_tcam_mgr_shared_clear(tfp, &mgr_parms);
 }
 
 int
 tf_tcam_mgr_shared_move_msg(struct tf *tfp,
 		     struct tf_move_tcam_shared_entries_parms *parms)
 {
-	struct cfa_tcam_mgr_context context;
 	struct cfa_tcam_mgr_shared_move_parms mgr_parms;
 
-	context.tfp = tfp;
 	mgr_parms.dir = parms->dir;
 	mgr_parms.type = tcam_types[parms->tcam_tbl_type];
 
-	return cfa_tcam_mgr_shared_move(&context, &mgr_parms);
+	return cfa_tcam_mgr_shared_move(tfp, &mgr_parms);
 }
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 09/47] net/bnxt: tf_core: remove dead AFM code from session-based priority TCAM mgr
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (7 preceding siblings ...)
  2024-10-01  5:57 ` [PATCH v3 08/47] net/bnxt: tf_core: convert priority based TCAM manager to dynamic allocation Sriharsha Basavapatna
@ 2024-10-01  5:57 ` Sriharsha Basavapatna
  2024-10-01  5:57 ` [PATCH v3 10/47] net/bnxt: tf_core: remove dead " Sriharsha Basavapatna
                   ` (24 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:57 UTC (permalink / raw)
  To: dev
  Cc: Randy Schacher, Sriharsha Basavapatna, Farah Smith,
	Kishore Padmanabha, Ajit Khaparde

From: Randy Schacher <stuart.schacher@broadcom.com>

Remove references to AFM allocated memory which is no longer
supported with TCAM mgr and truflow

Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_core/cfa_tcam_mgr.c     | 121 ++++----
 drivers/net/bnxt/tf_core/cfa_tcam_mgr.h     |  27 +-
 drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.c  | 320 +++-----------------
 drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.c | 320 +++-----------------
 drivers/net/bnxt/tf_core/tf_resources.c     |   4 +-
 drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c  |  18 +-
 6 files changed, 143 insertions(+), 667 deletions(-)

diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c
index 165376182e..380e828da8 100644
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c
+++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c
@@ -20,23 +20,23 @@
 #define TF_TCAM_SLICE_INVALID (-1)
 
 static int physical_table_types[CFA_TCAM_MGR_TBL_TYPE_MAX] = {
-	[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_APPS] =
+	[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH] =
 		TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
-	[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_APPS]  =
+	[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW]  =
 		TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,
-	[CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_APPS]	      =
+	[CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM]	      =
 		TF_TCAM_TBL_TYPE_PROF_TCAM,
-	[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS]	      =
+	[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM]	      =
 		TF_TCAM_TBL_TYPE_WC_TCAM,
-	[CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_APPS]	      =
+	[CFA_TCAM_MGR_TBL_TYPE_SP_TCAM]	      =
 		TF_TCAM_TBL_TYPE_SP_TCAM,
-	[CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_APPS]      =
+	[CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM]      =
 		TF_TCAM_TBL_TYPE_CT_RULE_TCAM,
-	[CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_APPS]	      =
+	[CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM]	      =
 		TF_TCAM_TBL_TYPE_VEB_TCAM,
-	[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS]     =
+	[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH]     =
 		TF_TCAM_TBL_TYPE_WC_TCAM_HIGH,
-	[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS]      =
+	[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW]      =
 		TF_TCAM_TBL_TYPE_WC_TCAM_LOW,
 };
 
@@ -53,41 +53,23 @@ const char *
 cfa_tcam_mgr_tbl_2_str(enum cfa_tcam_mgr_tbl_type tcam_type)
 {
 	switch (tcam_type) {
-	case CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_AFM:
-		return "l2_ctxt_tcam_high AFM";
-	case CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_APPS:
+	case CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH:
 		return "l2_ctxt_tcam_high Apps";
-	case CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_AFM:
-		return "l2_ctxt_tcam_low AFM";
-	case CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_APPS:
+	case CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW:
 		return "l2_ctxt_tcam_low Apps";
-	case CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_AFM:
-		return "prof_tcam AFM";
-	case CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_APPS:
+	case CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM:
 		return "prof_tcam Apps";
-	case CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_AFM:
-		return "wc_tcam AFM";
-	case CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS:
+	case CFA_TCAM_MGR_TBL_TYPE_WC_TCAM:
 		return "wc_tcam Apps";
-	case CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_AFM:
-		return "veb_tcam AFM";
-	case CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_APPS:
+	case CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM:
 		return "veb_tcam Apps";
-	case CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_AFM:
-		return "sp_tcam AFM";
-	case CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_APPS:
+	case CFA_TCAM_MGR_TBL_TYPE_SP_TCAM:
 		return "sp_tcam Apps";
-	case CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_AFM:
-		return "ct_rule_tcam AFM";
-	case CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_APPS:
+	case CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM:
 		return "ct_rule_tcam Apps";
-	case CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_AFM:
-		return "wc_tcam_high AFM";
-	case CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS:
+	case CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH:
 		return "wc_tcam_high Apps";
-	case CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_AFM:
-		return "wc_tcam_low AFM";
-	case CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS:
+	case CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW:
 		return "wc_tcam_low Apps";
 	default:
 		return "Invalid tcam table type";
@@ -972,10 +954,13 @@ cfa_tcam_mgr_bitmap_alloc(struct tf *tfp __rte_unused,
 
 	/* Allocate first index to avoid idx 0 */
 	first_idx = ba_alloc(tcam_mgr_data->session_bmp);
-	if (first_idx == BA_FAIL)
+	if (first_idx == BA_FAIL) {
+		tfp_free(tcam_mgr_data->session_bmp);
+		tcam_mgr_data->session_bmp = NULL;
 		return -CFA_TCAM_MGR_ERR_CODE(NOSPC);
+	}
 
-	TFP_DRV_LOG(INFO,
+	TFP_DRV_LOG(DEBUG,
 		    "session bitmap size is %" PRIX64 "\n",
 		    tcam_mgr_data->session_bmp_size);
 
@@ -1087,8 +1072,9 @@ cfa_tcam_mgr_init(struct tf *tfp, enum cfa_tcam_mgr_device_type type,
 	if (parms)
 		parms->max_entries = tcam_mgr_data->cfa_tcam_mgr_max_entries;
 
-	CFA_TCAM_MGR_LOG(DEBUG, "Global TCAM tbl initialized max entries %d\n",
-			 tcam_mgr_data->cfa_tcam_mgr_max_entries);
+	CFA_TCAM_MGR_TRACE(DEBUG,
+			   "Global TCAM tbl initialized max entries %d\n",
+			   tcam_mgr_data->cfa_tcam_mgr_max_entries);
 
 	return 0;
 }
@@ -1227,38 +1213,41 @@ cfa_tcam_mgr_shared_wc_bind(struct tf *tfp, bool dual_ha_app,
 
 	for (dir = 0; dir < TF_DIR_MAX; dir++) {
 		rc = cfa_tcam_mgr_tables_get(tfp, dir,
-					     CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS,
-					     &start_row, &end_row, &max_entries, &slices);
+					     CFA_TCAM_MGR_TBL_TYPE_WC_TCAM,
+					     &start_row, &end_row, &max_entries,
+					     &slices);
 		if (rc)
 			return rc;
 		if (max_entries) {
 			rc = cfa_tcam_mgr_tables_set(tfp, dir,
-						     CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS,
+					     CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH,
 						     start_row,
 						     start_row +
-						     ((max_entries / slices) / num_pools) - 1,
+						     ((max_entries / slices) /
+						     num_pools) - 1,
 						     max_entries / num_pools);
 			if (rc)
 				return rc;
 			rc = cfa_tcam_mgr_tables_set(tfp, dir,
-						     CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS,
+					      CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW,
 						     start_row +
-						     ((max_entries / slices) / num_pools),
+						     ((max_entries / slices) /
+						     num_pools),
 						     start_row +
 						     (max_entries / slices) - 1,
 						     max_entries / num_pools);
 			if (rc)
 				return rc;
 			rc = cfa_tcam_mgr_tables_set(tfp, dir,
-						     CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS,
+						  CFA_TCAM_MGR_TBL_TYPE_WC_TCAM,
 						     0, 0, 0);
 			if (rc)
 				return rc;
-			tcam_cnt[dir][CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS] =
+			tcam_cnt[dir][CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH] =
 				max_entries / num_pools;
-			tcam_cnt[dir][CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS] =
+			tcam_cnt[dir][CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW] =
 				max_entries / num_pools;
-			tcam_cnt[dir][CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS] = 0;
+			tcam_cnt[dir][CFA_TCAM_MGR_TBL_TYPE_WC_TCAM] = 0;
 		}
 	}
 
@@ -1389,8 +1378,8 @@ cfa_tcam_mgr_bind(struct tf *tfp,
 		}
 	}
 
-	CFA_TCAM_MGR_LOG(DEBUG, "TCAM table bind for max entries %d.\n",
-			 tcam_mgr_data->cfa_tcam_mgr_max_entries);
+	CFA_TCAM_MGR_TRACE(DEBUG, "TCAM table bind for max entries %d.\n",
+			   tcam_mgr_data->cfa_tcam_mgr_max_entries);
 
 	if (tf_session_is_shared_hotup_session(tfs)) {
 		rc = cfa_tcam_mgr_shared_wc_bind(tfp, false,
@@ -1537,16 +1526,6 @@ cfa_tcam_mgr_alloc(struct tf *tfp,
 		return -CFA_TCAM_MGR_ERR_CODE(INVAL);
 	}
 
-#if TF_TCAM_PRIORITY_MAX < UINT16_MAX
-	if (parms->priority > TF_TCAM_PRIORITY_MAX) {
-		CFA_TCAM_MGR_LOG_DIR(ERR, dir,
-				     "%s: Priority:%u out of range (%u-%u).\n",
-				     tf_dir_2_str(dir), parms->priority,
-				     TF_TCAM_PRIORITY_MIN,
-				     TF_TCAM_PRIORITY_MAX);
-	}
-#endif
-
 	rc = tf_session_get_session_internal(tfp, &tfs);
 	if (rc)
 		return rc;
@@ -1650,7 +1629,7 @@ cfa_tcam_mgr_free(struct tf *tfp,
 	id = parms->id;
 	entry = cfa_tcam_mgr_entry_get(tcam_mgr_data, id);
 	if (!entry) {
-		CFA_TCAM_MGR_LOG(INFO, "Entry %d not found\n", id);
+		CFA_TCAM_MGR_LOG(ERR, "Entry %d not found\n", id);
 		return -CFA_TCAM_MGR_ERR_CODE(INVAL);
 	}
 
@@ -1976,7 +1955,7 @@ cfa_tcam_mgr_shared_entry_move(struct cfa_tcam_mgr_data *tcam_mgr_data,
 		return rc;
 
 	sparms.dir	   = dir;
-	sparms.type	   = CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS;
+	sparms.type	   = CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW;
 	sparms.hcapi_type  = table_data->hcapi_type;
 	sparms.key	   = key;
 	sparms.mask	   = mask;
@@ -2033,7 +2012,7 @@ cfa_tcam_mgr_shared_entry_move(struct cfa_tcam_mgr_data *tcam_mgr_data,
 #ifdef CFA_TCAM_MGR_TRACING
 	cfa_tcam_mgr_rows_dump(tfp, dir, type);
 	cfa_tcam_mgr_rows_dump(tfp, dir,
-			       CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS);
+			       CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW);
 #endif
 
 	return 0;
@@ -2065,15 +2044,15 @@ int cfa_tcam_mgr_shared_move(struct tf *tfp,
 
 	src_table_data =
 		&tcam_mgr_data->cfa_tcam_mgr_tables[parms->dir]
-			[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS];
+			[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH];
 	dst_table_data =
 		&tcam_mgr_data->cfa_tcam_mgr_tables[parms->dir]
-			[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS];
+			[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW];
 
 	row_size =
 		cfa_tcam_mgr_row_size_get(tcam_mgr_data,
 					  parms->dir,
-					  CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS);
+					  CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH);
 
 	for (src_row = src_table_data->start_row,
 	     dst_row = dst_table_data->start_row;
@@ -2099,8 +2078,8 @@ int cfa_tcam_mgr_shared_move(struct tf *tfp,
 			rc = cfa_tcam_mgr_shared_entry_move(tcam_mgr_data,
 							tfp,
 							parms->dir,
-							CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS,
-							src_table_row->entries[slice],
+					     CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH,
+						  src_table_row->entries[slice],
 							dst_table_data,
 							src_table_data,
 							dst_row, slice,
@@ -2235,6 +2214,7 @@ cfa_tcam_mgr_tables_set(struct tf *tfp, enum tf_dir dir,
 	return 0;
 }
 
+#ifdef CFA_TCAM_MGR_TRACING
 void
 cfa_tcam_mgr_rows_dump(struct tf *tfp, enum tf_dir dir,
 		       enum cfa_tcam_mgr_tbl_type type)
@@ -2425,3 +2405,4 @@ cfa_tcam_mgr_entries_dump(struct tf *tfp)
 	if (!entry_found)
 		printf("No entries found.\n");
 }
+#endif /* CFA_TCAM_MGR_TRACING */
diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.h b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.h
index d4f8512d2a..25654a8351 100644
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.h
+++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.h
@@ -88,25 +88,16 @@
 
 /* Logical TCAM tables */
 enum cfa_tcam_mgr_tbl_type {
-	CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_AFM =
+	CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH =
 		CFA_TCAM_MGR_TBL_TYPE_START,
-	CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_APPS,
-	CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_AFM,
-	CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_APPS,
-	CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_AFM,
-	CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_APPS,
-	CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_AFM,
-	CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS,
-	CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_AFM,
-	CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_APPS,
-	CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_AFM,
-	CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_APPS,
-	CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_AFM,
-	CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_APPS,
-	CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_AFM,
-	CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS,
-	CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_AFM,
-	CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS,
+	CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW,
+	CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM,
+	CFA_TCAM_MGR_TBL_TYPE_WC_TCAM,
+	CFA_TCAM_MGR_TBL_TYPE_SP_TCAM,
+	CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM,
+	CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM,
+	CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH,
+	CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW,
 	CFA_TCAM_MGR_TBL_TYPE_MAX
 };
 
diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.c b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.c
index b2eadde61e..acb3a8f832 100644
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.c
+++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.c
@@ -165,17 +165,7 @@ struct cfa_tcam_mgr_table_rows_p4 {
 struct cfa_tcam_mgr_table_data
 cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 	{				/* RX */
-		{			/* High AFM */
-			.max_slices  = L2_CTXT_TCAM_RX_MAX_SLICES,
-			.row_width   = L2_CTXT_TCAM_RX_ROW_WIDTH,
-			.num_rows    = L2_CTXT_TCAM_RX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = L2_CTXT_TCAM_RX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P4_L2_CTXT_TCAM_HIGH,
-		},
-		{			/* High APPS */
+		{
 			.max_slices  = L2_CTXT_TCAM_RX_MAX_SLICES,
 			.row_width   = L2_CTXT_TCAM_RX_ROW_WIDTH,
 			.num_rows    = L2_CTXT_TCAM_RX_NUM_ROWS,
@@ -185,17 +175,7 @@ cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.result_size = L2_CTXT_TCAM_RX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P4_L2_CTXT_TCAM_HIGH,
 		},
-		{			/* Low AFM */
-			.max_slices  = L2_CTXT_TCAM_RX_MAX_SLICES,
-			.row_width   = L2_CTXT_TCAM_RX_ROW_WIDTH,
-			.num_rows    = L2_CTXT_TCAM_RX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = L2_CTXT_TCAM_RX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P4_L2_CTXT_TCAM_LOW,
-		},
-		{			/* Low APPS */
+		{
 			.max_slices  = L2_CTXT_TCAM_RX_MAX_SLICES,
 			.row_width   = L2_CTXT_TCAM_RX_ROW_WIDTH,
 			.num_rows    = L2_CTXT_TCAM_RX_NUM_ROWS,
@@ -205,17 +185,7 @@ cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.result_size = L2_CTXT_TCAM_RX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P4_L2_CTXT_TCAM_LOW,
 		},
-		{			/* AFM */
-			.max_slices  = PROF_TCAM_RX_MAX_SLICES,
-			.row_width   = PROF_TCAM_RX_ROW_WIDTH,
-			.num_rows    = PROF_TCAM_RX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = PROF_TCAM_RX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P4_PROF_TCAM,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = PROF_TCAM_RX_MAX_SLICES,
 			.row_width   = PROF_TCAM_RX_ROW_WIDTH,
 			.num_rows    = PROF_TCAM_RX_NUM_ROWS,
@@ -225,17 +195,7 @@ cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.result_size = PROF_TCAM_RX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P4_PROF_TCAM,
 		},
-		{			/* AFM */
-			.max_slices  = WC_TCAM_RX_MAX_SLICES,
-			.row_width   = WC_TCAM_RX_ROW_WIDTH,
-			.num_rows    = WC_TCAM_RX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = WC_TCAM_RX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P4_WC_TCAM,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = WC_TCAM_RX_MAX_SLICES,
 			.row_width   = WC_TCAM_RX_ROW_WIDTH,
 			.num_rows    = WC_TCAM_RX_NUM_ROWS,
@@ -245,17 +205,7 @@ cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.result_size = WC_TCAM_RX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P4_WC_TCAM,
 		},
-		{			/* AFM */
-			.max_slices  = SP_TCAM_RX_MAX_SLICES,
-			.row_width   = SP_TCAM_RX_ROW_WIDTH,
-			.num_rows    = SP_TCAM_RX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = SP_TCAM_RX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P4_SP_TCAM,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = SP_TCAM_RX_MAX_SLICES,
 			.row_width   = SP_TCAM_RX_ROW_WIDTH,
 			.num_rows    = SP_TCAM_RX_NUM_ROWS,
@@ -265,16 +215,7 @@ cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.result_size = SP_TCAM_RX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P4_SP_TCAM,
 		},
-		{			/* AFM */
-			.max_slices  = CT_RULE_TCAM_RX_MAX_SLICES,
-			.row_width   = CT_RULE_TCAM_RX_ROW_WIDTH,
-			.num_rows    = CT_RULE_TCAM_RX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = CT_RULE_TCAM_RX_RESULT_SIZE,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = CT_RULE_TCAM_RX_MAX_SLICES,
 			.row_width   = CT_RULE_TCAM_RX_ROW_WIDTH,
 			.num_rows    = CT_RULE_TCAM_RX_NUM_ROWS,
@@ -288,16 +229,7 @@ cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.max_entries = CT_RULE_TCAM_RX_MAX_ENTRIES,
 			.result_size = CT_RULE_TCAM_RX_RESULT_SIZE,
 		},
-		{			/* AFM */
-			.max_slices  = VEB_TCAM_RX_MAX_SLICES,
-			.row_width   = VEB_TCAM_RX_ROW_WIDTH,
-			.num_rows    = VEB_TCAM_RX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = VEB_TCAM_RX_RESULT_SIZE,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = VEB_TCAM_RX_MAX_SLICES,
 			.row_width   = VEB_TCAM_RX_ROW_WIDTH,
 			.num_rows    = VEB_TCAM_RX_NUM_ROWS,
@@ -311,17 +243,7 @@ cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.max_entries = VEB_TCAM_RX_MAX_ENTRIES,
 			.result_size = VEB_TCAM_RX_RESULT_SIZE,
 		},
-		{			/* AFM */
-			.max_slices  = WC_TCAM_RX_MAX_SLICES,
-			.row_width   = WC_TCAM_RX_ROW_WIDTH,
-			.num_rows    = WC_TCAM_RX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = WC_TCAM_RX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P4_WC_TCAM,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = WC_TCAM_RX_MAX_SLICES,
 			.row_width   = WC_TCAM_RX_ROW_WIDTH,
 			.num_rows    = WC_TCAM_RX_NUM_ROWS,
@@ -331,17 +253,7 @@ cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.result_size = WC_TCAM_RX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P4_WC_TCAM,
 		},
-		{			/* AFM */
-			.max_slices  = WC_TCAM_RX_MAX_SLICES,
-			.row_width   = WC_TCAM_RX_ROW_WIDTH,
-			.num_rows    = WC_TCAM_RX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = WC_TCAM_RX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P4_WC_TCAM,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = WC_TCAM_RX_MAX_SLICES,
 			.row_width   = WC_TCAM_RX_ROW_WIDTH,
 			.num_rows    = WC_TCAM_RX_NUM_ROWS,
@@ -353,17 +265,7 @@ cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 		},
 	},
 	{				/* TX */
-		{			/* AFM */
-			.max_slices  = L2_CTXT_TCAM_TX_MAX_SLICES,
-			.row_width   = L2_CTXT_TCAM_TX_ROW_WIDTH,
-			.num_rows    = L2_CTXT_TCAM_TX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = L2_CTXT_TCAM_TX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P4_L2_CTXT_TCAM_HIGH,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = L2_CTXT_TCAM_TX_MAX_SLICES,
 			.row_width   = L2_CTXT_TCAM_TX_ROW_WIDTH,
 			.num_rows    = L2_CTXT_TCAM_TX_NUM_ROWS,
@@ -373,17 +275,7 @@ cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.result_size = L2_CTXT_TCAM_TX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P4_L2_CTXT_TCAM_HIGH,
 		},
-		{			/* AFM */
-			.max_slices  = L2_CTXT_TCAM_TX_MAX_SLICES,
-			.row_width   = L2_CTXT_TCAM_TX_ROW_WIDTH,
-			.num_rows    = L2_CTXT_TCAM_TX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = L2_CTXT_TCAM_TX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P4_L2_CTXT_TCAM_LOW,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = L2_CTXT_TCAM_TX_MAX_SLICES,
 			.row_width   = L2_CTXT_TCAM_TX_ROW_WIDTH,
 			.num_rows    = L2_CTXT_TCAM_TX_NUM_ROWS,
@@ -393,17 +285,7 @@ cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.result_size = L2_CTXT_TCAM_TX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P4_L2_CTXT_TCAM_LOW,
 		},
-		{			/* AFM */
-			.max_slices  = PROF_TCAM_TX_MAX_SLICES,
-			.row_width   = PROF_TCAM_TX_ROW_WIDTH,
-			.num_rows    = PROF_TCAM_TX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = PROF_TCAM_TX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P4_PROF_TCAM,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = PROF_TCAM_TX_MAX_SLICES,
 			.row_width   = PROF_TCAM_TX_ROW_WIDTH,
 			.num_rows    = PROF_TCAM_TX_NUM_ROWS,
@@ -413,17 +295,7 @@ cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.result_size = PROF_TCAM_TX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P4_PROF_TCAM,
 		},
-		{			/* AFM */
-			.max_slices  = WC_TCAM_TX_MAX_SLICES,
-			.row_width   = WC_TCAM_TX_ROW_WIDTH,
-			.num_rows    = WC_TCAM_TX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = WC_TCAM_TX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P4_WC_TCAM,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = WC_TCAM_TX_MAX_SLICES,
 			.row_width   = WC_TCAM_TX_ROW_WIDTH,
 			.num_rows    = WC_TCAM_TX_NUM_ROWS,
@@ -433,17 +305,7 @@ cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.result_size = WC_TCAM_TX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P4_WC_TCAM,
 		},
-		{			/* AFM */
-			.max_slices  = SP_TCAM_TX_MAX_SLICES,
-			.row_width   = SP_TCAM_TX_ROW_WIDTH,
-			.num_rows    = SP_TCAM_TX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = SP_TCAM_TX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P4_SP_TCAM,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = SP_TCAM_TX_MAX_SLICES,
 			.row_width   = SP_TCAM_TX_ROW_WIDTH,
 			.num_rows    = SP_TCAM_TX_NUM_ROWS,
@@ -453,16 +315,7 @@ cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.result_size = SP_TCAM_TX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P4_SP_TCAM,
 		},
-		{			/* AFM */
-			.max_slices  = CT_RULE_TCAM_TX_MAX_SLICES,
-			.row_width   = CT_RULE_TCAM_TX_ROW_WIDTH,
-			.num_rows    = CT_RULE_TCAM_TX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = CT_RULE_TCAM_RX_RESULT_SIZE,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = CT_RULE_TCAM_TX_MAX_SLICES,
 			.row_width   = CT_RULE_TCAM_TX_ROW_WIDTH,
 			.num_rows    = CT_RULE_TCAM_TX_NUM_ROWS,
@@ -476,16 +329,7 @@ cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.max_entries = CT_RULE_TCAM_TX_MAX_ENTRIES,
 			.result_size = CT_RULE_TCAM_RX_RESULT_SIZE,
 		},
-		{			/* AFM */
-			.max_slices  = VEB_TCAM_TX_MAX_SLICES,
-			.row_width   = VEB_TCAM_TX_ROW_WIDTH,
-			.num_rows    = VEB_TCAM_TX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = VEB_TCAM_RX_RESULT_SIZE,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = VEB_TCAM_TX_MAX_SLICES,
 			.row_width   = VEB_TCAM_TX_ROW_WIDTH,
 			.num_rows    = VEB_TCAM_TX_NUM_ROWS,
@@ -495,17 +339,7 @@ cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.result_size = VEB_TCAM_RX_RESULT_SIZE,
 /*			.hcapi_type  = */
 		},
-		{			/* AFM */
-			.max_slices  = WC_TCAM_TX_MAX_SLICES,
-			.row_width   = WC_TCAM_TX_ROW_WIDTH,
-			.num_rows    = WC_TCAM_TX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = WC_TCAM_TX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P4_WC_TCAM,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = WC_TCAM_TX_MAX_SLICES,
 			.row_width   = WC_TCAM_TX_ROW_WIDTH,
 			.num_rows    = WC_TCAM_TX_NUM_ROWS,
@@ -515,17 +349,7 @@ cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.result_size = WC_TCAM_TX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P4_WC_TCAM,
 		},
-		{			/* AFM */
-			.max_slices  = WC_TCAM_TX_MAX_SLICES,
-			.row_width   = WC_TCAM_TX_ROW_WIDTH,
-			.num_rows    = WC_TCAM_TX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = WC_TCAM_TX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P4_WC_TCAM,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = WC_TCAM_TX_MAX_SLICES,
 			.row_width   = WC_TCAM_TX_ROW_WIDTH,
 			.num_rows    = WC_TCAM_TX_NUM_ROWS,
@@ -633,164 +457,92 @@ cfa_tcam_mgr_init_p4(struct tf *tfp)
 	       sizeof(tcam_mgr_data->cfa_tcam_mgr_tables));
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_L2_CTXT_TCAM_RX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_L2_CTXT_TCAM_RX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_L2_CTXT_TCAM_TX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_L2_CTXT_TCAM_TX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_L2_CTXT_TCAM_RX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_L2_CTXT_TCAM_RX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_L2_CTXT_TCAM_TX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_L2_CTXT_TCAM_TX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_PROF_TCAM_RX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_PROF_TCAM_RX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_PROF_TCAM_TX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_PROF_TCAM_TX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_WC_TCAM_RX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_WC_TCAM_RX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_WC_TCAM_TX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_WC_TCAM_TX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_SP_TCAM_RX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_SP_TCAM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_SP_TCAM_RX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_SP_TCAM_TX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_SP_TCAM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_SP_TCAM_TX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_CT_RULE_TCAM_RX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_CT_RULE_TCAM_RX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_CT_RULE_TCAM_TX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_CT_RULE_TCAM_TX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_VEB_TCAM_RX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_VEB_TCAM_RX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_VEB_TCAM_TX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_VEB_TCAM_TX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_WC_TCAM_RX_HIGH[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_WC_TCAM_RX_HIGH[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_WC_TCAM_TX_HIGH[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_WC_TCAM_TX_HIGH[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_WC_TCAM_RX_LOW[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_WC_TCAM_RX_LOW[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_WC_TCAM_TX_LOW[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_WC_TCAM_TX_LOW[0];
 
diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.c b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.c
index aa322b4452..3edffab10f 100644
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.c
+++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.c
@@ -165,17 +165,7 @@ struct cfa_tcam_mgr_table_rows_p58 {
 struct cfa_tcam_mgr_table_data
 cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 	{				/* RX */
-		{			/* High AFM */
-			.max_slices  = L2_CTXT_TCAM_RX_MAX_SLICES,
-			.row_width   = L2_CTXT_TCAM_RX_ROW_WIDTH,
-			.num_rows    = 0,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = L2_CTXT_TCAM_RX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P58_L2_CTXT_TCAM_HIGH,
-		},
-		{			/* High APPS */
+		{
 			.max_slices  = L2_CTXT_TCAM_RX_MAX_SLICES,
 			.row_width   = L2_CTXT_TCAM_RX_ROW_WIDTH,
 			.num_rows    = L2_CTXT_TCAM_RX_NUM_ROWS,
@@ -185,17 +175,7 @@ cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.result_size = L2_CTXT_TCAM_RX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P58_L2_CTXT_TCAM_HIGH,
 		},
-		{			/* Low AFM */
-			.max_slices  = L2_CTXT_TCAM_RX_MAX_SLICES,
-			.row_width   = L2_CTXT_TCAM_RX_ROW_WIDTH,
-			.num_rows    = 0,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = L2_CTXT_TCAM_RX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P58_L2_CTXT_TCAM_LOW,
-		},
-		{			/* Low APPS */
+		{
 			.max_slices  = L2_CTXT_TCAM_RX_MAX_SLICES,
 			.row_width   = L2_CTXT_TCAM_RX_ROW_WIDTH,
 			.num_rows    = L2_CTXT_TCAM_RX_NUM_ROWS,
@@ -205,17 +185,7 @@ cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.result_size = L2_CTXT_TCAM_RX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P58_L2_CTXT_TCAM_LOW,
 		},
-		{			/* AFM */
-			.max_slices  = PROF_TCAM_RX_MAX_SLICES,
-			.row_width   = PROF_TCAM_RX_ROW_WIDTH,
-			.num_rows    = 0,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = PROF_TCAM_RX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P58_PROF_TCAM,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = PROF_TCAM_RX_MAX_SLICES,
 			.row_width   = PROF_TCAM_RX_ROW_WIDTH,
 			.num_rows    = PROF_TCAM_RX_NUM_ROWS,
@@ -225,17 +195,7 @@ cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.result_size = PROF_TCAM_RX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P58_PROF_TCAM,
 		},
-		{			/* AFM */
-			.max_slices  = WC_TCAM_RX_MAX_SLICES,
-			.row_width   = WC_TCAM_RX_ROW_WIDTH,
-			.num_rows    = WC_TCAM_RX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = WC_TCAM_RX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P58_WC_TCAM,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = WC_TCAM_RX_MAX_SLICES,
 			.row_width   = WC_TCAM_RX_ROW_WIDTH,
 			.num_rows    = WC_TCAM_RX_NUM_ROWS,
@@ -245,16 +205,7 @@ cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.result_size = WC_TCAM_RX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P58_WC_TCAM,
 		},
-		{			/* AFM */
-			.max_slices  = SP_TCAM_RX_MAX_SLICES,
-			.row_width   = SP_TCAM_RX_ROW_WIDTH,
-			.num_rows    = 0,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = SP_TCAM_RX_RESULT_SIZE,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = SP_TCAM_RX_MAX_SLICES,
 			.row_width   = SP_TCAM_RX_ROW_WIDTH,
 			.num_rows    = SP_TCAM_RX_NUM_ROWS,
@@ -263,16 +214,7 @@ cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.max_entries = SP_TCAM_RX_MAX_ENTRIES,
 			.result_size = SP_TCAM_RX_RESULT_SIZE,
 		},
-		{			/* AFM */
-			.max_slices  = CT_RULE_TCAM_RX_MAX_SLICES,
-			.row_width   = CT_RULE_TCAM_RX_ROW_WIDTH,
-			.num_rows    = CT_RULE_TCAM_RX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = CT_RULE_TCAM_RX_RESULT_SIZE,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = CT_RULE_TCAM_RX_MAX_SLICES,
 			.row_width   = CT_RULE_TCAM_RX_ROW_WIDTH,
 			.num_rows    = CT_RULE_TCAM_RX_NUM_ROWS,
@@ -286,17 +228,7 @@ cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.max_entries = CT_RULE_TCAM_RX_MAX_ENTRIES,
 			.result_size = CT_RULE_TCAM_RX_RESULT_SIZE,
 		},
-		{			/* AFM */
-			.max_slices  = VEB_TCAM_RX_MAX_SLICES,
-			.row_width   = VEB_TCAM_RX_ROW_WIDTH,
-			.num_rows    = VEB_TCAM_RX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = VEB_TCAM_RX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P58_VEB_TCAM,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = VEB_TCAM_RX_MAX_SLICES,
 			.row_width   = VEB_TCAM_RX_ROW_WIDTH,
 			.num_rows    = VEB_TCAM_RX_NUM_ROWS,
@@ -310,17 +242,7 @@ cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.result_size = VEB_TCAM_RX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P58_VEB_TCAM,
 		},
-		{			/* AFM */
-			.max_slices  = WC_TCAM_RX_MAX_SLICES,
-			.row_width   = WC_TCAM_RX_ROW_WIDTH,
-			.num_rows    = WC_TCAM_RX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = WC_TCAM_RX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P58_WC_TCAM,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = WC_TCAM_RX_MAX_SLICES,
 			.row_width   = WC_TCAM_RX_ROW_WIDTH,
 			.num_rows    = WC_TCAM_RX_NUM_ROWS,
@@ -330,17 +252,7 @@ cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.result_size = WC_TCAM_RX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P58_WC_TCAM,
 		},
-		{			/* AFM */
-			.max_slices  = WC_TCAM_RX_MAX_SLICES,
-			.row_width   = WC_TCAM_RX_ROW_WIDTH,
-			.num_rows    = WC_TCAM_RX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = WC_TCAM_RX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P58_WC_TCAM,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = WC_TCAM_RX_MAX_SLICES,
 			.row_width   = WC_TCAM_RX_ROW_WIDTH,
 			.num_rows    = WC_TCAM_RX_NUM_ROWS,
@@ -352,17 +264,7 @@ cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 		},
 	},
 	{				/* TX */
-		{			/* AFM */
-			.max_slices  = L2_CTXT_TCAM_TX_MAX_SLICES,
-			.row_width   = L2_CTXT_TCAM_TX_ROW_WIDTH,
-			.num_rows    = L2_CTXT_TCAM_TX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = L2_CTXT_TCAM_TX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P58_L2_CTXT_TCAM_HIGH,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = L2_CTXT_TCAM_TX_MAX_SLICES,
 			.row_width   = L2_CTXT_TCAM_TX_ROW_WIDTH,
 			.num_rows    = L2_CTXT_TCAM_TX_NUM_ROWS,
@@ -372,17 +274,7 @@ cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.result_size = L2_CTXT_TCAM_TX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P58_L2_CTXT_TCAM_HIGH,
 		},
-		{			/* AFM */
-			.max_slices  = L2_CTXT_TCAM_TX_MAX_SLICES,
-			.row_width   = L2_CTXT_TCAM_TX_ROW_WIDTH,
-			.num_rows    = L2_CTXT_TCAM_TX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = L2_CTXT_TCAM_TX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P58_L2_CTXT_TCAM_LOW,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = L2_CTXT_TCAM_TX_MAX_SLICES,
 			.row_width   = L2_CTXT_TCAM_TX_ROW_WIDTH,
 			.num_rows    = L2_CTXT_TCAM_TX_NUM_ROWS,
@@ -392,17 +284,7 @@ cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.result_size = L2_CTXT_TCAM_TX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P58_L2_CTXT_TCAM_LOW,
 		},
-		{			/* AFM */
-			.max_slices  = PROF_TCAM_TX_MAX_SLICES,
-			.row_width   = PROF_TCAM_TX_ROW_WIDTH,
-			.num_rows    = PROF_TCAM_TX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = PROF_TCAM_TX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P58_PROF_TCAM,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = PROF_TCAM_TX_MAX_SLICES,
 			.row_width   = PROF_TCAM_TX_ROW_WIDTH,
 			.num_rows    = PROF_TCAM_TX_NUM_ROWS,
@@ -412,17 +294,7 @@ cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.result_size = PROF_TCAM_TX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P58_PROF_TCAM,
 		},
-		{			/* AFM */
-			.max_slices  = WC_TCAM_TX_MAX_SLICES,
-			.row_width   = WC_TCAM_TX_ROW_WIDTH,
-			.num_rows    = WC_TCAM_TX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = WC_TCAM_TX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P58_WC_TCAM,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = WC_TCAM_TX_MAX_SLICES,
 			.row_width   = WC_TCAM_TX_ROW_WIDTH,
 			.num_rows    = WC_TCAM_TX_NUM_ROWS,
@@ -432,16 +304,7 @@ cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.result_size = WC_TCAM_TX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P58_WC_TCAM,
 		},
-		{			/* AFM */
-			.max_slices  = SP_TCAM_TX_MAX_SLICES,
-			.row_width   = SP_TCAM_TX_ROW_WIDTH,
-			.num_rows    = SP_TCAM_TX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = SP_TCAM_TX_RESULT_SIZE,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = SP_TCAM_TX_MAX_SLICES,
 			.row_width   = SP_TCAM_TX_ROW_WIDTH,
 			.num_rows    = SP_TCAM_TX_NUM_ROWS,
@@ -450,16 +313,7 @@ cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.max_entries = SP_TCAM_TX_MAX_ENTRIES,
 			.result_size = SP_TCAM_TX_RESULT_SIZE,
 		},
-		{			/* AFM */
-			.max_slices  = CT_RULE_TCAM_TX_MAX_SLICES,
-			.row_width   = CT_RULE_TCAM_TX_ROW_WIDTH,
-			.num_rows    = CT_RULE_TCAM_TX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = CT_RULE_TCAM_RX_RESULT_SIZE,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = CT_RULE_TCAM_TX_MAX_SLICES,
 			.row_width   = CT_RULE_TCAM_TX_ROW_WIDTH,
 			.num_rows    = CT_RULE_TCAM_TX_NUM_ROWS,
@@ -473,17 +327,7 @@ cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.max_entries = CT_RULE_TCAM_TX_MAX_ENTRIES,
 			.result_size = CT_RULE_TCAM_RX_RESULT_SIZE,
 		},
-		{			/* AFM */
-			.max_slices  = VEB_TCAM_TX_MAX_SLICES,
-			.row_width   = VEB_TCAM_TX_ROW_WIDTH,
-			.num_rows    = VEB_TCAM_TX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = VEB_TCAM_RX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P58_VEB_TCAM,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = VEB_TCAM_TX_MAX_SLICES,
 			.row_width   = VEB_TCAM_TX_ROW_WIDTH,
 			.num_rows    = VEB_TCAM_TX_NUM_ROWS,
@@ -493,17 +337,7 @@ cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.result_size = VEB_TCAM_RX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P58_VEB_TCAM,
 		},
-		{			/* AFM */
-			.max_slices  = WC_TCAM_TX_MAX_SLICES,
-			.row_width   = WC_TCAM_TX_ROW_WIDTH,
-			.num_rows    = WC_TCAM_TX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = WC_TCAM_TX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P58_WC_TCAM,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = WC_TCAM_TX_MAX_SLICES,
 			.row_width   = WC_TCAM_TX_ROW_WIDTH,
 			.num_rows    = WC_TCAM_TX_NUM_ROWS,
@@ -513,17 +347,7 @@ cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
 			.result_size = WC_TCAM_TX_RESULT_SIZE,
 			.hcapi_type  = CFA_RESOURCE_TYPE_P58_WC_TCAM,
 		},
-		{			/* AFM */
-			.max_slices  = WC_TCAM_TX_MAX_SLICES,
-			.row_width   = WC_TCAM_TX_ROW_WIDTH,
-			.num_rows    = WC_TCAM_TX_NUM_ROWS,
-			.start_row   = 0,
-			.end_row     = 0,
-			.max_entries = 0,
-			.result_size = WC_TCAM_TX_RESULT_SIZE,
-			.hcapi_type  = CFA_RESOURCE_TYPE_P58_WC_TCAM,
-		},
-		{			/* APPS */
+		{
 			.max_slices  = WC_TCAM_TX_MAX_SLICES,
 			.row_width   = WC_TCAM_TX_ROW_WIDTH,
 			.num_rows    = WC_TCAM_TX_NUM_ROWS,
@@ -624,164 +448,92 @@ cfa_tcam_mgr_init_p58(struct tf *tfp)
 	       sizeof(tcam_mgr_data->cfa_tcam_mgr_tables));
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_L2_CTXT_TCAM_RX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_L2_CTXT_TCAM_RX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_L2_CTXT_TCAM_TX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_L2_CTXT_TCAM_TX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_L2_CTXT_TCAM_RX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_L2_CTXT_TCAM_RX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_L2_CTXT_TCAM_TX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_L2_CTXT_TCAM_TX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_PROF_TCAM_RX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_PROF_TCAM_RX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_PROF_TCAM_TX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_PROF_TCAM_TX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_WC_TCAM_RX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_WC_TCAM_RX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_WC_TCAM_TX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_WC_TCAM_TX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_SP_TCAM_RX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_SP_TCAM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_SP_TCAM_RX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_SP_TCAM_TX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_SP_TCAM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_SP_TCAM_TX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_CT_RULE_TCAM_RX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_CT_RULE_TCAM_RX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_CT_RULE_TCAM_TX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_CT_RULE_TCAM_TX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_VEB_TCAM_RX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_VEB_TCAM_RX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_VEB_TCAM_TX[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_VEB_TCAM_TX[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_WC_TCAM_RX_HIGH[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_WC_TCAM_RX_HIGH[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_WC_TCAM_TX_HIGH[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_WC_TCAM_TX_HIGH[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_WC_TCAM_RX_LOW[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_WC_TCAM_RX_LOW[0];
 
 	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_AFM].tcam_rows =
-		(struct cfa_tcam_mgr_table_rows_0 *)
-		&table_rows->table_rows_WC_TCAM_TX_LOW[0];
-	tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS].tcam_rows =
+		[CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW].tcam_rows =
 		(struct cfa_tcam_mgr_table_rows_0 *)
 		&table_rows->table_rows_WC_TCAM_TX_LOW[0];
 
diff --git a/drivers/net/bnxt/tf_core/tf_resources.c b/drivers/net/bnxt/tf_core/tf_resources.c
index d4fd3c2333..600149d77e 100644
--- a/drivers/net/bnxt/tf_core/tf_resources.c
+++ b/drivers/net/bnxt/tf_core/tf_resources.c
@@ -88,7 +88,7 @@ tf_tcam_mgr_row_entry_used(struct cfa_tcam_mgr_table_rows_0 *row,
 /* Initialize the resource usage buffer for WC-TCAM tables */
 void tf_tcam_usage_init(struct tf *tfp)
 {
-	enum cfa_tcam_mgr_tbl_type type = CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS;
+	enum cfa_tcam_mgr_tbl_type type = CFA_TCAM_MGR_TBL_TYPE_WC_TCAM;
 	struct cfa_tcam_mgr_table_data *table_data = NULL;
 	struct tf_resc_wc_tcam_usage *usage_data = NULL;
 	struct cfa_tcam_mgr_data *tcam_mgr_data;
@@ -169,7 +169,7 @@ int tf_tcam_usage_update(struct tf *tfp,
 		return -1;
 
 	/* Support WC-TCAM APPs only */
-	if (tcam_tbl_type != CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS)
+	if (tcam_tbl_type != CFA_TCAM_MGR_TBL_TYPE_WC_TCAM)
 		return 0;
 
 	resc_usage_control.buffer_dirty[dir] = 1;
diff --git a/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c b/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c
index 8c1e6d2e0f..8cf4d4d1fb 100644
--- a/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c
+++ b/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c
@@ -17,23 +17,23 @@
  */
 static enum cfa_tcam_mgr_tbl_type tcam_types[TF_TCAM_TBL_TYPE_MAX] = {
 	[TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH] =
-		CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_APPS,
+		CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH,
 	[TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW]  =
-		CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_APPS,
+		CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW,
 	[TF_TCAM_TBL_TYPE_PROF_TCAM]	     =
-		CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_APPS,
+		CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM,
 	[TF_TCAM_TBL_TYPE_WC_TCAM]	     =
-		CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS,
+		CFA_TCAM_MGR_TBL_TYPE_WC_TCAM,
 	[TF_TCAM_TBL_TYPE_SP_TCAM]	     =
-		CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_APPS,
+		CFA_TCAM_MGR_TBL_TYPE_SP_TCAM,
 	[TF_TCAM_TBL_TYPE_CT_RULE_TCAM]	     =
-		CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_APPS,
+		CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM,
 	[TF_TCAM_TBL_TYPE_VEB_TCAM]	     =
-		CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_APPS,
+		CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM,
 	[TF_TCAM_TBL_TYPE_WC_TCAM_HIGH]      =
-		CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS,
+		CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH,
 	[TF_TCAM_TBL_TYPE_WC_TCAM_LOW]       =
-		CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS,
+		CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW,
 };
 
 static uint16_t hcapi_type[TF_TCAM_TBL_TYPE_MAX];
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 10/47] net/bnxt: tf_core: remove dead code from session-based priority TCAM mgr
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (8 preceding siblings ...)
  2024-10-01  5:57 ` [PATCH v3 09/47] net/bnxt: tf_core: remove dead AFM code from session-based priority TCAM mgr Sriharsha Basavapatna
@ 2024-10-01  5:57 ` Sriharsha Basavapatna
  2024-10-01  5:57 ` [PATCH v3 13/47] net/bnxt: tf_ulp: add custom l2 etype tunnel support Sriharsha Basavapatna
                   ` (23 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:57 UTC (permalink / raw)
  To: dev
  Cc: Randy Schacher, Sriharsha Basavapatna, Peter Spreadborough,
	Manish Kurup, Farah Smith, Ajit Khaparde

From: Randy Schacher <stuart.schacher@broadcom.com>

Remove references to tx_tcam_supported and rx_tcam_supported
logic which chooses between FW-based tcam resource allocation
and driver-based tcam manager.

Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Reviewed-by: Manish Kurup <manish.kurup@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_core/cfa_tcam_mgr.c    |  46 ----
 drivers/net/bnxt/tf_core/cfa_tcam_mgr.h    |  29 --
 drivers/net/bnxt/tf_core/tf_session.h      |   5 -
 drivers/net/bnxt/tf_core/tf_tcam.c         | 294 +--------------------
 drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c |  28 --
 drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.h |   6 -
 6 files changed, 8 insertions(+), 400 deletions(-)

diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c
index 380e828da8..3875a0b934 100644
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c
+++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c
@@ -1079,52 +1079,6 @@ cfa_tcam_mgr_init(struct tf *tfp, enum cfa_tcam_mgr_device_type type,
 	return 0;
 }
 
-int
-cfa_tcam_mgr_qcaps(struct tf *tfp __rte_unused,
-		   struct cfa_tcam_mgr_qcaps_parms *parms)
-{
-	struct cfa_tcam_mgr_data *tcam_mgr_data;
-	struct tf_session *tfs;
-	unsigned int type;
-	int rc;
-
-	CFA_TCAM_MGR_CHECK_PARMS2(tfp, parms);
-
-	rc = tf_session_get_session_internal(tfp, &tfs);
-	if (rc)
-		return rc;
-
-	tcam_mgr_data = tfs->tcam_mgr_handle;
-	if (!tcam_mgr_data) {
-		CFA_TCAM_MGR_LOG_0(ERR, "No TCAM data created for session.\n");
-		return -CFA_TCAM_MGR_ERR_CODE(PERM);
-	}
-
-	/*
-	 * This code will indicate if TCAM Manager is managing a logical TCAM
-	 * table or not.  If not, then the physical TCAM will have to be
-	 * accessed using the traditional methods.
-	 */
-	parms->rx_tcam_supported = 0;
-	parms->tx_tcam_supported = 0;
-	for (type = 0; type < CFA_TCAM_MGR_TBL_TYPE_MAX; type++) {
-		if (tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-				[type].max_entries > 0 &&
-		    tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-				[type].hcapi_type > 0)
-			parms->rx_tcam_supported |=
-				1 << cfa_tcam_mgr_get_phys_table_type(type);
-		if (tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-				[type].max_entries > 0 &&
-		    tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-				[type].hcapi_type > 0)
-			parms->tx_tcam_supported |=
-				1 << cfa_tcam_mgr_get_phys_table_type(type);
-	}
-
-	return 0;
-}
-
 static
 int cfa_tcam_mgr_validate_tcam_cnt(struct tf *tfp  __rte_unused,
 				   struct cfa_tcam_mgr_data *tcam_mgr_data,
diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.h b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.h
index 25654a8351..1cbd25e7d1 100644
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.h
+++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.h
@@ -122,18 +122,6 @@ struct cfa_tcam_mgr_init_parms {
 	uint32_t max_entries;
 };
 
-/**
- * TCAM Manager initialization parameters
- */
-struct cfa_tcam_mgr_qcaps_parms {
-	/**
-	 * [out] Bitmasks.  Set if TCAM Manager is managing a logical TCAM.
-	 * Each bitmask is indexed by logical TCAM table ID.
-	 */
-	uint32_t rx_tcam_supported;
-	uint32_t tx_tcam_supported;
-};
-
 /**
  * TCAM Manager configuration parameters
  */
@@ -369,23 +357,6 @@ cfa_tcam_mgr_init(struct tf *tfp, enum cfa_tcam_mgr_device_type type,
 int
 cfa_tcam_mgr_get_phys_table_type(enum cfa_tcam_mgr_tbl_type type);
 
-/**
- * Queries the capabilities of TCAM Manager.
- *
- * [in] context
- *   Pointer to context information
- *
- * [out] parms
- *   Pointer to parameters to be returned
- *
- * Returns
- *   - (0) if successful.
- *   - (<0) on failure.
- */
-int
-cfa_tcam_mgr_qcaps(struct tf *tfp __rte_unused,
-		   struct cfa_tcam_mgr_qcaps_parms *parms);
-
 /**
  * Initializes the TCAM module with the requested DBs. Must be
  * invoked as the first thing before any of the access functions.
diff --git a/drivers/net/bnxt/tf_core/tf_session.h b/drivers/net/bnxt/tf_core/tf_session.h
index d46d89e9e9..7668e9d0e0 100644
--- a/drivers/net/bnxt/tf_core/tf_session.h
+++ b/drivers/net/bnxt/tf_core/tf_session.h
@@ -174,11 +174,6 @@ struct tf_session {
 	 */
 	uint16_t wc_num_slices_per_row;
 
-	/**
-	 * Indicates if TCAM is controlled by TCAM Manager
-	 */
-	int tcam_mgr_control[TF_DIR_MAX][TF_TCAM_TBL_TYPE_MAX];
-
 	/**
 	 * TCAM Manager handle pointing to session based tcam memory
 	 */
diff --git a/drivers/net/bnxt/tf_core/tf_tcam.c b/drivers/net/bnxt/tf_core/tf_tcam.c
index fa8f60777d..e9bff62f88 100644
--- a/drivers/net/bnxt/tf_core/tf_tcam.c
+++ b/drivers/net/bnxt/tf_core/tf_tcam.c
@@ -37,9 +37,6 @@ tf_tcam_bind(struct tf *tfp,
 	struct tcam_rm_db *tcam_db;
 	struct tfp_calloc_parms cparms;
 	struct tf_resource_info resv_res[TF_DIR_MAX][TF_TCAM_TBL_TYPE_MAX];
-	uint32_t rx_supported;
-	uint32_t tx_supported;
-	bool no_req = true;
 
 	TF_CHECK_PARMS2(tfp, parms);
 
@@ -167,39 +164,16 @@ tf_tcam_bind(struct tf *tfp,
 	if (rc)
 		return rc;
 
-	rc = tf_tcam_mgr_qcaps_msg(tfp, dev,
-				   &rx_supported, &tx_supported);
-	if (rc)
-		return rc;
-
-	for (t = 0; t < TF_TCAM_TBL_TYPE_MAX; t++) {
-		if (rx_supported & 1 << t)
-			tfs->tcam_mgr_control[TF_DIR_RX][t] = 1;
-		if (tx_supported & 1 << t)
-			tfs->tcam_mgr_control[TF_DIR_TX][t] = 1;
-	}
-
 	/*
 	 * Make a local copy of tcam_cnt with only resources not managed by TCAM
 	 * Manager requested.
 	 */
 	memcpy(&local_tcam_cnt, tcam_cnt, sizeof(local_tcam_cnt));
 	tcam_cnt = local_tcam_cnt;
-	for (d = 0; d < TF_DIR_MAX; d++) {
-		for (t = 0; t < TF_TCAM_TBL_TYPE_MAX; t++) {
-			/* If controlled by TCAM Manager */
-			if (tfs->tcam_mgr_control[d][t])
-				tcam_cnt[d].cnt[t] = 0;
-			else if (tcam_cnt[d].cnt[t] > 0)
-				no_req = false;
-		}
-	}
-
-	/* If no resources left to request */
-	if (no_req)
-		goto finished;
+	for (d = 0; d < TF_DIR_MAX; d++)
+		for (t = 0; t < TF_TCAM_TBL_TYPE_MAX; t++)
+			tcam_cnt[d].cnt[t] = 0;
 
-finished:
 	TFP_DRV_LOG(INFO,
 		    "TCAM - initialized\n");
 
@@ -274,14 +248,10 @@ int
 tf_tcam_alloc(struct tf *tfp,
 	      struct tf_tcam_alloc_parms *parms)
 {
-	int rc, i;
+	int rc;
 	struct tf_session *tfs;
 	struct tf_dev_info *dev;
-	struct tf_rm_allocate_parms aparms;
 	uint16_t num_slices = 1;
-	uint32_t index;
-	struct tcam_rm_db *tcam_db;
-	void *tcam_db_ptr = NULL;
 
 	TF_CHECK_PARMS2(tfp, parms);
 
@@ -312,43 +282,7 @@ tf_tcam_alloc(struct tf *tfp,
 	if (rc)
 		return rc;
 
-	/* If TCAM controlled by TCAM Manager */
-	if (tfs->tcam_mgr_control[parms->dir][parms->type])
-		return tf_tcam_mgr_alloc_msg(tfp, dev, parms);
-	rc = tf_session_get_db(tfp, TF_MODULE_TYPE_TCAM, &tcam_db_ptr);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			    "Failed to get tcam_db from session, rc:%s\n",
-			    strerror(-rc));
-		return rc;
-	}
-	tcam_db = (struct tcam_rm_db *)tcam_db_ptr;
-
-	/*
-	 * For WC TCAM, number of slices could be 4, 2, 1 based on
-	 * the key_size. For other TCAM, it is always 1
-	 */
-	for (i = 0; i < num_slices; i++) {
-		memset(&aparms, 0, sizeof(aparms));
-		aparms.rm_db = tcam_db->tcam_db[parms->dir];
-		aparms.subtype = parms->type;
-		aparms.priority = parms->priority;
-		aparms.index = &index;
-		rc = tf_rm_allocate(&aparms);
-		if (rc) {
-			TFP_DRV_LOG(ERR,
-				    "%s: Failed tcam, type:%d\n",
-				    tf_dir_2_str(parms->dir),
-				    parms->type);
-			return rc;
-		}
-
-		/* return the start index of each row */
-			if (i == 0)
-				parms->idx = index;
-	}
-
-	return 0;
+	return tf_tcam_mgr_alloc_msg(tfp, dev, parms);
 }
 
 int
@@ -358,14 +292,7 @@ tf_tcam_free(struct tf *tfp,
 	int rc;
 	struct tf_session *tfs;
 	struct tf_dev_info *dev;
-	struct tf_rm_is_allocated_parms aparms;
-	struct tf_rm_free_parms fparms;
-	struct tf_rm_get_hcapi_parms hparms;
 	uint16_t num_slices = 1;
-	int allocated = 0;
-	int i;
-	struct tcam_rm_db *tcam_db;
-	void *tcam_db_ptr = NULL;
 
 	TF_CHECK_PARMS2(tfp, parms);
 
@@ -396,91 +323,7 @@ tf_tcam_free(struct tf *tfp,
 	if (rc)
 		return rc;
 
-	/* If TCAM controlled by TCAM Manager */
-	if (tfs->tcam_mgr_control[parms->dir][parms->type])
-		/*
-		 * If a session can have multiple references to an entry, check
-		 * the reference count here before actually freeing the entry.
-		 */
-		return tf_tcam_mgr_free_msg(tfp, dev, parms);
-
-	if (parms->idx % num_slices) {
-		TFP_DRV_LOG(ERR,
-			    "%s: TCAM reserved resource is not multiple of %d\n",
-			    tf_dir_2_str(parms->dir),
-			    num_slices);
-		return -EINVAL;
-	}
-
-	rc = tf_session_get_db(tfp, TF_MODULE_TYPE_TCAM, &tcam_db_ptr);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			    "Failed to get em_ext_db from session, rc:%s\n",
-			    strerror(-rc));
-		return rc;
-	}
-	tcam_db = (struct tcam_rm_db *)tcam_db_ptr;
-
-	/* Check if element is in use */
-	memset(&aparms, 0, sizeof(aparms));
-	aparms.rm_db = tcam_db->tcam_db[parms->dir];
-	aparms.subtype = parms->type;
-	aparms.index = parms->idx;
-	aparms.allocated = &allocated;
-	rc = tf_rm_is_allocated(&aparms);
-	if (rc)
-		return rc;
-
-	if (allocated != TF_RM_ALLOCATED_ENTRY_IN_USE) {
-		TFP_DRV_LOG(ERR,
-			    "%s: Entry already free, type:%d, index:%d\n",
-			    tf_dir_2_str(parms->dir),
-			    parms->type,
-			    parms->idx);
-		return -EINVAL;
-	}
-
-	for (i = 0; i < num_slices; i++) {
-		/* Free requested element */
-		memset(&fparms, 0, sizeof(fparms));
-		fparms.rm_db = tcam_db->tcam_db[parms->dir];
-		fparms.subtype = parms->type;
-		fparms.index = parms->idx + i;
-		rc = tf_rm_free(&fparms);
-		if (rc) {
-			TFP_DRV_LOG(ERR,
-				    "%s: Free failed, type:%d, index:%d\n",
-				    tf_dir_2_str(parms->dir),
-				    parms->type,
-				    parms->idx);
-			return rc;
-		}
-	}
-
-	/* Convert TF type to HCAPI RM type */
-	memset(&hparms, 0, sizeof(hparms));
-
-	hparms.rm_db = tcam_db->tcam_db[parms->dir];
-	hparms.subtype = parms->type;
-	hparms.hcapi_type = &parms->hcapi_type;
-
-	rc = tf_rm_get_hcapi_type(&hparms);
-	if (rc)
-		return rc;
-
-	rc = tf_msg_tcam_entry_free(tfp, dev, parms);
-	if (rc) {
-		/* Log error */
-		TFP_DRV_LOG(ERR,
-			    "%s: %s: Entry %d free failed, rc:%s\n",
-			    tf_dir_2_str(parms->dir),
-			    tf_tcam_tbl_2_str(parms->type),
-			    parms->idx,
-			    strerror(-rc));
-		return rc;
-	}
-
-	return 0;
+	return tf_tcam_mgr_free_msg(tfp, dev, parms);
 }
 
 int
@@ -490,12 +333,7 @@ tf_tcam_set(struct tf *tfp __rte_unused,
 	int rc;
 	struct tf_session *tfs;
 	struct tf_dev_info *dev;
-	struct tf_rm_is_allocated_parms aparms;
-	struct tf_rm_get_hcapi_parms hparms;
 	uint16_t num_slice_per_row = 1;
-	int allocated = 0;
-	struct tcam_rm_db *tcam_db;
-	void *tcam_db_ptr = NULL;
 
 	TF_CHECK_PARMS2(tfp, parms);
 
@@ -526,62 +364,7 @@ tf_tcam_set(struct tf *tfp __rte_unused,
 	if (rc)
 		return rc;
 
-	/* If TCAM controlled by TCAM Manager */
-	if (tfs->tcam_mgr_control[parms->dir][parms->type])
-		return tf_tcam_mgr_set_msg(tfp, dev, parms);
-
-	rc = tf_session_get_db(tfp, TF_MODULE_TYPE_TCAM, &tcam_db_ptr);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			    "Failed to get em_ext_db from session, rc:%s\n",
-			    strerror(-rc));
-		return rc;
-	}
-	tcam_db = (struct tcam_rm_db *)tcam_db_ptr;
-
-	/* Check if element is in use */
-	memset(&aparms, 0, sizeof(aparms));
-
-	aparms.rm_db = tcam_db->tcam_db[parms->dir];
-	aparms.subtype = parms->type;
-	aparms.index = parms->idx;
-	aparms.allocated = &allocated;
-	rc = tf_rm_is_allocated(&aparms);
-	if (rc)
-		return rc;
-
-	if (allocated != TF_RM_ALLOCATED_ENTRY_IN_USE) {
-		TFP_DRV_LOG(ERR,
-			    "%s: Entry is not allocated, type:%d, index:%d\n",
-			    tf_dir_2_str(parms->dir),
-			    parms->type,
-			    parms->idx);
-		return -EINVAL;
-	}
-
-	/* Convert TF type to HCAPI RM type */
-	memset(&hparms, 0, sizeof(hparms));
-
-	hparms.rm_db = tcam_db->tcam_db[parms->dir];
-	hparms.subtype = parms->type;
-	hparms.hcapi_type = &parms->hcapi_type;
-
-	rc = tf_rm_get_hcapi_type(&hparms);
-	if (rc)
-		return rc;
-
-	rc = tf_msg_tcam_entry_set(tfp, dev, parms);
-	if (rc) {
-		/* Log error */
-		TFP_DRV_LOG(ERR,
-			    "%s: %s: Entry %d set failed, rc:%s",
-			    tf_dir_2_str(parms->dir),
-			    tf_tcam_tbl_2_str(parms->type),
-			    parms->idx,
-			    strerror(-rc));
-		return rc;
-	}
-	return 0;
+	return tf_tcam_mgr_set_msg(tfp, dev, parms);
 }
 
 int
@@ -591,11 +374,6 @@ tf_tcam_get(struct tf *tfp __rte_unused,
 	int rc;
 	struct tf_session *tfs;
 	struct tf_dev_info *dev;
-	struct tf_rm_is_allocated_parms aparms;
-	struct tf_rm_get_hcapi_parms hparms;
-	int allocated = 0;
-	struct tcam_rm_db *tcam_db;
-	void *tcam_db_ptr = NULL;
 
 	TF_CHECK_PARMS2(tfp, parms);
 
@@ -609,63 +387,7 @@ tf_tcam_get(struct tf *tfp __rte_unused,
 	if (rc)
 		return rc;
 
-	/* If TCAM controlled by TCAM Manager */
-	if (tfs->tcam_mgr_control[parms->dir][parms->type])
-		return tf_tcam_mgr_get_msg(tfp, dev, parms);
-
-	rc = tf_session_get_db(tfp, TF_MODULE_TYPE_TCAM, &tcam_db_ptr);
-	if (rc) {
-		TFP_DRV_LOG(ERR,
-			    "Failed to get em_ext_db from session, rc:%s\n",
-			    strerror(-rc));
-		return rc;
-	}
-	tcam_db = (struct tcam_rm_db *)tcam_db_ptr;
-
-	/* Check if element is in use */
-	memset(&aparms, 0, sizeof(aparms));
-
-	aparms.rm_db = tcam_db->tcam_db[parms->dir];
-	aparms.subtype = parms->type;
-	aparms.index = parms->idx;
-	aparms.allocated = &allocated;
-	rc = tf_rm_is_allocated(&aparms);
-	if (rc)
-		return rc;
-
-	if (allocated != TF_RM_ALLOCATED_ENTRY_IN_USE) {
-		TFP_DRV_LOG(ERR,
-			    "%s: Entry is not allocated, type:%d, index:%d\n",
-			    tf_dir_2_str(parms->dir),
-			    parms->type,
-			    parms->idx);
-		return -EINVAL;
-	}
-
-	/* Convert TF type to HCAPI RM type */
-	memset(&hparms, 0, sizeof(hparms));
-
-	hparms.rm_db = tcam_db->tcam_db[parms->dir];
-	hparms.subtype = parms->type;
-	hparms.hcapi_type = &parms->hcapi_type;
-
-	rc = tf_rm_get_hcapi_type(&hparms);
-	if (rc)
-		return rc;
-
-	rc = tf_msg_tcam_entry_get(tfp, dev, parms);
-	if (rc) {
-		/* Log error */
-		TFP_DRV_LOG(ERR,
-			    "%s: %s: Entry %d set failed, rc:%s",
-			    tf_dir_2_str(parms->dir),
-			    tf_tcam_tbl_2_str(parms->type),
-			    parms->idx,
-			    strerror(-rc));
-		return rc;
-	}
-
-	return 0;
+	return tf_tcam_mgr_get_msg(tfp, dev, parms);
 }
 
 int
diff --git a/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c b/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c
index 8cf4d4d1fb..9e5d39fde5 100644
--- a/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c
+++ b/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c
@@ -38,34 +38,6 @@ static enum cfa_tcam_mgr_tbl_type tcam_types[TF_TCAM_TBL_TYPE_MAX] = {
 
 static uint16_t hcapi_type[TF_TCAM_TBL_TYPE_MAX];
 
-/*
- * This is the glue between the core tf_tcam and the TCAM manager.  It is
- * intended to abstract out the location of the TCAM manager so that the core
- * code will be the same if the TCAM manager is in the core or in firmware.
- *
- * If the TCAM manager is in the core, then this file will just translate to
- * TCAM manager APIs.  If TCAM manager is in firmware, then this file will cause
- * messages to be sent (except for bind and unbind).
- */
-
-int
-tf_tcam_mgr_qcaps_msg(struct tf *tfp,
-		      struct tf_dev_info *dev __rte_unused,
-		      uint32_t *rx_tcam_supported,
-		      uint32_t *tx_tcam_supported)
-{
-	struct cfa_tcam_mgr_qcaps_parms mgr_parms;
-	int rc;
-
-	memset(&mgr_parms, 0, sizeof(mgr_parms));
-	rc = cfa_tcam_mgr_qcaps(tfp, &mgr_parms);
-	if (rc >= 0) {
-		*rx_tcam_supported = mgr_parms.rx_tcam_supported;
-		*tx_tcam_supported = mgr_parms.tx_tcam_supported;
-	}
-	return rc;
-}
-
 int
 tf_tcam_mgr_bind_msg(struct tf *tfp,
 		     struct tf_dev_info *dev __rte_unused,
diff --git a/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.h b/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.h
index 8a8d136f5e..eb4617049a 100644
--- a/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.h
+++ b/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.h
@@ -9,12 +9,6 @@
 #include "tf_tcam.h"
 #include "tf_rm.h"
 
-int
-tf_tcam_mgr_qcaps_msg(struct tf *tfp,
-		      struct tf_dev_info *dev __rte_unused,
-		      uint32_t *rx_tcam_supported,
-		      uint32_t *tx_tcam_supported);
-
 int
 tf_tcam_mgr_bind_msg(struct tf *tfp,
 		     struct tf_dev_info *dev,
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 13/47] net/bnxt: tf_ulp: add custom l2 etype tunnel support
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (9 preceding siblings ...)
  2024-10-01  5:57 ` [PATCH v3 10/47] net/bnxt: tf_core: remove dead " Sriharsha Basavapatna
@ 2024-10-01  5:57 ` Sriharsha Basavapatna
  2024-10-01  5:58 ` [PATCH v3 14/47] net/bnxt: tf_ulp: add support for vf to vf flow offload Sriharsha Basavapatna
                   ` (22 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:57 UTC (permalink / raw)
  To: dev
  Cc: Shahaji Bhosle, Sriharsha Basavapatna, Kishore Padmanabha, Ajit Khaparde

From: Shahaji Bhosle <sbhosle@broadcom.com>

Add hooks in the hwrm and ulp layer to enable,
custom tunnel header support on wh+ generic app(ovs).

Signed-off-by: Shahaji Bhosle <sbhosle@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt.h            |  4 +++
 drivers/net/bnxt/bnxt_hwrm.c       | 18 ++++++++++
 drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 54 ++++++++++++++++++++++++++++++
 drivers/net/bnxt/tf_ulp/bnxt_ulp.h |  3 ++
 4 files changed, 79 insertions(+)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 00123e51ac..b905d9fd3e 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -988,13 +988,17 @@ struct bnxt {
 	uint8_t			vxlan_port_cnt;
 	uint8_t			geneve_port_cnt;
 	uint8_t			ecpri_port_cnt;
+	uint8_t			l2_etype_tunnel_cnt;
 	uint16_t		vxlan_port;
 	uint16_t		geneve_port;
 	uint16_t		ecpri_port;
 	uint16_t		vxlan_fw_dst_port_id;
 	uint16_t		geneve_fw_dst_port_id;
 	uint16_t		ecpri_fw_dst_port_id;
+#define BNXT_L2_ETYPE_TUNNEL_ID 0xFFFF /* CUSTOM L2 ENCAP - VF representors */
+	uint16_t		l2_etype_tunnel_id;
 	uint16_t		ecpri_upar_in_use;
+	uint8_t			l2_etype_upar_in_use;
 	uint32_t		fw_ver;
 	uint32_t		hwrm_spec_code;
 
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 4e62dbbcca..778488ce1a 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -3515,6 +3515,10 @@ bnxt_free_tunnel_ports(struct bnxt *bp)
 	if (bp->ecpri_port_cnt)
 		bnxt_hwrm_tunnel_dst_port_free(bp, bp->ecpri_fw_dst_port_id,
 			HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_ECPRI);
+
+	if (bp->l2_etype_tunnel_cnt)
+		bnxt_hwrm_tunnel_dst_port_free(bp, bp->l2_etype_tunnel_id,
+			HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_L2_ETYPE);
 }
 
 void bnxt_free_all_hwrm_resources(struct bnxt *bp)
@@ -4811,6 +4815,10 @@ int bnxt_hwrm_tunnel_dst_port_alloc(struct bnxt *bp, uint16_t port,
 		bp->ecpri_port = port;
 		bp->ecpri_upar_in_use = resp->upar_in_use;
 		break;
+	case HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_L2_ETYPE:
+		bp->l2_etype_tunnel_id = port;
+		bp->l2_etype_upar_in_use = resp->upar_in_use;
+		break;
 	default:
 		break;
 	}
@@ -4841,6 +4849,9 @@ int bnxt_hwrm_tunnel_upar_id_get(struct bnxt *bp, uint8_t *upar_id,
 	case HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_SRV6:
 		*upar_id = resp->upar_in_use;
 		break;
+	case HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_L2_ETYPE:
+		*upar_id = resp->upar_in_use;
+		break;
 	default:
 		/* INVALID UPAR Id if another tunnel type tries to retrieve */
 		*upar_id = 0xff;
@@ -4887,6 +4898,13 @@ int bnxt_hwrm_tunnel_dst_port_free(struct bnxt *bp, uint16_t port,
 		bp->ecpri_port_cnt = 0;
 	}
 
+	if (tunnel_type ==
+	    HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_L2_ETYPE) {
+		bp->l2_etype_tunnel_cnt = 0;
+		bp->l2_etype_tunnel_id = 0;
+		bp->l2_etype_upar_in_use = 0;
+	}
+
 	bnxt_hwrm_set_tpa(bp);
 	return rc;
 }
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
index 96a5353aaf..912946303a 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
@@ -454,6 +454,10 @@ bnxt_ulp_cntxt_app_caps_init(struct bnxt *bp,
 			}
 		}
 
+		if (info[i].flags & BNXT_ULP_APP_CAP_L2_ETYPE)
+			ulp_ctx->cfg_data->ulp_flags |=
+				BNXT_ULP_APP_L2_ETYPE;
+
 		bnxt_ulp_vxlan_ip_port_set(ulp_ctx, info[i].vxlan_ip_port);
 		bnxt_ulp_vxlan_port_set(ulp_ctx, info[i].vxlan_port);
 		bnxt_ulp_ecpri_udp_port_set(ulp_ctx, info[i].ecpri_udp_port);
@@ -1795,6 +1799,29 @@ bnxt_ulp_init(struct bnxt *bp,
 	return rc;
 }
 
+static int
+ulp_l2_etype_tunnel_alloc(struct bnxt *bp)
+{
+	int rc = 0;
+
+	if (!ULP_APP_L2_ETYPE_SUPPORT(bp->ulp_ctx))
+		return rc;
+
+	if (bp->l2_etype_tunnel_cnt) {
+		BNXT_TF_DBG(DEBUG, "L2 ETYPE Custom Tunnel already allocated\n");
+		return rc;
+	}
+	rc = bnxt_tunnel_dst_port_alloc(bp,
+					BNXT_L2_ETYPE_TUNNEL_ID,
+					HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_L2_ETYPE);
+	if (rc)
+		BNXT_TF_DBG(ERR, "Failed to set global L2 ETYPE Custom Tunnel\n");
+	else
+		bp->l2_etype_tunnel_cnt++;
+
+	return rc;
+}
+
 static int
 ulp_cust_vxlan_alloc(struct bnxt *bp)
 {
@@ -1943,6 +1970,10 @@ bnxt_ulp_port_init(struct bnxt *bp)
 	if (rc)
 		goto jump_to_error;
 
+	rc = ulp_l2_etype_tunnel_alloc(bp);
+	if (rc)
+		goto jump_to_error;
+
 	return rc;
 
 jump_to_error:
@@ -1950,6 +1981,28 @@ bnxt_ulp_port_init(struct bnxt *bp)
 	return rc;
 }
 
+static void
+ulp_l2_etype_tunnel_free(struct bnxt *bp)
+{
+	int rc;
+
+	if (!ULP_APP_L2_ETYPE_SUPPORT(bp->ulp_ctx))
+		return;
+
+	if (bp->l2_etype_tunnel_cnt == 0) {
+		BNXT_TF_DBG(DEBUG, "L2 ETYPE Custom Tunnel already freed\n");
+		return;
+	}
+
+	rc = bnxt_tunnel_dst_port_free(bp,
+				       BNXT_L2_ETYPE_TUNNEL_ID,
+				       HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_L2_ETYPE);
+	if (rc)
+		BNXT_TF_DBG(ERR, "Failed to clear L2 ETYPE Custom Tunnel\n");
+
+	bp->l2_etype_tunnel_cnt--;
+}
+
 static void
 ulp_cust_vxlan_free(struct bnxt *bp)
 {
@@ -2026,6 +2079,7 @@ bnxt_ulp_port_deinit(struct bnxt *bp)
 		if (bp->ulp_ctx->cfg_data->ref_cnt) {
 			/* Free tunnel configurations */
 			ulp_cust_vxlan_free(bp);
+			ulp_l2_etype_tunnel_free(bp);
 
 			/* free the port details */
 			/* Free the default flow rule associated to this port */
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.h b/drivers/net/bnxt/tf_ulp/bnxt_ulp.h
index d42382d947..8b75120926 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.h
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.h
@@ -40,6 +40,7 @@
 #define BNXT_ULP_CUST_VXLAN_SUPPORT	0x100
 #define BNXT_ULP_MULTI_SHARED_SUPPORT	0x200
 #define BNXT_ULP_APP_HA_DYNAMIC		0x400
+#define BNXT_ULP_APP_L2_ETYPE		0x800
 
 #define ULP_VF_REP_IS_ENABLED(flag)	((flag) & BNXT_ULP_VF_REP_ENABLED)
 #define ULP_SHARED_SESSION_IS_ENABLED(flag) ((flag) &\
@@ -60,6 +61,8 @@
 #define ULP_APP_CUST_VXLAN_SUPPORT(ctx)	   ((ctx)->cfg_data->vxlan_port != 0)
 #define ULP_APP_VXLAN_GPE_SUPPORT(ctx)     ((ctx)->cfg_data->vxlan_gpe_port != 0)
 #define ULP_APP_CUST_VXLAN_IP_SUPPORT(ctx) ((ctx)->cfg_data->vxlan_ip_port != 0)
+#define ULP_APP_L2_ETYPE_SUPPORT(ctx)	((ctx)->cfg_data->ulp_flags &\
+					BNXT_ULP_APP_L2_ETYPE)
 
 enum bnxt_ulp_flow_mem_type {
 	BNXT_ULP_FLOW_MEM_TYPE_INT = 0,
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 14/47] net/bnxt: tf_ulp: add support for vf to vf flow offload
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (10 preceding siblings ...)
  2024-10-01  5:57 ` [PATCH v3 13/47] net/bnxt: tf_ulp: add custom l2 etype tunnel support Sriharsha Basavapatna
@ 2024-10-01  5:58 ` Sriharsha Basavapatna
  2024-10-01  5:58 ` [PATCH v3 15/47] net/bnxt: tf_ulp: Wh+ mirroring support Sriharsha Basavapatna
                   ` (21 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:58 UTC (permalink / raw)
  To: dev
  Cc: Kishore Padmanabha, Sriharsha Basavapatna, Shahaji Bhosle, Ajit Khaparde

From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>

Added support for the vf to vf flow offload for the whitney platform.
It includes the change of the pipeline from using vlan tags to using
custom L2 encap and decap of the packets.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/bnxt_ulp.c      |  5 ++++
 drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c | 32 +++++++++++++++++++++++++
 drivers/net/bnxt/tf_ulp/ulp_def_rules.c | 26 ++++++++++++++++++++
 drivers/net/bnxt/tf_ulp/ulp_mapper.c    |  6 +++++
 drivers/net/bnxt/tf_ulp/ulp_port_db.c   | 32 +++++++++++++++++++++++++
 drivers/net/bnxt/tf_ulp/ulp_port_db.h   | 13 ++++++++++
 6 files changed, 114 insertions(+)

diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
index 912946303a..3f0a5f2300 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
@@ -1927,6 +1927,11 @@ bnxt_ulp_port_init(struct bnxt *bp)
 		}
 	}
 
+	/* setup the l2 etype tunnel for custom l2 encap/decap */
+	rc = ulp_l2_etype_tunnel_alloc(bp);
+	if (rc)
+		goto jump_to_error;
+
 	/* Update bnxt driver flags */
 	rc = ulp_dparms_dev_port_intf_update(bp, bp->ulp_ctx);
 	if (rc) {
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c
index ad04644db4..2f159ae486 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c
@@ -606,6 +606,38 @@ bnxt_ulp_action_handle_create(struct rte_eth_dev *dev,
 					    BNXT_ULP_DIR_EGRESS);
 	}
 
+	/* perform the conversion from dpdk port to bnxt ifindex */
+	if (ulp_port_db_dev_port_to_ulp_index(ulp_ctx,
+					      dev->data->port_id,
+					      &ifindex)) {
+		BNXT_TF_DBG(ERR, "Port id is not valid\n");
+		goto parse_error;
+	}
+	port_type = ulp_port_db_port_type_get(ulp_ctx, ifindex);
+	if (port_type == BNXT_ULP_INTF_TYPE_INVALID) {
+		BNXT_TF_DBG(ERR, "Port type is not valid\n");
+		goto parse_error;
+	}
+
+	bnxt_ulp_init_parser_cf_defaults(&params, dev->data->port_id);
+
+	/* Emulating the match port for direction processing */
+	ULP_COMP_FLD_IDX_WR(&params, BNXT_ULP_CF_IDX_MATCH_PORT_TYPE,
+			    port_type);
+
+	if ((params.dir_attr & BNXT_ULP_FLOW_ATTR_INGRESS) &&
+	    port_type == BNXT_ULP_INTF_TYPE_VF_REP) {
+		ULP_COMP_FLD_IDX_WR(&params, BNXT_ULP_CF_IDX_DIRECTION,
+				    BNXT_ULP_DIR_EGRESS);
+	} else {
+		/* Assign the input direction */
+		if (params.dir_attr & BNXT_ULP_FLOW_ATTR_INGRESS)
+			ULP_COMP_FLD_IDX_WR(&params, BNXT_ULP_CF_IDX_DIRECTION,
+					    BNXT_ULP_DIR_INGRESS);
+		else
+			ULP_COMP_FLD_IDX_WR(&params, BNXT_ULP_CF_IDX_DIRECTION,
+					    BNXT_ULP_DIR_EGRESS);
+	}
 	/* Parse the shared action */
 	ret = bnxt_ulp_rte_parser_act_parse(actions, &params);
 	if (ret != BNXT_TF_RC_SUCCESS)
diff --git a/drivers/net/bnxt/tf_ulp/ulp_def_rules.c b/drivers/net/bnxt/tf_ulp/ulp_def_rules.c
index 8237dbd294..e2d281130e 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_def_rules.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_def_rules.c
@@ -12,6 +12,10 @@
 #include "ulp_flow_db.h"
 #include "ulp_mapper.h"
 
+static void
+ulp_l2_custom_tunnel_id_update(struct bnxt *bp,
+			       struct bnxt_ulp_mapper_create_parms *params);
+
 struct bnxt_ulp_def_param_handler {
 	int32_t (*vfr_func)(struct bnxt_ulp_context *ulp_ctx,
 			    struct ulp_tlv_param *param,
@@ -306,6 +310,7 @@ ulp_default_flow_create(struct rte_eth_dev *eth_dev,
 	struct ulp_rte_act_bitmap	act = { 0 };
 	struct bnxt_ulp_context		*ulp_ctx;
 	uint32_t type, ulp_flags = 0, fid;
+	struct bnxt *bp = eth_dev->data->dev_private;
 	int rc = 0;
 
 	memset(&mapper_params, 0, sizeof(mapper_params));
@@ -366,6 +371,9 @@ ulp_default_flow_create(struct rte_eth_dev *eth_dev,
 	ULP_COMP_FLD_IDX_WR(&mapper_params, BNXT_ULP_CF_IDX_VF_META_FID,
 			    BNXT_ULP_META_VF_FLAG | mapper_params.func_id);
 
+	/* update the upar id */
+	ulp_l2_custom_tunnel_id_update(bp, &mapper_params);
+
 	BNXT_TF_DBG(DEBUG, "Creating default flow with template id: %u\n",
 		    ulp_class_tid);
 
@@ -641,3 +649,21 @@ bnxt_ulp_delete_vfr_default_rules(struct bnxt_representor *vfr)
 	memset(info, 0, sizeof(struct bnxt_ulp_vfr_rule_info));
 	return 0;
 }
+
+static void
+ulp_l2_custom_tunnel_id_update(struct bnxt *bp,
+			       struct bnxt_ulp_mapper_create_parms *params)
+{
+	if (!bp->l2_etype_tunnel_cnt)
+		return;
+
+	if (bp->l2_etype_upar_in_use &
+	    HWRM_TUNNEL_DST_PORT_QUERY_OUTPUT_UPAR_IN_USE_UPAR0) {
+		ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_L2_CUSTOM_UPAR_ID,
+				    ULP_WP_SYM_TUN_HDR_TYPE_UPAR1);
+	} else if (bp->l2_etype_upar_in_use &
+		   HWRM_TUNNEL_DST_PORT_QUERY_OUTPUT_UPAR_IN_USE_UPAR1) {
+		ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_L2_CUSTOM_UPAR_ID,
+				    ULP_WP_SYM_TUN_HDR_TYPE_UPAR2);
+	}
+}
diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.c b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
index ea1311c0c4..9dda70d75b 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
@@ -1073,6 +1073,12 @@ ulp_mapper_field_port_db_process(struct bnxt_ulp_mapper_parms *parms,
 			return -EINVAL;
 		}
 		break;
+	case BNXT_ULP_PORT_TABLE_VF_FUNC_FID:
+		if (ulp_port_db_port_vf_fid_get(parms->ulp_ctx, port_id, val)) {
+			BNXT_TF_DBG(ERR, "Invalid port id %u\n", port_id);
+			return -EINVAL;
+		}
+		break;
 	default:
 		BNXT_TF_DBG(ERR, "Invalid port_data %d\n", port_data);
 		return -EINVAL;
diff --git a/drivers/net/bnxt/tf_ulp/ulp_port_db.c b/drivers/net/bnxt/tf_ulp/ulp_port_db.c
index ba1f966ec3..bc0a7a95e6 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_port_db.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_port_db.c
@@ -760,3 +760,35 @@ ulp_port_db_port_meta_data_get(struct bnxt_ulp_context *ulp_ctxt,
 	}
 	return -EINVAL;
 }
+
+/* Api to get the function id for a given port id
+ *
+ * ulp_ctxt [in] Ptr to ulp context
+ * port_id [in] dpdk port id
+ * fid_data [out] the function id of the given port
+ *
+ * Returns 0 on success or negative number on failure.
+ */
+int32_t
+ulp_port_db_port_vf_fid_get(struct bnxt_ulp_context *ulp_ctxt,
+			    uint16_t port_id, uint8_t **fid_data)
+{
+	struct bnxt_ulp_port_db *port_db;
+	uint32_t ifindex;
+
+	port_db = bnxt_ulp_cntxt_ptr2_port_db_get(ulp_ctxt);
+	if (!port_db || port_id >= RTE_MAX_ETHPORTS) {
+		BNXT_TF_DBG(ERR, "Invalid Arguments\n");
+		return -EINVAL;
+	}
+	ifindex = port_db->dev_port_list[port_id];
+	if (!ifindex)
+		return -ENOENT;
+
+	if (port_db->ulp_intf_list[ifindex].type != BNXT_ULP_INTF_TYPE_VF &&
+	    port_db->ulp_intf_list[ifindex].type != BNXT_ULP_INTF_TYPE_VF_REP)
+		return -EINVAL;
+
+	*fid_data = (uint8_t *)&port_db->ulp_intf_list[ifindex].vf_func_id;
+	return 0;
+}
diff --git a/drivers/net/bnxt/tf_ulp/ulp_port_db.h b/drivers/net/bnxt/tf_ulp/ulp_port_db.h
index d4efe0a3d5..9d7ab02ad7 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_port_db.h
+++ b/drivers/net/bnxt/tf_ulp/ulp_port_db.h
@@ -354,4 +354,17 @@ ulp_port_db_port_is_pf_get(struct bnxt_ulp_context *ulp_ctxt,
 int32_t
 ulp_port_db_port_meta_data_get(struct bnxt_ulp_context *ulp_ctxt,
 			       uint16_t port_id, uint8_t **meta_data);
+
+/* Api to get the function id for a given port id
+ *
+ * ulp_ctxt [in] Ptr to ulp context
+ * port_id [in] dpdk port id
+ * fid_data [out] the function id of the given port
+ *
+ * Returns 0 on success or negative number on failure.
+ */
+int32_t
+ulp_port_db_port_vf_fid_get(struct bnxt_ulp_context *ulp_ctxt,
+			    uint16_t port_id, uint8_t **fid_data);
+
 #endif /* _ULP_PORT_DB_H_ */
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 15/47] net/bnxt: tf_ulp: Wh+ mirroring support
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (11 preceding siblings ...)
  2024-10-01  5:58 ` [PATCH v3 14/47] net/bnxt: tf_ulp: add support for vf to vf flow offload Sriharsha Basavapatna
@ 2024-10-01  5:58 ` Sriharsha Basavapatna
  2024-10-01  5:58 ` [PATCH v3 16/47] net/bnxt: tf_ulp: miscellaneous fixes Sriharsha Basavapatna
                   ` (20 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:58 UTC (permalink / raw)
  To: dev
  Cc: Manish Kurup, Sriharsha Basavapatna, Kishore Padmanabha, Ajit Khaparde

From: Manish Kurup <manish.kurup@broadcom.com>

1. ULP fixes to enable primitives to support mirroring
2. RTE parser changes to support and use multiple ports in RTE
   input msgs
3. Template changes required to support ingress mirroring
4. Template changes required to support egress mirroring
   (using VFR pipeline)

Signed-off-by: Manish Kurup <manish.kurup@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/ulp_mapper.c     |   8 +
 drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 179 ++++++++++++++++++++---
 2 files changed, 167 insertions(+), 20 deletions(-)

diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.c b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
index 9dda70d75b..eb0f95cfee 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
@@ -3789,6 +3789,8 @@ ulp_mapper_func_info_process(struct bnxt_ulp_mapper_parms *parms,
 	case BNXT_ULP_FUNC_OPC_GT:
 	case BNXT_ULP_FUNC_OPC_LE:
 	case BNXT_ULP_FUNC_OPC_LT:
+	case BNXT_ULP_FUNC_OPC_ADD:
+	case BNXT_ULP_FUNC_OPC_SUB:
 		process_src1 = 1;
 		process_src2 = 1;
 		break;
@@ -3841,6 +3843,12 @@ ulp_mapper_func_info_process(struct bnxt_ulp_mapper_parms *parms,
 		if (res1 < res2)
 			res = 1;
 		break;
+	case BNXT_ULP_FUNC_OPC_ADD:
+		res = res1 + res2;
+		break;
+	case BNXT_ULP_FUNC_OPC_SUB:
+		res = res1 - res2;
+		break;
 	case BNXT_ULP_FUNC_OPC_COPY_SRC1_TO_RF:
 		res = res1;
 		break;
diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
index 013d8b0a59..da20b41c72 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
@@ -330,9 +330,21 @@ ulp_post_process_normal_flow(struct ulp_rte_parser_params *params)
 
 	/* Evaluate the VF to VF flag */
 	if (act_port_set && act_port_type == BNXT_ULP_INTF_TYPE_VF_REP &&
-	    match_port_type == BNXT_ULP_INTF_TYPE_VF_REP)
-		ULP_BITMAP_SET(params->act_bitmap.bits,
-			       BNXT_ULP_ACT_BIT_VF_TO_VF);
+	     match_port_type == BNXT_ULP_INTF_TYPE_VF_REP) {
+		if (!ULP_BITMAP_ISSET(params->act_bitmap.bits,
+				      BNXT_ULP_ACT_BIT_MULTIPLE_PORT)) {
+			ULP_BITMAP_SET(params->act_bitmap.bits,
+				       BNXT_ULP_ACT_BIT_VF_TO_VF);
+		} else {
+			if (ULP_COMP_FLD_IDX_RD(params, BNXT_ULP_CF_IDX_MP_A_IS_VFREP) &&
+			    ULP_COMP_FLD_IDX_RD(params, BNXT_ULP_CF_IDX_MP_B_IS_VFREP))
+				ULP_BITMAP_SET(params->act_bitmap.bits,
+					       BNXT_ULP_ACT_BIT_VF_TO_VF);
+			else
+				ULP_BITMAP_RESET(params->act_bitmap.bits,
+						 BNXT_ULP_ACT_BIT_VF_TO_VF);
+		}
+	}
 
 	/* Update the decrement ttl computational fields */
 	if (ULP_BITMAP_ISSET(params->act_bitmap.bits,
@@ -2349,15 +2361,74 @@ ulp_rte_count_act_handler(const struct rte_flow_action *action_item,
 	return BNXT_TF_RC_SUCCESS;
 }
 
+static bool ulp_rte_parser_is_portb_vfrep(struct ulp_rte_parser_params *param)
+{
+	return ULP_COMP_FLD_IDX_RD(param, BNXT_ULP_CF_IDX_MP_B_IS_VFREP);
+}
+
+/*
+ * Swaps info related to multi-port:
+ * common:
+ *    BNXT_ULP_CF_IDX_MP_B_IS_VFREP, BNXT_ULP_CF_IDX_MP_A_IS_VFREP
+ *    BNXT_ULP_CF_IDX_MP_PORT_A, BNXT_ULP_CF_IDX_MP_PORT_B
+ *
+ * ingress:
+ *    BNXT_ULP_CF_IDX_MP_VNIC_B, BNXT_ULP_CF_IDX_MP_VNIC_A
+ *
+ * egress:
+ *    BNXT_ULP_CF_IDX_MP_MDATA_B, BNXT_ULP_CF_IDX_MP_MDATA_A
+ *    BNXT_ULP_CF_IDX_MP_VPORT_B, BNXT_ULP_CF_IDX_MP_VPORT_A
+ *
+ * Note: This is done as OVS could give us a non-VFREP port in port B, and we
+ * cannot use that to mirror, so we swap out the ports so that a VFREP is now
+ * in port B instead.
+ */
+static int32_t
+ulp_rte_parser_normalize_port_info(struct ulp_rte_parser_params *param)
+{
+	uint16_t mp_port_a, mp_port_b, mp_mdata_a, mp_mdata_b,
+		 mp_vport_a, mp_vport_b, mp_vnic_a, mp_vnic_b,
+		 mp_is_vfrep_a, mp_is_vfrep_b;
+
+	mp_is_vfrep_a = ULP_COMP_FLD_IDX_RD(param, BNXT_ULP_CF_IDX_MP_A_IS_VFREP);
+	mp_is_vfrep_b = ULP_COMP_FLD_IDX_RD(param, BNXT_ULP_CF_IDX_MP_B_IS_VFREP);
+	ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_MP_B_IS_VFREP, mp_is_vfrep_a);
+	ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_MP_A_IS_VFREP, mp_is_vfrep_b);
+
+	mp_port_a = ULP_COMP_FLD_IDX_RD(param, BNXT_ULP_CF_IDX_MP_PORT_A);
+	mp_port_b = ULP_COMP_FLD_IDX_RD(param, BNXT_ULP_CF_IDX_MP_PORT_B);
+	ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_MP_PORT_B, mp_port_a);
+	ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_MP_PORT_A, mp_port_b);
+
+	mp_vport_a = ULP_COMP_FLD_IDX_RD(param, BNXT_ULP_CF_IDX_MP_VPORT_A);
+	mp_vport_b = ULP_COMP_FLD_IDX_RD(param, BNXT_ULP_CF_IDX_MP_VPORT_B);
+	ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_MP_VPORT_B, mp_vport_a);
+	ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_MP_VPORT_A, mp_vport_b);
+
+	mp_vnic_a = ULP_COMP_FLD_IDX_RD(param, BNXT_ULP_CF_IDX_MP_VNIC_A);
+	mp_vnic_b = ULP_COMP_FLD_IDX_RD(param, BNXT_ULP_CF_IDX_MP_VNIC_B);
+	ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_MP_VNIC_B, mp_vnic_a);
+	ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_MP_VNIC_A, mp_vnic_b);
+
+	mp_mdata_a = ULP_COMP_FLD_IDX_RD(param, BNXT_ULP_CF_IDX_MP_MDATA_A);
+	mp_mdata_b = ULP_COMP_FLD_IDX_RD(param, BNXT_ULP_CF_IDX_MP_MDATA_B);
+	ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_MP_MDATA_B, mp_mdata_a);
+	ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_MP_MDATA_A, mp_mdata_b);
+
+	return BNXT_TF_RC_SUCCESS;
+}
+
+
 /* Function to handle the parsing of action ports. */
 static int32_t
 ulp_rte_parser_act_port_set(struct ulp_rte_parser_params *param,
-			    uint32_t ifindex,
+			    uint32_t ifindex, bool multi_port,
 			    enum bnxt_ulp_direction_type act_dir)
 {
 	enum bnxt_ulp_direction_type dir;
 	uint16_t pid_s;
-	uint32_t pid;
+	uint8_t *p_mdata;
+	uint32_t pid, port_index;
 	struct ulp_rte_act_prop *act = &param->act_prop;
 	enum bnxt_ulp_intf_type port_type;
 	uint32_t vnic_type;
@@ -2367,27 +2438,63 @@ ulp_rte_parser_act_port_set(struct ulp_rte_parser_params *param,
 	dir = (act_dir == BNXT_ULP_DIR_INVALID) ?
 		ULP_COMP_FLD_IDX_RD(param, BNXT_ULP_CF_IDX_DIRECTION) :
 		act_dir;
-	port_type = ULP_COMP_FLD_IDX_RD(param, BNXT_ULP_CF_IDX_ACT_PORT_TYPE);
-	if (dir == BNXT_ULP_DIR_EGRESS &&
-	    port_type != BNXT_ULP_INTF_TYPE_VF_REP) {
+
+	port_type = ULP_COMP_FLD_IDX_RD(param,
+					BNXT_ULP_CF_IDX_ACT_PORT_TYPE);
+
+	/* Update flag if Port A/B type is VF-REP */
+	ULP_COMP_FLD_IDX_WR(param, multi_port ?
+					BNXT_ULP_CF_IDX_MP_B_IS_VFREP :
+					BNXT_ULP_CF_IDX_MP_A_IS_VFREP,
+			    (port_type == BNXT_ULP_INTF_TYPE_VF_REP) ? 1 : 0);
+	if (dir == BNXT_ULP_DIR_EGRESS) {
 		/* For egress direction, fill vport */
 		if (ulp_port_db_vport_get(param->ulp_ctx, ifindex, &pid_s))
 			return BNXT_TF_RC_ERROR;
 
 		pid = pid_s;
 		pid = rte_cpu_to_be_32(pid);
-		memcpy(&act->act_details[BNXT_ULP_ACT_PROP_IDX_VPORT],
-		       &pid, BNXT_ULP_ACT_PROP_SZ_VPORT);
+		if (!multi_port)
+			memcpy(&act->act_details[BNXT_ULP_ACT_PROP_IDX_VPORT],
+			       &pid, BNXT_ULP_ACT_PROP_SZ_VPORT);
+
+		/* Fill metadata */
+		if (port_type == BNXT_ULP_INTF_TYPE_VF_REP) {
+			port_index  = ULP_COMP_FLD_IDX_RD(param, multi_port ?
+								 BNXT_ULP_CF_IDX_MP_PORT_B :
+								 BNXT_ULP_CF_IDX_MP_PORT_A);
+			if (ulp_port_db_port_meta_data_get(param->ulp_ctx,
+							   port_index, &p_mdata))
+				return BNXT_TF_RC_ERROR;
+			/*
+			 * Update appropriate port (A/B) metadata based on multi-port
+			 * indication
+			 */
+			ULP_COMP_FLD_IDX_WR(param,
+					    multi_port ?
+						BNXT_ULP_CF_IDX_MP_MDATA_B :
+						BNXT_ULP_CF_IDX_MP_MDATA_A,
+					    rte_cpu_to_be_16(*((uint16_t *)p_mdata)));
+		}
+		/*
+		 * Update appropriate port (A/B) VPORT based on multi-port
+		 * indication.
+		 */
+		ULP_COMP_FLD_IDX_WR(param,
+				    multi_port ?
+					BNXT_ULP_CF_IDX_MP_VPORT_B :
+					BNXT_ULP_CF_IDX_MP_VPORT_A,
+				    pid_s);
 	} else {
 		/* For ingress direction, fill vnic */
 		/*
-		 * Action		Destination
+		 * Action               Destination
 		 * ------------------------------------
-		 * PORT_REPRESENTOR	Driver Function
+		 * PORT_REPRESENTOR     Driver Function
 		 * ------------------------------------
-		 * REPRESENTED_PORT	VF
+		 * REPRESENTED_PORT     VF
 		 * ------------------------------------
-		 * PORT_ID		VF
+		 * PORT_ID              VF
 		 */
 		if (act_dir != BNXT_ULP_DIR_INGRESS &&
 		    port_type == BNXT_ULP_INTF_TYPE_VF_REP)
@@ -2401,10 +2508,23 @@ ulp_rte_parser_act_port_set(struct ulp_rte_parser_params *param,
 
 		pid = pid_s;
 		pid = rte_cpu_to_be_32(pid);
-		memcpy(&act->act_details[BNXT_ULP_ACT_PROP_IDX_VNIC],
-		       &pid, BNXT_ULP_ACT_PROP_SZ_VNIC);
+		if (!multi_port)
+			memcpy(&act->act_details[BNXT_ULP_ACT_PROP_IDX_VNIC],
+			       &pid, BNXT_ULP_ACT_PROP_SZ_VNIC);
+		/*
+		 * Update appropriate port (A/B) VNIC based on multi-port
+		 * indication.
+		 */
+		ULP_COMP_FLD_IDX_WR(param,
+				    multi_port ?
+					BNXT_ULP_CF_IDX_MP_VNIC_B :
+					BNXT_ULP_CF_IDX_MP_VNIC_A,
+				    pid_s);
 	}
 
+	if (multi_port && !ulp_rte_parser_is_portb_vfrep(param))
+		ulp_rte_parser_normalize_port_info(param);
+
 	/* Update the action port set bit */
 	ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_ACT_PORT_IS_SET, 1);
 	return BNXT_TF_RC_SUCCESS;
@@ -2437,7 +2557,7 @@ ulp_rte_pf_act_handler(const struct rte_flow_action *action_item __rte_unused,
 	}
 	/* Update the action properties */
 	ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_ACT_PORT_TYPE, intf_type);
-	return ulp_rte_parser_act_port_set(params, ifindex,
+	return ulp_rte_parser_act_port_set(params, ifindex, false,
 					   BNXT_ULP_DIR_INVALID);
 }
 
@@ -2489,7 +2609,7 @@ ulp_rte_vf_act_handler(const struct rte_flow_action *action_item,
 
 	/* Update the action properties */
 	ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_ACT_PORT_TYPE, intf_type);
-	return ulp_rte_parser_act_port_set(params, ifindex,
+	return ulp_rte_parser_act_port_set(params, ifindex, false,
 					   BNXT_ULP_DIR_INVALID);
 }
 
@@ -2500,12 +2620,14 @@ ulp_rte_port_act_handler(const struct rte_flow_action *act_item,
 {
 	uint32_t ethdev_id;
 	uint32_t ifindex;
+	const struct rte_flow_action_port_id *port_id = act_item->conf;
+	uint32_t num_ports;
 	enum bnxt_ulp_intf_type intf_type;
 	enum bnxt_ulp_direction_type act_dir;
 
 	if (!act_item->conf) {
 		BNXT_TF_DBG(ERR,
-			    "ParseErr: Invalid Argument\n");
+				"ParseErr: Invalid Argument\n");
 		return BNXT_TF_RC_PARSE_ERR;
 	}
 	switch (act_item->type) {
@@ -2540,6 +2662,18 @@ ulp_rte_port_act_handler(const struct rte_flow_action *act_item,
 		return BNXT_TF_RC_ERROR;
 	}
 
+	num_ports  = ULP_COMP_FLD_IDX_RD(param, BNXT_ULP_CF_IDX_MP_NPORTS);
+
+	if (num_ports) {
+		ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_MP_PORT_B,
+				    port_id->id);
+		ULP_BITMAP_SET(param->act_bitmap.bits,
+			       BNXT_ULP_ACT_BIT_MULTIPLE_PORT);
+	} else {
+		ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_MP_PORT_A,
+				    port_id->id);
+	}
+
 	/* Get the port db ifindex */
 	if (ulp_port_db_dev_port_to_ulp_index(param->ulp_ctx, ethdev_id,
 					      &ifindex)) {
@@ -2558,7 +2692,12 @@ ulp_rte_port_act_handler(const struct rte_flow_action *act_item,
 	ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_ACT_PORT_TYPE, intf_type);
 	ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_DEV_ACT_PORT_ID,
 			    ethdev_id);
-	return ulp_rte_parser_act_port_set(param, ifindex, act_dir);
+
+	ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_MP_NPORTS, ++num_ports);
+	return ulp_rte_parser_act_port_set(param, ifindex,
+					   ULP_BITMAP_ISSET(param->act_bitmap.bits,
+							    BNXT_ULP_ACT_BIT_MULTIPLE_PORT),
+					   act_dir);
 }
 
 /* Function to handle the parsing of RTE Flow action pop vlan. */
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 16/47] net/bnxt: tf_ulp: miscellaneous fixes
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (12 preceding siblings ...)
  2024-10-01  5:58 ` [PATCH v3 15/47] net/bnxt: tf_ulp: Wh+ mirroring support Sriharsha Basavapatna
@ 2024-10-01  5:58 ` Sriharsha Basavapatna
  2024-10-01  5:58 ` [PATCH v3 19/47] net/bnxt: tf_ulp: convert recipe table to dynamic memory Sriharsha Basavapatna
                   ` (19 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:58 UTC (permalink / raw)
  To: dev
  Cc: Mike Baucom, Shahaji Bhosle, Randy Schacher, Venkat Duvvuru,
	Sriharsha Basavapatna, Kishore Padmanabha, Ajit Khaparde

From: Mike Baucom <michael.baucom@broadcom.com>

Template compiler modifications for v3 api:
    Compile named/unnamed shared app resources for the applications
    that are capable.

Change app id signature with base zero offset:
    The app id is used in the calculation of the matching signatures
    and as app id value increases the output of the signature also
    increases to keep up the scale, the app id is reset to zero based
    offset. Also fix some whitespace errors.

Add support for vxlan-gpe:
    Add support for enabling UPAR1 and UPAR2 to parse vxlan-gpe/nsh/ipv4
    and vxlan-gpe/nsh/ipv6 packets for.

Default parif handling for single port cards:
    Update Ingress default and offloaded flows to use driver
    function parif, instead of physical port parif. We have cards
    that use single physical port with two PFs on the same physical
    port, this causes the default physical port parif to be over
    written by the second PF. If you use driver function parif then
    single port with more than one PF can use its own parif and not
    step on each other.

    Note: We cannot support TWO VFs on the same PF, because driver
    function parif is based on PF fw id, so if two VFs on same PF
    are offloading flows they will get the same driver function parifs
    and this will interfere with each other.

Support vxlan flow with vxlan-gpe port:
    The patch adds the APP_CAP_CUST_VXLAN flag, so that the app
    can create a custom vxlan flow, instead of vxlan-gpe flow,
    when the custom vxlan port is 4790.

Synchronize async event handler and Truflow init:
    If Truflow is not initialized then bail out in async event handler
    gracefully. Add a new macro ulp_is_default_session_active().

Reduce the log level from info to debug:
    Default VFR action record get api in templates that do not support
    VFR report an info message which looks like an error. But it is benign
    and doesn't impact the functionality. So change the log level to
    debug from info.

Read upar_in_use from tunnel_dst_port_alloc response:
    This patch reads the upar_in_use field from
    hwrm_tunnel_dst_port_alloc's response and stores inside the bp
    structure.

Add API to configure hot upgrade:
    This patch adds an API that can be called to configure hot upgrade.
    If this API is not called then the driver relies on the environment
    variable to configure the hot upgrade feature.

Add parser changes to support custom VxLAN:
    This patch writes UPAR1 tunnel header type to the computational
    field at index VXLAN_IP_UPAR_ID.

Free custom vxlan tunnel port:
    The current code invokes ulp_cust_vxlan_free() while detaching
    a port from the session. This is incorrect since it should be freed
    only when the session reference count goes to zero. So move this
    to bnxt_ulp_deinit().

Parse UDP dport 4789 as VxLAN conditionally:
    Currently, the ULP parser is parsing UDP dport 4789 as VxLAN
    unconditionally. However for some apps, the requirement may be to
    consider UDP dport 4789 as non-tunnel. This patch fixes the problem
    by parsing UDP dport 4789 as non-tunnel when needed.

Delete flow context for the port being deleted:
    Flow manager is running in alarm thread and the main thread is
    deleting the flow context causing garbage data to request flow
    count. Delete the ulp context before deleting the flows so
    that flow manager thread does not dereference invalid ulp context.

Validate ulp context while parsing L4 proto type:
    In ulp_rte_l4_proto_type_update() we try to access bp->ulp_ctx
    without checking if it is valid. Add error checking and return
    if ulp_ctx has not been initialized. Otherwise it could crash
    the application.

Fix a crash seen in bnxt_ulp_port_init(), in some conditions:
    The function bnxt_ulp_init() invokes ulp_ha_mgr_open() which
    could fail in some conditions. As part of the error processing and
    cleanup, bnxt_ulp_deinit() is called which frees ulp_ctx->cfg_data.
    When the control returns back to bnxt_ulp_port_init(), as part of
    its error handling it invokes ulp_cust_vxlan_free(). There we end
    up dereferencing ulp_ctx->cfg_data which is already freed.
    Fix this by updating the code (macro) to check for validity of
    cfg_data before accessing it.

Support 256 vf representors:
    Extend ULP port database size
    Reduce Rx WC tcam slices from 6860 to 6572
    Convert Rx VF rep default action record type from FULL to Compact

Set the correct vxlan or vxlan-gpe header type:
    Appropriately configure the vxlan or vxlan_gpe header bit when an
    application supports any customer vxlan port. The initial code
    erroneously configures both vxlan and vxlan_gpe header bits when
    adding a vxlan flow with the vxlan_gpe port(4790).
    Remove endian converting code for port id.

Free L2 Etype tunnel for each port stop:
    Update the point where ulp_l2_etype_tunnel_free() is called in
    bnxt_ulp_port_deinit().

Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
Signed-off-by: Shahaji Bhosle <sbhosle@broadcom.com>
Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt.h                       |   2 +
 drivers/net/bnxt/bnxt_hwrm.c                  |   6 +
 drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c    |  37 +++++-
 drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.h    |   3 +-
 drivers/net/bnxt/tf_ulp/bnxt_ulp.c            | 124 +++++++++++-------
 drivers/net/bnxt/tf_ulp/bnxt_ulp.h            |  23 +++-
 drivers/net/bnxt/tf_ulp/ulp_def_rules.c       |  13 ++
 drivers/net/bnxt/tf_ulp/ulp_flow_db.c         |   2 +-
 drivers/net/bnxt/tf_ulp/ulp_mapper.c          |  45 ++++---
 drivers/net/bnxt/tf_ulp/ulp_mapper.h          |   2 +
 drivers/net/bnxt/tf_ulp/ulp_matcher.c         |  21 ++-
 drivers/net/bnxt/tf_ulp/ulp_port_db.c         |   4 +-
 drivers/net/bnxt/tf_ulp/ulp_rte_parser.c      |  84 ++++++++++--
 drivers/net/bnxt/tf_ulp/ulp_template_struct.h |   1 +
 14 files changed, 283 insertions(+), 84 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index b905d9fd3e..2ee053b912 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -990,6 +990,7 @@ struct bnxt {
 	uint8_t			ecpri_port_cnt;
 	uint8_t			l2_etype_tunnel_cnt;
 	uint16_t		vxlan_port;
+	uint16_t		vxlan_ip_port;
 	uint16_t		geneve_port;
 	uint16_t		ecpri_port;
 	uint16_t		vxlan_fw_dst_port_id;
@@ -999,6 +1000,7 @@ struct bnxt {
 	uint16_t		l2_etype_tunnel_id;
 	uint16_t		ecpri_upar_in_use;
 	uint8_t			l2_etype_upar_in_use;
+	uint8_t			vxlan_ip_upar_in_use;
 	uint32_t		fw_ver;
 	uint32_t		hwrm_spec_code;
 
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 778488ce1a..e49e0754c6 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -4819,6 +4819,12 @@ int bnxt_hwrm_tunnel_dst_port_alloc(struct bnxt *bp, uint16_t port,
 		bp->l2_etype_tunnel_id = port;
 		bp->l2_etype_upar_in_use = resp->upar_in_use;
 		break;
+	case HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4:
+		bp->vxlan_ip_upar_in_use = resp->upar_in_use;
+		bp->vxlan_ip_port = port;
+		PMD_DRV_LOG(DEBUG, "vxlan_ip_upar_in_use %x port %x\n",
+			    bp->vxlan_ip_upar_in_use, bp->vxlan_ip_port);
+		break;
 	default:
 		break;
 	}
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c b/drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c
index 758dffde22..5bee25d9d3 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c
@@ -17,6 +17,8 @@
 #include "bnxt_tf_common.h"
 #include "bnxt_tf_pmd_shim.h"
 
+void bnxt_pmd_configure_hot_upgrade(bool enable);
+
 int
 bnxt_tunnel_dst_port_free(struct bnxt *bp,
 			  uint16_t port,
@@ -557,6 +559,9 @@ bnxt_pmd_global_tunnel_set(uint16_t port_id, uint8_t type,
 	case BNXT_GLOBAL_REGISTER_TUNNEL_VXLAN_GPE:
 		hwtype = HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE;
 		break;
+	case BNXT_GLOBAL_REGISTER_TUNNEL_VXLAN_GPE_V6:
+		hwtype = HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE_V6;
+		break;
 	default:
 		BNXT_TF_DBG(ERR, "Tunnel Type (%d) invalid\n", type);
 		return -EINVAL;
@@ -622,13 +627,41 @@ bnxt_pmd_global_tunnel_set(uint16_t port_id, uint8_t type,
  * If BNXT_ULP_T_HA_SUPPORT is set to zero explicitly then
  * hotupgrade is disabled.
  */
-int32_t bnxt_pmd_get_hot_upgrade_env(void)
+static bool bnxt_pmd_get_hot_upgrade_env(void)
 {
 	char *env;
-	int32_t hot_up = 1;
+	bool hot_up = 1;
 
 	env = getenv(BNXT_ULP_HOT_UP_DYNAMIC_ENV_VAR);
 	if (env && strcmp(env, "0") == 0)
 		hot_up = 0;
 	return hot_up;
 }
+
+static bool hot_up_api;
+static bool hot_up_configured_by_api;
+/* There are two ways to configure hot upgrade.
+ * By either calling this bnxt_pmd_configure_hot_upgrade API or
+ * setting the BNXT_ULP_T_HA_SUPPORT environment variable.
+ * bnxt_pmd_configure_hot_upgrade takes precedence over the
+ * environment variable way. Once the setting is done through
+ * bnxt_pmd_configure_hot_upgrade, can't switch back to env
+ * variable.
+ *
+ * bnxt_pmd_configure_hot_upgrade must be called before
+ * dev_start eth_dev_ops is called for the configuration to
+ * take effect.
+ */
+void bnxt_pmd_configure_hot_upgrade(bool enable)
+{
+	hot_up_configured_by_api = true;
+	hot_up_api = enable;
+}
+
+bool bnxt_pmd_get_hot_up_config(void)
+{
+	if (hot_up_configured_by_api)
+		return hot_up_api;
+
+	return bnxt_pmd_get_hot_upgrade_env();
+}
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.h b/drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.h
index 84e395c9df..10c146e494 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.h
+++ b/drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.h
@@ -21,6 +21,7 @@ enum bnxt_global_register_tunnel_type {
 	BNXT_GLOBAL_REGISTER_TUNNEL_VXLAN,
 	BNXT_GLOBAL_REGISTER_TUNNEL_ECPRI,
 	BNXT_GLOBAL_REGISTER_TUNNEL_VXLAN_GPE,
+	BNXT_GLOBAL_REGISTER_TUNNEL_VXLAN_GPE_V6,
 	BNXT_GLOBAL_REGISTER_TUNNEL_MAX
 };
 
@@ -59,5 +60,5 @@ int32_t
 bnxt_tunnel_upar_id_get(struct bnxt *bp,
 			uint8_t type,
 			uint8_t *upar_id);
-int32_t bnxt_pmd_get_hot_upgrade_env(void);
+bool bnxt_pmd_get_hot_up_config(void);
 #endif /* _BNXT_TF_PMD_ABSTRACT_H_ */
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
index 3f0a5f2300..a7df525c16 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
@@ -48,6 +48,14 @@ static int32_t bnxt_ulp_cntxt_list_init(void);
 static int32_t bnxt_ulp_cntxt_list_add(struct bnxt_ulp_context *ulp_ctx);
 static void bnxt_ulp_cntxt_list_del(struct bnxt_ulp_context *ulp_ctx);
 
+bool
+ulp_is_default_session_active(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (ulp_ctx == NULL || ulp_ctx->g_tfp[0] == NULL)
+		return false;
+
+	return true;
+}
 /*
  * Allow the deletion of context only for the bnxt device that
  * created the session.
@@ -294,7 +302,7 @@ bnxt_ulp_tf_shared_session_resources_get(struct bnxt_ulp_context *ulp_ctx,
 {
 	struct bnxt_ulp_resource_resv_info *unnamed;
 	struct bnxt_ulp_glb_resource_info *named;
-	uint32_t unum, nnum;
+	uint32_t unum = 0, nnum = 0;
 	int32_t rc;
 
 	if (ulp_ctx == NULL || res == NULL) {
@@ -315,24 +323,21 @@ bnxt_ulp_tf_shared_session_resources_get(struct bnxt_ulp_context *ulp_ctx,
 	 */
 	/* Get the baseline counts */
 	unnamed = bnxt_ulp_app_resource_resv_list_get(&unum);
-	if (unnamed == NULL) {
-		BNXT_TF_DBG(ERR, "Unable to get shared resource resv list.\n");
-		return -EINVAL;
-	}
-	rc = bnxt_ulp_unnamed_resources_calc(ulp_ctx, unnamed, unum, stype,
-					     res);
-	if (rc) {
-		BNXT_TF_DBG(ERR,
-			    "Unable to calc resources for shared session.\n");
-		return -EINVAL;
+	if (unum) {
+		rc = bnxt_ulp_unnamed_resources_calc(ulp_ctx, unnamed, unum, stype,
+						     res);
+		if (rc) {
+			BNXT_TF_DBG(ERR,
+				    "Unable to calc resources for shared session.\n");
+			return -EINVAL;
+		}
 	}
 
 	/* Get the named list and add the totals */
 	named = bnxt_ulp_app_glb_resource_info_list_get(&nnum);
-	if (named == NULL) {
-		BNXT_TF_DBG(ERR, "Unable to get app global resource list\n");
-		return -EINVAL;
-	}
+	if (!nnum)
+		return 0;
+
 	rc = bnxt_ulp_named_resources_calc(ulp_ctx, named, nnum, stype, res);
 	if (rc)
 		BNXT_TF_DBG(ERR, "Unable to calc named resources\n");
@@ -442,7 +447,7 @@ bnxt_ulp_cntxt_app_caps_init(struct bnxt *bp,
 		}
 		if (info[i].flags & BNXT_ULP_APP_CAP_HA_DYNAMIC) {
 			/* Read the environment variable to determine hot up */
-			if (!bnxt_pmd_get_hot_upgrade_env()) {
+			if (!bnxt_pmd_get_hot_up_config()) {
 				ulp_ctx->cfg_data->ulp_flags |=
 					BNXT_ULP_APP_HA_DYNAMIC;
 				/* reset Hot upgrade, dynamically disabled */
@@ -458,9 +463,14 @@ bnxt_ulp_cntxt_app_caps_init(struct bnxt *bp,
 			ulp_ctx->cfg_data->ulp_flags |=
 				BNXT_ULP_APP_L2_ETYPE;
 
+		if (info[i].flags & BNXT_ULP_APP_CAP_CUST_VXLAN)
+			ulp_ctx->cfg_data->ulp_flags |=
+				BNXT_ULP_CUST_VXLAN_SUPPORT;
+
 		bnxt_ulp_vxlan_ip_port_set(ulp_ctx, info[i].vxlan_ip_port);
 		bnxt_ulp_vxlan_port_set(ulp_ctx, info[i].vxlan_port);
 		bnxt_ulp_ecpri_udp_port_set(ulp_ctx, info[i].ecpri_udp_port);
+		bnxt_ulp_vxlan_gpe_next_proto_set(ulp_ctx, info[i].tunnel_next_proto);
 
 		/* set the shared session support from firmware */
 		fw = info[i].upgrade_fw_update;
@@ -531,6 +541,29 @@ bnxt_ulp_vxlan_ip_port_get(struct bnxt_ulp_context *ulp_ctx)
 	return (unsigned int)ulp_ctx->cfg_data->vxlan_ip_port;
 }
 
+/* Function to set the number for vxlan_gpe next_proto into the context */
+uint32_t
+bnxt_ulp_vxlan_gpe_next_proto_set(struct bnxt_ulp_context *ulp_ctx,
+				  uint8_t tunnel_next_proto)
+{
+	if (!ulp_ctx || !ulp_ctx->cfg_data)
+		return -EINVAL;
+
+	ulp_ctx->cfg_data->tunnel_next_proto = tunnel_next_proto;
+
+	return 0;
+}
+
+/* Function to retrieve the vxlan_gpe next_proto from the context. */
+uint8_t
+bnxt_ulp_vxlan_gpe_next_proto_get(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (!ulp_ctx || !ulp_ctx->cfg_data)
+		return 0;
+
+	return ulp_ctx->cfg_data->tunnel_next_proto;
+}
+
 /* Function to set the number for vxlan port into the context */
 int
 bnxt_ulp_vxlan_port_set(struct bnxt_ulp_context *ulp_ctx,
@@ -1602,6 +1635,28 @@ bnxt_ulp_destroy_vfr_default_rules(struct bnxt *bp, bool global)
 	}
 }
 
+static void
+ulp_cust_vxlan_free(struct bnxt *bp)
+{
+	int rc;
+
+	if (ULP_APP_CUST_VXLAN_SUPPORT(bp->ulp_ctx)) {
+		rc = bnxt_tunnel_dst_port_free(bp,
+					       bp->ulp_ctx->cfg_data->vxlan_port,
+				     HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN);
+		if (rc)
+			BNXT_TF_DBG(ERR, "Failed to clear global vxlan port\n");
+	}
+
+	if (ULP_APP_CUST_VXLAN_IP_SUPPORT(bp->ulp_ctx)) {
+		rc = bnxt_tunnel_dst_port_free(bp,
+					       bp->ulp_ctx->cfg_data->vxlan_ip_port,
+				     HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4);
+		if (rc)
+			BNXT_TF_DBG(ERR, "Failed to clear global custom vxlan port\n");
+	}
+}
+
 /*
  * When a port is deinit'ed by dpdk. This function is called
  * and this function clears the ULP context and rest of the
@@ -1624,6 +1679,9 @@ bnxt_ulp_deinit(struct bnxt *bp,
 			BNXT_TF_DBG(ERR, "Failed to close HA (%d)\n", rc);
 	}
 
+	/* Free tunnel configuration */
+	ulp_cust_vxlan_free(bp);
+
 	/* clean up default flows */
 	bnxt_ulp_destroy_df_rules(bp, true);
 
@@ -2008,28 +2066,6 @@ ulp_l2_etype_tunnel_free(struct bnxt *bp)
 	bp->l2_etype_tunnel_cnt--;
 }
 
-static void
-ulp_cust_vxlan_free(struct bnxt *bp)
-{
-	int rc;
-
-	if (ULP_APP_CUST_VXLAN_SUPPORT(bp->ulp_ctx)) {
-		rc = bnxt_tunnel_dst_port_free(bp,
-					       bp->ulp_ctx->cfg_data->vxlan_port,
-				     HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN);
-		if (rc)
-			BNXT_TF_DBG(ERR, "Failed to clear global vxlan port\n");
-	}
-
-	if (ULP_APP_CUST_VXLAN_IP_SUPPORT(bp->ulp_ctx)) {
-		rc = bnxt_tunnel_dst_port_free(bp,
-					       bp->ulp_ctx->cfg_data->vxlan_ip_port,
-				     HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4);
-		if (rc)
-			BNXT_TF_DBG(ERR, "Failed to clear global custom vxlan port\n");
-	}
-}
-
 /*
  * When a port is de-initialized by dpdk. This functions clears up
  * the port specific details.
@@ -2081,16 +2117,17 @@ bnxt_ulp_port_deinit(struct bnxt *bp)
 	/* Check the reference count to deinit or deattach*/
 	if (bp->ulp_ctx->cfg_data && bp->ulp_ctx->cfg_data->ref_cnt) {
 		bp->ulp_ctx->cfg_data->ref_cnt--;
+		/* Free tunnels for each port */
+		ulp_l2_etype_tunnel_free(bp);
 		if (bp->ulp_ctx->cfg_data->ref_cnt) {
-			/* Free tunnel configurations */
-			ulp_cust_vxlan_free(bp);
-			ulp_l2_etype_tunnel_free(bp);
-
 			/* free the port details */
 			/* Free the default flow rule associated to this port */
 			bnxt_ulp_destroy_df_rules(bp, false);
 			bnxt_ulp_destroy_vfr_default_rules(bp, false);
 
+			/* Free the ulp context in the context entry list */
+			bnxt_ulp_cntxt_list_del(bp->ulp_ctx);
+
 			/* free flows associated with this port */
 			bnxt_ulp_flush_port_flows(bp);
 
@@ -2105,9 +2142,6 @@ bnxt_ulp_port_deinit(struct bnxt *bp)
 		}
 	}
 
-	/* Free the ulp context in the context entry list */
-	bnxt_ulp_cntxt_list_del(bp->ulp_ctx);
-
 	/* clean up the session */
 	ulp_session_deinit(session);
 
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.h b/drivers/net/bnxt/tf_ulp/bnxt_ulp.h
index 8b75120926..32a7455bd6 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.h
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.h
@@ -58,11 +58,15 @@
 #define ULP_APP_HA_IS_DYNAMIC(ctx)	((ctx)->cfg_data->ulp_flags &\
 					BNXT_ULP_APP_HA_DYNAMIC)
 
-#define ULP_APP_CUST_VXLAN_SUPPORT(ctx)	   ((ctx)->cfg_data->vxlan_port != 0)
+#define ULP_APP_CUST_VXLAN_EN(ctx)	((ctx)->cfg_data->ulp_flags &\
+					BNXT_ULP_CUST_VXLAN_SUPPORT)
 #define ULP_APP_VXLAN_GPE_SUPPORT(ctx)     ((ctx)->cfg_data->vxlan_gpe_port != 0)
-#define ULP_APP_CUST_VXLAN_IP_SUPPORT(ctx) ((ctx)->cfg_data->vxlan_ip_port != 0)
 #define ULP_APP_L2_ETYPE_SUPPORT(ctx)	((ctx)->cfg_data->ulp_flags &\
 					BNXT_ULP_APP_L2_ETYPE)
+#define ULP_APP_CUST_VXLAN_SUPPORT(ctx)	\
+	((ctx) && (ctx)->cfg_data && (ctx)->cfg_data->vxlan_port != 0)
+#define ULP_APP_CUST_VXLAN_IP_SUPPORT(ctx)\
+	((ctx) && (ctx)->cfg_data && (ctx)->cfg_data->vxlan_ip_port != 0)
 
 enum bnxt_ulp_flow_mem_type {
 	BNXT_ULP_FLOW_MEM_TYPE_INT = 0,
@@ -120,10 +124,11 @@ struct bnxt_ulp_data {
 	uint32_t			vxlan_gpe_port;
 	uint32_t			vxlan_ip_port;
 	uint32_t			ecpri_udp_port;
+	uint32_t			hu_session_type;
 	uint8_t				hu_reg_state;
 	uint8_t				hu_reg_cnt;
-	uint32_t			hu_session_type;
 	uint8_t				ha_pool_id;
+	uint8_t				tunnel_next_proto;
 	enum bnxt_ulp_session_type	def_session_type;
 };
 
@@ -166,6 +171,9 @@ struct ulp_context_list_entry {
 	struct bnxt_ulp_context			*ulp_ctx;
 };
 
+bool
+ulp_is_default_session_active(struct bnxt_ulp_context *ulp_ctx);
+
 /*
  * Allow the deletion of context only for the bnxt device that
  * created the session
@@ -381,15 +389,24 @@ bnxt_ulp_default_app_priority_get(struct bnxt_ulp_context *ulp_ctx);
 int
 bnxt_ulp_vxlan_ip_port_set(struct bnxt_ulp_context *ulp_ctx,
 			   uint32_t vxlan_ip_port);
+
 unsigned int
 bnxt_ulp_vxlan_ip_port_get(struct bnxt_ulp_context *ulp_ctx);
 
 int
 bnxt_ulp_ecpri_udp_port_set(struct bnxt_ulp_context *ulp_ctx,
 			    uint32_t ecpri_udp_port);
+
 unsigned int
 bnxt_ulp_ecpri_udp_port_get(struct bnxt_ulp_context *ulp_ctx);
 
+uint32_t
+bnxt_ulp_vxlan_gpe_next_proto_set(struct bnxt_ulp_context *ulp_ctx,
+				  uint8_t tunnel_next_proto);
+
+uint8_t
+bnxt_ulp_vxlan_gpe_next_proto_get(struct bnxt_ulp_context *ulp_ctx);
+
 int32_t
 bnxt_flow_meter_init(struct bnxt *bp);
 
diff --git a/drivers/net/bnxt/tf_ulp/ulp_def_rules.c b/drivers/net/bnxt/tf_ulp/ulp_def_rules.c
index e2d281130e..88ba00295c 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_def_rules.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_def_rules.c
@@ -183,6 +183,7 @@ ulp_df_dev_port_handler(struct bnxt_ulp_context *ulp_ctx,
 			struct bnxt_ulp_mapper_create_parms *mapper_params)
 {
 	uint16_t port_id;
+	uint16_t parif;
 	uint32_t ifindex;
 	int rc;
 
@@ -243,6 +244,18 @@ ulp_df_dev_port_handler(struct bnxt_ulp_context *ulp_ctx,
 	if (rc)
 		return rc;
 
+	/* Note:
+	 * We save the drv_func_parif into CF_IDX of phy_port_parif,
+	 * since that index is currently referenced by ingress templates
+	 * for datapath flows. If in the future we change the parser to
+	 * save it in the CF_IDX of drv_func_parif we also need to update
+	 * the template.
+	 * WARNING: Two VFs on same parent PF will not work, as the parif is
+	 * based on fw fid of the parent PF.
+	 */
+	parif = ULP_COMP_FLD_IDX_RD(mapper_params, BNXT_ULP_CF_IDX_DRV_FUNC_PARIF);
+	ULP_COMP_FLD_IDX_WR(mapper_params, BNXT_ULP_CF_IDX_PHY_PORT_PARIF, parif);
+
 	/* Set VF Func PARIF */
 	rc = ulp_set_parif_in_comp_fld(ulp_ctx, ifindex, BNXT_ULP_VF_FUNC_PARIF,
 				       mapper_params);
diff --git a/drivers/net/bnxt/tf_ulp/ulp_flow_db.c b/drivers/net/bnxt/tf_ulp/ulp_flow_db.c
index 2e6ea43ac1..fba61032d5 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_flow_db.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_flow_db.c
@@ -1177,7 +1177,7 @@ ulp_default_flow_db_cfa_action_get(struct bnxt_ulp_context *ulp_ctx,
 					     BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
 					     sub_typ, &params);
 	if (rc) {
-		BNXT_TF_DBG(INFO, "CFA Action ptr not found for flow id %u\n",
+		BNXT_TF_DBG(DEBUG, "CFA Action ptr not found for flow id %u\n",
 			    flow_id);
 		return -ENOENT;
 	}
diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.c b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
index eb0f95cfee..33ff14835f 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
@@ -56,6 +56,12 @@ ulp_mapper_glb_resource_info_list_get(uint32_t *num_entries)
 	return ulp_glb_resource_tbl;
 }
 
+uint32_t bnxt_ulp_glb_app_id_sig_get(uint8_t app_id)
+{
+	if (app_id >= BNXT_ULP_GLB_SIG_TBL_SIZE)
+		return 0;
+	return ulp_glb_app_sig_tbl[app_id];
+}
 /*
  * Read the global resource from the mapper global resource list
  *
@@ -230,9 +236,12 @@ ulp_mapper_glb_field_tbl_get(struct bnxt_ulp_mapper_parms *parms,
 			     uint32_t operand,
 			     uint8_t *val)
 {
+	uint8_t app_id_sig;
 	uint32_t t_idx;
 
-	t_idx = parms->app_id << (BNXT_ULP_APP_ID_SHIFT +
+	app_id_sig = bnxt_ulp_glb_app_id_sig_get(parms->app_id);
+
+	t_idx = app_id_sig << (BNXT_ULP_APP_ID_SHIFT +
 				  BNXT_ULP_HDR_SIG_ID_SHIFT +
 				  BNXT_ULP_GLB_FIELD_TBL_SHIFT);
 	t_idx += parms->class_tid << (BNXT_ULP_HDR_SIG_ID_SHIFT +
@@ -3314,6 +3323,11 @@ ulp_mapper_global_res_free(struct bnxt_ulp_context *ulp __rte_unused,
 		rc = bnxt_pmd_global_tunnel_set(port_id, ttype, dport,
 						&handle);
 		break;
+	case BNXT_ULP_RESOURCE_SUB_TYPE_GLOBAL_REGISTER_CUST_VXLAN_GPE_V6:
+		ttype = BNXT_GLOBAL_REGISTER_TUNNEL_VXLAN_GPE_V6;
+		rc = bnxt_pmd_global_tunnel_set(port_id, ttype, dport,
+						&handle);
+		break;
 	default:
 		rc = -EINVAL;
 		BNXT_TF_DBG(ERR, "Invalid ulp global resource type %d\n",
@@ -3374,6 +3388,9 @@ ulp_mapper_global_register_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	case BNXT_ULP_RESOURCE_SUB_TYPE_GLOBAL_REGISTER_CUST_VXLAN_GPE:
 		ttype = BNXT_GLOBAL_REGISTER_TUNNEL_VXLAN_GPE;
 		break;
+	case BNXT_ULP_RESOURCE_SUB_TYPE_GLOBAL_REGISTER_CUST_VXLAN_GPE_V6:
+		ttype = BNXT_GLOBAL_REGISTER_TUNNEL_VXLAN_GPE_V6;
+		break;
 	default:
 		rc = -EINVAL;
 		BNXT_TF_DBG(ERR, "Invalid ulp global resource type %d\n",
@@ -3421,15 +3438,14 @@ ulp_mapper_glb_resource_info_init(struct bnxt_ulp_context *ulp_ctx,
 				  struct bnxt_ulp_mapper_data *mapper_data)
 {
 	struct bnxt_ulp_glb_resource_info *glb_res;
-	uint32_t num_glb_res_ids, idx, dev_id;
+	uint32_t num_entries = 0, idx, dev_id;
 	uint8_t app_id;
 	int32_t rc = 0;
 
-	glb_res = ulp_mapper_glb_resource_info_list_get(&num_glb_res_ids);
-	if (!glb_res || !num_glb_res_ids) {
-		BNXT_TF_DBG(ERR, "Invalid Arguments\n");
-		return -EINVAL;
-	}
+	glb_res = ulp_mapper_glb_resource_info_list_get(&num_entries);
+	/* Check if there are no resources */
+	if (!num_entries)
+		return 0;
 
 	rc = bnxt_ulp_cntxt_dev_id_get(ulp_ctx, &dev_id);
 	if (rc) {
@@ -3446,7 +3462,7 @@ ulp_mapper_glb_resource_info_init(struct bnxt_ulp_context *ulp_ctx,
 	}
 
 	/* Iterate the global resources and process each one */
-	for (idx = 0; idx < num_glb_res_ids; idx++) {
+	for (idx = 0; idx < num_entries; idx++) {
 		if (dev_id != glb_res[idx].device_id ||
 		    glb_res[idx].app_id != app_id)
 			continue;
@@ -3480,15 +3496,14 @@ ulp_mapper_app_glb_resource_info_init(struct bnxt_ulp_context *ulp_ctx,
 				  struct bnxt_ulp_mapper_data *mapper_data)
 {
 	struct bnxt_ulp_glb_resource_info *glb_res;
-	uint32_t num_glb_res_ids, idx, dev_id;
+	uint32_t num_entries, idx, dev_id;
 	uint8_t app_id;
 	int32_t rc = 0;
 
-	glb_res = bnxt_ulp_app_glb_resource_info_list_get(&num_glb_res_ids);
-	if (!glb_res || !num_glb_res_ids) {
-		BNXT_TF_DBG(ERR, "Invalid Arguments\n");
-		return -EINVAL;
-	}
+	glb_res = bnxt_ulp_app_glb_resource_info_list_get(&num_entries);
+	/* Check if there are no resources */
+	if (!num_entries)
+		return 0;
 
 	rc = bnxt_ulp_cntxt_dev_id_get(ulp_ctx, &dev_id);
 	if (rc) {
@@ -3505,7 +3520,7 @@ ulp_mapper_app_glb_resource_info_init(struct bnxt_ulp_context *ulp_ctx,
 	}
 
 	/* Iterate the global resources and process each one */
-	for (idx = 0; idx < num_glb_res_ids; idx++) {
+	for (idx = 0; idx < num_entries; idx++) {
 		if (dev_id != glb_res[idx].device_id ||
 		    glb_res[idx].app_id != app_id)
 			continue;
diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.h b/drivers/net/bnxt/tf_ulp/ulp_mapper.h
index 225a14ccfa..e6c1338555 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.h
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.h
@@ -98,6 +98,8 @@ struct bnxt_ulp_mapper_create_parms {
 	uint16_t			port_id;
 };
 
+uint32_t bnxt_ulp_glb_app_id_sig_get(uint8_t app_id);
+
 /* Function to initialize any dynamic mapper data. */
 int32_t
 ulp_mapper_init(struct bnxt_ulp_context	*ulp_ctx);
diff --git a/drivers/net/bnxt/tf_ulp/ulp_matcher.c b/drivers/net/bnxt/tf_ulp/ulp_matcher.c
index 8c90998a7d..7e1c1e5ae8 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_matcher.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_matcher.c
@@ -4,6 +4,7 @@
  */
 
 #include "ulp_matcher.h"
+#include "ulp_mapper.h"
 #include "ulp_utils.h"
 
 /* Utility function to calculate the class matcher hash */
@@ -47,10 +48,13 @@ ulp_matcher_pattern_match(struct ulp_rte_parser_params *params,
 	struct bnxt_ulp_class_match_info *class_match;
 	uint32_t class_hid;
 	uint16_t tmpl_id;
+	uint32_t app_id_sig;
+
+	app_id_sig = bnxt_ulp_glb_app_id_sig_get(params->app_id);
 
 	/* calculate the hash of the given flow */
 	class_hid = ulp_matcher_class_hash_calculate((params->hdr_bitmap.bits ^
-						     params->app_id),
+						     app_id_sig),
 						     params->fld_s_bitmap.bits);
 
 	/* validate the calculate hash values */
@@ -71,9 +75,9 @@ ulp_matcher_pattern_match(struct ulp_rte_parser_params *params,
 	}
 
 	/* Match the application id before proceeding */
-	if (params->app_id != class_match->app_sig) {
+	if (app_id_sig != class_match->app_sig) {
 		BNXT_TF_DBG(DEBUG, "Field to match the app id %u:%u\n",
-			    params->app_id, class_match->app_sig);
+			    app_id_sig, class_match->app_sig);
 		goto error;
 	}
 
@@ -99,13 +103,16 @@ int32_t
 ulp_matcher_action_match(struct ulp_rte_parser_params *params,
 			 uint32_t *act_id)
 {
+	struct bnxt_ulp_act_match_info *act_match;
+	uint32_t app_id_sig;
 	uint32_t act_hid;
 	uint16_t tmpl_id;
-	struct bnxt_ulp_act_match_info *act_match;
+
+	app_id_sig = bnxt_ulp_glb_app_id_sig_get(params->app_id);
 
 	/* calculate the hash of the given flow action */
 	act_hid = ulp_matcher_action_hash_calculate(params->act_bitmap.bits,
-						    params->app_id);
+						    app_id_sig);
 
 	/* validate the calculate hash values */
 	if (act_hid >= BNXT_ULP_ACT_SIG_TBL_MAX_SZ)
@@ -121,9 +128,9 @@ ulp_matcher_action_match(struct ulp_rte_parser_params *params,
 	}
 
 	/* Match the application id before proceeding */
-	if (params->app_id != act_match->app_sig) {
+	if (app_id_sig != act_match->app_sig) {
 		BNXT_TF_DBG(DEBUG, "Field to match the app id %u:%u\n",
-			    params->app_id, act_match->app_sig);
+			    app_id_sig, act_match->app_sig);
 		goto error;
 	}
 
diff --git a/drivers/net/bnxt/tf_ulp/ulp_port_db.c b/drivers/net/bnxt/tf_ulp/ulp_port_db.c
index bc0a7a95e6..dba2dcc7ae 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_port_db.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_port_db.c
@@ -50,8 +50,8 @@ int32_t	ulp_port_db_init(struct bnxt_ulp_context *ulp_ctxt, uint8_t port_cnt)
 	/* Attach the port database to the ulp context. */
 	bnxt_ulp_cntxt_ptr2_port_db_set(ulp_ctxt, port_db);
 
-	/* index 0 is not being used hence add 1 to size */
-	port_db->ulp_intf_list_size = BNXT_PORT_DB_MAX_INTF_LIST + 1;
+	/* 256 VFs + PFs etc. so making it 512*/
+	port_db->ulp_intf_list_size = BNXT_PORT_DB_MAX_INTF_LIST * 2;
 	/* Allocate the port tables */
 	port_db->ulp_intf_list = rte_zmalloc("bnxt_ulp_port_db_intf_list",
 					     port_db->ulp_intf_list_size *
diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
index da20b41c72..bd11facb03 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
@@ -249,10 +249,19 @@ bnxt_ulp_comp_fld_intf_update(struct ulp_rte_parser_params *params)
 	if (dir == BNXT_ULP_DIR_INGRESS) {
 		/* Set port PARIF */
 		if (ulp_port_db_parif_get(params->ulp_ctx, ifindex,
-					  BNXT_ULP_PHY_PORT_PARIF, &parif)) {
+					  BNXT_ULP_DRV_FUNC_PARIF, &parif)) {
 			BNXT_TF_DBG(ERR, "ParseErr:ifindex is not valid\n");
 			return;
 		}
+		/* Note:
+		 * We save the drv_func_parif into CF_IDX of phy_port_parif,
+		 * since that index is currently referenced by ingress templates
+		 * for datapath flows. If in the future we change the parser to
+		 * save it in the CF_IDX of drv_func_parif we also need to update
+		 * the template.
+		 * WARNING: Two VFs on same parent PF will not work, as the parif is
+		 * based on fw fid of the parent PF.
+		 */
 		ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_PHY_PORT_PARIF,
 				    parif);
 		/* Set port SVIF */
@@ -1232,6 +1241,8 @@ ulp_rte_l4_proto_type_update(struct ulp_rte_parser_params *params,
 			     uint16_t dst_port, uint16_t dst_mask,
 			     enum bnxt_ulp_hdr_bit hdr_bit)
 {
+	struct bnxt *bp;
+
 	switch (hdr_bit) {
 	case BNXT_ULP_HDR_BIT_I_UDP:
 	case BNXT_ULP_HDR_BIT_I_TCP:
@@ -1281,19 +1292,53 @@ ulp_rte_l4_proto_type_update(struct ulp_rte_parser_params *params,
 		break;
 	}
 
-	if (hdr_bit == BNXT_ULP_HDR_BIT_O_UDP && dst_port ==
-	    tfp_cpu_to_be_16(ULP_UDP_PORT_VXLAN)) {
-		ULP_BITMAP_SET(params->hdr_fp_bit.bits,
-			       BNXT_ULP_HDR_BIT_T_VXLAN);
-		ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_L3_TUN, 1);
+	bp = bnxt_pmd_get_bp(params->port_id);
+	if (bp == NULL) {
+		BNXT_TF_DBG(ERR, "Invalid bp\n");
+		return;
 	}
 
-	if (hdr_bit == BNXT_ULP_HDR_BIT_O_UDP && dst_port ==
-	    tfp_cpu_to_be_16(ULP_UDP_PORT_VXLAN_GPE)) {
+	/* vxlan dynamic customized port */
+	if (ULP_APP_CUST_VXLAN_EN(params->ulp_ctx)) {
+		/* ulp_rte_vxlan_hdr_handler will parser it further */
+		return;
+	}
+	/* vxlan static cutomized port */
+	else if (ULP_APP_CUST_VXLAN_SUPPORT(bp->ulp_ctx)) {
+		if (hdr_bit == BNXT_ULP_HDR_BIT_O_UDP &&
+		    dst_port == tfp_cpu_to_be_16(bp->ulp_ctx->cfg_data->vxlan_port)) {
+			ULP_BITMAP_SET(params->hdr_fp_bit.bits, BNXT_ULP_HDR_BIT_T_VXLAN);
+			ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_L3_TUN, 1);
+		}
+	}
+	/* vxlan ip port */
+	else if (ULP_APP_CUST_VXLAN_IP_SUPPORT(bp->ulp_ctx)) {
+		if (hdr_bit == BNXT_ULP_HDR_BIT_O_UDP &&
+		    dst_port == tfp_cpu_to_be_16(bp->ulp_ctx->cfg_data->vxlan_ip_port)) {
+			ULP_BITMAP_SET(params->hdr_fp_bit.bits, BNXT_ULP_HDR_BIT_T_VXLAN);
+			ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_L3_TUN, 1);
+			if (bp->vxlan_ip_upar_in_use &
+			    HWRM_TUNNEL_DST_PORT_QUERY_OUTPUT_UPAR_IN_USE_UPAR0) {
+				ULP_COMP_FLD_IDX_WR(params,
+						    BNXT_ULP_CF_IDX_VXLAN_IP_UPAR_ID,
+						    ULP_WP_SYM_TUN_HDR_TYPE_UPAR1);
+			}
+		}
+	}
+	/* vxlan gpe port */
+	else if (hdr_bit == BNXT_ULP_HDR_BIT_O_UDP &&
+		 dst_port == tfp_cpu_to_be_16(ULP_UDP_PORT_VXLAN_GPE)) {
 		ULP_BITMAP_SET(params->hdr_fp_bit.bits,
 			       BNXT_ULP_HDR_BIT_T_VXLAN_GPE);
 		ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_L3_TUN, 1);
 	}
+	/* vxlan standard port */
+	else if (hdr_bit == BNXT_ULP_HDR_BIT_O_UDP &&
+		 dst_port == tfp_cpu_to_be_16(ULP_UDP_PORT_VXLAN)) {
+		ULP_BITMAP_SET(params->hdr_fp_bit.bits,
+			       BNXT_ULP_HDR_BIT_T_VXLAN);
+		ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_L3_TUN, 1);
+	}
 }
 
 /* Function to handle the parsing of RTE Flow item UDP Header. */
@@ -1536,6 +1581,17 @@ ulp_rte_vxlan_hdr_handler(const struct rte_flow_item *item,
 				    ULP_UDP_PORT_VXLAN_MASK);
 	}
 
+	/* No need to check vxlan port for these conditions here */
+	if (ULP_APP_CUST_VXLAN_EN(params->ulp_ctx) ||
+	    ULP_APP_CUST_VXLAN_SUPPORT(params->ulp_ctx) ||
+	    ULP_APP_CUST_VXLAN_IP_SUPPORT(params->ulp_ctx))
+		return BNXT_TF_RC_SUCCESS;
+
+	/* Verify vxlan port */
+	if (dport != 0 && dport != ULP_UDP_PORT_VXLAN) {
+		BNXT_TF_DBG(ERR, "ParseErr:vxlan port is not valid\n");
+		return BNXT_TF_RC_PARSE_ERR;
+	}
 	return BNXT_TF_RC_SUCCESS;
 }
 
@@ -1603,6 +1659,18 @@ ulp_rte_vxlan_gpe_hdr_handler(const struct rte_flow_item *item,
 				    ULP_UDP_PORT_VXLAN_GPE_MASK);
 	}
 
+	if (ULP_APP_CUST_VXLAN_EN(params->ulp_ctx) ||
+	    ULP_APP_CUST_VXLAN_SUPPORT(params->ulp_ctx) ||
+	    ULP_APP_CUST_VXLAN_IP_SUPPORT(params->ulp_ctx)) {
+		BNXT_TF_DBG(ERR, "ParseErr:vxlan setting is not valid\n");
+		return BNXT_TF_RC_PARSE_ERR;
+	}
+
+	/* Verify the vxlan gpe port */
+	if (dport != 0 && dport != ULP_UDP_PORT_VXLAN_GPE) {
+		BNXT_TF_DBG(ERR, "ParseErr:vxlan gpe port is not valid\n");
+		return BNXT_TF_RC_PARSE_ERR;
+	}
 	return BNXT_TF_RC_SUCCESS;
 }
 
diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_struct.h b/drivers/net/bnxt/tf_ulp/ulp_template_struct.h
index becbb73655..1d78c5f07c 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_template_struct.h
+++ b/drivers/net/bnxt/tf_ulp/ulp_template_struct.h
@@ -373,6 +373,7 @@ struct bnxt_ulp_app_capabilities_info {
 	uint8_t				ha_pool_id;
 	uint8_t				ha_reg_state;
 	uint8_t				ha_reg_cnt;
+	uint8_t				tunnel_next_proto;
 	uint32_t			flags;
 };
 
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 19/47] net/bnxt: tf_ulp: convert recipe table to dynamic memory
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (13 preceding siblings ...)
  2024-10-01  5:58 ` [PATCH v3 16/47] net/bnxt: tf_ulp: miscellaneous fixes Sriharsha Basavapatna
@ 2024-10-01  5:58 ` Sriharsha Basavapatna
  2024-10-01  5:58 ` [PATCH v3 21/47] net/bnxt: tf_ulp: add action read and clear support Sriharsha Basavapatna
                   ` (18 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:58 UTC (permalink / raw)
  To: dev
  Cc: Kishore Padmanabha, Sriharsha Basavapatna, Michael Baucom, Ajit Khaparde

From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>

Converted the recipe table allocation from static model to dynamic
memory allocation model.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Michael Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/ulp_mapper.c | 175 +++++++++++++++------------
 drivers/net/bnxt/tf_ulp/ulp_mapper.h |   5 +-
 2 files changed, 97 insertions(+), 83 deletions(-)

diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.c b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
index 7045efffad..a7b35bf292 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
@@ -1280,65 +1280,71 @@ ulp_mapper_field_opc_next(struct bnxt_ulp_mapper_parms *parms,
 static void
 ulp_mapper_key_recipe_tbl_deinit(struct bnxt_ulp_mapper_data *mdata)
 {
+	struct bnxt_ulp_key_recipe_entry **recipes;
 	enum bnxt_ulp_direction dir;
+	uint32_t idx, ftype;
+
+	/* If recipe table is not initialized then exit */
+	if (!mdata->key_recipe_info.num_recipes)
+		return;
 
 	for (dir = 0; dir < BNXT_ULP_DIRECTION_LAST; dir++) {
-		rte_free(mdata->key_recipe_info.em_recipes[dir]);
-		rte_free(mdata->key_recipe_info.wc_recipes[dir]);
+		for (ftype = 0; ftype < ULP_RECIPE_TYPE_MAX; ftype++) {
+			recipes = mdata->key_recipe_info.recipes[dir][ftype];
+			for (idx = 0; idx < mdata->key_recipe_info.num_recipes;
+			      idx++) {
+				if (recipes[idx])
+					rte_free(recipes[idx]);
+			}
+			rte_free(mdata->key_recipe_info.recipes[dir][ftype]);
+			mdata->key_recipe_info.recipes[dir][ftype] =  NULL;
+		}
 	}
+	mdata->key_recipe_info.num_recipes = 0;
 }
 
 static int32_t
 ulp_mapper_key_recipe_tbl_init(struct bnxt_ulp_context *ulp_ctx,
 			       struct bnxt_ulp_mapper_data *mdata)
 {
-	struct bnxt_ulp_key_recipe_entry *recipes;
+	struct bnxt_ulp_key_recipe_entry **recipes;
 	enum bnxt_ulp_direction dir;
-	uint32_t dev_id = 0;
-	uint32_t num_recipes;
+	uint32_t dev_id = 0, size_val;
+	uint32_t num_recipes, ftype;
 	int32_t rc = 0;
 
 	rc = bnxt_ulp_cntxt_dev_id_get(ulp_ctx, &dev_id);
 	if (rc) {
 		BNXT_DRV_DBG(ERR, "Unable to get device id from ulp.\n");
-		return rc;
+		return -EINVAL;
 	}
 	num_recipes = bnxt_ulp_num_key_recipes_get(ulp_ctx);
 	if (!num_recipes)
-		return 0;
+		return rc;
 
+	size_val = sizeof(struct bnxt_ulp_key_recipe_entry *);
 	for (dir = 0; dir < BNXT_ULP_DIRECTION_LAST; dir++) {
-		recipes = rte_zmalloc("key_recipe_em",
-				   sizeof(struct bnxt_ulp_key_recipe_entry) *
-				   num_recipes, 0);
-		if (!recipes)
-			goto error;
-		mdata->key_recipe_info.em_recipes[dir] = recipes;
-
-		recipes = rte_zmalloc("key_recipe_wc",
-				   sizeof(struct bnxt_ulp_key_recipe_entry) *
-				   num_recipes, 0);
-		if (!recipes)
-			goto error;
-		mdata->key_recipe_info.wc_recipes[dir] = recipes;
+		for (ftype = 0; ftype < ULP_RECIPE_TYPE_MAX; ftype++) {
+			recipes = rte_zmalloc("key_recipe_list",
+					      size_val * num_recipes, 0);
+			if (!recipes) {
+				BNXT_DRV_DBG(ERR, "Uanable to alloc memory\n");
+				return -ENOMEM;
+			}
+			mdata->key_recipe_info.recipes[dir][ftype] = recipes;
+		}
 	}
-
 	mdata->key_recipe_info.num_recipes = num_recipes;
 	mdata->key_recipe_info.max_fields = BNXT_ULP_KEY_RECIPE_MAX_FLDS;
-
-	return 0;
-error:
-	(void)ulp_mapper_key_recipe_tbl_deinit(mdata);
-	return -ENOMEM;
+	return rc;
 }
 
-static struct bnxt_ulp_key_recipe_entry *
-ulp_mapper_key_recipe_entry_get(struct bnxt_ulp_context *ulp_ctx,
-				enum bnxt_ulp_direction dir,
-				enum bnxt_ulp_resource_sub_type stype,
-				uint8_t recipe_id, uint8_t *max_fields)
+static struct bnxt_ulp_mapper_data *
+ulp_mapper_key_recipe_args_validate(struct bnxt_ulp_context *ulp_ctx,
+				    enum bnxt_ulp_direction dir,
+				    enum bnxt_ulp_resource_sub_type stype,
+				    uint8_t recipe_id)
 {
-	struct bnxt_ulp_key_recipe_entry *recipes;
 	struct bnxt_ulp_mapper_data *mdata;
 
 	mdata = (struct bnxt_ulp_mapper_data *)
@@ -1355,52 +1361,54 @@ ulp_mapper_key_recipe_entry_get(struct bnxt_ulp_context *ulp_ctx,
 		BNXT_DRV_DBG(ERR, "Recipes are not supported\n");
 		return NULL;
 	}
-	switch (stype) {
-	case BNXT_ULP_RESOURCE_SUB_TYPE_KEY_RECIPE_TABLE_WM:
-		recipes = mdata->key_recipe_info.wc_recipes[dir];
-		break;
-	case BNXT_ULP_RESOURCE_SUB_TYPE_KEY_RECIPE_TABLE_EM:
-		recipes = mdata->key_recipe_info.em_recipes[dir];
-		break;
-	default:
-		BNXT_DRV_DBG(ERR, "Invalid type (%d) for key recipe.\n", stype);
+	if (stype != BNXT_ULP_RESOURCE_SUB_TYPE_KEY_RECIPE_TABLE_WM &&
+	    stype != BNXT_ULP_RESOURCE_SUB_TYPE_KEY_RECIPE_TABLE_EM) {
+		BNXT_DRV_DBG(ERR, "Invalid type (%d) in key recipe\n", stype);
 		return NULL;
-	};
-
-	if (recipe_id >= mdata->key_recipe_info.num_recipes) {
-		BNXT_DRV_DBG(ERR, "key recipe id out of range(%d >= %d)\n",
+	}
+	if (recipe_id >= mdata->key_recipe_info.num_recipes ||
+	    !mdata->key_recipe_info.num_recipes) {
+		BNXT_DRV_DBG(ERR, "Key recipe id out of range(%d >= %d)\n",
 			     recipe_id, mdata->key_recipe_info.num_recipes);
 		return NULL;
 	}
-
-	if (max_fields)
-		*max_fields = mdata->key_recipe_info.max_fields;
-	return &recipes[recipe_id];
+	return mdata;
 }
 
-/* Not a strict alloc, it is allocating with the key id */
 static struct bnxt_ulp_key_recipe_entry *
 ulp_mapper_key_recipe_alloc(struct bnxt_ulp_context *ulp_ctx,
 			    enum bnxt_ulp_direction dir,
 			    enum bnxt_ulp_resource_sub_type stype,
 			    uint8_t recipe_id, uint8_t *max_fields)
 {
-	struct bnxt_ulp_key_recipe_entry *recipe;
+	struct bnxt_ulp_key_recipe_entry **recipes;
+	struct bnxt_ulp_mapper_data *mdata = NULL;
+	uint32_t size_s = sizeof(struct bnxt_ulp_key_recipe_entry);
 
-	recipe = ulp_mapper_key_recipe_entry_get(ulp_ctx, dir, stype,
-						 recipe_id, max_fields);
-	if (recipe) {
-		if (recipe->in_use) {
-			BNXT_DRV_INF("Recipe ID (%d) already allocated\n",
-				     recipe_id);
+	mdata = ulp_mapper_key_recipe_args_validate(ulp_ctx, dir,
+						    stype, recipe_id);
+	if (mdata == NULL)
+		return NULL;
+
+	recipes = mdata->key_recipe_info.recipes[dir][stype];
+	if (recipes[recipe_id] == NULL) {
+		recipes[recipe_id] = rte_zmalloc("key_recipe_entry", size_s, 0);
+		if (recipes[recipe_id] == NULL) {
+			BNXT_DRV_DBG(ERR, "Unable to alloc key recipe\n");
 			return NULL;
 		}
-		recipe->in_use = true;
-		recipe->cnt = 0;
+#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
+#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_MAPPER
+	BNXT_DRV_INF("Alloc key recipe [%s]:[%s] = 0x%X\n",
+		     (dir == BNXT_ULP_DIRECTION_INGRESS) ? "rx" : "tx",
+		     ulp_mapper_key_recipe_type_to_str(stype), recipe_id);
+#endif
+#endif
+		*max_fields = mdata->key_recipe_info.max_fields;
+		return recipes[recipe_id];
 	}
-
-	/* key will be null if it failed */
-	return recipe;
+	BNXT_DRV_DBG(ERR, "Recipe ID (%d) already allocated\n", recipe_id);
+	return NULL;
 }
 
 /* The free just marks the entry as not in use and resets the number of entries
@@ -1412,15 +1420,19 @@ ulp_mapper_key_recipe_free(struct bnxt_ulp_context *ulp_ctx,
 			   enum bnxt_ulp_resource_sub_type stype,
 			   uint32_t index)
 {
-	struct bnxt_ulp_key_recipe_entry *recipe;
+	struct bnxt_ulp_key_recipe_entry **recipes;
+	struct bnxt_ulp_mapper_data *mdata = NULL;
 
-	recipe = ulp_mapper_key_recipe_entry_get(ulp_ctx, dir, stype,
-					      index, NULL);
-	if (recipe == NULL)
+	mdata = ulp_mapper_key_recipe_args_validate(ulp_ctx, dir,
+						    stype, index);
+	if (mdata == NULL)
 		return -EINVAL;
 
-	recipe->in_use = false;
-	recipe->cnt = 0;
+	recipes = mdata->key_recipe_info.recipes[dir][stype];
+	if (recipes[index] == NULL)
+		return -EINVAL;
+	rte_free(recipes[index]);
+	recipes[index] = NULL;
 #ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
 #ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_MAPPER
 	BNXT_DRV_INF("Free key recipe [%s]:[%s] = 0x%X\n",
@@ -1428,7 +1440,6 @@ ulp_mapper_key_recipe_free(struct bnxt_ulp_context *ulp_ctx,
 		     ulp_mapper_key_recipe_type_to_str(stype), index);
 #endif
 #endif
-
 	return 0;
 }
 
@@ -1454,8 +1465,9 @@ ulp_mapper_key_recipe_fields_get(struct bnxt_ulp_mapper_parms *parms,
 				 struct bnxt_ulp_mapper_tbl_info *tbl,
 				 uint32_t *num_flds)
 {
-	struct bnxt_ulp_key_recipe_entry *recipe;
+	struct bnxt_ulp_key_recipe_entry **recipes;
 	enum bnxt_ulp_resource_sub_type stype;
+	struct bnxt_ulp_mapper_data *mdata = NULL;
 	uint64_t recipe_id = 0;
 
 	/* Don't like this, but need to convert from a tbl resource func to the
@@ -1475,22 +1487,25 @@ ulp_mapper_key_recipe_fields_get(struct bnxt_ulp_mapper_parms *parms,
 	};
 
 	/* Get the recipe index from the registry file */
-	if (!ulp_regfile_read(parms->regfile,
-			      tbl->key_recipe_operand,
+	if (!ulp_regfile_read(parms->regfile, tbl->key_recipe_operand,
 			      &recipe_id)) {
-		BNXT_DRV_DBG(ERR,
-			     "Failed to get tbl idx from regfile[%d].\n",
+		BNXT_DRV_DBG(ERR, "Failed to get tbl idx from regfile[%d].\n",
 			     tbl->tbl_operand);
 		return NULL;
 	}
 	recipe_id = tfp_be_to_cpu_64(recipe_id);
-	recipe = ulp_mapper_key_recipe_entry_get(parms->ulp_ctx, tbl->direction,
-					      stype, recipe_id, NULL);
-	if (recipe == NULL || !recipe->in_use)
+	mdata = ulp_mapper_key_recipe_args_validate(parms->ulp_ctx,
+						    tbl->direction,
+						    stype, recipe_id);
+	if (mdata == NULL)
+		return NULL;
+
+	recipes = mdata->key_recipe_info.recipes[tbl->direction][stype];
+	if (recipes[recipe_id] == NULL)
 		return NULL;
 
-	*num_flds = recipe->cnt;
-	return &recipe->flds[0];
+	*num_flds = recipes[recipe_id]->cnt;
+	return &recipes[recipe_id]->flds[0];
 }
 
 static int32_t
@@ -3552,7 +3567,7 @@ ulp_mapper_func_info_process(struct bnxt_ulp_mapper_parms *parms,
 	}
 #ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
 #ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_MAPPER
-	BNXT_DRV_DBG(DEBUG, "write the %" PRIu64 " into func_opc %u\n", res,
+	BNXT_DRV_DBG(DEBUG, "write the %" PRIX64 " into func_opc %u\n", res,
 		     func_info->func_dst_opr);
 #endif
 #endif
diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.h b/drivers/net/bnxt/tf_ulp/ulp_mapper.h
index 9c7fb67891..53305670bf 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.h
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.h
@@ -31,16 +31,15 @@ struct bnxt_ulp_mapper_glb_resource_entry {
 
 #define BNXT_ULP_KEY_RECIPE_MAX_FLDS 128
 struct bnxt_ulp_key_recipe_entry {
-	bool in_use;
 	uint32_t cnt;
 	struct bnxt_ulp_mapper_key_info	flds[BNXT_ULP_KEY_RECIPE_MAX_FLDS];
 };
 
+#define ULP_RECIPE_TYPE_MAX (BNXT_ULP_RESOURCE_SUB_TYPE_KEY_RECIPE_TABLE_WM + 1)
 struct bnxt_ulp_key_recipe_info {
 	uint32_t num_recipes;
 	uint8_t max_fields;
-	struct bnxt_ulp_key_recipe_entry *em_recipes[BNXT_ULP_DIRECTION_LAST];
-	struct bnxt_ulp_key_recipe_entry *wc_recipes[BNXT_ULP_DIRECTION_LAST];
+	struct bnxt_ulp_key_recipe_entry **recipes[BNXT_ULP_DIRECTION_LAST][ULP_RECIPE_TYPE_MAX];
 };
 
 struct ulp_mapper_core_ops;
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 21/47] net/bnxt: tf_ulp: add action read and clear support
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (14 preceding siblings ...)
  2024-10-01  5:58 ` [PATCH v3 19/47] net/bnxt: tf_ulp: convert recipe table to dynamic memory Sriharsha Basavapatna
@ 2024-10-01  5:58 ` Sriharsha Basavapatna
  2024-10-01  5:58 ` [PATCH v3 23/47] net/bnxt: tf_ulp: VFR updates for Thor 2 Sriharsha Basavapatna
                   ` (17 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:58 UTC (permalink / raw)
  To: dev
  Cc: Jay Ding, Sriharsha Basavapatna, Michael Baucom, Farah Smith,
	Ajit Khaparde

From: Jay Ding <jay.ding@broadcom.com>

Implement action read and clear support. Change flow
query count to reset the count after read in ULP.
Update cli cmds accordingly.

Fixed bnxt_mpc_xmit() to pad the mpc message to be
multiple of 16 bytes.

Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Michael Baucom <michael.baucom@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c
index f1bbce797d..2be37b59c2 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c
@@ -83,6 +83,10 @@ ulp_fc_tfc_flow_stat_get(struct bnxt_ulp_context *ctxt,
 	cmm_info.rsubtype = CFA_RSUBTYPE_CMM_ACT;
 	cmm_info.act_handle = handle;
 	cmm_info.dir = (enum cfa_dir)direction;
+	cmm_clr.clr = true;
+	cmm_clr.offset_in_byte = 0;
+	cmm_clr.sz_in_byte = sizeof(data64[ULP_FC_TFC_PKT_CNT_OFFS]) +
+			     sizeof(data64[ULP_FC_TFC_BYTE_CNT_OFFS]);
 	rc = tfc_act_get(tfcp, NULL, &cmm_info, &cmm_clr, data, &word_size);
 	if (rc) {
 		BNXT_DRV_DBG(ERR,
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 23/47] net/bnxt: tf_ulp: VFR updates for Thor 2
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (15 preceding siblings ...)
  2024-10-01  5:58 ` [PATCH v3 21/47] net/bnxt: tf_ulp: add action read and clear support Sriharsha Basavapatna
@ 2024-10-01  5:58 ` Sriharsha Basavapatna
  2024-10-01  5:58 ` [PATCH v3 25/47] net/bnxt: tf_ulp: update template files Sriharsha Basavapatna
                   ` (16 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:58 UTC (permalink / raw)
  To: dev
  Cc: Mike Baucom, Sriharsha Basavapatna, Farah Smith,
	Kishore Padmanabha, Ajit Khaparde

From: Mike Baucom <michael.baucom@broadcom.com>

Update to VFR code to:
- add the endpoint (efid) to the session
- modify the generic tables to write the l2 context id
- tfc session code changes to allow the efid to be added to the sid
- release both rfid and efid from afm

This patch includes a few related changes:

Thor2 change the counter get to clear on request
	Allow the caller to either clear on read or simply read based
	on their request.

Reject duplicate EM flow entry
	It is not necessary to add an duplicate EM entry to WC.
	This change will reject it.

Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c           |  15 +++
 drivers/net/bnxt/bnxt_reps.c             |  60 +++++++++---
 drivers/net/bnxt/tf_ulp/bnxt_ulp.c       |  28 ++++++
 drivers/net/bnxt/tf_ulp/bnxt_ulp.h       |  12 +++
 drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c    |   2 +
 drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c   | 114 ++++++++++++++++++-----
 drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c |  11 ++-
 drivers/net/bnxt/tf_ulp/ulp_mapper_tfc.c |  33 ++++++-
 8 files changed, 229 insertions(+), 46 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 2c638193a5..aac487bdb2 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1800,6 +1800,21 @@ int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
 
 	/* Initialize bnxt ULP port details */
 	if (bnxt_enable_ulp(bp)) {
+		if (BNXT_CHIP_P7(bp)) {
+			/* Need to release the Fid from AFM control */
+			rc = bnxt_hwrm_release_afm_func(bp, bp->fw_fid,
+							bp->fw_fid,
+							HWRM_CFA_RELEASE_AFM_FUNC_INPUT_TYPE_RFID,
+							0);
+			if (rc) {
+				PMD_DRV_LOG(ERR,
+					    "Failed in hwrm release afm func:%u rc=%d\n",
+					    bp->fw_fid, rc);
+				goto error;
+			}
+			PMD_DRV_LOG(DEBUG, "Released RFID:%d\n", bp->fw_fid);
+		}
+
 		rc = bnxt_ulp_port_init(bp);
 		if (rc)
 			goto error;
diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c
index 701f75f53c..f058f1aac2 100644
--- a/drivers/net/bnxt/bnxt_reps.c
+++ b/drivers/net/bnxt/bnxt_reps.c
@@ -34,7 +34,7 @@ static const struct eth_dev_ops bnxt_rep_dev_ops = {
 
 static bool bnxt_rep_check_parent(struct bnxt_representor *rep)
 {
-	if (!rep->parent_dev->data->dev_private)
+	if (!rep->parent_dev->data || !rep->parent_dev->data->dev_private)
 		return false;
 
 	return true;
@@ -357,28 +357,41 @@ static int bnxt_tf_vfr_alloc(struct rte_eth_dev *vfr_ethdev)
 		rc = bnxt_hwrm_release_afm_func(parent_bp,
 				vfr->fw_fid,
 				parent_bp->fw_fid,
-				HWRM_CFA_RELEASE_AFM_FUNC_INPUT_TYPE_RFID,
+				HWRM_CFA_RELEASE_AFM_FUNC_INPUT_TYPE_EFID,
 				0);
 
-		if (rc)
+		if (rc) {
 			PMD_DRV_LOG(ERR,
-			    "Failed in hwrm release afm func:%u rc=%d\n",
-			    vfr->vf_id, rc);
+			    "Failed to release EFID:%d from RFID:%d rc=%d\n",
+			    vfr->vf_id, parent_bp->fw_fid, rc);
+			goto error_del_rules;
+		}
+		PMD_DRV_LOG(DEBUG, "Released EFID:%d from RFID:%d\n",
+			    vfr->fw_fid, parent_bp->fw_fid);
+
 	} else {
 		rc = bnxt_hwrm_cfa_pair_alloc(parent_bp, vfr);
-		if (rc)
+		if (rc) {
 			PMD_DRV_LOG(ERR,
 				    "Failed in hwrm vfr alloc vfr:%u rc=%d\n",
 				    vfr->vf_id, rc);
+			goto error_del_rules;
+		}
 	}
 
+	/* if supported, it will add the vfr endpoint to the session, otherwise
+	 * it returns success
+	 */
+	rc = bnxt_ulp_vfr_session_fid_add(parent_bp->ulp_ctx, vfr->fw_fid);
 	if (rc)
-		(void)bnxt_ulp_delete_vfr_default_rules(vfr);
+		goto error_del_rules;
 	else
 		PMD_DRV_LOG(DEBUG,
 			    "BNXT Port:%d VFR created and initialized\n",
 			    vfr->dpdk_port_id);
-
+	return rc;
+error_del_rules:
+	(void)bnxt_ulp_delete_vfr_default_rules(vfr);
 	return rc;
 }
 
@@ -489,8 +502,29 @@ int bnxt_rep_dev_start_op(struct rte_eth_dev *eth_dev)
 
 static int bnxt_tf_vfr_free(struct bnxt_representor *vfr)
 {
+	struct bnxt *parent_bp;
+	int32_t rc;
+
 	PMD_DRV_LOG(DEBUG, "BNXT Port:%d VFR ulp free\n", vfr->dpdk_port_id);
-	return bnxt_ulp_delete_vfr_default_rules(vfr);
+	rc = bnxt_ulp_delete_vfr_default_rules(vfr);
+	if (rc)
+		PMD_DRV_LOG(ERR,
+			    "Failed to delete dflt rules from Port:%d VFR\n",
+			    vfr->dpdk_port_id);
+
+	/* Need to remove the vfr fid from the session regardless */
+	parent_bp = vfr->parent_dev->data->dev_private;
+	if (!parent_bp) {
+		PMD_DRV_LOG(DEBUG, "BNXT Port:%d VFR already freed\n",
+			    vfr->dpdk_port_id);
+		return 0;
+	}
+	rc = bnxt_ulp_vfr_session_fid_rem(parent_bp->ulp_ctx, vfr->fw_fid);
+	if (rc)
+		PMD_DRV_LOG(ERR,
+			    "Failed to remove BNXT Port:%d VFR from session\n",
+			    vfr->dpdk_port_id);
+	return rc;
 }
 
 static int bnxt_vfr_free(struct bnxt_representor *vfr)
@@ -564,13 +598,15 @@ int bnxt_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,
 	struct bnxt_representor *rep_bp = eth_dev->data->dev_private;
 	struct bnxt *parent_bp;
 	unsigned int max_rx_rings;
-	int rc = 0;
 
 	/* MAC Specifics */
 	if (!bnxt_rep_check_parent(rep_bp)) {
-		/* Need not be an error scenario, if parent is closed first */
 		PMD_DRV_LOG(INFO, "Rep parent port does not exist.\n");
-		return rc;
+		/* Need be an error scenario, if parent is removed first */
+		if (eth_dev->device->driver == NULL)
+			return -ENODEV;
+		/* Need not be an error scenario, if parent is closed first */
+		return 0;
 	}
 	parent_bp = rep_bp->parent_dev->data->dev_private;
 	PMD_DRV_LOG(DEBUG, "Representor dev_info_get_op\n");
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
index 037723f20c..a942af4486 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
@@ -1567,3 +1567,31 @@ bnxt_ulp_feature_bits_get(struct bnxt_ulp_context *ulp_ctx)
 	return ulp_ctx->cfg_data->feature_bits;
 }
 
+/* Add the VF Rep endpoint to the session */
+int32_t
+bnxt_ulp_vfr_session_fid_add(struct bnxt_ulp_context *ulp_ctx,
+			     uint16_t vfr_fid)
+{
+	int32_t rc = 0;
+
+	if (ulp_ctx == NULL || ulp_ctx->ops == NULL)
+		return -EINVAL;
+	if (ulp_ctx->ops->ulp_vfr_session_fid_add)
+		rc = ulp_ctx->ops->ulp_vfr_session_fid_add(ulp_ctx, vfr_fid);
+
+	return rc;
+}
+
+/* Remove the VF Rep endpoint from the session */
+int32_t
+bnxt_ulp_vfr_session_fid_rem(struct bnxt_ulp_context *ulp_ctx,
+			     uint16_t vfr_fid)
+{
+	int32_t rc = 0;
+
+	if (ulp_ctx == NULL || ulp_ctx->ops == NULL)
+		return -EINVAL;
+	if (ulp_ctx->ops->ulp_vfr_session_fid_rem)
+		rc = ulp_ctx->ops->ulp_vfr_session_fid_rem(ulp_ctx, vfr_fid);
+	return rc;
+}
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.h b/drivers/net/bnxt/tf_ulp/bnxt_ulp.h
index 3ab142767f..9ea34eab3b 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.h
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.h
@@ -220,6 +220,12 @@ struct bnxt_ulp_core_ops {
 	void
 	(*ulp_ctx_detach)(struct bnxt *bp,
 			  struct bnxt_ulp_session_state *session);
+	int32_t
+	(*ulp_vfr_session_fid_add)(struct bnxt_ulp_context *ulp_ctx,
+				  uint16_t rep_fid);
+	int32_t
+	(*ulp_vfr_session_fid_rem)(struct bnxt_ulp_context *ulp_ctx,
+				  uint16_t rep_fid);
 };
 
 extern const struct bnxt_ulp_core_ops bnxt_ulp_tf_core_ops;
@@ -581,4 +587,10 @@ int32_t bnxt_ulp_num_key_recipes_get(struct bnxt_ulp_context *ulp_ctx);
 uint64_t
 bnxt_ulp_feature_bits_get(struct bnxt_ulp_context *ulp_ctx);
 
+int32_t
+bnxt_ulp_vfr_session_fid_add(struct bnxt_ulp_context *ulp_ctx,
+			     uint16_t vfr_fid);
+int32_t
+bnxt_ulp_vfr_session_fid_rem(struct bnxt_ulp_context *ulp_ctx,
+			     uint16_t vfr_fid);
 #endif /* _BNXT_ULP_H_ */
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
index 00a36b2e82..2d46d21a5d 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
@@ -1511,4 +1511,6 @@ const struct bnxt_ulp_core_ops bnxt_ulp_tf_core_ops = {
 	.ulp_ctx_detach = ulp_tf_ctx_detach,
 	.ulp_deinit =  ulp_tf_deinit,
 	.ulp_init =  ulp_tf_init,
+	.ulp_vfr_session_fid_add = NULL,
+	.ulp_vfr_session_fid_rem = NULL
 };
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
index 191eb09160..3e934c861a 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
@@ -336,7 +336,7 @@ ulp_tfc_tbl_scope_init(struct bnxt *bp)
 {
 	struct tfc_tbl_scope_mem_alloc_parms mem_parms;
 	struct tfc_tbl_scope_size_query_parms qparms =  { 0 };
-	uint8_t max_lkup_sz[CFA_DIR_MAX], max_act_sz[CFA_DIR_MAX];
+	uint16_t max_lkup_sz[CFA_DIR_MAX], max_act_sz[CFA_DIR_MAX];
 	struct tfc_tbl_scope_cpm_alloc_parms cparms;
 	uint16_t fid, max_pools;
 	bool first = true, shared = false;
@@ -681,6 +681,70 @@ ulp_tfc_ctx_init(struct bnxt *bp,
 	return rc;
 }
 
+static int32_t
+ulp_tfc_vfr_session_fid_add(struct bnxt_ulp_context *ulp_ctx, uint16_t rep_fid)
+{
+	uint16_t fid_cnt = 0, sid = 0;
+	struct tfc *tfcp = NULL;
+	int rc;
+
+	tfcp = bnxt_ulp_cntxt_tfcp_get(ulp_ctx);
+	if (!tfcp) {
+		PMD_DRV_LOG(ERR, "Unable to get tfcp from ulp_ctx\n");
+		return -EINVAL;
+	}
+
+	/* Get the session id */
+	rc = bnxt_ulp_cntxt_sid_get(ulp_ctx, &sid);
+	if (rc) {
+		PMD_DRV_LOG(ERR, "Unable to get SID for VFR FID=%d\n", rep_fid);
+		return rc;
+	}
+
+	rc = tfc_session_fid_add(tfcp, rep_fid, sid, &fid_cnt);
+	if (!rc)
+		PMD_DRV_LOG(DEBUG,
+			    "EFID=%d added to SID=%d, %d total.\n",
+			    rep_fid, sid, fid_cnt);
+	else
+		PMD_DRV_LOG(ERR,
+			    "Failed to add EFID=%d to SID=%d\n",
+			    rep_fid, sid);
+	return rc;
+}
+
+static int32_t
+ulp_tfc_vfr_session_fid_rem(struct bnxt_ulp_context *ulp_ctx, uint16_t rep_fid)
+{
+	uint16_t fid_cnt = 0, sid = 0;
+	struct tfc *tfcp = NULL;
+	int rc;
+
+	tfcp = bnxt_ulp_cntxt_tfcp_get(ulp_ctx);
+	if (!tfcp) {
+		PMD_DRV_LOG(ERR, "Unable tfcp from ulp_ctx\n");
+		return -EINVAL;
+	}
+
+	/* Get the session id */
+	rc = bnxt_ulp_cntxt_sid_get(ulp_ctx, &sid);
+	if (rc) {
+		PMD_DRV_LOG(ERR, "Unable to get SID for VFR FID=%d\n", rep_fid);
+		return rc;
+	}
+
+	rc = tfc_session_fid_rem(tfcp, rep_fid, &fid_cnt);
+	if (!rc)
+		PMD_DRV_LOG(DEBUG,
+			    "Removed EFID=%d from SID=%d, %d remain.\n",
+			    rep_fid, sid, fid_cnt);
+	else
+		PMD_DRV_LOG(ERR, "Failed to remove EFID=%d from SID=%d\n",
+			    rep_fid, sid);
+
+	return rc;
+}
+
 static int32_t
 ulp_tfc_ctx_attach(struct bnxt *bp,
 		   struct bnxt_ulp_session_state *session)
@@ -703,6 +767,12 @@ ulp_tfc_ctx_attach(struct bnxt *bp,
 		return rc;
 	}
 
+	rc = bnxt_ulp_devid_get(bp, &dev_id);
+	if (rc) {
+		BNXT_DRV_DBG(ERR, "Unable to get device id from ulp.\n");
+		return rc;
+	}
+
 	/* Increment the ulp context data reference count usage. */
 	bp->ulp_ctx->cfg_data = session->cfg_data;
 	bp->ulp_ctx->cfg_data->ref_cnt++;
@@ -710,12 +780,12 @@ ulp_tfc_ctx_attach(struct bnxt *bp,
 	rc = tfc_session_fid_add(&bp->tfcp, bp->fw_fid,
 				 session->session_id, &fid_cnt);
 	if (rc) {
-		BNXT_DRV_DBG(ERR, "Failed to add FID:%d to SID:%d.\n",
+		BNXT_DRV_DBG(ERR, "Failed to add RFID:%d to SID:%d.\n",
 			     bp->fw_fid, session->session_id);
 		return rc;
 	}
-	BNXT_DRV_DBG(DEBUG, "SID:%d added FID:%d\n",
-		     session->session_id, bp->fw_fid);
+	BNXT_DRV_DBG(DEBUG, "RFID:%d added to SID:%d\n",
+		     bp->fw_fid, session->session_id);
 
 	rc = bnxt_ulp_cntxt_sid_set(bp->ulp_ctx, session->session_id);
 	if (rc) {
@@ -739,13 +809,6 @@ ulp_tfc_ctx_attach(struct bnxt *bp,
 		BNXT_DRV_DBG(ERR, "Unable to get the app id from ulp.\n");
 		return -EINVAL;
 	}
-
-	rc = bnxt_ulp_cntxt_dev_id_get(bp->ulp_ctx, &dev_id);
-	if (rc) {
-		BNXT_DRV_DBG(ERR, "Unable do get the dev_id.\n");
-		return -EINVAL;
-	}
-
 	flags = bp->ulp_ctx->cfg_data->ulp_flags;
 	if (ULP_APP_DEV_UNSUPPORTED_ENABLED(flags)) {
 		BNXT_DRV_DBG(ERR, "APP ID %d, Device ID: 0x%x not supported.\n",
@@ -769,11 +832,11 @@ ulp_tfc_ctx_detach(struct bnxt *bp,
 
 	rc = tfc_session_fid_rem(&bp->tfcp, bp->fw_fid, &fid_cnt);
 	if (rc)
-		BNXT_DRV_DBG(ERR, "Failed to remove FID:%d from SID:%d\n",
+		BNXT_DRV_DBG(ERR, "Failed to remove RFID:%d from SID:%d\n",
 			     bp->fw_fid, session->session_id);
 	else
-		BNXT_DRV_DBG(DEBUG, "SID:%d removed FID:%d CNT:%d\n",
-			     session->session_id, bp->fw_fid, fid_cnt);
+		BNXT_DRV_DBG(DEBUG, "Removed RFID:%d from SID:%d CNT:%d\n",
+			     bp->fw_fid, session->session_id, fid_cnt);
 	bnxt_ulp_cntxt_sid_reset(bp->ulp_ctx);
 	(void)tfc_close(&bp->tfcp);
 }
@@ -826,11 +889,11 @@ ulp_tfc_deinit(struct bnxt *bp,
 
 	rc = tfc_session_fid_rem(&bp->tfcp, bp->fw_fid, &fid_cnt);
 	if (rc)
-		BNXT_DRV_DBG(ERR, "Failed to remove FID:%d from SID:%d\n",
+		BNXT_DRV_DBG(ERR, "Failed to remove RFID:%d from SID:%d\n",
 			     bp->fw_fid, session->session_id);
 	else
-		BNXT_DRV_DBG(DEBUG, "SID:%d removed FID:%d CNT:%d\n",
-			     session->session_id, bp->fw_fid, fid_cnt);
+		BNXT_DRV_DBG(DEBUG, "Removed RFID:%d from SID:%d CNT:%d\n",
+			     bp->fw_fid, session->session_id, fid_cnt);
 	bnxt_ulp_cntxt_sid_reset(bp->ulp_ctx);
 	(void)tfc_close(&bp->tfcp);
 
@@ -853,6 +916,12 @@ ulp_tfc_init(struct bnxt *bp,
 	uint16_t sid;
 	int rc;
 
+	rc = bnxt_ulp_devid_get(bp, &ulp_dev_id);
+	if (rc) {
+		BNXT_DRV_DBG(ERR, "Unable to get device id from ulp.\n");
+		return rc;
+	}
+
 	bp->tfcp.bp = bp;
 	rc = tfc_open(&bp->tfcp);
 	if (rc) {
@@ -872,7 +941,7 @@ ulp_tfc_init(struct bnxt *bp,
 		BNXT_DRV_DBG(ERR, "Failed to allocate a session id\n");
 		return rc;
 	}
-	BNXT_DRV_DBG(DEBUG, "SID:%d allocated with FID:%d\n", sid, bp->fw_fid);
+	BNXT_DRV_DBG(DEBUG, "SID:%d allocated with RFID:%d\n", sid, bp->fw_fid);
 	session->session_id = sid;
 	rc = bnxt_ulp_cntxt_sid_set(bp->ulp_ctx, sid);
 	if (rc) {
@@ -899,13 +968,6 @@ ulp_tfc_init(struct bnxt *bp,
 		goto jump_to_error;
 	}
 
-	/* Initialize ulp dparms with values devargs passed */
-	rc = bnxt_ulp_cntxt_dev_id_get(bp->ulp_ctx, &ulp_dev_id);
-	if (rc) {
-		BNXT_DRV_DBG(ERR, "Unable to get device id from ulp.\n");
-		return rc;
-	}
-
 	rc = ulp_tfc_dparms_init(bp, bp->ulp_ctx, ulp_dev_id);
 	if (rc) {
 		BNXT_DRV_DBG(ERR, "Failed to initialize the dparms\n");
@@ -968,4 +1030,6 @@ const struct bnxt_ulp_core_ops bnxt_ulp_tfc_core_ops = {
 	.ulp_ctx_detach = ulp_tfc_ctx_detach,
 	.ulp_deinit =  ulp_tfc_deinit,
 	.ulp_init =  ulp_tfc_init,
+	.ulp_vfr_session_fid_add = ulp_tfc_vfr_session_fid_add,
+	.ulp_vfr_session_fid_rem = ulp_tfc_vfr_session_fid_rem
 };
diff --git a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c
index 2be37b59c2..24299a269b 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c
@@ -83,10 +83,13 @@ ulp_fc_tfc_flow_stat_get(struct bnxt_ulp_context *ctxt,
 	cmm_info.rsubtype = CFA_RSUBTYPE_CMM_ACT;
 	cmm_info.act_handle = handle;
 	cmm_info.dir = (enum cfa_dir)direction;
-	cmm_clr.clr = true;
-	cmm_clr.offset_in_byte = 0;
-	cmm_clr.sz_in_byte = sizeof(data64[ULP_FC_TFC_PKT_CNT_OFFS]) +
-			     sizeof(data64[ULP_FC_TFC_BYTE_CNT_OFFS]);
+	/* Read and Clear the hw stat if requested */
+	if (count->reset) {
+		cmm_clr.clr = true;
+		cmm_clr.offset_in_byte = 0;
+		cmm_clr.sz_in_byte = sizeof(data64[ULP_FC_TFC_PKT_CNT_OFFS]) +
+			sizeof(data64[ULP_FC_TFC_BYTE_CNT_OFFS]);
+	}
 	rc = tfc_act_get(tfcp, NULL, &cmm_info, &cmm_clr, data, &word_size);
 	if (rc) {
 		BNXT_DRV_DBG(ERR,
diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper_tfc.c b/drivers/net/bnxt/tf_ulp/ulp_mapper_tfc.c
index d8539134d2..ed840b111c 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper_tfc.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper_tfc.c
@@ -608,8 +608,12 @@ ulp_mapper_tfc_em_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		if (tbl->tbl_opcode == BNXT_ULP_EM_TBL_OPC_WR_REGFILE) {
 			uint64_t val = 0;
 
-			/* over max flows or hash collision */
-			if (rc == -E2BIG || rc == -ENOMEM) {
+			/* hash collision */
+			if (rc == -E2BIG)
+				BNXT_DRV_DBG(DEBUG, "Dulicate EM entry\n");
+
+			/* over max flows */
+			if (rc == -ENOMEM) {
 				val = 1;
 				rc = 0;
 				BNXT_DRV_DBG(DEBUG,
@@ -618,9 +622,11 @@ ulp_mapper_tfc_em_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 			ulp_regfile_write(parms->regfile, tbl->tbl_operand,
 					  rte_cpu_to_be_64(val));
 		}
-		if (rc)
+
+		if (rc && rc != -E2BIG)
 			BNXT_DRV_DBG(ERR,
 				     "Failed to insert em entry rc=%d.\n", rc);
+
 		if (rc && error != NULL && tfc_is_mpc_error(rc))
 			rte_flow_error_set((struct rte_flow_error *)error, EIO,
 					   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
@@ -1021,6 +1027,7 @@ ulp_mapper_tfc_index_entry_free(struct bnxt_ulp_context *ulp_ctx,
 	struct tfc *tfcp = NULL;
 	struct tfc_idx_tbl_info tbl_info = { 0 };
 	uint16_t fw_fid = 0;
+	int32_t rc;
 
 	if (bnxt_ulp_cntxt_fid_get(ulp_ctx, &fw_fid)) {
 		BNXT_DRV_DBG(ERR, "Failed to get func_id\n");
@@ -1039,7 +1046,16 @@ ulp_mapper_tfc_index_entry_free(struct bnxt_ulp_context *ulp_ctx,
 	tbl_info.id = (uint16_t)res->resource_hndl;
 
 	/* TBD: check to see if the memory needs to be cleaned as well*/
-	return tfc_idx_tbl_free(tfcp, fw_fid, &tbl_info);
+	rc = tfc_idx_tbl_free(tfcp, fw_fid, &tbl_info);
+#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
+#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_MAPPER
+	if (!rc)
+		BNXT_DRV_DBG(DEBUG, "Freed Index [%s]:[%s] = 0x%X\n",
+		     tfc_dir_2_str(tbl_info.dir),
+		     tfc_idx_tbl_2_str(tbl_info.rsubtype), tbl_info.id);
+#endif
+#endif
+	return rc;
 }
 
 static int32_t
@@ -1568,7 +1584,7 @@ ulp_mapper_tfc_ident_free(struct bnxt_ulp_context *ulp_ctx,
 	}
 #ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
 #ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_MAPPER
-	BNXT_DRV_INF("Freed Identifier [%s]:[%s] = 0x%X\n",
+	BNXT_DRV_DBG(DEBUG, "Freed Identifier [%s]:[%s] = 0x%X\n",
 		     tfc_dir_2_str(ident_info.dir),
 		     tfc_ident_2_str(ident_info.rsubtype), ident_info.id);
 #endif
@@ -1604,6 +1620,13 @@ ulp_mapper_tfc_tcam_entry_free(struct bnxt_ulp_context *ulp,
 			    tcam_info.id);
 		return -EINVAL;
 	}
+#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
+#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_MAPPER
+	BNXT_DRV_DBG(DEBUG, "Freed TCAM [%s]:[%s] = 0x%X\n",
+		     tfc_dir_2_str(tcam_info.dir),
+		     tfc_tcam_2_str(tcam_info.rsubtype), tcam_info.id);
+#endif
+#endif
 	return 0;
 }
 
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 25/47] net/bnxt: tf_ulp: update template files
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (16 preceding siblings ...)
  2024-10-01  5:58 ` [PATCH v3 23/47] net/bnxt: tf_ulp: VFR updates for Thor 2 Sriharsha Basavapatna
@ 2024-10-01  5:58 ` Sriharsha Basavapatna
  2024-10-01  5:58 ` [PATCH v3 26/47] net/bnxt: tf_ulp: enable recipe id generation Sriharsha Basavapatna
                   ` (15 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:58 UTC (permalink / raw)
  To: dev; +Cc: Kishore Padmanabha, Sriharsha Basavapatna, Ajit Khaparde

From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>

This patch updates template files for the following list
of changes, that are being added in the next patch.

- enable recipe id generation
- fix segfault in the wildcard recipe process

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 .../generic_templates/ulp_template_db_enum.h  | 115 +++---
 .../generic_templates/ulp_template_db_tbl.c   |   8 +-
 .../ulp_template_db_thor2_class.c             | 352 +++++++++++------
 .../ulp_template_db_thor_class.c              | 372 ++++++++++++------
 4 files changed, 547 insertions(+), 300 deletions(-)

diff --git a/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_enum.h b/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_enum.h
index 240acbc564..ddd65a62b1 100644
--- a/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_enum.h
+++ b/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_enum.h
@@ -6,7 +6,7 @@
 #ifndef ULP_TEMPLATE_DB_H_
 #define ULP_TEMPLATE_DB_H_
 
-#define BNXT_ULP_REGFILE_MAX_SZ 81
+#define BNXT_ULP_REGFILE_MAX_SZ 82
 #define BNXT_ULP_MAX_NUM_DEVICES 5
 #define BNXT_ULP_LOG2_MAX_NUM_DEV 2.32192809488736
 #define BNXT_ULP_GEN_TBL_MAX_SZ 50
@@ -31,19 +31,19 @@
 #define ULP_WH_PLUS_CLASS_COND_LIST_SIZE 50
 #define ULP_WH_PLUS_CLASS_COND_OPER_LIST_SIZE 0
 #define ULP_THOR_CLASS_TMPL_LIST_SIZE 5
-#define ULP_THOR_CLASS_TBL_LIST_SIZE 122
+#define ULP_THOR_CLASS_TBL_LIST_SIZE 126
 #define ULP_THOR_CLASS_KEY_INFO_LIST_SIZE 605
 #define ULP_THOR_CLASS_KEY_EXT_LIST_SIZE 615
-#define ULP_THOR_CLASS_IDENT_LIST_SIZE 39
-#define ULP_THOR_CLASS_RESULT_FIELD_LIST_SIZE 1248
+#define ULP_THOR_CLASS_IDENT_LIST_SIZE 43
+#define ULP_THOR_CLASS_RESULT_FIELD_LIST_SIZE 1252
 #define ULP_THOR_CLASS_COND_LIST_SIZE 3077
 #define ULP_THOR_CLASS_COND_OPER_LIST_SIZE 7
 #define ULP_THOR2_CLASS_TMPL_LIST_SIZE 5
-#define ULP_THOR2_CLASS_TBL_LIST_SIZE 121
+#define ULP_THOR2_CLASS_TBL_LIST_SIZE 125
 #define ULP_THOR2_CLASS_KEY_INFO_LIST_SIZE 665
 #define ULP_THOR2_CLASS_KEY_EXT_LIST_SIZE 628
-#define ULP_THOR2_CLASS_IDENT_LIST_SIZE 49
-#define ULP_THOR2_CLASS_RESULT_FIELD_LIST_SIZE 1512
+#define ULP_THOR2_CLASS_IDENT_LIST_SIZE 53
+#define ULP_THOR2_CLASS_RESULT_FIELD_LIST_SIZE 1516
 #define ULP_THOR2_CLASS_COND_LIST_SIZE 3298
 #define ULP_THOR2_CLASS_COND_OPER_LIST_SIZE 7
 #define ULP_WH_PLUS_ACT_TMPL_LIST_SIZE 11
@@ -699,8 +699,10 @@ enum bnxt_ulp_key_recipe_opc {
 
 enum bnxt_ulp_key_recipe_tbl_opc {
 	BNXT_ULP_KEY_RECIPE_TBL_OPC_NOT_USED = 0,
-	BNXT_ULP_KEY_RECIPE_TBL_OPC_WR_REGFILE = 1,
-	BNXT_ULP_KEY_RECIPE_TBL_OPC_LAST = 2
+	BNXT_ULP_KEY_RECIPE_TBL_OPC_ALLOC_REGFILE = 1,
+	BNXT_ULP_KEY_RECIPE_TBL_OPC_ALLOC_WR_REGFILE = 2,
+	BNXT_ULP_KEY_RECIPE_TBL_OPC_WR_REGFILE = 3,
+	BNXT_ULP_KEY_RECIPE_TBL_OPC_LAST = 4
 };
 
 enum bnxt_ulp_mark_db_opc {
@@ -795,53 +797,54 @@ enum bnxt_ulp_rf_idx {
 	BNXT_ULP_RF_IDX_HDR_SIG_ID = 32,
 	BNXT_ULP_RF_IDX_FLOW_SIG_ID = 33,
 	BNXT_ULP_RF_IDX_RID = 34,
-	BNXT_ULP_RF_IDX_RID_1 = 35,
-	BNXT_ULP_RF_IDX_WC_KEY_ID_0 = 36,
-	BNXT_ULP_RF_IDX_EM_KEY_ID_0 = 37,
-	BNXT_ULP_RF_IDX_DRV_FUNC_MAC = 38,
-	BNXT_ULP_RF_IDX_DRV_FUNC_PARENT_MAC = 39,
-	BNXT_ULP_RF_IDX_DEFAULT_AREC_PTR = 40,
-	BNXT_ULP_RF_IDX_CC = 41,
-	BNXT_ULP_RF_IDX_CF_FLOW_SIG_ID = 42,
-	BNXT_ULP_RF_IDX_PHY_PORT = 43,
-	BNXT_ULP_RF_IDX_METADATA_PROF = 44,
-	BNXT_ULP_RF_IDX_MODIFY_PTR = 45,
-	BNXT_ULP_RF_IDX_SOCK_DIR_SVIF = 46,
-	BNXT_ULP_RF_IDX_SOCK_DIR_PARIF = 47,
-	BNXT_ULP_RF_IDX_SOCK_DIR_ACT_PTR = 48,
-	BNXT_ULP_RF_IDX_SOCK_DIR_PARENT_MAC = 49,
-	BNXT_ULP_RF_IDX_RSS_VNIC = 50,
-	BNXT_ULP_RF_IDX_PORT_IS_PF = 51,
-	BNXT_ULP_RF_IDX_METER_PROFILE_PTR_0 = 52,
-	BNXT_ULP_RF_IDX_METER_PTR_0 = 53,
-	BNXT_ULP_RF_IDX_REF_CNT = 54,
-	BNXT_ULP_RF_IDX_RF_0 = 55,
-	BNXT_ULP_RF_IDX_RF_1 = 56,
-	BNXT_ULP_RF_IDX_RF_2 = 57,
-	BNXT_ULP_RF_IDX_RF_3 = 58,
-	BNXT_ULP_RF_IDX_RF_4 = 59,
-	BNXT_ULP_RF_IDX_RF_5 = 60,
-	BNXT_ULP_RF_IDX_RF_6 = 61,
-	BNXT_ULP_RF_IDX_RF_7 = 62,
-	BNXT_ULP_RF_IDX_CMM_ACT_HNDL = 63,
-	BNXT_ULP_RF_IDX_CMM_STAT_HNDL = 64,
-	BNXT_ULP_RF_IDX_CMM_MOD_HNDL = 65,
-	BNXT_ULP_RF_IDX_CMM_ENC_HNDL = 66,
-	BNXT_ULP_RF_IDX_CMM_SRP_HNDL = 67,
-	BNXT_ULP_RF_IDX_VF_FUNC_METADATA = 68,
-	BNXT_ULP_RF_IDX_CHAIN_ID_METADATA = 69,
-	BNXT_ULP_RF_IDX_RECYCLE_CNT = 70,
-	BNXT_ULP_RF_IDX_DEST_VNIC = 71,
-	BNXT_ULP_RF_IDX_DEST_VPORT = 72,
-	BNXT_ULP_RF_IDX_DEST_METADATA = 73,
-	BNXT_ULP_RF_IDX_PROF_TCAM_PRI = 74,
-	BNXT_ULP_RF_IDX_EM_INSERT_FAIL = 75,
-	BNXT_ULP_RF_IDX_PROF_TCAM_PRIORITY = 76,
-	BNXT_ULP_RF_IDX_TERM_FLOW = 77,
-	BNXT_ULP_RF_IDX_O_DMAC = 78,
-	BNXT_ULP_RF_IDX_FLOW_CNTR_PTR_F1 = 79,
-	BNXT_ULP_RF_IDX_CMM_STAT_HNDL_F1 = 80,
-	BNXT_ULP_RF_IDX_LAST = 81
+	BNXT_ULP_RF_IDX_WC_KEY_ID_0 = 35,
+	BNXT_ULP_RF_IDX_EM_KEY_ID_0 = 36,
+	BNXT_ULP_RF_IDX_DRV_FUNC_MAC = 37,
+	BNXT_ULP_RF_IDX_DRV_FUNC_PARENT_MAC = 38,
+	BNXT_ULP_RF_IDX_DEFAULT_AREC_PTR = 39,
+	BNXT_ULP_RF_IDX_CC = 40,
+	BNXT_ULP_RF_IDX_CF_FLOW_SIG_ID = 41,
+	BNXT_ULP_RF_IDX_PHY_PORT = 42,
+	BNXT_ULP_RF_IDX_METADATA_PROF = 43,
+	BNXT_ULP_RF_IDX_MODIFY_PTR = 44,
+	BNXT_ULP_RF_IDX_SOCK_DIR_SVIF = 45,
+	BNXT_ULP_RF_IDX_SOCK_DIR_PARIF = 46,
+	BNXT_ULP_RF_IDX_SOCK_DIR_ACT_PTR = 47,
+	BNXT_ULP_RF_IDX_SOCK_DIR_PARENT_MAC = 48,
+	BNXT_ULP_RF_IDX_RSS_VNIC = 49,
+	BNXT_ULP_RF_IDX_PORT_IS_PF = 50,
+	BNXT_ULP_RF_IDX_METER_PROFILE_PTR_0 = 51,
+	BNXT_ULP_RF_IDX_METER_PTR_0 = 52,
+	BNXT_ULP_RF_IDX_REF_CNT = 53,
+	BNXT_ULP_RF_IDX_RF_0 = 54,
+	BNXT_ULP_RF_IDX_RF_1 = 55,
+	BNXT_ULP_RF_IDX_RF_2 = 56,
+	BNXT_ULP_RF_IDX_RF_3 = 57,
+	BNXT_ULP_RF_IDX_RF_4 = 58,
+	BNXT_ULP_RF_IDX_RF_5 = 59,
+	BNXT_ULP_RF_IDX_RF_6 = 60,
+	BNXT_ULP_RF_IDX_RF_7 = 61,
+	BNXT_ULP_RF_IDX_CMM_ACT_HNDL = 62,
+	BNXT_ULP_RF_IDX_CMM_STAT_HNDL = 63,
+	BNXT_ULP_RF_IDX_CMM_MOD_HNDL = 64,
+	BNXT_ULP_RF_IDX_CMM_ENC_HNDL = 65,
+	BNXT_ULP_RF_IDX_CMM_SRP_HNDL = 66,
+	BNXT_ULP_RF_IDX_VF_FUNC_METADATA = 67,
+	BNXT_ULP_RF_IDX_CHAIN_ID_METADATA = 68,
+	BNXT_ULP_RF_IDX_RECYCLE_CNT = 69,
+	BNXT_ULP_RF_IDX_DEST_VNIC = 70,
+	BNXT_ULP_RF_IDX_DEST_VPORT = 71,
+	BNXT_ULP_RF_IDX_DEST_METADATA = 72,
+	BNXT_ULP_RF_IDX_PROF_TCAM_PRI = 73,
+	BNXT_ULP_RF_IDX_EM_INSERT_FAIL = 74,
+	BNXT_ULP_RF_IDX_PROF_TCAM_PRIORITY = 75,
+	BNXT_ULP_RF_IDX_TERM_FLOW = 76,
+	BNXT_ULP_RF_IDX_O_DMAC = 77,
+	BNXT_ULP_RF_IDX_FLOW_CNTR_PTR_F1 = 78,
+	BNXT_ULP_RF_IDX_CMM_STAT_HNDL_F1 = 79,
+	BNXT_ULP_RF_IDX_WC_RECIPE_ID = 80,
+	BNXT_ULP_RF_IDX_EM_RECIPE_ID = 81,
+	BNXT_ULP_RF_IDX_LAST = 82
 };
 
 enum bnxt_ulp_tcam_tbl_opc {
diff --git a/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_tbl.c b/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_tbl.c
index 70f31946ab..4f8cc5a4b3 100644
--- a/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_tbl.c
+++ b/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_tbl.c
@@ -1121,7 +1121,7 @@ const struct bnxt_ulp_generic_tbl_params ulp_thor_generic_tbl_params[] = {
 	.name = "INGRESS GENERIC_TABLE_PROTO_HEADER",
 	.gen_tbl_type = BNXT_ULP_GEN_TBL_TYPE_HASH_LIST,
 	.result_num_entries = 256,
-	.result_num_bytes = 10,
+	.result_num_bytes = 14,
 	.key_num_bytes = 10,
 	.partial_key_num_bytes = 0,
 	.num_buckets = 4,
@@ -1133,7 +1133,7 @@ const struct bnxt_ulp_generic_tbl_params ulp_thor_generic_tbl_params[] = {
 	.name = "EGRESS GENERIC_TABLE_PROTO_HEADER",
 	.gen_tbl_type = BNXT_ULP_GEN_TBL_TYPE_HASH_LIST,
 	.result_num_entries = 256,
-	.result_num_bytes = 10,
+	.result_num_bytes = 14,
 	.key_num_bytes = 10,
 	.partial_key_num_bytes = 0,
 	.num_buckets = 4,
@@ -1724,7 +1724,7 @@ const struct bnxt_ulp_generic_tbl_params ulp_thor2_generic_tbl_params[] = {
 	.name = "INGRESS GENERIC_TABLE_PROTO_HEADER",
 	.gen_tbl_type = BNXT_ULP_GEN_TBL_TYPE_HASH_LIST,
 	.result_num_entries = 256,
-	.result_num_bytes = 10,
+	.result_num_bytes = 14,
 	.key_num_bytes = 10,
 	.partial_key_num_bytes = 0,
 	.num_buckets = 4,
@@ -1736,7 +1736,7 @@ const struct bnxt_ulp_generic_tbl_params ulp_thor2_generic_tbl_params[] = {
 	.name = "EGRESS GENERIC_TABLE_PROTO_HEADER",
 	.gen_tbl_type = BNXT_ULP_GEN_TBL_TYPE_HASH_LIST,
 	.result_num_entries = 256,
-	.result_num_bytes = 10,
+	.result_num_bytes = 14,
 	.key_num_bytes = 10,
 	.partial_key_num_bytes = 0,
 	.num_buckets = 4,
diff --git a/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor2_class.c b/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor2_class.c
index 5cfdd0804b..99c56fea0c 100644
--- a/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor2_class.c
+++ b/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor2_class.c
@@ -13,7 +13,7 @@ struct bnxt_ulp_mapper_tmpl_info ulp_thor2_class_tmpl_list[] = {
 	/* class_tid: 1, ingress */
 	[1] = {
 	.device_name = BNXT_ULP_DEVICE_ID_THOR2,
-	.num_tbls = 41,
+	.num_tbls = 43,
 	.start_tbl_idx = 0,
 	.reject_info = {
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_FALSE,
@@ -23,8 +23,8 @@ struct bnxt_ulp_mapper_tmpl_info ulp_thor2_class_tmpl_list[] = {
 	/* class_tid: 2, egress */
 	[2] = {
 	.device_name = BNXT_ULP_DEVICE_ID_THOR2,
-	.num_tbls = 26,
-	.start_tbl_idx = 41,
+	.num_tbls = 28,
+	.start_tbl_idx = 43,
 	.reject_info = {
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_FALSE,
 		.cond_start_idx = 1655,
@@ -34,7 +34,7 @@ struct bnxt_ulp_mapper_tmpl_info ulp_thor2_class_tmpl_list[] = {
 	[3] = {
 	.device_name = BNXT_ULP_DEVICE_ID_THOR2,
 	.num_tbls = 35,
-	.start_tbl_idx = 67,
+	.start_tbl_idx = 71,
 	.reject_info = {
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_FALSE,
 		.cond_start_idx = 3292,
@@ -44,7 +44,7 @@ struct bnxt_ulp_mapper_tmpl_info ulp_thor2_class_tmpl_list[] = {
 	[4] = {
 	.device_name = BNXT_ULP_DEVICE_ID_THOR2,
 	.num_tbls = 19,
-	.start_tbl_idx = 102,
+	.start_tbl_idx = 106,
 	.reject_info = {
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_FALSE,
 		.cond_start_idx = 3296,
@@ -442,20 +442,19 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.key_bit_size = 74,
 	.key_num_fields = 3,
 	.ident_start_idx = 11,
-	.ident_nums = 5
+	.ident_nums = 7
 	},
 	{ /* class_tid: 1, , table: control.proto_header_cache_miss */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_CTRL_TABLE,
 	.direction = TF_DIR_RX,
 	.execute_info = {
 		.cond_true_goto  = 1,
-		.cond_false_goto = 11,
+		.cond_false_goto = 13,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
 		.cond_start_idx = 42,
 		.cond_nums = 1 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
-	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
-	.fdb_operand = BNXT_ULP_RF_IDX_RID
+	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP
 	},
 	{ /* class_tid: 1, , table: hdr_overlap_cache.overlap_check */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_GENERIC_TABLE,
@@ -479,7 +478,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.partial_key_start_idx = 53,
 	.partial_key_num_fields = 1,
 	.partial_key_bit_size = 64,
-	.ident_start_idx = 16,
+	.ident_start_idx = 18,
 	.ident_nums = 2
 	},
 	{ /* class_tid: 1, , table: control.overlap_miss */
@@ -493,7 +492,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 		.cond_nums = 1 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
-	.fdb_operand = BNXT_ULP_RF_IDX_RID_1
+	.fdb_operand = BNXT_ULP_RF_IDX_RID
 	},
 	{ /* class_tid: 1, , table: profile_tcam.allocate_wc_profile */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
@@ -509,10 +508,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.tbl_operand = BNXT_ULP_RF_IDX_PROFILE_TCAM_INDEX_0,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
-	.fdb_operand = BNXT_ULP_RF_IDX_RID_1,
+	.fdb_operand = BNXT_ULP_RF_IDX_RID,
 	.pri_opcode  = BNXT_ULP_PRI_OPC_APP_PRI_OR_CONST,
 	.pri_operand = ULP_THOR2_SYM_PROF_TCAM_PRI_APP,
-	.ident_start_idx = 18,
+	.ident_start_idx = 20,
 	.ident_nums = 1
 	},
 	{ /* class_tid: 1, , table: fkb_select.wc_gen_template */
@@ -529,7 +528,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.tbl_operand = BNXT_ULP_RF_IDX_WC_KEY_ID_0,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
-	.fdb_operand = BNXT_ULP_RF_IDX_RID_1,
+	.fdb_operand = BNXT_ULP_RF_IDX_RID,
 	.result_start_idx = 31,
 	.result_bit_size = 256,
 	.result_num_fields = 172
@@ -560,6 +559,19 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.result_bit_size = 48,
 	.result_num_fields = 3
 	},
+	{ /* class_tid: 1, , table: control.proto_header_rid_alloc */
+	.resource_func = BNXT_ULP_RESOURCE_FUNC_CTRL_TABLE,
+	.direction = TF_DIR_RX,
+	.execute_info = {
+		.cond_true_goto  = 1,
+		.cond_false_goto = 1,
+		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
+		.cond_start_idx = 320,
+		.cond_nums = 0 },
+	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
+	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
+	.fdb_operand = BNXT_ULP_RF_IDX_RID
+	},
 	{ /* class_tid: 1, , table: fkb_select.em_gen_template_alloc */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
 	.resource_type = CFA_RSUBTYPE_IDX_TBL_EM_FKB,
@@ -579,6 +591,26 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.result_bit_size = 256,
 	.result_num_fields = 172
 	},
+	{ /* class_tid: 1, , table: em_key_recipe.alloc_only */
+	.resource_func = BNXT_ULP_RESOURCE_FUNC_KEY_RECIPE_TABLE,
+	.resource_sub_type =
+		BNXT_ULP_RESOURCE_SUB_TYPE_KEY_RECIPE_TABLE_EM,
+	.direction = TF_DIR_RX,
+	.execute_info = {
+		.cond_true_goto  = 1,
+		.cond_false_goto = 1,
+		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
+		.cond_start_idx = 321,
+		.cond_nums = 0 },
+	.tbl_opcode = BNXT_ULP_KEY_RECIPE_TBL_OPC_ALLOC_REGFILE,
+	.tbl_operand = BNXT_ULP_RF_IDX_EM_RECIPE_ID,
+	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
+	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
+	.fdb_operand = BNXT_ULP_RF_IDX_RID,
+	.result_start_idx = 378,
+	.result_bit_size = 0,
+	.result_num_fields = 0
+	},
 	{ /* class_tid: 1, , table: control.profile_tcam_priority */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_CTRL_TABLE,
 	.direction = TF_DIR_RX,
@@ -622,7 +654,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.result_start_idx = 378,
 	.result_bit_size = 64,
 	.result_num_fields = 10,
-	.ident_start_idx = 19,
+	.ident_start_idx = 21,
 	.ident_nums = 1
 	},
 	{ /* class_tid: 1, , table: wm_key_recipe.0 */
@@ -636,8 +668,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
 		.cond_start_idx = 568,
 		.cond_nums = 0 },
-	.tbl_opcode = BNXT_ULP_KEY_RECIPE_TBL_OPC_WR_REGFILE,
-	.tbl_operand = BNXT_ULP_RF_IDX_PROFILE_TCAM_INDEX_0,
+	.tbl_opcode = BNXT_ULP_KEY_RECIPE_TBL_OPC_ALLOC_WR_REGFILE,
+	.tbl_operand = BNXT_ULP_RF_IDX_WC_RECIPE_ID,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
 	.fdb_operand = BNXT_ULP_RF_IDX_RID,
@@ -669,8 +701,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.key_bit_size = 74,
 	.key_num_fields = 3,
 	.result_start_idx = 388,
-	.result_bit_size = 74,
-	.result_num_fields = 6
+	.result_bit_size = 106,
+	.result_num_fields = 8
 	},
 	{ /* class_tid: 1, , table: em_flow_conflict_cache.rd */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_GENERIC_TABLE,
@@ -691,7 +723,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 74,
 	.key_bit_size = 74,
 	.key_num_fields = 3,
-	.ident_start_idx = 20,
+	.ident_start_idx = 22,
 	.ident_nums = 1
 	},
 	{ /* class_tid: 1, , table: control.em_flow_conflict_cache_miss */
@@ -721,7 +753,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.tbl_operand = BNXT_ULP_RF_IDX_EM_KEY_ID_0,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
-	.result_start_idx = 394,
+	.result_start_idx = 396,
 	.result_bit_size = 256,
 	.result_num_fields = 172
 	},
@@ -737,15 +769,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 		.cond_start_idx = 1246,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_KEY_RECIPE_TBL_OPC_WR_REGFILE,
-	.tbl_operand = BNXT_ULP_RF_IDX_EM_KEY_ID_0,
+	.tbl_operand = BNXT_ULP_RF_IDX_EM_RECIPE_ID,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
-	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
-	.fdb_operand = BNXT_ULP_RF_IDX_RID,
+	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
 	.key_start_idx = 162,
 	.blob_key_bit_size = 0,
 	.key_bit_size = 0,
 	.key_num_fields = 33,
-	.result_start_idx = 566,
+	.result_start_idx = 568,
 	.result_bit_size = 0,
 	.result_num_fields = 0
 	},
@@ -768,7 +799,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 74,
 	.key_bit_size = 74,
 	.key_num_fields = 3,
-	.result_start_idx = 566,
+	.result_start_idx = 568,
 	.result_bit_size = 96,
 	.result_num_fields = 2
 	},
@@ -804,10 +835,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.tbl_opcode = BNXT_ULP_EM_TBL_OPC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_EM_INSERT_FAIL,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_DYN_KEY,
-	.key_recipe_operand = BNXT_ULP_RF_IDX_EM_KEY_ID_0,
+	.key_recipe_operand = BNXT_ULP_RF_IDX_EM_RECIPE_ID,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_YES,
-	.result_start_idx = 568,
+	.result_start_idx = 570,
 	.result_bit_size = 0,
 	.result_num_fields = 17
 	},
@@ -836,13 +867,13 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_WC_TCAM_INDEX_0,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_DYN_KEY,
-	.key_recipe_operand = BNXT_ULP_RF_IDX_PROFILE_TCAM_INDEX_0,
+	.key_recipe_operand = BNXT_ULP_RF_IDX_WC_RECIPE_ID,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.pri_opcode  = BNXT_ULP_PRI_OPC_CONST,
 	.pri_operand = 0,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
 	.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_YES,
-	.result_start_idx = 585,
+	.result_start_idx = 587,
 	.result_bit_size = 128,
 	.result_num_fields = 15
 	},
@@ -865,7 +896,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 10,
 	.key_bit_size = 10,
 	.key_num_fields = 1,
-	.ident_start_idx = 21,
+	.ident_start_idx = 23,
 	.ident_nums = 1
 	},
 	{ /* class_tid: 2, , table: l2_cntxt_tcam_cache.def_rd */
@@ -888,7 +919,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 11,
 	.key_bit_size = 11,
 	.key_num_fields = 1,
-	.ident_start_idx = 22,
+	.ident_start_idx = 24,
 	.ident_nums = 2
 	},
 	{ /* class_tid: 2, , table: control.l2_only_check */
@@ -954,21 +985,20 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 74,
 	.key_bit_size = 74,
 	.key_num_fields = 3,
-	.ident_start_idx = 24,
-	.ident_nums = 5
+	.ident_start_idx = 26,
+	.ident_nums = 7
 	},
 	{ /* class_tid: 2, , table: control.proto_header_cache_miss */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_CTRL_TABLE,
 	.direction = TF_DIR_TX,
 	.execute_info = {
 		.cond_true_goto  = 1,
-		.cond_false_goto = 11,
+		.cond_false_goto = 13,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
 		.cond_start_idx = 1681,
 		.cond_nums = 1 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
-	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
-	.fdb_operand = BNXT_ULP_RF_IDX_RID
+	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP
 	},
 	{ /* class_tid: 2, , table: hdr_overlap_cache.overlap_check */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_GENERIC_TABLE,
@@ -992,7 +1022,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.partial_key_start_idx = 205,
 	.partial_key_num_fields = 1,
 	.partial_key_bit_size = 64,
-	.ident_start_idx = 29,
+	.ident_start_idx = 33,
 	.ident_nums = 2
 	},
 	{ /* class_tid: 2, , table: control.overlap_miss */
@@ -1006,7 +1036,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 		.cond_nums = 1 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
-	.fdb_operand = BNXT_ULP_RF_IDX_RID_1
+	.fdb_operand = BNXT_ULP_RF_IDX_RID
 	},
 	{ /* class_tid: 2, , table: profile_tcam.allocate_wc_profile */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
@@ -1022,10 +1052,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.tbl_operand = BNXT_ULP_RF_IDX_PROFILE_TCAM_INDEX_0,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
-	.fdb_operand = BNXT_ULP_RF_IDX_RID_1,
+	.fdb_operand = BNXT_ULP_RF_IDX_RID,
 	.pri_opcode  = BNXT_ULP_PRI_OPC_CONST,
 	.pri_operand = 0,
-	.ident_start_idx = 31,
+	.ident_start_idx = 35,
 	.ident_nums = 1
 	},
 	{ /* class_tid: 2, , table: fkb_select.wc_gen_template */
@@ -1042,8 +1072,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.tbl_operand = BNXT_ULP_RF_IDX_WC_KEY_ID_0,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
-	.fdb_operand = BNXT_ULP_RF_IDX_RID_1,
-	.result_start_idx = 600,
+	.fdb_operand = BNXT_ULP_RF_IDX_RID,
+	.result_start_idx = 602,
 	.result_bit_size = 256,
 	.result_num_fields = 172
 	},
@@ -1069,10 +1099,23 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.partial_key_start_idx = 208,
 	.partial_key_num_fields = 1,
 	.partial_key_bit_size = 64,
-	.result_start_idx = 772,
+	.result_start_idx = 774,
 	.result_bit_size = 48,
 	.result_num_fields = 3
 	},
+	{ /* class_tid: 2, , table: control.proto_header_rid_alloc */
+	.resource_func = BNXT_ULP_RESOURCE_FUNC_CTRL_TABLE,
+	.direction = TF_DIR_TX,
+	.execute_info = {
+		.cond_true_goto  = 1,
+		.cond_false_goto = 1,
+		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
+		.cond_start_idx = 1961,
+		.cond_nums = 0 },
+	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
+	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
+	.fdb_operand = BNXT_ULP_RF_IDX_RID
+	},
 	{ /* class_tid: 2, , table: fkb_select.em_gen_template_alloc */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
 	.resource_type = CFA_RSUBTYPE_IDX_TBL_EM_FKB,
@@ -1088,10 +1131,30 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
 	.fdb_operand = BNXT_ULP_RF_IDX_RID,
-	.result_start_idx = 775,
+	.result_start_idx = 777,
 	.result_bit_size = 256,
 	.result_num_fields = 172
 	},
+	{ /* class_tid: 2, , table: em_key_recipe.alloc_only */
+	.resource_func = BNXT_ULP_RESOURCE_FUNC_KEY_RECIPE_TABLE,
+	.resource_sub_type =
+		BNXT_ULP_RESOURCE_SUB_TYPE_KEY_RECIPE_TABLE_EM,
+	.direction = TF_DIR_TX,
+	.execute_info = {
+		.cond_true_goto  = 1,
+		.cond_false_goto = 1,
+		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
+		.cond_start_idx = 1962,
+		.cond_nums = 0 },
+	.tbl_opcode = BNXT_ULP_KEY_RECIPE_TBL_OPC_ALLOC_REGFILE,
+	.tbl_operand = BNXT_ULP_RF_IDX_EM_RECIPE_ID,
+	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
+	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
+	.fdb_operand = BNXT_ULP_RF_IDX_RID,
+	.result_start_idx = 949,
+	.result_bit_size = 0,
+	.result_num_fields = 0
+	},
 	{ /* class_tid: 2, , table: control.profile_tcam_priority */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_CTRL_TABLE,
 	.direction = TF_DIR_TX,
@@ -1133,10 +1196,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 256,
 	.key_bit_size = 256,
 	.key_num_fields = 66,
-	.result_start_idx = 947,
+	.result_start_idx = 949,
 	.result_bit_size = 64,
 	.result_num_fields = 10,
-	.ident_start_idx = 32,
+	.ident_start_idx = 36,
 	.ident_nums = 1
 	},
 	{ /* class_tid: 2, , table: wm_key_recipe.0 */
@@ -1150,8 +1213,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
 		.cond_start_idx = 2201,
 		.cond_nums = 0 },
-	.tbl_opcode = BNXT_ULP_KEY_RECIPE_TBL_OPC_WR_REGFILE,
-	.tbl_operand = BNXT_ULP_RF_IDX_PROFILE_TCAM_INDEX_0,
+	.tbl_opcode = BNXT_ULP_KEY_RECIPE_TBL_OPC_ALLOC_WR_REGFILE,
+	.tbl_operand = BNXT_ULP_RF_IDX_WC_RECIPE_ID,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
 	.fdb_operand = BNXT_ULP_RF_IDX_RID,
@@ -1159,7 +1222,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 0,
 	.key_bit_size = 0,
 	.key_num_fields = 33,
-	.result_start_idx = 957,
+	.result_start_idx = 959,
 	.result_bit_size = 0,
 	.result_num_fields = 0
 	},
@@ -1182,9 +1245,9 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 74,
 	.key_bit_size = 74,
 	.key_num_fields = 3,
-	.result_start_idx = 957,
-	.result_bit_size = 74,
-	.result_num_fields = 6
+	.result_start_idx = 959,
+	.result_bit_size = 106,
+	.result_num_fields = 8
 	},
 	{ /* class_tid: 2, , table: em_flow_conflict_cache.rd */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_GENERIC_TABLE,
@@ -1205,7 +1268,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 74,
 	.key_bit_size = 74,
 	.key_num_fields = 3,
-	.ident_start_idx = 33,
+	.ident_start_idx = 37,
 	.ident_nums = 1
 	},
 	{ /* class_tid: 2, , table: control.em_flow_conflict_cache_miss */
@@ -1235,7 +1298,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.tbl_operand = BNXT_ULP_RF_IDX_EM_KEY_ID_0,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
-	.result_start_idx = 963,
+	.result_start_idx = 967,
 	.result_bit_size = 256,
 	.result_num_fields = 172
 	},
@@ -1251,15 +1314,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 		.cond_start_idx = 2883,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_KEY_RECIPE_TBL_OPC_WR_REGFILE,
-	.tbl_operand = BNXT_ULP_RF_IDX_EM_KEY_ID_0,
+	.tbl_operand = BNXT_ULP_RF_IDX_EM_RECIPE_ID,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
-	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
-	.fdb_operand = BNXT_ULP_RF_IDX_RID,
+	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
 	.key_start_idx = 314,
 	.blob_key_bit_size = 0,
 	.key_bit_size = 0,
 	.key_num_fields = 33,
-	.result_start_idx = 1135,
+	.result_start_idx = 1139,
 	.result_bit_size = 0,
 	.result_num_fields = 0
 	},
@@ -1282,7 +1344,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 74,
 	.key_bit_size = 74,
 	.key_num_fields = 3,
-	.result_start_idx = 1135,
+	.result_start_idx = 1139,
 	.result_bit_size = 96,
 	.result_num_fields = 2
 	},
@@ -1318,10 +1380,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.tbl_opcode = BNXT_ULP_EM_TBL_OPC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_EM_INSERT_FAIL,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_DYN_KEY,
-	.key_recipe_operand = BNXT_ULP_RF_IDX_EM_KEY_ID_0,
+	.key_recipe_operand = BNXT_ULP_RF_IDX_EM_RECIPE_ID,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_YES,
-	.result_start_idx = 1137,
+	.result_start_idx = 1141,
 	.result_bit_size = 0,
 	.result_num_fields = 17
 	},
@@ -1350,13 +1412,13 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_WC_TCAM_INDEX_0,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_DYN_KEY,
-	.key_recipe_operand = BNXT_ULP_RF_IDX_PROFILE_TCAM_INDEX_0,
+	.key_recipe_operand = BNXT_ULP_RF_IDX_WC_RECIPE_ID,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.pri_opcode  = BNXT_ULP_PRI_OPC_CONST,
 	.pri_operand = 0,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
 	.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_YES,
-	.result_start_idx = 1154,
+	.result_start_idx = 1158,
 	.result_bit_size = 128,
 	.result_num_fields = 15
 	},
@@ -1377,7 +1439,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
-	.result_start_idx = 1169,
+	.result_start_idx = 1173,
 	.result_bit_size = 32,
 	.result_num_fields = 1
 	},
@@ -1398,7 +1460,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
-	.result_start_idx = 1170,
+	.result_start_idx = 1174,
 	.result_bit_size = 32,
 	.result_num_fields = 1
 	},
@@ -1419,7 +1481,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
-	.result_start_idx = 1171,
+	.result_start_idx = 1175,
 	.result_bit_size = 32,
 	.result_num_fields = 1
 	},
@@ -1440,7 +1502,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
-	.result_start_idx = 1172,
+	.result_start_idx = 1176,
 	.result_bit_size = 32,
 	.result_num_fields = 1
 	},
@@ -1461,7 +1523,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
-	.result_start_idx = 1173,
+	.result_start_idx = 1177,
 	.result_bit_size = 32,
 	.result_num_fields = 1
 	},
@@ -1482,7 +1544,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
-	.result_start_idx = 1174,
+	.result_start_idx = 1178,
 	.result_bit_size = 32,
 	.result_num_fields = 1
 	},
@@ -1505,7 +1567,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 6,
 	.key_bit_size = 6,
 	.key_num_fields = 2,
-	.ident_start_idx = 34,
+	.ident_start_idx = 38,
 	.ident_nums = 2
 	},
 	{ /* class_tid: 3, , table: control.ts_ing_rd_check */
@@ -1539,7 +1601,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
 	.fdb_operand = BNXT_ULP_RF_IDX_RID,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
-	.result_start_idx = 1175,
+	.result_start_idx = 1179,
 	.result_bit_size = 192,
 	.result_num_fields = 18
 	},
@@ -1561,7 +1623,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
 	.fdb_operand = BNXT_ULP_RF_IDX_RID,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
-	.result_start_idx = 1193,
+	.result_start_idx = 1197,
 	.result_bit_size = 192,
 	.result_num_fields = 18
 	},
@@ -1606,10 +1668,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 256,
 	.key_bit_size = 256,
 	.key_num_fields = 66,
-	.result_start_idx = 1211,
+	.result_start_idx = 1215,
 	.result_bit_size = 65,
 	.result_num_fields = 7,
-	.ident_start_idx = 36,
+	.ident_start_idx = 40,
 	.ident_nums = 1
 	},
 	{ /* class_tid: 3, , table: table_scope_cache.tsid_ing_wr */
@@ -1631,7 +1693,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 6,
 	.key_bit_size = 6,
 	.key_num_fields = 2,
-	.result_start_idx = 1218,
+	.result_start_idx = 1222,
 	.result_bit_size = 88,
 	.result_num_fields = 5
 	},
@@ -1654,7 +1716,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 10,
 	.key_bit_size = 10,
 	.key_num_fields = 1,
-	.result_start_idx = 1223,
+	.result_start_idx = 1227,
 	.result_bit_size = 169,
 	.result_num_fields = 6
 	},
@@ -1677,7 +1739,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 11,
 	.key_bit_size = 11,
 	.key_num_fields = 1,
-	.ident_start_idx = 37,
+	.ident_start_idx = 41,
 	.ident_nums = 1
 	},
 	{ /* class_tid: 3, , table: control.ing_rd_check */
@@ -1714,10 +1776,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 256,
 	.key_bit_size = 256,
 	.key_num_fields = 24,
-	.result_start_idx = 1229,
+	.result_start_idx = 1233,
 	.result_bit_size = 127,
 	.result_num_fields = 17,
-	.ident_start_idx = 38,
+	.ident_start_idx = 42,
 	.ident_nums = 1
 	},
 	{ /* class_tid: 3, , table: l2_cntxt_tcam_cache.ing_wr */
@@ -1739,7 +1801,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 11,
 	.key_bit_size = 11,
 	.key_num_fields = 1,
-	.result_start_idx = 1246,
+	.result_start_idx = 1250,
 	.result_bit_size = 94,
 	.result_num_fields = 5
 	},
@@ -1760,7 +1822,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
-	.result_start_idx = 1251,
+	.result_start_idx = 1255,
 	.result_bit_size = 192,
 	.result_num_fields = 18,
 	.encap_num_fields = 0
@@ -1782,7 +1844,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
-	.result_start_idx = 1269,
+	.result_start_idx = 1273,
 	.result_bit_size = 192,
 	.result_num_fields = 18,
 	.encap_num_fields = 0
@@ -1813,7 +1875,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 10,
 	.key_bit_size = 10,
 	.key_num_fields = 1,
-	.result_start_idx = 1287,
+	.result_start_idx = 1291,
 	.result_bit_size = 169,
 	.result_num_fields = 6
 	},
@@ -1831,7 +1893,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.tbl_operand = BNXT_ULP_CF_IDX_DRV_FUNC_SVIF,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
-	.result_start_idx = 1293,
+	.result_start_idx = 1297,
 	.result_bit_size = 128,
 	.result_num_fields = 14
 	},
@@ -1854,7 +1916,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 11,
 	.key_bit_size = 11,
 	.key_num_fields = 1,
-	.ident_start_idx = 39,
+	.ident_start_idx = 43,
 	.ident_nums = 0
 	},
 	{ /* class_tid: 3, , table: control.non_vfr_egr_rd_check */
@@ -1891,10 +1953,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 256,
 	.key_bit_size = 256,
 	.key_num_fields = 24,
-	.result_start_idx = 1307,
+	.result_start_idx = 1311,
 	.result_bit_size = 127,
 	.result_num_fields = 17,
-	.ident_start_idx = 39,
+	.ident_start_idx = 43,
 	.ident_nums = 2
 	},
 	{ /* class_tid: 3, , table: profile_tcam_bypass.non_vfr_egr_catch_all */
@@ -1919,10 +1981,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 256,
 	.key_bit_size = 256,
 	.key_num_fields = 66,
-	.result_start_idx = 1324,
+	.result_start_idx = 1328,
 	.result_bit_size = 65,
 	.result_num_fields = 7,
-	.ident_start_idx = 41,
+	.ident_start_idx = 45,
 	.ident_nums = 0
 	},
 	{ /* class_tid: 3, , table: l2_cntxt_tcam_cache.non_vfr_egr_wr */
@@ -1944,7 +2006,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 11,
 	.key_bit_size = 11,
 	.key_num_fields = 1,
-	.result_start_idx = 1331,
+	.result_start_idx = 1335,
 	.result_bit_size = 94,
 	.result_num_fields = 5
 	},
@@ -1967,7 +2029,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 6,
 	.key_bit_size = 6,
 	.key_num_fields = 2,
-	.ident_start_idx = 41,
+	.ident_start_idx = 45,
 	.ident_nums = 1
 	},
 	{ /* class_tid: 3, , table: control.tsid_vfr_rd_check */
@@ -2000,7 +2062,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
 	.fdb_operand = BNXT_ULP_RF_IDX_RID,
-	.result_start_idx = 1336,
+	.result_start_idx = 1340,
 	.result_bit_size = 0,
 	.result_num_fields = 0,
 	.encap_num_fields = 20
@@ -2042,7 +2104,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
 	.fdb_operand = BNXT_ULP_RF_IDX_RID,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
-	.result_start_idx = 1356,
+	.result_start_idx = 1360,
 	.result_bit_size = 192,
 	.result_num_fields = 18
 	},
@@ -2086,10 +2148,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 256,
 	.key_bit_size = 256,
 	.key_num_fields = 24,
-	.result_start_idx = 1374,
+	.result_start_idx = 1378,
 	.result_bit_size = 127,
 	.result_num_fields = 17,
-	.ident_start_idx = 42,
+	.ident_start_idx = 46,
 	.ident_nums = 1
 	},
 	{ /* class_tid: 3, , table: table_scope_cache.tsid_vfr_wr */
@@ -2111,7 +2173,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 6,
 	.key_bit_size = 6,
 	.key_num_fields = 2,
-	.result_start_idx = 1391,
+	.result_start_idx = 1395,
 	.result_bit_size = 88,
 	.result_num_fields = 5
 	},
@@ -2134,7 +2196,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 6,
 	.key_bit_size = 6,
 	.key_num_fields = 2,
-	.ident_start_idx = 43,
+	.ident_start_idx = 47,
 	.ident_nums = 3
 	},
 	{ /* class_tid: 4, , table: control.tsid_vfr_egr_check */
@@ -2174,7 +2236,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 		.func_src2 = BNXT_ULP_FUNC_SRC_CONST,
 		.func_opr2 = ULP_THOR2_SYM_VF_2_VF_META_VAL,
 		.func_dst_opr = BNXT_ULP_RF_IDX_RF_0 },
-	.result_start_idx = 1396,
+	.result_start_idx = 1400,
 	.result_bit_size = 0,
 	.result_num_fields = 0,
 	.encap_num_fields = 20
@@ -2216,7 +2278,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
 	.fdb_operand = BNXT_ULP_RF_IDX_RID,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
-	.result_start_idx = 1416,
+	.result_start_idx = 1420,
 	.result_bit_size = 192,
 	.result_num_fields = 18
 	},
@@ -2261,10 +2323,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 256,
 	.key_bit_size = 256,
 	.key_num_fields = 66,
-	.result_start_idx = 1434,
+	.result_start_idx = 1438,
 	.result_bit_size = 65,
 	.result_num_fields = 7,
-	.ident_start_idx = 46,
+	.ident_start_idx = 50,
 	.ident_nums = 1
 	},
 	{ /* class_tid: 4, , table: table_scope_cache.tsid_vfr_egr_wr */
@@ -2286,7 +2348,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 6,
 	.key_bit_size = 6,
 	.key_num_fields = 2,
-	.result_start_idx = 1441,
+	.result_start_idx = 1445,
 	.result_bit_size = 88,
 	.result_num_fields = 5
 	},
@@ -2310,7 +2372,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 11,
 	.key_bit_size = 11,
 	.key_num_fields = 1,
-	.ident_start_idx = 47,
+	.ident_start_idx = 51,
 	.ident_nums = 1
 	},
 	{ /* class_tid: 4, , table: control.endpoint_def_egr_rd_check */
@@ -2347,10 +2409,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 256,
 	.key_bit_size = 256,
 	.key_num_fields = 24,
-	.result_start_idx = 1446,
+	.result_start_idx = 1450,
 	.result_bit_size = 127,
 	.result_num_fields = 17,
-	.ident_start_idx = 48,
+	.ident_start_idx = 52,
 	.ident_nums = 1
 	},
 	{ /* class_tid: 4, , table: l2_cntxt_tcam_cache.endpoint_def_egr_wr */
@@ -2373,7 +2435,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 11,
 	.key_bit_size = 11,
 	.key_num_fields = 1,
-	.result_start_idx = 1463,
+	.result_start_idx = 1467,
 	.result_bit_size = 94,
 	.result_num_fields = 5
 	},
@@ -2396,7 +2458,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.blob_key_bit_size = 10,
 	.key_bit_size = 10,
 	.key_num_fields = 1,
-	.result_start_idx = 1468,
+	.result_start_idx = 1472,
 	.result_bit_size = 169,
 	.result_num_fields = 6
 	},
@@ -2423,7 +2485,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 		.func_src2 = BNXT_ULP_FUNC_SRC_CONST,
 		.func_opr2 = ULP_THOR2_SYM_VF_2_VF_META_VAL,
 		.func_dst_opr = BNXT_ULP_RF_IDX_RF_0 },
-	.result_start_idx = 1474,
+	.result_start_idx = 1478,
 	.result_bit_size = 0,
 	.result_num_fields = 0,
 	.encap_num_fields = 20
@@ -2464,7 +2526,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
-	.result_start_idx = 1494,
+	.result_start_idx = 1498,
 	.result_bit_size = 192,
 	.result_num_fields = 18
 	},
@@ -7012,7 +7074,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor2_class_cond_list[] = {
 	},
 	/* field_cond: class_tid: 1, fkb_select.em_gen_template:1012*/
 	{
-	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
+	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
 	},
 	{
@@ -42521,8 +42583,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor2_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
 	.field_opr1 = {
-	(BNXT_ULP_RF_IDX_RID_1 >> 8) & 0xff,
-	BNXT_ULP_RF_IDX_RID_1 & 0xff}
+	(BNXT_ULP_RF_IDX_RID >> 8) & 0xff,
+	BNXT_ULP_RF_IDX_RID & 0xff}
 	},
 	{
 	.description = "wc_profile_id",
@@ -43718,6 +43780,24 @@ struct bnxt_ulp_mapper_field_info ulp_thor2_class_result_field_list[] = {
 	(BNXT_ULP_RF_IDX_WC_KEY_ID_0 >> 8) & 0xff,
 	BNXT_ULP_RF_IDX_WC_KEY_ID_0 & 0xff}
 	},
+	{
+	.description = "em_recipe_id",
+	.field_bit_size = 16,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
+	.field_opr1 = {
+	(BNXT_ULP_RF_IDX_EM_RECIPE_ID >> 8) & 0xff,
+	BNXT_ULP_RF_IDX_EM_RECIPE_ID & 0xff}
+	},
+	{
+	.description = "wc_recipe_id",
+	.field_bit_size = 16,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
+	.field_opr1 = {
+	(BNXT_ULP_RF_IDX_WC_RECIPE_ID >> 8) & 0xff,
+	BNXT_ULP_RF_IDX_WC_RECIPE_ID & 0xff}
+	},
 	/* class_tid: 1, , table: fkb_select.em_gen_template */
 	{
 	.description = "l2_cntxt_id.en",
@@ -46921,8 +47001,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor2_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
 	.field_opr1 = {
-	(BNXT_ULP_RF_IDX_RID_1 >> 8) & 0xff,
-	BNXT_ULP_RF_IDX_RID_1 & 0xff}
+	(BNXT_ULP_RF_IDX_RID >> 8) & 0xff,
+	BNXT_ULP_RF_IDX_RID & 0xff}
 	},
 	{
 	.description = "wc_profile_id",
@@ -48117,6 +48197,24 @@ struct bnxt_ulp_mapper_field_info ulp_thor2_class_result_field_list[] = {
 	(BNXT_ULP_RF_IDX_WC_KEY_ID_0 >> 8) & 0xff,
 	BNXT_ULP_RF_IDX_WC_KEY_ID_0 & 0xff}
 	},
+	{
+	.description = "em_recipe_id",
+	.field_bit_size = 16,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
+	.field_opr1 = {
+	(BNXT_ULP_RF_IDX_EM_RECIPE_ID >> 8) & 0xff,
+	BNXT_ULP_RF_IDX_EM_RECIPE_ID & 0xff}
+	},
+	{
+	.description = "wc_recipe_id",
+	.field_bit_size = 16,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
+	.field_opr1 = {
+	(BNXT_ULP_RF_IDX_WC_RECIPE_ID >> 8) & 0xff,
+	BNXT_ULP_RF_IDX_WC_RECIPE_ID & 0xff}
+	},
 	/* class_tid: 2, , table: fkb_select.em_gen_template */
 	{
 	.description = "l2_cntxt_id.en",
@@ -52303,6 +52401,12 @@ struct bnxt_ulp_mapper_ident_info ulp_thor2_class_ident_list[] = {
 	.ident_bit_pos = 42
 	},
 	{
+	.description = "em_recipe_id",
+	.regfile_idx = BNXT_ULP_RF_IDX_EM_RECIPE_ID,
+	.ident_bit_size = 16,
+	.ident_bit_pos = 74
+	},
+	{
 	.description = "profile_tcam_index",
 	.regfile_idx = BNXT_ULP_RF_IDX_PROFILE_TCAM_INDEX_0,
 	.ident_bit_size = 10,
@@ -52320,6 +52424,12 @@ struct bnxt_ulp_mapper_ident_info ulp_thor2_class_ident_list[] = {
 	.ident_bit_size = 8,
 	.ident_bit_pos = 58
 	},
+	{
+	.description = "wc_recipe_id",
+	.regfile_idx = BNXT_ULP_RF_IDX_WC_RECIPE_ID,
+	.ident_bit_size = 16,
+	.ident_bit_pos = 90
+	},
 	/* class_tid: 1, , table: hdr_overlap_cache.overlap_check */
 	{
 	.description = "wc_key_id",
@@ -52392,6 +52502,12 @@ struct bnxt_ulp_mapper_ident_info ulp_thor2_class_ident_list[] = {
 	.ident_bit_pos = 42
 	},
 	{
+	.description = "em_recipe_id",
+	.regfile_idx = BNXT_ULP_RF_IDX_EM_RECIPE_ID,
+	.ident_bit_size = 16,
+	.ident_bit_pos = 74
+	},
+	{
 	.description = "profile_tcam_index",
 	.regfile_idx = BNXT_ULP_RF_IDX_PROFILE_TCAM_INDEX_0,
 	.ident_bit_size = 10,
@@ -52409,6 +52525,12 @@ struct bnxt_ulp_mapper_ident_info ulp_thor2_class_ident_list[] = {
 	.ident_bit_size = 8,
 	.ident_bit_pos = 58
 	},
+	{
+	.description = "wc_recipe_id",
+	.regfile_idx = BNXT_ULP_RF_IDX_WC_RECIPE_ID,
+	.ident_bit_size = 16,
+	.ident_bit_pos = 90
+	},
 	/* class_tid: 2, , table: hdr_overlap_cache.overlap_check */
 	{
 	.description = "wc_key_id",
diff --git a/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor_class.c b/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor_class.c
index 4d8f54dac1..f2fb25d7b6 100644
--- a/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor_class.c
+++ b/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor_class.c
@@ -13,7 +13,7 @@ struct bnxt_ulp_mapper_tmpl_info ulp_thor_class_tmpl_list[] = {
 	/* class_tid: 1, ingress */
 	[1] = {
 	.device_name = BNXT_ULP_DEVICE_ID_THOR,
-	.num_tbls = 39,
+	.num_tbls = 41,
 	.start_tbl_idx = 0,
 	.reject_info = {
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_FALSE,
@@ -23,8 +23,8 @@ struct bnxt_ulp_mapper_tmpl_info ulp_thor_class_tmpl_list[] = {
 	/* class_tid: 2, egress */
 	[2] = {
 	.device_name = BNXT_ULP_DEVICE_ID_THOR,
-	.num_tbls = 25,
-	.start_tbl_idx = 39,
+	.num_tbls = 27,
+	.start_tbl_idx = 41,
 	.reject_info = {
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_FALSE,
 		.cond_start_idx = 1545,
@@ -34,7 +34,7 @@ struct bnxt_ulp_mapper_tmpl_info ulp_thor_class_tmpl_list[] = {
 	[3] = {
 	.device_name = BNXT_ULP_DEVICE_ID_THOR,
 	.num_tbls = 23,
-	.start_tbl_idx = 64,
+	.start_tbl_idx = 68,
 	.reject_info = {
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_FALSE,
 		.cond_start_idx = 3069,
@@ -44,7 +44,7 @@ struct bnxt_ulp_mapper_tmpl_info ulp_thor_class_tmpl_list[] = {
 	[4] = {
 	.device_name = BNXT_ULP_DEVICE_ID_THOR,
 	.num_tbls = 35,
-	.start_tbl_idx = 87,
+	.start_tbl_idx = 91,
 	.reject_info = {
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_FALSE,
 		.cond_start_idx = 3073,
@@ -398,20 +398,19 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.key_bit_size = 73,
 	.key_num_fields = 3,
 	.ident_start_idx = 10,
-	.ident_nums = 5
+	.ident_nums = 7
 	},
 	{ /* class_tid: 1, , table: control.proto_header_cache_miss */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_CTRL_TABLE,
 	.direction = TF_DIR_RX,
 	.execute_info = {
 		.cond_true_goto  = 1,
-		.cond_false_goto = 11,
+		.cond_false_goto = 13,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
 		.cond_start_idx = 42,
 		.cond_nums = 1 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
-	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
-	.fdb_operand = BNXT_ULP_RF_IDX_RID
+	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP
 	},
 	{ /* class_tid: 1, , table: hdr_overlap_cache.overlap_check */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_GENERIC_TABLE,
@@ -435,7 +434,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.partial_key_start_idx = 48,
 	.partial_key_num_fields = 1,
 	.partial_key_bit_size = 64,
-	.ident_start_idx = 15,
+	.ident_start_idx = 17,
 	.ident_nums = 2
 	},
 	{ /* class_tid: 1, , table: control.overlap_miss */
@@ -449,7 +448,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_nums = 1 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
-	.fdb_operand = BNXT_ULP_RF_IDX_RID_1
+	.fdb_operand = BNXT_ULP_RF_IDX_RID
 	},
 	{ /* class_tid: 1, , table: profile_tcam.allocate_wc_profile */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
@@ -465,10 +464,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.tbl_operand = BNXT_ULP_RF_IDX_PROFILE_TCAM_INDEX_0,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
-	.fdb_operand = BNXT_ULP_RF_IDX_RID_1,
+	.fdb_operand = BNXT_ULP_RF_IDX_RID,
 	.pri_opcode  = BNXT_ULP_PRI_OPC_CONST,
 	.pri_operand = 0,
-	.ident_start_idx = 17,
+	.ident_start_idx = 19,
 	.ident_nums = 1
 	},
 	{ /* class_tid: 1, , table: fkb_select.wc_gen_template */
@@ -485,7 +484,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.tbl_operand = BNXT_ULP_RF_IDX_WC_KEY_ID_0,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
-	.fdb_operand = BNXT_ULP_RF_IDX_RID_1,
+	.fdb_operand = BNXT_ULP_RF_IDX_RID,
 	.result_start_idx = 14,
 	.result_bit_size = 106,
 	.result_num_fields = 106
@@ -516,6 +515,19 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.result_bit_size = 48,
 	.result_num_fields = 3
 	},
+	{ /* class_tid: 1, , table: control.proto_header_rid_alloc */
+	.resource_func = BNXT_ULP_RESOURCE_FUNC_CTRL_TABLE,
+	.direction = TF_DIR_RX,
+	.execute_info = {
+		.cond_true_goto  = 1,
+		.cond_false_goto = 1,
+		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
+		.cond_start_idx = 253,
+		.cond_nums = 0 },
+	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
+	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
+	.fdb_operand = BNXT_ULP_RF_IDX_RID
+	},
 	{ /* class_tid: 1, , table: fkb_select.em_gen_template_alloc */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
 	.resource_type = TF_TBL_TYPE_EM_FKB,
@@ -535,6 +547,26 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.result_bit_size = 106,
 	.result_num_fields = 106
 	},
+	{ /* class_tid: 1, , table: em_key_recipe.alloc_only */
+	.resource_func = BNXT_ULP_RESOURCE_FUNC_KEY_RECIPE_TABLE,
+	.resource_sub_type =
+		BNXT_ULP_RESOURCE_SUB_TYPE_KEY_RECIPE_TABLE_EM,
+	.direction = TF_DIR_RX,
+	.execute_info = {
+		.cond_true_goto  = 1,
+		.cond_false_goto = 1,
+		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
+		.cond_start_idx = 254,
+		.cond_nums = 0 },
+	.tbl_opcode = BNXT_ULP_KEY_RECIPE_TBL_OPC_ALLOC_REGFILE,
+	.tbl_operand = BNXT_ULP_RF_IDX_EM_RECIPE_ID,
+	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
+	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
+	.fdb_operand = BNXT_ULP_RF_IDX_RID,
+	.result_start_idx = 229,
+	.result_bit_size = 0,
+	.result_num_fields = 0
+	},
 	{ /* class_tid: 1, , table: control.profile_tcam_priority */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_CTRL_TABLE,
 	.direction = TF_DIR_RX,
@@ -579,7 +611,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.result_start_idx = 229,
 	.result_bit_size = 33,
 	.result_num_fields = 8,
-	.ident_start_idx = 18,
+	.ident_start_idx = 20,
 	.ident_nums = 1
 	},
 	{ /* class_tid: 1, , table: wm_key_recipe.0 */
@@ -593,8 +625,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
 		.cond_start_idx = 513,
 		.cond_nums = 0 },
-	.tbl_opcode = BNXT_ULP_KEY_RECIPE_TBL_OPC_WR_REGFILE,
-	.tbl_operand = BNXT_ULP_RF_IDX_PROFILE_TCAM_INDEX_0,
+	.tbl_opcode = BNXT_ULP_KEY_RECIPE_TBL_OPC_ALLOC_WR_REGFILE,
+	.tbl_operand = BNXT_ULP_RF_IDX_WC_RECIPE_ID,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
 	.fdb_operand = BNXT_ULP_RF_IDX_RID,
@@ -626,8 +658,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.key_bit_size = 73,
 	.key_num_fields = 3,
 	.result_start_idx = 237,
-	.result_bit_size = 74,
-	.result_num_fields = 6
+	.result_bit_size = 106,
+	.result_num_fields = 8
 	},
 	{ /* class_tid: 1, , table: em_flow_conflict_cache.rd */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_GENERIC_TABLE,
@@ -648,7 +680,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 73,
 	.key_bit_size = 73,
 	.key_num_fields = 3,
-	.ident_start_idx = 19,
+	.ident_start_idx = 21,
 	.ident_nums = 1
 	},
 	{ /* class_tid: 1, , table: control.em_flow_conflict_cache_miss */
@@ -678,7 +710,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.tbl_operand = BNXT_ULP_RF_IDX_EM_KEY_ID_0,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
-	.result_start_idx = 243,
+	.result_start_idx = 245,
 	.result_bit_size = 106,
 	.result_num_fields = 106
 	},
@@ -694,15 +726,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_start_idx = 1136,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_KEY_RECIPE_TBL_OPC_WR_REGFILE,
-	.tbl_operand = BNXT_ULP_RF_IDX_EM_KEY_ID_0,
+	.tbl_operand = BNXT_ULP_RF_IDX_EM_RECIPE_ID,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
-	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
-	.fdb_operand = BNXT_ULP_RF_IDX_RID,
+	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
 	.key_start_idx = 134,
 	.blob_key_bit_size = 0,
 	.key_bit_size = 0,
 	.key_num_fields = 33,
-	.result_start_idx = 349,
+	.result_start_idx = 351,
 	.result_bit_size = 0,
 	.result_num_fields = 0
 	},
@@ -725,7 +756,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 73,
 	.key_bit_size = 73,
 	.key_num_fields = 3,
-	.result_start_idx = 349,
+	.result_start_idx = 351,
 	.result_bit_size = 96,
 	.result_num_fields = 2
 	},
@@ -761,10 +792,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.tbl_opcode = BNXT_ULP_EM_TBL_OPC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_EM_INSERT_FAIL,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_DYN_KEY,
-	.key_recipe_operand = BNXT_ULP_RF_IDX_EM_KEY_ID_0,
+	.key_recipe_operand = BNXT_ULP_RF_IDX_EM_RECIPE_ID,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_YES,
-	.result_start_idx = 351,
+	.result_start_idx = 353,
 	.result_bit_size = 0,
 	.result_num_fields = 6
 	},
@@ -793,13 +824,13 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_WC_TCAM_INDEX_0,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_DYN_KEY,
-	.key_recipe_operand = BNXT_ULP_RF_IDX_PROFILE_TCAM_INDEX_0,
+	.key_recipe_operand = BNXT_ULP_RF_IDX_WC_RECIPE_ID,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.pri_opcode  = BNXT_ULP_PRI_OPC_CONST,
 	.pri_operand = 0,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
 	.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_YES,
-	.result_start_idx = 357,
+	.result_start_idx = 359,
 	.result_bit_size = 38,
 	.result_num_fields = 5
 	},
@@ -822,7 +853,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 11,
 	.key_bit_size = 11,
 	.key_num_fields = 1,
-	.ident_start_idx = 20,
+	.ident_start_idx = 22,
 	.ident_nums = 2
 	},
 	{ /* class_tid: 2, , table: control.l2_only_check */
@@ -888,21 +919,20 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 73,
 	.key_bit_size = 73,
 	.key_num_fields = 3,
-	.ident_start_idx = 22,
-	.ident_nums = 5
+	.ident_start_idx = 24,
+	.ident_nums = 7
 	},
 	{ /* class_tid: 2, , table: control.proto_header_cache_miss */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_CTRL_TABLE,
 	.direction = TF_DIR_TX,
 	.execute_info = {
 		.cond_true_goto  = 1,
-		.cond_false_goto = 11,
+		.cond_false_goto = 13,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
 		.cond_start_idx = 1571,
 		.cond_nums = 1 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
-	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
-	.fdb_operand = BNXT_ULP_RF_IDX_RID
+	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP
 	},
 	{ /* class_tid: 2, , table: hdr_overlap_cache.overlap_check */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_GENERIC_TABLE,
@@ -926,7 +956,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.partial_key_start_idx = 176,
 	.partial_key_num_fields = 1,
 	.partial_key_bit_size = 64,
-	.ident_start_idx = 27,
+	.ident_start_idx = 31,
 	.ident_nums = 2
 	},
 	{ /* class_tid: 2, , table: control.overlap_miss */
@@ -940,7 +970,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_nums = 1 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
-	.fdb_operand = BNXT_ULP_RF_IDX_RID_1
+	.fdb_operand = BNXT_ULP_RF_IDX_RID
 	},
 	{ /* class_tid: 2, , table: profile_tcam.allocate_wc_profile */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
@@ -956,10 +986,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.tbl_operand = BNXT_ULP_RF_IDX_PROFILE_TCAM_INDEX_0,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
-	.fdb_operand = BNXT_ULP_RF_IDX_RID_1,
+	.fdb_operand = BNXT_ULP_RF_IDX_RID,
 	.pri_opcode  = BNXT_ULP_PRI_OPC_CONST,
 	.pri_operand = 0,
-	.ident_start_idx = 29,
+	.ident_start_idx = 33,
 	.ident_nums = 1
 	},
 	{ /* class_tid: 2, , table: fkb_select.wc_gen_template */
@@ -976,8 +1006,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.tbl_operand = BNXT_ULP_RF_IDX_WC_KEY_ID_0,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
-	.fdb_operand = BNXT_ULP_RF_IDX_RID_1,
-	.result_start_idx = 362,
+	.fdb_operand = BNXT_ULP_RF_IDX_RID,
+	.result_start_idx = 364,
 	.result_bit_size = 106,
 	.result_num_fields = 106
 	},
@@ -1003,10 +1033,23 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.partial_key_start_idx = 179,
 	.partial_key_num_fields = 1,
 	.partial_key_bit_size = 64,
-	.result_start_idx = 468,
+	.result_start_idx = 470,
 	.result_bit_size = 48,
 	.result_num_fields = 3
 	},
+	{ /* class_tid: 2, , table: control.proto_header_rid_alloc */
+	.resource_func = BNXT_ULP_RESOURCE_FUNC_CTRL_TABLE,
+	.direction = TF_DIR_TX,
+	.execute_info = {
+		.cond_true_goto  = 1,
+		.cond_false_goto = 1,
+		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
+		.cond_start_idx = 1784,
+		.cond_nums = 0 },
+	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
+	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
+	.fdb_operand = BNXT_ULP_RF_IDX_RID
+	},
 	{ /* class_tid: 2, , table: fkb_select.em_gen_template_alloc */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
 	.resource_type = TF_TBL_TYPE_EM_FKB,
@@ -1022,10 +1065,30 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
 	.fdb_operand = BNXT_ULP_RF_IDX_RID,
-	.result_start_idx = 471,
+	.result_start_idx = 473,
 	.result_bit_size = 106,
 	.result_num_fields = 106
 	},
+	{ /* class_tid: 2, , table: em_key_recipe.alloc_only */
+	.resource_func = BNXT_ULP_RESOURCE_FUNC_KEY_RECIPE_TABLE,
+	.resource_sub_type =
+		BNXT_ULP_RESOURCE_SUB_TYPE_KEY_RECIPE_TABLE_EM,
+	.direction = TF_DIR_TX,
+	.execute_info = {
+		.cond_true_goto  = 1,
+		.cond_false_goto = 1,
+		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
+		.cond_start_idx = 1785,
+		.cond_nums = 0 },
+	.tbl_opcode = BNXT_ULP_KEY_RECIPE_TBL_OPC_ALLOC_REGFILE,
+	.tbl_operand = BNXT_ULP_RF_IDX_EM_RECIPE_ID,
+	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
+	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
+	.fdb_operand = BNXT_ULP_RF_IDX_RID,
+	.result_start_idx = 579,
+	.result_bit_size = 0,
+	.result_num_fields = 0
+	},
 	{ /* class_tid: 2, , table: control.profile_tcam_priority */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_CTRL_TABLE,
 	.direction = TF_DIR_TX,
@@ -1067,10 +1130,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 94,
 	.key_bit_size = 94,
 	.key_num_fields = 43,
-	.result_start_idx = 577,
+	.result_start_idx = 579,
 	.result_bit_size = 33,
 	.result_num_fields = 8,
-	.ident_start_idx = 30,
+	.ident_start_idx = 34,
 	.ident_nums = 1
 	},
 	{ /* class_tid: 2, , table: wm_key_recipe.0 */
@@ -1084,8 +1147,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
 		.cond_start_idx = 2042,
 		.cond_nums = 0 },
-	.tbl_opcode = BNXT_ULP_KEY_RECIPE_TBL_OPC_WR_REGFILE,
-	.tbl_operand = BNXT_ULP_RF_IDX_PROFILE_TCAM_INDEX_0,
+	.tbl_opcode = BNXT_ULP_KEY_RECIPE_TBL_OPC_ALLOC_WR_REGFILE,
+	.tbl_operand = BNXT_ULP_RF_IDX_WC_RECIPE_ID,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
 	.fdb_operand = BNXT_ULP_RF_IDX_RID,
@@ -1093,7 +1156,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 0,
 	.key_bit_size = 0,
 	.key_num_fields = 33,
-	.result_start_idx = 585,
+	.result_start_idx = 587,
 	.result_bit_size = 0,
 	.result_num_fields = 0
 	},
@@ -1116,9 +1179,9 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 73,
 	.key_bit_size = 73,
 	.key_num_fields = 3,
-	.result_start_idx = 585,
-	.result_bit_size = 74,
-	.result_num_fields = 6
+	.result_start_idx = 587,
+	.result_bit_size = 106,
+	.result_num_fields = 8
 	},
 	{ /* class_tid: 2, , table: em_flow_conflict_cache.rd */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_GENERIC_TABLE,
@@ -1139,7 +1202,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 73,
 	.key_bit_size = 73,
 	.key_num_fields = 3,
-	.ident_start_idx = 31,
+	.ident_start_idx = 35,
 	.ident_nums = 1
 	},
 	{ /* class_tid: 2, , table: control.em_flow_conflict_cache_miss */
@@ -1169,7 +1232,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.tbl_operand = BNXT_ULP_RF_IDX_EM_KEY_ID_0,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
-	.result_start_idx = 591,
+	.result_start_idx = 595,
 	.result_bit_size = 106,
 	.result_num_fields = 106
 	},
@@ -1185,15 +1248,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_start_idx = 2666,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_KEY_RECIPE_TBL_OPC_WR_REGFILE,
-	.tbl_operand = BNXT_ULP_RF_IDX_EM_KEY_ID_0,
+	.tbl_operand = BNXT_ULP_RF_IDX_EM_RECIPE_ID,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
-	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
-	.fdb_operand = BNXT_ULP_RF_IDX_RID,
+	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
 	.key_start_idx = 262,
 	.blob_key_bit_size = 0,
 	.key_bit_size = 0,
 	.key_num_fields = 33,
-	.result_start_idx = 697,
+	.result_start_idx = 701,
 	.result_bit_size = 0,
 	.result_num_fields = 0
 	},
@@ -1216,7 +1278,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 73,
 	.key_bit_size = 73,
 	.key_num_fields = 3,
-	.result_start_idx = 697,
+	.result_start_idx = 701,
 	.result_bit_size = 96,
 	.result_num_fields = 2
 	},
@@ -1252,10 +1314,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.tbl_opcode = BNXT_ULP_EM_TBL_OPC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_EM_INSERT_FAIL,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_DYN_KEY,
-	.key_recipe_operand = BNXT_ULP_RF_IDX_EM_KEY_ID_0,
+	.key_recipe_operand = BNXT_ULP_RF_IDX_EM_RECIPE_ID,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_YES,
-	.result_start_idx = 699,
+	.result_start_idx = 703,
 	.result_bit_size = 0,
 	.result_num_fields = 6
 	},
@@ -1284,13 +1346,13 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_WC_TCAM_INDEX_0,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_DYN_KEY,
-	.key_recipe_operand = BNXT_ULP_RF_IDX_PROFILE_TCAM_INDEX_0,
+	.key_recipe_operand = BNXT_ULP_RF_IDX_WC_RECIPE_ID,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.pri_opcode  = BNXT_ULP_PRI_OPC_CONST,
 	.pri_operand = 0,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
 	.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_YES,
-	.result_start_idx = 705,
+	.result_start_idx = 709,
 	.result_bit_size = 38,
 	.result_num_fields = 5
 	},
@@ -1311,7 +1373,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
-	.result_start_idx = 710,
+	.result_start_idx = 714,
 	.result_bit_size = 128,
 	.result_num_fields = 17
 	},
@@ -1334,7 +1396,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 10,
 	.key_bit_size = 10,
 	.key_num_fields = 1,
-	.result_start_idx = 727,
+	.result_start_idx = 731,
 	.result_bit_size = 179,
 	.result_num_fields = 8
 	},
@@ -1357,7 +1419,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 11,
 	.key_bit_size = 11,
 	.key_num_fields = 1,
-	.ident_start_idx = 32,
+	.ident_start_idx = 36,
 	.ident_nums = 0
 	},
 	{ /* class_tid: 3, , table: control.ing_0 */
@@ -1396,10 +1458,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 213,
 	.key_bit_size = 213,
 	.key_num_fields = 21,
-	.result_start_idx = 735,
+	.result_start_idx = 739,
 	.result_bit_size = 43,
 	.result_num_fields = 6,
-	.ident_start_idx = 32,
+	.ident_start_idx = 36,
 	.ident_nums = 2
 	},
 	{ /* class_tid: 3, , table: l2_cntxt_tcam_cache.ing_wr */
@@ -1421,7 +1483,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 11,
 	.key_bit_size = 11,
 	.key_num_fields = 1,
-	.result_start_idx = 741,
+	.result_start_idx = 745,
 	.result_bit_size = 70,
 	.result_num_fields = 5
 	},
@@ -1447,10 +1509,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 94,
 	.key_bit_size = 94,
 	.key_num_fields = 43,
-	.result_start_idx = 746,
+	.result_start_idx = 750,
 	.result_bit_size = 33,
 	.result_num_fields = 8,
-	.ident_start_idx = 34,
+	.ident_start_idx = 38,
 	.ident_nums = 0
 	},
 	{ /* class_tid: 3, , table: parif_def_arec_ptr.ing_0 */
@@ -1467,7 +1529,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.tbl_operand = BNXT_ULP_CF_IDX_PHY_PORT_PARIF,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
-	.result_start_idx = 754,
+	.result_start_idx = 758,
 	.result_bit_size = 32,
 	.result_num_fields = 1
 	},
@@ -1485,7 +1547,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.tbl_operand = BNXT_ULP_CF_IDX_PHY_PORT_PARIF,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
-	.result_start_idx = 755,
+	.result_start_idx = 759,
 	.result_bit_size = 32,
 	.result_num_fields = 1
 	},
@@ -1506,7 +1568,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
-	.result_start_idx = 756,
+	.result_start_idx = 760,
 	.result_bit_size = 128,
 	.result_num_fields = 17,
 	.encap_num_fields = 0
@@ -1530,7 +1592,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 10,
 	.key_bit_size = 10,
 	.key_num_fields = 1,
-	.result_start_idx = 773,
+	.result_start_idx = 777,
 	.result_bit_size = 179,
 	.result_num_fields = 8
 	},
@@ -1565,7 +1627,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 11,
 	.key_bit_size = 11,
 	.key_num_fields = 1,
-	.ident_start_idx = 34,
+	.ident_start_idx = 38,
 	.ident_nums = 0
 	},
 	{ /* class_tid: 3, , table: control.egr_1 */
@@ -1598,7 +1660,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.fdb_operand = BNXT_ULP_RF_IDX_RID,
 	.pri_opcode  = BNXT_ULP_PRI_OPC_CONST,
 	.pri_operand = 0,
-	.ident_start_idx = 34,
+	.ident_start_idx = 38,
 	.ident_nums = 1
 	},
 	{ /* class_tid: 3, , table: ilt_tbl.egr_vfr */
@@ -1616,7 +1678,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
 	.fdb_operand = BNXT_ULP_RF_IDX_RID,
-	.result_start_idx = 781,
+	.result_start_idx = 785,
 	.result_bit_size = 64,
 	.result_num_fields = 8
 	},
@@ -1639,7 +1701,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 11,
 	.key_bit_size = 11,
 	.key_num_fields = 1,
-	.result_start_idx = 789,
+	.result_start_idx = 793,
 	.result_bit_size = 70,
 	.result_num_fields = 5
 	},
@@ -1662,7 +1724,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 11,
 	.key_bit_size = 11,
 	.key_num_fields = 1,
-	.ident_start_idx = 35,
+	.ident_start_idx = 39,
 	.ident_nums = 0
 	},
 	{ /* class_tid: 3, , table: control.egr_2 */
@@ -1699,10 +1761,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 213,
 	.key_bit_size = 213,
 	.key_num_fields = 21,
-	.result_start_idx = 794,
+	.result_start_idx = 798,
 	.result_bit_size = 43,
 	.result_num_fields = 6,
-	.ident_start_idx = 35,
+	.ident_start_idx = 39,
 	.ident_nums = 2
 	},
 	{ /* class_tid: 3, , table: l2_cntxt_tcam_cache.egr_wr */
@@ -1724,7 +1786,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 11,
 	.key_bit_size = 11,
 	.key_num_fields = 1,
-	.result_start_idx = 800,
+	.result_start_idx = 804,
 	.result_bit_size = 70,
 	.result_num_fields = 5
 	},
@@ -1742,7 +1804,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.tbl_operand = BNXT_ULP_CF_IDX_DRV_FUNC_PARIF,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
-	.result_start_idx = 805,
+	.result_start_idx = 809,
 	.result_bit_size = 32,
 	.result_num_fields = 1
 	},
@@ -1760,7 +1822,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.tbl_operand = BNXT_ULP_CF_IDX_DRV_FUNC_PARIF,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
-	.result_start_idx = 806,
+	.result_start_idx = 810,
 	.result_bit_size = 32,
 	.result_num_fields = 1
 	},
@@ -1784,7 +1846,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 15,
 	.key_bit_size = 15,
 	.key_num_fields = 3,
-	.ident_start_idx = 37,
+	.ident_start_idx = 41,
 	.ident_nums = 0
 	},
 	{ /* class_tid: 4, , table: control.prof_tcam_cache.vfr_glb_act_rec_rd.0 */
@@ -1816,7 +1878,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.tbl_operand = BNXT_ULP_GLB_RF_IDX_GLB_MODIFY_PTR,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
-	.result_start_idx = 807,
+	.result_start_idx = 811,
 	.result_bit_size = 0,
 	.result_num_fields = 0,
 	.encap_num_fields = 20
@@ -1838,7 +1900,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
-	.result_start_idx = 827,
+	.result_start_idx = 831,
 	.result_bit_size = 128,
 	.result_num_fields = 17,
 	.encap_num_fields = 0
@@ -1858,7 +1920,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
 	.fdb_operand = BNXT_ULP_RF_IDX_RID,
-	.result_start_idx = 844,
+	.result_start_idx = 848,
 	.result_bit_size = 32,
 	.result_num_fields = 1
 	},
@@ -1877,7 +1939,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
 	.fdb_operand = BNXT_ULP_RF_IDX_RID,
-	.result_start_idx = 845,
+	.result_start_idx = 849,
 	.result_bit_size = 32,
 	.result_num_fields = 1
 	},
@@ -1901,7 +1963,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 15,
 	.key_bit_size = 15,
 	.key_num_fields = 3,
-	.result_start_idx = 846,
+	.result_start_idx = 850,
 	.result_bit_size = 138,
 	.result_num_fields = 7
 	},
@@ -1924,7 +1986,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 11,
 	.key_bit_size = 11,
 	.key_num_fields = 1,
-	.ident_start_idx = 37,
+	.ident_start_idx = 41,
 	.ident_nums = 0
 	},
 	{ /* class_tid: 4, , table: control.vf_2_vfr.0 */
@@ -1959,7 +2021,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 11,
 	.key_bit_size = 11,
 	.key_num_fields = 1,
-	.ident_start_idx = 37,
+	.ident_start_idx = 41,
 	.ident_nums = 1
 	},
 	{ /* class_tid: 4, , table: l2_cntxt_tcam.vf_egr */
@@ -1983,10 +2045,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 213,
 	.key_bit_size = 213,
 	.key_num_fields = 21,
-	.result_start_idx = 853,
+	.result_start_idx = 857,
 	.result_bit_size = 43,
 	.result_num_fields = 6,
-	.ident_start_idx = 38,
+	.ident_start_idx = 42,
 	.ident_nums = 1
 	},
 	{ /* class_tid: 4, , table: profile_tcam.prof_func_catch_all */
@@ -2012,10 +2074,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 94,
 	.key_bit_size = 94,
 	.key_num_fields = 43,
-	.result_start_idx = 859,
+	.result_start_idx = 863,
 	.result_bit_size = 33,
 	.result_num_fields = 8,
-	.ident_start_idx = 39,
+	.ident_start_idx = 43,
 	.ident_nums = 0
 	},
 	{ /* class_tid: 4, , table: l2_cntxt_tcam_cache.vf_egr_wr */
@@ -2037,7 +2099,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 11,
 	.key_bit_size = 11,
 	.key_num_fields = 1,
-	.result_start_idx = 867,
+	.result_start_idx = 871,
 	.result_bit_size = 70,
 	.result_num_fields = 5
 	},
@@ -2058,7 +2120,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_PUSH_AND_SET_VFR_FLAG,
-	.result_start_idx = 872,
+	.result_start_idx = 876,
 	.result_bit_size = 128,
 	.result_num_fields = 17
 	},
@@ -2082,7 +2144,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 15,
 	.key_bit_size = 15,
 	.key_num_fields = 3,
-	.ident_start_idx = 39,
+	.ident_start_idx = 43,
 	.ident_nums = 0
 	},
 	{ /* class_tid: 4, , table: control.prof_tcam_cache.vfr.0 */
@@ -2115,7 +2177,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
-	.result_start_idx = 889,
+	.result_start_idx = 893,
 	.result_bit_size = 128,
 	.result_num_fields = 17,
 	.encap_num_fields = 0
@@ -2143,10 +2205,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 213,
 	.key_bit_size = 213,
 	.key_num_fields = 21,
-	.result_start_idx = 906,
+	.result_start_idx = 910,
 	.result_bit_size = 43,
 	.result_num_fields = 6,
-	.ident_start_idx = 39,
+	.ident_start_idx = 43,
 	.ident_nums = 0
 	},
 	{ /* class_tid: 4, , table: l2_cntxt_tcam.vfr_2_vf_ing.0 */
@@ -2172,10 +2234,10 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 213,
 	.key_bit_size = 213,
 	.key_num_fields = 21,
-	.result_start_idx = 912,
+	.result_start_idx = 916,
 	.result_bit_size = 43,
 	.result_num_fields = 6,
-	.ident_start_idx = 39,
+	.ident_start_idx = 43,
 	.ident_nums = 0
 	},
 	{ /* class_tid: 4, , table: fkb_select.vfr_em */
@@ -2192,7 +2254,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.tbl_operand = BNXT_ULP_GLB_RF_IDX_GLB_VFR_EM_KEY_ID_0,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
-	.result_start_idx = 918,
+	.result_start_idx = 922,
 	.result_bit_size = 106,
 	.result_num_fields = 106
 	},
@@ -2210,7 +2272,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.tbl_operand = BNXT_ULP_GLB_RF_IDX_GLB_VFR_EM_KEY_ID_1,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
-	.result_start_idx = 1024,
+	.result_start_idx = 1028,
 	.result_bit_size = 106,
 	.result_num_fields = 106
 	},
@@ -2237,7 +2299,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 94,
 	.key_bit_size = 94,
 	.key_num_fields = 43,
-	.result_start_idx = 1130,
+	.result_start_idx = 1134,
 	.result_bit_size = 33,
 	.result_num_fields = 8
 	},
@@ -2264,7 +2326,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 94,
 	.key_bit_size = 94,
 	.key_num_fields = 43,
-	.result_start_idx = 1138,
+	.result_start_idx = 1142,
 	.result_bit_size = 33,
 	.result_num_fields = 8
 	},
@@ -2288,7 +2350,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 15,
 	.key_bit_size = 15,
 	.key_num_fields = 3,
-	.result_start_idx = 1146,
+	.result_start_idx = 1150,
 	.result_bit_size = 138,
 	.result_num_fields = 7
 	},
@@ -2306,7 +2368,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.tbl_operand = BNXT_ULP_CF_IDX_VF_FUNC_SVIF,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
-	.result_start_idx = 1153,
+	.result_start_idx = 1157,
 	.result_bit_size = 64,
 	.result_num_fields = 8
 	},
@@ -2327,7 +2389,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 0,
 	.key_bit_size = 0,
 	.key_num_fields = 3,
-	.result_start_idx = 1161,
+	.result_start_idx = 1165,
 	.result_bit_size = 0,
 	.result_num_fields = 6
 	},
@@ -2351,7 +2413,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 11,
 	.key_bit_size = 11,
 	.key_num_fields = 1,
-	.ident_start_idx = 39,
+	.ident_start_idx = 43,
 	.ident_nums = 0
 	},
 	{ /* class_tid: 4, , table: control.0 */
@@ -2382,7 +2444,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
 	.fdb_operand = BNXT_ULP_RF_IDX_RID,
-	.result_start_idx = 1167,
+	.result_start_idx = 1171,
 	.result_bit_size = 64,
 	.result_num_fields = 8
 	},
@@ -2405,7 +2467,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 11,
 	.key_bit_size = 11,
 	.key_num_fields = 1,
-	.result_start_idx = 1175,
+	.result_start_idx = 1179,
 	.result_bit_size = 70,
 	.result_num_fields = 5
 	},
@@ -2423,7 +2485,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.tbl_operand = BNXT_ULP_CF_IDX_VF_FUNC_SVIF,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
-	.result_start_idx = 1180,
+	.result_start_idx = 1184,
 	.result_bit_size = 64,
 	.result_num_fields = 8
 	},
@@ -2443,7 +2505,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.tbl_operand = BNXT_ULP_RF_IDX_MODIFY_PTR,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
-	.result_start_idx = 1188,
+	.result_start_idx = 1192,
 	.result_bit_size = 0,
 	.result_num_fields = 0,
 	.encap_num_fields = 20
@@ -2465,7 +2527,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
-	.result_start_idx = 1208,
+	.result_start_idx = 1212,
 	.result_bit_size = 128,
 	.result_num_fields = 17
 	},
@@ -2486,7 +2548,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
-	.result_start_idx = 1225,
+	.result_start_idx = 1229,
 	.result_bit_size = 128,
 	.result_num_fields = 17
 	},
@@ -2507,7 +2569,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.blob_key_bit_size = 0,
 	.key_bit_size = 0,
 	.key_num_fields = 2,
-	.result_start_idx = 1242,
+	.result_start_idx = 1246,
 	.result_bit_size = 0,
 	.result_num_fields = 6
 	}
@@ -6759,7 +6821,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	},
 	/* field_cond: class_tid: 1, fkb_select.em_gen_template:956*/
 	{
-	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
+	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
 	},
 	{
@@ -39971,8 +40033,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
 	.field_opr1 = {
-	(BNXT_ULP_RF_IDX_RID_1 >> 8) & 0xff,
-	BNXT_ULP_RF_IDX_RID_1 & 0xff}
+	(BNXT_ULP_RF_IDX_RID >> 8) & 0xff,
+	BNXT_ULP_RF_IDX_RID & 0xff}
 	},
 	{
 	.description = "wc_profile_id",
@@ -40750,6 +40812,24 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	(BNXT_ULP_RF_IDX_WC_KEY_ID_0 >> 8) & 0xff,
 	BNXT_ULP_RF_IDX_WC_KEY_ID_0 & 0xff}
 	},
+	{
+	.description = "em_recipe_id",
+	.field_bit_size = 16,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
+	.field_opr1 = {
+	(BNXT_ULP_RF_IDX_EM_RECIPE_ID >> 8) & 0xff,
+	BNXT_ULP_RF_IDX_EM_RECIPE_ID & 0xff}
+	},
+	{
+	.description = "wc_recipe_id",
+	.field_bit_size = 16,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
+	.field_opr1 = {
+	(BNXT_ULP_RF_IDX_WC_RECIPE_ID >> 8) & 0xff,
+	BNXT_ULP_RF_IDX_WC_RECIPE_ID & 0xff}
+	},
 	/* class_tid: 1, , table: fkb_select.em_gen_template */
 	{
 	.description = "l2_cntxt_id.en",
@@ -42763,8 +42843,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
 	.field_opr1 = {
-	(BNXT_ULP_RF_IDX_RID_1 >> 8) & 0xff,
-	BNXT_ULP_RF_IDX_RID_1 & 0xff}
+	(BNXT_ULP_RF_IDX_RID >> 8) & 0xff,
+	BNXT_ULP_RF_IDX_RID & 0xff}
 	},
 	{
 	.description = "wc_profile_id",
@@ -43542,6 +43622,24 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	(BNXT_ULP_RF_IDX_WC_KEY_ID_0 >> 8) & 0xff,
 	BNXT_ULP_RF_IDX_WC_KEY_ID_0 & 0xff}
 	},
+	{
+	.description = "em_recipe_id",
+	.field_bit_size = 16,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
+	.field_opr1 = {
+	(BNXT_ULP_RF_IDX_EM_RECIPE_ID >> 8) & 0xff,
+	BNXT_ULP_RF_IDX_EM_RECIPE_ID & 0xff}
+	},
+	{
+	.description = "wc_recipe_id",
+	.field_bit_size = 16,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
+	.field_opr1 = {
+	(BNXT_ULP_RF_IDX_WC_RECIPE_ID >> 8) & 0xff,
+	BNXT_ULP_RF_IDX_WC_RECIPE_ID & 0xff}
+	},
 	/* class_tid: 2, , table: fkb_select.em_gen_template */
 	{
 	.description = "l2_cntxt_id.en",
@@ -48221,6 +48319,12 @@ struct bnxt_ulp_mapper_ident_info ulp_thor_class_ident_list[] = {
 	.ident_bit_pos = 42
 	},
 	{
+	.description = "em_recipe_id",
+	.regfile_idx = BNXT_ULP_RF_IDX_EM_RECIPE_ID,
+	.ident_bit_size = 16,
+	.ident_bit_pos = 74
+	},
+	{
 	.description = "profile_tcam_index",
 	.regfile_idx = BNXT_ULP_RF_IDX_PROFILE_TCAM_INDEX_0,
 	.ident_bit_size = 10,
@@ -48238,6 +48342,12 @@ struct bnxt_ulp_mapper_ident_info ulp_thor_class_ident_list[] = {
 	.ident_bit_size = 8,
 	.ident_bit_pos = 58
 	},
+	{
+	.description = "wc_recipe_id",
+	.regfile_idx = BNXT_ULP_RF_IDX_WC_RECIPE_ID,
+	.ident_bit_size = 16,
+	.ident_bit_pos = 90
+	},
 	/* class_tid: 1, , table: hdr_overlap_cache.overlap_check */
 	{
 	.description = "wc_key_id",
@@ -48303,6 +48413,12 @@ struct bnxt_ulp_mapper_ident_info ulp_thor_class_ident_list[] = {
 	.ident_bit_pos = 42
 	},
 	{
+	.description = "em_recipe_id",
+	.regfile_idx = BNXT_ULP_RF_IDX_EM_RECIPE_ID,
+	.ident_bit_size = 16,
+	.ident_bit_pos = 74
+	},
+	{
 	.description = "profile_tcam_index",
 	.regfile_idx = BNXT_ULP_RF_IDX_PROFILE_TCAM_INDEX_0,
 	.ident_bit_size = 10,
@@ -48320,6 +48436,12 @@ struct bnxt_ulp_mapper_ident_info ulp_thor_class_ident_list[] = {
 	.ident_bit_size = 8,
 	.ident_bit_pos = 58
 	},
+	{
+	.description = "wc_recipe_id",
+	.regfile_idx = BNXT_ULP_RF_IDX_WC_RECIPE_ID,
+	.ident_bit_size = 16,
+	.ident_bit_pos = 90
+	},
 	/* class_tid: 2, , table: hdr_overlap_cache.overlap_check */
 	{
 	.description = "wc_key_id",
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 26/47] net/bnxt: tf_ulp: enable recipe id generation
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (17 preceding siblings ...)
  2024-10-01  5:58 ` [PATCH v3 25/47] net/bnxt: tf_ulp: update template files Sriharsha Basavapatna
@ 2024-10-01  5:58 ` Sriharsha Basavapatna
  2024-10-01  5:58 ` [PATCH v3 27/47] net/bnxt: tf_ulp: fixed parent child db counters Sriharsha Basavapatna
                   ` (14 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:58 UTC (permalink / raw)
  To: dev
  Cc: Kishore Padmanabha, Shuanglin Wang, Sriharsha Basavapatna,
	Shahaji Bhosle, Michael Baucom, Ajit Khaparde

From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>

Added support to generate recipe id generation.

This patch includes a few related changes:

fix segfault in the wildcard recipe process
	The recipe id is being passed as 8 bit instead of 64bit
	causing the crash.

Ported code using default_non_ha resource
	Missing code to use default_non_ha resource if HA is
	disabled.

fix move debug message from info to debug level
	The action pointer does not exist for non representor ports
	so it is a debug message.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Shuanglin Wang <shuanglin.wang@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Michael Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c |   4 +
 drivers/net/bnxt/tf_ulp/ulp_flow_db.c |   2 +-
 drivers/net/bnxt/tf_ulp/ulp_mapper.c  | 257 +++++++++++++++++++-------
 drivers/net/bnxt/tf_ulp/ulp_mapper.h  |   2 +
 4 files changed, 196 insertions(+), 69 deletions(-)

diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
index 2d46d21a5d..0cc2b4e81d 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
@@ -257,6 +257,10 @@ ulp_tf_resources_get(struct bnxt_ulp_context *ulp_ctx,
 		return -EINVAL;
 	}
 
+	/* use DEFAULT_NON_HA instead of DEFAULT resources if HA is disabled */
+	if (ULP_APP_HA_IS_DYNAMIC(ulp_ctx))
+		stype = ulp_ctx->cfg_data->def_session_type;
+
 	unnamed = bnxt_ulp_resource_resv_list_get(&unum);
 	if (unnamed == NULL) {
 		BNXT_DRV_DBG(ERR, "Unable to get resource resv list.\n");
diff --git a/drivers/net/bnxt/tf_ulp/ulp_flow_db.c b/drivers/net/bnxt/tf_ulp/ulp_flow_db.c
index 82a653594f..099ae7adc8 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_flow_db.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_flow_db.c
@@ -1198,7 +1198,7 @@ ulp_default_flow_db_cfa_action_get(struct bnxt_ulp_context *ulp_ctx,
 					     BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
 					     sub_typ, &params);
 	if (rc) {
-		BNXT_DRV_DBG(INFO, "CFA Action ptr not found for flow id %u\n",
+		BNXT_DRV_DBG(DEBUG, "CFA Action ptr not found for flow id %u\n",
 			     flow_id);
 		return -ENOENT;
 	}
diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.c b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
index e399c136f3..b44b25429f 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
@@ -1302,7 +1302,9 @@ ulp_mapper_key_recipe_tbl_deinit(struct bnxt_ulp_mapper_data *mdata)
 					rte_free(recipes[idx]);
 			}
 			rte_free(mdata->key_recipe_info.recipes[dir][ftype]);
-			mdata->key_recipe_info.recipes[dir][ftype] =  NULL;
+			mdata->key_recipe_info.recipes[dir][ftype] = NULL;
+			rte_free(mdata->key_recipe_info.recipe_ba[dir][ftype]);
+			mdata->key_recipe_info.recipe_ba[dir][ftype] = NULL;
 		}
 	}
 	mdata->key_recipe_info.num_recipes = 0;
@@ -1315,8 +1317,9 @@ ulp_mapper_key_recipe_tbl_init(struct bnxt_ulp_context *ulp_ctx,
 	struct bnxt_ulp_key_recipe_entry **recipes;
 	enum bnxt_ulp_direction dir;
 	uint32_t dev_id = 0, size_val;
-	uint32_t num_recipes, ftype;
+	uint32_t num_recipes, ftype, pool_size;
 	int32_t rc = 0;
+	struct bitalloc *recipe_ba;
 
 	rc = bnxt_ulp_cntxt_dev_id_get(ulp_ctx, &dev_id);
 	if (rc) {
@@ -1327,20 +1330,43 @@ ulp_mapper_key_recipe_tbl_init(struct bnxt_ulp_context *ulp_ctx,
 	if (!num_recipes)
 		return rc;
 
+	/* Need to write these values so that a failure will result in freeing
+	 * the memory in the deinit
+	 */
+	mdata->key_recipe_info.num_recipes = num_recipes;
+	mdata->key_recipe_info.max_fields = BNXT_ULP_KEY_RECIPE_MAX_FLDS;
+
 	size_val = sizeof(struct bnxt_ulp_key_recipe_entry *);
+	pool_size = BITALLOC_SIZEOF(num_recipes);
+
+	/* The caller will deinit if failures occur, so just return fail instead
+	 * of attempting to free allocated memory
+	 **/
 	for (dir = 0; dir < BNXT_ULP_DIRECTION_LAST; dir++) {
 		for (ftype = 0; ftype < ULP_RECIPE_TYPE_MAX; ftype++) {
 			recipes = rte_zmalloc("key_recipe_list",
 					      size_val * num_recipes, 0);
 			if (!recipes) {
-				BNXT_DRV_DBG(ERR, "Uanable to alloc memory\n");
+				BNXT_DRV_DBG(ERR, "Unable to alloc memory\n");
 				return -ENOMEM;
 			}
 			mdata->key_recipe_info.recipes[dir][ftype] = recipes;
+
+			recipe_ba = rte_malloc("key_recipe_ba", pool_size, 0);
+			if (!recipe_ba) {
+				BNXT_DRV_DBG(ERR, "Unable to alloc memory\n");
+				return -ENOMEM;
+			}
+			mdata->key_recipe_info.recipe_ba[dir][ftype] =
+				recipe_ba;
+			rc = ba_init(recipe_ba, num_recipes, true);
+			if (rc) {
+				BNXT_DRV_DBG(ERR,
+					     "Unable to alloc recipe ba\n");
+				return -ENOMEM;
+			}
 		}
 	}
-	mdata->key_recipe_info.num_recipes = num_recipes;
-	mdata->key_recipe_info.max_fields = BNXT_ULP_KEY_RECIPE_MAX_FLDS;
 	return rc;
 }
 
@@ -1348,7 +1374,7 @@ static struct bnxt_ulp_mapper_data *
 ulp_mapper_key_recipe_args_validate(struct bnxt_ulp_context *ulp_ctx,
 				    enum bnxt_ulp_direction dir,
 				    enum bnxt_ulp_resource_sub_type stype,
-				    uint8_t recipe_id)
+				    uint32_t recipe_id)
 {
 	struct bnxt_ulp_mapper_data *mdata;
 
@@ -1373,7 +1399,7 @@ ulp_mapper_key_recipe_args_validate(struct bnxt_ulp_context *ulp_ctx,
 	}
 	if (recipe_id >= mdata->key_recipe_info.num_recipes ||
 	    !mdata->key_recipe_info.num_recipes) {
-		BNXT_DRV_DBG(ERR, "Key recipe id out of range(%d >= %d)\n",
+		BNXT_DRV_DBG(ERR, "Key recipe id out of range(%u >= %u)\n",
 			     recipe_id, mdata->key_recipe_info.num_recipes);
 		return NULL;
 	}
@@ -1384,7 +1410,8 @@ static struct bnxt_ulp_key_recipe_entry *
 ulp_mapper_key_recipe_alloc(struct bnxt_ulp_context *ulp_ctx,
 			    enum bnxt_ulp_direction dir,
 			    enum bnxt_ulp_resource_sub_type stype,
-			    uint8_t recipe_id, uint8_t *max_fields)
+			    uint32_t recipe_id, bool alloc_only,
+			    uint8_t *max_fields)
 {
 	struct bnxt_ulp_key_recipe_entry **recipes;
 	struct bnxt_ulp_mapper_data *mdata = NULL;
@@ -1396,7 +1423,7 @@ ulp_mapper_key_recipe_alloc(struct bnxt_ulp_context *ulp_ctx,
 		return NULL;
 
 	recipes = mdata->key_recipe_info.recipes[dir][stype];
-	if (recipes[recipe_id] == NULL) {
+	if (alloc_only && recipes[recipe_id] == NULL) {
 		recipes[recipe_id] = rte_zmalloc("key_recipe_entry", size_s, 0);
 		if (recipes[recipe_id] == NULL) {
 			BNXT_DRV_DBG(ERR, "Unable to alloc key recipe\n");
@@ -1409,11 +1436,12 @@ ulp_mapper_key_recipe_alloc(struct bnxt_ulp_context *ulp_ctx,
 		     ulp_mapper_key_recipe_type_to_str(stype), recipe_id);
 #endif
 #endif
-		*max_fields = mdata->key_recipe_info.max_fields;
-		return recipes[recipe_id];
+	} else if (alloc_only) {
+		BNXT_DRV_DBG(ERR, "Recipe ID (%d) already allocated\n",
+			     recipe_id);
 	}
-	BNXT_DRV_DBG(ERR, "Recipe ID (%d) already allocated\n", recipe_id);
-	return NULL;
+	*max_fields = mdata->key_recipe_info.max_fields;
+	return recipes[recipe_id];
 }
 
 /* The free just marks the entry as not in use and resets the number of entries
@@ -1427,15 +1455,28 @@ ulp_mapper_key_recipe_free(struct bnxt_ulp_context *ulp_ctx,
 {
 	struct bnxt_ulp_key_recipe_entry **recipes;
 	struct bnxt_ulp_mapper_data *mdata = NULL;
+	struct bitalloc *recipe_ba = NULL;
+	int32_t rc;
 
 	mdata = ulp_mapper_key_recipe_args_validate(ulp_ctx, dir,
 						    stype, index);
 	if (mdata == NULL)
 		return -EINVAL;
 
+	recipe_ba = mdata->key_recipe_info.recipe_ba[dir][stype];
+	rc = ba_free(recipe_ba, index);
+	if (rc < 0)
+		BNXT_DRV_DBG(DEBUG, "Unable to free recipe id[%s][%u] = (%d)\n",
+			     (dir == BNXT_ULP_DIRECTION_INGRESS) ? "rx" : "tx",
+			     stype, index);
+
 	recipes = mdata->key_recipe_info.recipes[dir][stype];
-	if (recipes[index] == NULL)
-		return -EINVAL;
+	if (recipes[index] == NULL) {
+		BNXT_DRV_DBG(DEBUG, "recipe id[%s][%u] = (%d) already freed\n",
+			     (dir == BNXT_ULP_DIRECTION_INGRESS) ? "rx" : "tx",
+			     stype, index);
+		return 0;
+	}
 	rte_free(recipes[index]);
 	recipes[index] = NULL;
 #ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
@@ -1473,7 +1514,8 @@ ulp_mapper_key_recipe_fields_get(struct bnxt_ulp_mapper_parms *parms,
 	struct bnxt_ulp_key_recipe_entry **recipes;
 	enum bnxt_ulp_resource_sub_type stype;
 	struct bnxt_ulp_mapper_data *mdata = NULL;
-	uint64_t recipe_id = 0;
+	uint64_t regval = 0;
+	uint32_t recipe_id = 0;
 
 	/* Don't like this, but need to convert from a tbl resource func to the
 	 * subtype for key_recipes.
@@ -1493,12 +1535,12 @@ ulp_mapper_key_recipe_fields_get(struct bnxt_ulp_mapper_parms *parms,
 
 	/* Get the recipe index from the registry file */
 	if (!ulp_regfile_read(parms->regfile, tbl->key_recipe_operand,
-			      &recipe_id)) {
+			      &regval)) {
 		BNXT_DRV_DBG(ERR, "Failed to get tbl idx from regfile[%d].\n",
 			     tbl->tbl_operand);
 		return NULL;
 	}
-	recipe_id = tfp_be_to_cpu_64(recipe_id);
+	recipe_id = (uint32_t)tfp_be_to_cpu_64(regval);
 	mdata = ulp_mapper_key_recipe_args_validate(parms->ulp_ctx,
 						    tbl->direction,
 						    stype, recipe_id);
@@ -1665,29 +1707,39 @@ static int32_t
 ulp_mapper_key_recipe_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 				  struct bnxt_ulp_mapper_tbl_info *tbl)
 {
-	uint8_t max_rflds = 0, recipe_id = 0, rnum_flds = 0;
+	bool alloc = false, write = false, regfile = false;
 	struct bnxt_ulp_mapper_key_info	*kflds, *rflds;
 	struct bnxt_ulp_mapper_field_info *kfld, *rfld;
+	struct bnxt_ulp_mapper_data *mdata = NULL;
 	struct bnxt_ulp_key_recipe_entry *recipe;
 	struct ulp_flow_db_res_params fid_parms;
+	int32_t rc = 0, free_rc, tmp_recipe_id;
+	enum bnxt_ulp_resource_sub_type stype;
+	uint8_t max_rflds = 0, rnum_flds = 0;
+	enum bnxt_ulp_direction dir;
+	struct bitalloc *recipe_ba = NULL;
+	uint32_t recipe_id = 0;
 	uint32_t i, num_kflds;
 	bool written = false;
 	uint64_t regval = 0;
-	int32_t rc = 0, free_rc;
-	/* The key recipe tbl only supports writing based on regfile,
-	 * get the index to write via the regfile
-	 */
+
+	dir = tbl->direction;
+	stype = tbl->resource_sub_type;
+
 	switch (tbl->tbl_opcode) {
+	case BNXT_ULP_KEY_RECIPE_TBL_OPC_ALLOC_WR_REGFILE:
+		alloc = true;
+		write = true;
+		regfile = true;
+		break;
+	case BNXT_ULP_KEY_RECIPE_TBL_OPC_ALLOC_REGFILE:
+		alloc = true;
+		regfile = true;
+		break;
 	case BNXT_ULP_KEY_RECIPE_TBL_OPC_WR_REGFILE:
-		if (!ulp_regfile_read(parms->regfile, tbl->tbl_operand,
-				      &regval)) {
-			BNXT_DRV_DBG(ERR,
-				     "Failed to get tbl idx from regfile[%d].\n",
-				     tbl->tbl_operand);
-			return -EINVAL;
-		}
-
-		recipe_id = rte_be_to_cpu_64(regval);
+		alloc = false;
+		regfile = true;
+		write = true;
 		break;
 	default:
 		BNXT_DRV_DBG(ERR, "Invalid recipe table opcode %d\n",
@@ -1695,58 +1747,126 @@ ulp_mapper_key_recipe_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		return -EINVAL;
 	};
 
-	/* Get the key fields to process */
-	kflds = ulp_mapper_key_fields_get(parms, tbl, &num_kflds);
-	if (!kflds || !num_kflds) {
-		BNXT_DRV_DBG(ERR, "Failed to get the key fields\n");
-		return -EINVAL;
+	/* Get the recipe_id from the regfile */
+	if (!alloc && regfile) {
+		if (!ulp_regfile_read(parms->regfile,
+				      tbl->tbl_operand,
+				      &regval)) {
+			BNXT_DRV_DBG(ERR,
+				     "Fail to get tbl idx from regfile[%d].\n",
+				     tbl->tbl_operand);
+			return -EINVAL;
+		}
+		recipe_id = rte_be_to_cpu_64(regval);
 	}
 
-	/* Get the recipe entry to write */
-	recipe = ulp_mapper_key_recipe_alloc(parms->ulp_ctx,
-					     tbl->direction,
-					     tbl->resource_sub_type,
-					     recipe_id, &max_rflds);
+	if (alloc) {
+		/* Allocate a recipe id based on the direction and type
+		 * only supported types are EM and WC for now.
+		 */
+		mdata = ulp_mapper_key_recipe_args_validate(parms->ulp_ctx, dir,
+							    stype, 0);
+		if (mdata == NULL)
+			return -EINVAL;
+
+		recipe_ba = mdata->key_recipe_info.recipe_ba[dir][stype];
+		tmp_recipe_id = ba_alloc(recipe_ba);
+		if (tmp_recipe_id < 0) {
+			BNXT_DRV_DBG(ERR, "Failed to allocate a recipe id\n");
+			return -EINVAL;
+		} else if ((uint32_t)tmp_recipe_id >=
+			   mdata->key_recipe_info.num_recipes) {
+			/* Shouldn't get here, but could be an issue with the
+			 * allocator, so free the recipe_id
+			 */
+			BNXT_DRV_DBG(ERR,
+				     "Allocated recipe id(%d) >= max(%d)\n",
+				     tmp_recipe_id,
+				     mdata->key_recipe_info.num_recipes);
+			(void)ba_free(recipe_ba, tmp_recipe_id);
+			return -EINVAL;
+		}
+		/* any error after this must goto error in order to free
+		 * the recipe_id
+		 */
+		recipe_id = tmp_recipe_id;
+	}
+
+	if (alloc && regfile) {
+		regval = rte_cpu_to_be_64(recipe_id);
+		rc = ulp_regfile_write(parms->regfile, tbl->tbl_operand,
+				       regval);
+		if (rc) {
+			BNXT_DRV_DBG(ERR, "Failed to write regfile[%d] rc=%d\n",
+				     tbl->tbl_operand, rc);
+			if (recipe_ba)
+				(void)ba_free(recipe_ba, recipe_id);
+			return -EINVAL;
+		}
+	}
+
+	/* allocate or Get the recipe entry based on alloc */
+	recipe = ulp_mapper_key_recipe_alloc(parms->ulp_ctx, dir, stype,
+					     recipe_id, alloc, &max_rflds);
 	if (!recipe || !max_rflds) {
-		BNXT_DRV_DBG(ERR, "Failed to allocate key recipe\n");
+		BNXT_DRV_DBG(ERR, "Failed to get the recipe slot\n");
+		if (recipe_ba)
+			(void)ba_free(recipe_ba, recipe_id);
 		return -EINVAL;
 	}
-	rflds = &recipe->flds[0];
 
-	/* iterate over the key fields and write the recipe */
-	for (i = 0; i < num_kflds; i++) {
-		if (rnum_flds >= max_rflds) {
-			BNXT_DRV_DBG(ERR, "Max recipe fields exceeded (%d)\n",
-				     rnum_flds);
+	/* We have a recipe_id by now, write the data */
+	if (write) {
+		/* Get the key fields to process */
+		kflds = ulp_mapper_key_fields_get(parms, tbl, &num_kflds);
+		if (!kflds || !num_kflds) {
+			BNXT_DRV_DBG(ERR, "Failed to get the key fields\n");
+			rc = -EINVAL;
 			goto error;
 		}
-		written = false;
-		kfld = &kflds[i].field_info_spec;
-		rfld = &rflds[rnum_flds].field_info_spec;
 
-		rc = ulp_mapper_key_recipe_field_opc_process(parms, tbl->direction,
-							 kfld, 1, "KEY",
-							 &written, rfld);
-		if (rc)
-			goto error;
+		rflds = &recipe->flds[0];
+		/* iterate over the key fields and write the recipe */
+		for (i = 0; i < num_kflds; i++) {
+			if (rnum_flds >= max_rflds) {
+				BNXT_DRV_DBG(ERR,
+					     "Max recipe fields exceeded (%d)\n",
+					     rnum_flds);
+				goto error;
+			}
+			written = false;
+			kfld = &kflds[i].field_info_spec;
+			rfld = &rflds[rnum_flds].field_info_spec;
 
-		if (tbl->resource_sub_type ==
-		    BNXT_ULP_RESOURCE_SUB_TYPE_KEY_RECIPE_TABLE_WM) {
-			kfld = &kflds[i].field_info_mask;
-			rfld = &rflds[rnum_flds].field_info_mask;
 			rc = ulp_mapper_key_recipe_field_opc_process(parms,
-								 tbl->direction,
-								 kfld, 0, "MASK",
-								 &written, rfld);
+								     dir,
+								     kfld, 1,
+								     "KEY",
+								     &written,
+								     rfld);
 			if (rc)
 				goto error;
+
+			if (stype ==
+			    BNXT_ULP_RESOURCE_SUB_TYPE_KEY_RECIPE_TABLE_WM) {
+				kfld = &kflds[i].field_info_mask;
+				rfld = &rflds[rnum_flds].field_info_mask;
+				rc = ulp_mapper_key_recipe_field_opc_process(parms,
+									     dir,
+									     kfld,
+									     0,
+									     "MASK",
+									     &written,
+									     rfld);
+				if (rc)
+					goto error;
+			}
+			if (written)
+				rnum_flds++;
 		}
-		if (written)
-			rnum_flds++;
+		recipe->cnt = rnum_flds;
 	}
 
-	recipe->cnt = rnum_flds;
-
 	memset(&fid_parms, 0, sizeof(fid_parms));
 	fid_parms.direction	= tbl->direction;
 	fid_parms.resource_func	= tbl->resource_func;
@@ -1764,6 +1884,7 @@ ulp_mapper_key_recipe_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 
 	return rc;
 error:
+	/* Free the actual recipe */
 	free_rc = ulp_mapper_key_recipe_free(parms->ulp_ctx, tbl->direction,
 					     tbl->resource_sub_type, recipe_id);
 	if (free_rc)
diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.h b/drivers/net/bnxt/tf_ulp/ulp_mapper.h
index 53305670bf..a934b01888 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.h
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.h
@@ -19,6 +19,7 @@
 #include "ulp_utils.h"
 #include "ulp_gen_tbl.h"
 #include "tfc_em.h"
+#include "bitalloc.h"
 
 #define ULP_IDENTS_INVALID ((uint16_t)0xffff)
 
@@ -40,6 +41,7 @@ struct bnxt_ulp_key_recipe_info {
 	uint32_t num_recipes;
 	uint8_t max_fields;
 	struct bnxt_ulp_key_recipe_entry **recipes[BNXT_ULP_DIRECTION_LAST][ULP_RECIPE_TYPE_MAX];
+	struct bitalloc *recipe_ba[BNXT_ULP_DIRECTION_LAST][ULP_RECIPE_TYPE_MAX];
 };
 
 struct ulp_mapper_core_ops;
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 27/47] net/bnxt: tf_ulp: fixed parent child db counters
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (18 preceding siblings ...)
  2024-10-01  5:58 ` [PATCH v3 26/47] net/bnxt: tf_ulp: enable recipe id generation Sriharsha Basavapatna
@ 2024-10-01  5:58 ` Sriharsha Basavapatna
  2024-10-01  5:58 ` [PATCH v3 28/47] net/bnxt: tf_ulp: modify return values to adhere to C coding standard Sriharsha Basavapatna
                   ` (13 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:58 UTC (permalink / raw)
  To: dev
  Cc: Kishore Padmanabha, Shuanglin Wang, Sriharsha Basavapatna,
	Michael Baucom, Ajit Khaparde

From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>

The locking for the parent child counters need to be done till the
stats are retrieved. Also the OVS is creating multiple F1 flows for
same tunnel hence reference count needs to be maintined for the F1
flows.

Fix name conflicts for class and action tables. Matcher allocates
hash tables for class and action entries. These tables should have
different names for each port.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Shuanglin Wang <shuanglin.wang@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Michael Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c  | 37 +++++++++++++++++----------
 drivers/net/bnxt/tf_ulp/ulp_flow_db.c | 22 ++++++++++------
 drivers/net/bnxt/tf_ulp/ulp_flow_db.h |  2 ++
 drivers/net/bnxt/tf_ulp/ulp_matcher.c | 12 +++++++--
 4 files changed, 50 insertions(+), 23 deletions(-)

diff --git a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
index b880b545da..0c46c7d4c9 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
@@ -563,23 +563,29 @@ int ulp_fc_mgr_query_count_get(struct bnxt_ulp_context *ctxt,
 
 	} while (!rc && nxt_resource_index);
 
-	bnxt_ulp_cntxt_release_fdb_lock(ctxt);
-
-	if (rc || !found_cntr_resource)
+	if (rc || !found_cntr_resource) {
+		bnxt_ulp_cntxt_release_fdb_lock(ctxt);
 		return rc;
+	}
 
 	dir = params.direction;
-	if (!(ulp_fc_info->flags & ULP_FLAG_FC_SW_AGG_EN))
-		return fc_ops->ulp_flow_stat_get(ctxt, dir,
-						 params.resource_hndl, count);
+	if (!(ulp_fc_info->flags & ULP_FLAG_FC_SW_AGG_EN)) {
+		rc = fc_ops->ulp_flow_stat_get(ctxt, dir,
+					       params.resource_hndl, count);
+		bnxt_ulp_cntxt_release_fdb_lock(ctxt);
+		return rc;
+	}
 
 	if (!found_parent_flow &&
 	    params.resource_sub_type ==
 			BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_INT_COUNT) {
 		hw_cntr_id = params.resource_hndl;
-		if (!ulp_fc_info->num_counters)
-			return fc_ops->ulp_flow_stat_get(ctxt, dir,
-							 hw_cntr_id, count);
+		if (!ulp_fc_info->num_counters) {
+			rc = fc_ops->ulp_flow_stat_get(ctxt, dir,
+						       hw_cntr_id, count);
+			bnxt_ulp_cntxt_release_fdb_lock(ctxt);
+			return rc;
+		}
 
 		/* TODO:
 		 * Think about optimizing with try_lock later
@@ -603,9 +609,14 @@ int ulp_fc_mgr_query_count_get(struct bnxt_ulp_context *ctxt,
 		   params.resource_sub_type ==
 			BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_INT_COUNT) {
 		/* Get stats from the parent child table */
-		ulp_flow_db_parent_flow_count_get(ctxt, pc_idx,
-						  &count->hits, &count->bytes,
-						  count->reset);
+		if (ulp_flow_db_parent_flow_count_get(ctxt, flow_id,
+						      pc_idx,
+						      &count->hits,
+						      &count->bytes,
+						      count->reset)) {
+			bnxt_ulp_cntxt_release_fdb_lock(ctxt);
+			return -EIO;
+		}
 		if (count->hits)
 			count->hits_set = 1;
 		if (count->bytes)
@@ -613,7 +624,7 @@ int ulp_fc_mgr_query_count_get(struct bnxt_ulp_context *ctxt,
 	} else {
 		rc = -EINVAL;
 	}
-
+	bnxt_ulp_cntxt_release_fdb_lock(ctxt);
 	return rc;
 }
 
diff --git a/drivers/net/bnxt/tf_ulp/ulp_flow_db.c b/drivers/net/bnxt/tf_ulp/ulp_flow_db.c
index 099ae7adc8..679dab0f17 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_flow_db.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_flow_db.c
@@ -836,7 +836,6 @@ ulp_flow_db_fid_free(struct bnxt_ulp_context *ulp_ctxt,
 #ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
 	BNXT_DRV_DBG(DEBUG, "flow_id = %u:%u freed\n", flow_type, fid);
 #endif
-
 	/* all good, return success */
 	return 0;
 }
@@ -1383,13 +1382,12 @@ ulp_flow_db_pc_db_parent_flow_set(struct bnxt_ulp_context *ulp_ctxt,
 
 	if (set_flag) {
 		pc_entry->parent_fid = parent_fid;
+		pc_entry->parent_ref_cnt++;
 	} else {
-		if (pc_entry->parent_fid != parent_fid)
-			BNXT_DRV_DBG(ERR, "Panic: invalid parent id\n");
-		pc_entry->parent_fid = 0;
-
+		if (pc_entry->parent_ref_cnt > 0)
+			pc_entry->parent_ref_cnt--;
 		/* Free the parent child db entry if no user present */
-		if (!pc_entry->f2_cnt)
+		if (!pc_entry->parent_ref_cnt && !pc_entry->f2_cnt)
 			ulp_flow_db_pc_db_entry_free(ulp_ctxt, pc_entry);
 	}
 	return 0;
@@ -1444,7 +1442,7 @@ ulp_flow_db_pc_db_child_flow_set(struct bnxt_ulp_context *ulp_ctxt,
 		ULP_INDEX_BITMAP_RESET(t[a_idx], child_fid);
 		if (pc_entry->f2_cnt)
 			pc_entry->f2_cnt--;
-		if (!pc_entry->f2_cnt && !pc_entry->parent_fid)
+		if (!pc_entry->f2_cnt && !pc_entry->parent_ref_cnt)
 			ulp_flow_db_pc_db_entry_free(ulp_ctxt, pc_entry);
 	}
 	return 0;
@@ -1536,7 +1534,7 @@ ulp_flow_db_parent_flow_count_accum_set(struct bnxt_ulp_context *ulp_ctxt,
 	/* check for parent idx validity */
 	p_pdb = &flow_db->parent_child_db;
 	if (pc_idx >= p_pdb->entries_count ||
-	    !p_pdb->parent_flow_tbl[pc_idx].parent_fid) {
+	    !p_pdb->parent_flow_tbl[pc_idx].parent_ref_cnt) {
 		BNXT_DRV_DBG(ERR, "Invalid parent child index %x\n", pc_idx);
 		return -EINVAL;
 	}
@@ -1784,6 +1782,7 @@ ulp_flow_db_parent_flow_count_update(struct bnxt_ulp_context *ulp_ctxt,
  */
 int32_t
 ulp_flow_db_parent_flow_count_get(struct bnxt_ulp_context *ulp_ctxt,
+				  uint32_t flow_id,
 				  uint32_t pc_idx, uint64_t *packet_count,
 				  uint64_t *byte_count, uint8_t count_reset)
 {
@@ -1796,6 +1795,13 @@ ulp_flow_db_parent_flow_count_get(struct bnxt_ulp_context *ulp_ctxt,
 		return -EINVAL;
 	}
 
+	/* stale parent fid */
+	if (flow_id != pc_entry->parent_fid) {
+		*packet_count = 0;
+		*byte_count = 0;
+		return 0;
+	}
+
 	if (pc_entry->counter_acc) {
 		*packet_count = pc_entry->pkt_count;
 		*byte_count = pc_entry->byte_count;
diff --git a/drivers/net/bnxt/tf_ulp/ulp_flow_db.h b/drivers/net/bnxt/tf_ulp/ulp_flow_db.h
index 39810c81c4..5a4b5a1ebf 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_flow_db.h
+++ b/drivers/net/bnxt/tf_ulp/ulp_flow_db.h
@@ -63,6 +63,7 @@ struct bnxt_ulp_flow_tbl {
 struct ulp_fdb_parent_info {
 	uint32_t	valid;
 	uint32_t	parent_fid;
+	uint32_t	parent_ref_cnt;
 	uint32_t	counter_acc;
 	uint64_t	pkt_count;
 	uint64_t	byte_count;
@@ -389,6 +390,7 @@ ulp_flow_db_parent_flow_count_update(struct bnxt_ulp_context *ulp_ctxt,
  */
 int32_t
 ulp_flow_db_parent_flow_count_get(struct bnxt_ulp_context *ulp_ctxt,
+				  uint32_t flow_id,
 				  uint32_t pc_idx,
 				  uint64_t *packet_count,
 				  uint64_t *byte_count,
diff --git a/drivers/net/bnxt/tf_ulp/ulp_matcher.c b/drivers/net/bnxt/tf_ulp/ulp_matcher.c
index 2284fb6423..9e0a9458e7 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_matcher.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_matcher.c
@@ -327,9 +327,17 @@ ulp_matcher_action_match(struct ulp_rte_parser_params *params,
 int32_t ulp_matcher_init(struct bnxt_ulp_context *ulp_ctx)
 {
 	struct rte_hash_parameters hash_tbl_params = {0};
-	char hash_class_tbl_name[64] = "bnxt_ulp_class_matcher";
-	char hash_act_tbl_name[64] = "bnxt_ulp_act_matcher";
+	char hash_class_tbl_name[64] = {0};
+	char hash_act_tbl_name[64] = {0};
 	struct bnxt_ulp_matcher_data *data;
+	uint16_t port_id;
+
+	/* append port_id to the buffer name */
+	port_id = ulp_ctx->bp->eth_dev->data->port_id;
+	snprintf(hash_class_tbl_name, sizeof(hash_class_tbl_name),
+		 "bnxt_ulp_class_matcher_%d", port_id);
+	snprintf(hash_act_tbl_name, sizeof(hash_act_tbl_name),
+		 "bnxt_ulp_act_matcher_%d", port_id);
 
 	data = rte_zmalloc("bnxt_ulp_matcher_data",
 			   sizeof(struct bnxt_ulp_matcher_data), 0);
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 28/47] net/bnxt: tf_ulp: modify return values to adhere to C coding standard
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (19 preceding siblings ...)
  2024-10-01  5:58 ` [PATCH v3 27/47] net/bnxt: tf_ulp: fixed parent child db counters Sriharsha Basavapatna
@ 2024-10-01  5:58 ` Sriharsha Basavapatna
  2024-10-01  5:58 ` [PATCH v3 29/47] net/bnxt: tf_ulp: update template files Sriharsha Basavapatna
                   ` (12 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:58 UTC (permalink / raw)
  To: dev
  Cc: Shuanglin Wang, Sriharsha Basavapatna, Kishore Padmanabha, Ajit Khaparde

From: Shuanglin Wang <shuanglin.wang@broadcom.com>

Modified return values of the several ULP utilities to comply C
coding standard.  Like using macros EXIT_SUCCESS(0) and
EXIT_FAILURE(1) for the conventional status value for success
and failure, respectively. They are declared in the file stdlib.h.

Signed-off-by: Shuanglin Wang <shuanglin.wang@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/ulp_mapper.c     | 172 +++++++++++------------
 drivers/net/bnxt/tf_ulp/ulp_mapper_tf.c  |  40 +++---
 drivers/net/bnxt/tf_ulp/ulp_mapper_tfc.c |  50 +++----
 drivers/net/bnxt/tf_ulp/ulp_utils.c      |  70 ++++-----
 drivers/net/bnxt/tf_ulp/ulp_utils.h      |  26 ++--
 5 files changed, 181 insertions(+), 177 deletions(-)

diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.c b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
index b44b25429f..ff57469aa3 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
@@ -573,7 +573,7 @@ ulp_mapper_fdb_opc_process(struct bnxt_ulp_mapper_parms *parms,
 		/* get the fid from the regfile */
 		rc = ulp_regfile_read(parms->regfile, tbl->fdb_operand,
 				      &val64);
-		if (!rc) {
+		if (rc) {
 			BNXT_DRV_DBG(ERR, "regfile[%d] read oob\n",
 				     tbl->fdb_operand);
 			return -EINVAL;
@@ -630,8 +630,8 @@ ulp_mapper_priority_opc_process(struct bnxt_ulp_mapper_parms *parms,
 			*priority = tbl->pri_operand;
 		break;
 	case BNXT_ULP_PRI_OPC_REGFILE:
-		if (!ulp_regfile_read(parms->regfile, tbl->pri_operand,
-				      &regval)) {
+		if (ulp_regfile_read(parms->regfile, tbl->pri_operand,
+				     &regval)) {
 			BNXT_DRV_DBG(ERR, "regfile[%u] read oob\n",
 				     tbl->pri_operand);
 			rc = -EINVAL;
@@ -880,8 +880,8 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 		*value = 1;
 		break;
 	case BNXT_ULP_FIELD_SRC_CF:
-		if (!ulp_operand_read(field_opr,
-				      (uint8_t *)&idx, sizeof(uint16_t))) {
+		if (ulp_operand_read(field_opr,
+				     (uint8_t *)&idx, sizeof(uint16_t))) {
 			BNXT_DRV_DBG(ERR, "CF operand read failed\n");
 			return -EINVAL;
 		}
@@ -896,15 +896,15 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 		*value = ULP_COMP_FLD_IDX_RD(parms, idx);
 		break;
 	case BNXT_ULP_FIELD_SRC_RF:
-		if (!ulp_operand_read(field_opr,
-				      (uint8_t *)&idx, sizeof(uint16_t))) {
+		if (ulp_operand_read(field_opr,
+				     (uint8_t *)&idx, sizeof(uint16_t))) {
 			BNXT_DRV_DBG(ERR, "RF operand read failed\n");
 			return -EINVAL;
 		}
 
 		idx = tfp_be_to_cpu_16(idx);
 		/* Uninitialized regfile entries return 0 */
-		if (!ulp_regfile_read(parms->regfile, idx, &lregval) ||
+		if (ulp_regfile_read(parms->regfile, idx, &lregval) ||
 		    sizeof(uint64_t) < bytelen) {
 			BNXT_DRV_DBG(ERR, "regfile[%d] read oob %u\n", idx,
 				     bytelen);
@@ -915,8 +915,8 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 		*value = tfp_be_to_cpu_64(lregval);
 		break;
 	case BNXT_ULP_FIELD_SRC_ACT_PROP:
-		if (!ulp_operand_read(field_opr,
-				      (uint8_t *)&idx, sizeof(uint16_t))) {
+		if (ulp_operand_read(field_opr,
+				     (uint8_t *)&idx, sizeof(uint16_t))) {
 			BNXT_DRV_DBG(ERR, "Action operand read failed\n");
 			return -EINVAL;
 		}
@@ -940,8 +940,8 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 		}
 		break;
 	case BNXT_ULP_FIELD_SRC_ACT_PROP_SZ:
-		if (!ulp_operand_read(field_opr,
-				      (uint8_t *)&idx, sizeof(uint16_t))) {
+		if (ulp_operand_read(field_opr,
+				     (uint8_t *)&idx, sizeof(uint16_t))) {
 			BNXT_DRV_DBG(ERR, "Action sz operand read failed\n");
 			return -EINVAL;
 		}
@@ -954,8 +954,8 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 		*val = &parms->act_prop->act_details[idx];
 
 		/* get the size index next */
-		if (!ulp_operand_read(&field_opr[sizeof(uint16_t)],
-				      (uint8_t *)&size_idx, sizeof(uint16_t))) {
+		if (ulp_operand_read(&field_opr[sizeof(uint16_t)],
+				     (uint8_t *)&size_idx, sizeof(uint16_t))) {
 			BNXT_DRV_DBG(ERR, "Action sz operand read failed\n");
 			return -EINVAL;
 		}
@@ -970,8 +970,8 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 		*val_len = ULP_BYTE_2_BITS(val_size);
 		break;
 	case BNXT_ULP_FIELD_SRC_GLB_RF:
-		if (!ulp_operand_read(field_opr,
-				      (uint8_t *)&idx, sizeof(uint16_t))) {
+		if (ulp_operand_read(field_opr,
+				     (uint8_t *)&idx, sizeof(uint16_t))) {
 			BNXT_DRV_DBG(ERR, "Global regfile read failed\n");
 			return -EINVAL;
 		}
@@ -990,8 +990,8 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 		break;
 	case BNXT_ULP_FIELD_SRC_HF:
 	case BNXT_ULP_FIELD_SRC_SUB_HF:
-		if (!ulp_operand_read(field_opr,
-				      (uint8_t *)&idx, sizeof(uint16_t))) {
+		if (ulp_operand_read(field_opr,
+				     (uint8_t *)&idx, sizeof(uint16_t))) {
 			BNXT_DRV_DBG(ERR, "Header field read failed\n");
 			return -EINVAL;
 		}
@@ -1021,9 +1021,9 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 			*val = &buffer[field_size - bytelen];
 		} else {
 			/* get the offset next */
-			if (!ulp_operand_read(&field_opr[sizeof(uint16_t)],
-					      (uint8_t *)&offset,
-					      sizeof(uint16_t))) {
+			if (ulp_operand_read(&field_opr[sizeof(uint16_t)],
+					     (uint8_t *)&offset,
+					     sizeof(uint16_t))) {
 				BNXT_DRV_DBG(ERR, "Hdr fld size read failed\n");
 				return -EINVAL;
 			}
@@ -1037,8 +1037,8 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 		}
 		break;
 	case BNXT_ULP_FIELD_SRC_HDR_BIT:
-		if (!ulp_operand_read(field_opr,
-				      (uint8_t *)&lregval, sizeof(uint64_t))) {
+		if (ulp_operand_read(field_opr,
+				     (uint8_t *)&lregval, sizeof(uint64_t))) {
 			BNXT_DRV_DBG(ERR, "Header bit read failed\n");
 			return -EINVAL;
 		}
@@ -1051,8 +1051,8 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 		}
 		break;
 	case BNXT_ULP_FIELD_SRC_ACT_BIT:
-		if (!ulp_operand_read(field_opr,
-				      (uint8_t *)&lregval, sizeof(uint64_t))) {
+		if (ulp_operand_read(field_opr,
+				     (uint8_t *)&lregval, sizeof(uint64_t))) {
 			BNXT_DRV_DBG(ERR, "Action bit read failed\n");
 			return -EINVAL;
 		}
@@ -1065,8 +1065,8 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 		}
 		break;
 	case BNXT_ULP_FIELD_SRC_FIELD_BIT:
-		if (!ulp_operand_read(field_opr,
-				      (uint8_t *)&idx, sizeof(uint16_t))) {
+		if (ulp_operand_read(field_opr,
+				     (uint8_t *)&idx, sizeof(uint16_t))) {
 			BNXT_DRV_DBG(ERR, "Field bit read failed\n");
 			return -EINVAL;
 		}
@@ -1085,8 +1085,8 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 		}
 		break;
 	case BNXT_ULP_FIELD_SRC_PORT_TABLE:
-		if (!ulp_operand_read(field_opr,
-				      (uint8_t *)&idx, sizeof(uint16_t))) {
+		if (ulp_operand_read(field_opr,
+				     (uint8_t *)&idx, sizeof(uint16_t))) {
 			BNXT_DRV_DBG(ERR, "CF operand read failed\n");
 			return -EINVAL;
 		}
@@ -1100,8 +1100,8 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 		/* The port id is present in the comp field list */
 		port_id = ULP_COMP_FLD_IDX_RD(parms, idx);
 		/* get the port table enum  */
-		if (!ulp_operand_read(field_opr + sizeof(uint16_t),
-				      (uint8_t *)&idx, sizeof(uint16_t))) {
+		if (ulp_operand_read(field_opr + sizeof(uint16_t),
+				     (uint8_t *)&idx, sizeof(uint16_t))) {
 			BNXT_DRV_DBG(ERR, "Port table enum read failed\n");
 			return -EINVAL;
 		}
@@ -1113,8 +1113,8 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 		}
 		break;
 	case BNXT_ULP_FIELD_SRC_ENC_HDR_BIT:
-		if (!ulp_operand_read(field_opr,
-				      (uint8_t *)&lregval, sizeof(uint64_t))) {
+		if (ulp_operand_read(field_opr,
+				     (uint8_t *)&lregval, sizeof(uint64_t))) {
 			BNXT_DRV_DBG(ERR, "Header bit read failed\n");
 			return -EINVAL;
 		}
@@ -1127,8 +1127,8 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 		}
 		break;
 	case BNXT_ULP_FIELD_SRC_ENC_FIELD:
-		if (!ulp_operand_read(field_opr,
-				      (uint8_t *)&idx, sizeof(uint16_t))) {
+		if (ulp_operand_read(field_opr,
+				     (uint8_t *)&idx, sizeof(uint16_t))) {
 			BNXT_DRV_DBG(ERR, "Header field read failed\n");
 			return -EINVAL;
 		}
@@ -1158,15 +1158,15 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 	case BNXT_ULP_FIELD_SRC_LIST_AND:
 	case BNXT_ULP_FIELD_SRC_LIST_OR:
 		/* read the cond table index and count */
-		if (!ulp_operand_read(field_opr,
-				      (uint8_t *)&idx, sizeof(uint16_t))) {
+		if (ulp_operand_read(field_opr,
+				     (uint8_t *)&idx, sizeof(uint16_t))) {
 			BNXT_DRV_DBG(ERR, "Cond idx operand read failed\n");
 			return -EINVAL;
 		}
 		idx = tfp_be_to_cpu_16(idx);
 
-		if (!ulp_operand_read(field_opr + sizeof(uint16_t),
-				      (uint8_t *)&size_idx, sizeof(uint16_t))) {
+		if (ulp_operand_read(field_opr + sizeof(uint16_t),
+				     (uint8_t *)&size_idx, sizeof(uint16_t))) {
 			BNXT_DRV_DBG(ERR, "Cond count operand read failed\n");
 			return -EINVAL;
 		}
@@ -1244,7 +1244,7 @@ static int32_t ulp_mapper_field_blob_write(enum bnxt_ulp_field_src fld_src,
 	} else if (fld_src == BNXT_ULP_FIELD_SRC_SKIP) {
 		/* do nothing */
 	} else {
-		if (!ulp_blob_push(blob, val, val_len)) {
+		if (ulp_blob_push(blob, val, val_len)) {
 			BNXT_DRV_DBG(ERR, "push of val1 failed\n");
 			return -EINVAL;
 		}
@@ -1265,8 +1265,8 @@ ulp_mapper_field_opc_next(struct bnxt_ulp_mapper_parms *parms,
 	uint16_t idx;
 
 	/* read the cond table index and count */
-	if (!ulp_operand_read(field_opr,
-			      (uint8_t *)&idx, sizeof(uint16_t))) {
+	if (ulp_operand_read(field_opr,
+			     (uint8_t *)&idx, sizeof(uint16_t))) {
 		BNXT_DRV_DBG(ERR, "field idx operand read failed\n");
 		return -EINVAL;
 	}
@@ -1534,8 +1534,8 @@ ulp_mapper_key_recipe_fields_get(struct bnxt_ulp_mapper_parms *parms,
 	};
 
 	/* Get the recipe index from the registry file */
-	if (!ulp_regfile_read(parms->regfile, tbl->key_recipe_operand,
-			      &regval)) {
+	if (ulp_regfile_read(parms->regfile, tbl->key_recipe_operand,
+			     &regval)) {
 		BNXT_DRV_DBG(ERR, "Failed to get tbl idx from regfile[%d].\n",
 			     tbl->tbl_operand);
 		return NULL;
@@ -1568,8 +1568,8 @@ ulp_mapper_key_recipe_field_opc_next(struct bnxt_ulp_mapper_parms *parms,
 	uint16_t idx;
 
 	/* read the cond table index and count */
-	if (!ulp_operand_read(field_opr,
-			      (uint8_t *)&idx, sizeof(uint16_t))) {
+	if (ulp_operand_read(field_opr,
+			     (uint8_t *)&idx, sizeof(uint16_t))) {
 		BNXT_DRV_DBG(ERR, "field idx operand read failed\n");
 		return -EINVAL;
 	}
@@ -1749,9 +1749,9 @@ ulp_mapper_key_recipe_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 
 	/* Get the recipe_id from the regfile */
 	if (!alloc && regfile) {
-		if (!ulp_regfile_read(parms->regfile,
-				      tbl->tbl_operand,
-				      &regval)) {
+		if (ulp_regfile_read(parms->regfile,
+				     tbl->tbl_operand,
+				     &regval)) {
 			BNXT_DRV_DBG(ERR,
 				     "Fail to get tbl idx from regfile[%d].\n",
 				     tbl->tbl_operand);
@@ -2162,9 +2162,9 @@ ulp_mapper_tbl_result_build(struct bnxt_ulp_mapper_parms *parms,
 	if (encap_flds) {
 		uint32_t pad = 0;
 		/* Initialize the encap blob */
-		if (!ulp_blob_init(&encap_blob,
-				   ULP_BYTE_2_BITS(tbl->record_size),
-				   parms->device_params->encap_byte_order)) {
+		if (ulp_blob_init(&encap_blob,
+				  ULP_BYTE_2_BITS(tbl->record_size),
+				  parms->device_params->encap_byte_order)) {
 			BNXT_DRV_DBG(ERR, "blob inits failed.\n");
 			return -EINVAL;
 		}
@@ -2276,9 +2276,9 @@ ulp_mapper_mark_act_ptr_process(struct bnxt_ulp_mapper_parms *parms,
 	       sizeof(mark));
 	mark = tfp_be_to_cpu_32(mark);
 
-	if (!ulp_regfile_read(parms->regfile,
-			      BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
-			      &val64)) {
+	if (ulp_regfile_read(parms->regfile,
+			     BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
+			     &val64)) {
 		BNXT_DRV_DBG(ERR, "read action ptr main failed\n");
 		return -EINVAL;
 	}
@@ -2321,9 +2321,9 @@ ulp_mapper_mark_vfr_idx_process(struct bnxt_ulp_mapper_parms *parms,
 	mark = ULP_COMP_FLD_IDX_RD(parms, BNXT_ULP_CF_IDX_DEV_PORT_ID);
 
 	 /* Get the main action pointer */
-	if (!ulp_regfile_read(parms->regfile,
-			      BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
-			      &val64)) {
+	if (ulp_regfile_read(parms->regfile,
+			     BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
+			     &val64)) {
 		BNXT_DRV_DBG(ERR, "read action ptr main failed\n");
 		return -EINVAL;
 	}
@@ -2425,8 +2425,8 @@ ulp_mapper_wc_tcam_tbl_dyn_post_process(struct bnxt_ulp_device_params *dparms,
 
 	/* The new length accounts for the ctrl word length and num slices */
 	tlen = tlen + clen * num_slices;
-	if (!ulp_blob_init(tkey, tlen, key->byte_order) ||
-	    !ulp_blob_init(tmask, tlen, mask->byte_order)) {
+	if (ulp_blob_init(tkey, tlen, key->byte_order) ||
+	    ulp_blob_init(tmask, tlen, mask->byte_order)) {
 		BNXT_DRV_DBG(ERR, "Unable to post process wc tcam entry\n");
 		return -EINVAL;
 	}
@@ -2560,9 +2560,9 @@ ulp_mapper_gen_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		pad = ULP_BYTE_2_BITS(sizeof(uint8_t)) -
 		ULP_BITS_IS_BYTE_NOT_ALIGNED(tbl->key_bit_size);
 
-	if (!ulp_blob_init(&key, tbl->key_bit_size + pad +
-			   tbl->partial_key_bit_size,
-			   parms->device_params->key_byte_order)) {
+	if (ulp_blob_init(&key, tbl->key_bit_size + pad +
+			  tbl->partial_key_bit_size,
+			  parms->device_params->key_byte_order)) {
 		BNXT_DRV_DBG(ERR, "Failed to alloc blob\n");
 		return -EINVAL;
 	}
@@ -2722,8 +2722,8 @@ ulp_mapper_gen_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		}
 
 		/* Initialize the blob data */
-		if (!ulp_blob_init(&data, tbl->result_bit_size,
-				   gen_tbl_ent.byte_order)) {
+		if (ulp_blob_init(&data, tbl->result_bit_size,
+				  gen_tbl_ent.byte_order)) {
 			BNXT_DRV_DBG(ERR, "Failed initial index table blob\n");
 			return -EINVAL;
 		}
@@ -2816,7 +2816,7 @@ ulp_mapper_ctrl_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		}
 	} else if (tbl->fdb_opcode == BNXT_ULP_FDB_OPC_DELETE_RID_REGFILE) {
 		rc = ulp_regfile_read(parms->regfile, tbl->fdb_operand, &val64);
-		if (!rc) {
+		if (rc) {
 			BNXT_DRV_DBG(ERR, "Failed to get RID from regfile\n");
 			return rc;
 		}
@@ -2959,8 +2959,8 @@ ulp_mapper_global_register_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	uint8_t ttype;
 
 	/* Initialize the blob data */
-	if (!ulp_blob_init(&data, tbl->result_bit_size,
-			   BNXT_ULP_BYTE_ORDER_BE)) {
+	if (ulp_blob_init(&data, tbl->result_bit_size,
+			  BNXT_ULP_BYTE_ORDER_BE)) {
 		BNXT_DRV_DBG(ERR, "Failed initial ulp_global table blob\n");
 		return -EINVAL;
 	}
@@ -3213,7 +3213,7 @@ ulp_mapper_cond_opc_process(struct bnxt_ulp_mapper_parms *parms,
 		result = !ULP_INDEX_BITMAP_GET(parms->fld_bitmap->bits, bit);
 		break;
 	case BNXT_ULP_COND_OPC_RF_IS_SET:
-		if (!ulp_regfile_read(parms->regfile, operand, &regval)) {
+		if (ulp_regfile_read(parms->regfile, operand, &regval)) {
 			BNXT_DRV_DBG(ERR,
 				     "regfile[%" PRIu64 "] read oob\n",
 				     operand);
@@ -3222,7 +3222,7 @@ ulp_mapper_cond_opc_process(struct bnxt_ulp_mapper_parms *parms,
 		result = regval != 0;
 		break;
 	case BNXT_ULP_COND_OPC_RF_NOT_SET:
-		if (!ulp_regfile_read(parms->regfile, operand, &regval)) {
+		if (ulp_regfile_read(parms->regfile, operand, &regval)) {
 			BNXT_DRV_DBG(ERR,
 				    "regfile[%" PRIu64 "] read oob\n", operand);
 			return -EINVAL;
@@ -3369,7 +3369,7 @@ ulp_mapper_func_opr_compute(struct bnxt_ulp_mapper_parms *parms,
 		*result = ULP_COMP_FLD_IDX_RD(parms, func_opr);
 		break;
 	case BNXT_ULP_FUNC_SRC_REGFILE:
-		if (!ulp_regfile_read(parms->regfile, func_opr, &regval)) {
+		if (ulp_regfile_read(parms->regfile, func_opr, &regval)) {
 			BNXT_DRV_DBG(ERR, "regfile[%d] read oob\n",
 						(uint32_t)func_opr);
 			return -EINVAL;
@@ -3480,9 +3480,9 @@ ulp_mapper_func_cond_list_process(struct bnxt_ulp_mapper_parms *parms,
 	if (value) {
 		if (fld->field_src2 == BNXT_ULP_FIELD_SRC_NEXT) {
 			/* read the next key ext table index */
-			if (!ulp_operand_read(fld->field_opr2,
-					      (uint8_t *)&ext_idx,
-					      sizeof(uint16_t))) {
+			if (ulp_operand_read(fld->field_opr2,
+					     (uint8_t *)&ext_idx,
+					     sizeof(uint16_t))) {
 				BNXT_DRV_DBG(ERR,
 					     "field idx operand read failed\n");
 				return -EINVAL;
@@ -3507,9 +3507,9 @@ ulp_mapper_func_cond_list_process(struct bnxt_ulp_mapper_parms *parms,
 	} else {
 		if (fld->field_src3 == BNXT_ULP_FIELD_SRC_NEXT) {
 			/* read the next key ext table index */
-			if (!ulp_operand_read(fld->field_opr3,
-					      (uint8_t *)&ext_idx,
-					      sizeof(uint16_t))) {
+			if (ulp_operand_read(fld->field_opr3,
+					     (uint8_t *)&ext_idx,
+					     sizeof(uint16_t))) {
 				BNXT_DRV_DBG(ERR,
 					     "field idx operand read failed\n");
 				return -EINVAL;
@@ -3938,9 +3938,9 @@ ulp_mapper_conflict_resolution_process(struct bnxt_ulp_mapper_parms *parms,
 		if (tbl->resource_func ==
 		    BNXT_ULP_RESOURCE_FUNC_GENERIC_TABLE) {
 			/* Perform the check that generic table is hit or not */
-			if (!ulp_regfile_read(parms->regfile,
-					      BNXT_ULP_RF_IDX_GENERIC_TBL_MISS,
-					      &regval)) {
+			if (ulp_regfile_read(parms->regfile,
+					     BNXT_ULP_RF_IDX_GENERIC_TBL_MISS,
+					     &regval)) {
 				BNXT_DRV_DBG(ERR, "regfile[%d] read oob\n",
 					     BNXT_ULP_RF_IDX_GENERIC_TBL_MISS);
 				return -EINVAL;
@@ -3952,9 +3952,9 @@ ulp_mapper_conflict_resolution_process(struct bnxt_ulp_mapper_parms *parms,
 			}
 		}
 		/* compare the new flow signature against stored one */
-		if (!ulp_regfile_read(parms->regfile,
-				      BNXT_ULP_RF_IDX_FLOW_SIG_ID,
-				      &regval)) {
+		if (ulp_regfile_read(parms->regfile,
+				     BNXT_ULP_RF_IDX_FLOW_SIG_ID,
+				     &regval)) {
 			BNXT_DRV_DBG(ERR, "regfile[%d] read oob\n",
 				     BNXT_ULP_RF_IDX_FLOW_SIG_ID);
 			return -EINVAL;
@@ -4111,8 +4111,8 @@ ulp_mapper_tbls_process(struct bnxt_ulp_mapper_parms *parms, void *error)
 
 			/* least significant 16 bits from reg_file index */
 			rf_idx = (uint32_t)(cond_goto & 0xFFFF);
-			if (!ulp_regfile_read(parms->regfile, rf_idx,
-					      &regval)) {
+			if (ulp_regfile_read(parms->regfile, rf_idx,
+					     &regval)) {
 				BNXT_DRV_DBG(ERR, "regfile[%d] read oob\n",
 					     rf_idx);
 				rc = -EINVAL;
@@ -4364,7 +4364,7 @@ ulp_mapper_flow_create(struct bnxt_ulp_context *ulp_ctx,
 	}
 
 	/* initialize the registry file for further processing */
-	if (!ulp_regfile_init(parms->regfile)) {
+	if (ulp_regfile_init(parms->regfile)) {
 		BNXT_DRV_DBG(ERR, "regfile initialization failed.\n");
 		return -EINVAL;
 	}
diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper_tf.c b/drivers/net/bnxt/tf_ulp/ulp_mapper_tf.c
index 73c2b42a43..c16261047d 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper_tf.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper_tf.c
@@ -135,12 +135,12 @@ ulp_mapper_tf_tcam_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	else
 		key_byte_order = dparms->key_byte_order;
 
-	if (!ulp_blob_init(key, tbl->blob_key_bit_size, key_byte_order) ||
-	    !ulp_blob_init(mask, tbl->blob_key_bit_size, key_byte_order) ||
-	    !ulp_blob_init(&data, tbl->result_bit_size,
-			   dparms->result_byte_order) ||
-	    !ulp_blob_init(&update_data, tbl->result_bit_size,
-			   dparms->result_byte_order)) {
+	if (ulp_blob_init(key, tbl->blob_key_bit_size, key_byte_order) ||
+	    ulp_blob_init(mask, tbl->blob_key_bit_size, key_byte_order) ||
+	    ulp_blob_init(&data, tbl->result_bit_size,
+			  dparms->result_byte_order) ||
+	    ulp_blob_init(&update_data, tbl->result_bit_size,
+			  dparms->result_byte_order)) {
 		BNXT_DRV_DBG(ERR, "blob inits failed.\n");
 		return -EINVAL;
 	}
@@ -314,8 +314,8 @@ ulp_mapper_tf_em_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	res_order = dparms->em_byte_order;
 
 	/* Initialize the key/result blobs */
-	if (!ulp_blob_init(&key, tbl->blob_key_bit_size, key_order) ||
-	    !ulp_blob_init(&data, tbl->result_bit_size, res_order)) {
+	if (ulp_blob_init(&key, tbl->blob_key_bit_size, key_order) ||
+	    ulp_blob_init(&data, tbl->result_bit_size, res_order)) {
 		BNXT_DRV_DBG(ERR, "blob inits failed.\n");
 		return -EINVAL;
 	}
@@ -626,8 +626,8 @@ ulp_mapper_tf_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	bit_size = ulp_mapper_tf_dyn_blob_size_get(parms, tbl);
 
 	/* Initialize the blob data */
-	if (!ulp_blob_init(&data, bit_size,
-			   parms->device_params->result_byte_order)) {
+	if (ulp_blob_init(&data, bit_size,
+			  parms->device_params->result_byte_order)) {
 		BNXT_DRV_DBG(ERR, "Failed to initialize index table blob\n");
 		return -EINVAL;
 	}
@@ -656,9 +656,9 @@ ulp_mapper_tf_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		 * get the index to write to from the regfile and then write
 		 * the table entry.
 		 */
-		if (!ulp_regfile_read(parms->regfile,
-				      tbl->tbl_operand,
-				      &regval)) {
+		if (ulp_regfile_read(parms->regfile,
+				    tbl->tbl_operand,
+				    &regval)) {
 			BNXT_DRV_DBG(ERR,
 				    "Failed to get tbl idx from regfile[%d].\n",
 				     tbl->tbl_operand);
@@ -721,8 +721,8 @@ ulp_mapper_tf_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 				     "Ext Table Read Opcode not supported.\n");
 			return -EINVAL;
 		}
-		if (!ulp_regfile_read(parms->regfile,
-				      tbl->tbl_operand, &regval)) {
+		if (ulp_regfile_read(parms->regfile,
+				     tbl->tbl_operand, &regval)) {
 			BNXT_DRV_DBG(ERR,
 				     "Failed to get tbl idx from regfile[%d]\n",
 				     tbl->tbl_operand);
@@ -947,8 +947,8 @@ ulp_mapper_tf_if_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 
 	tfp = bnxt_ulp_cntxt_tfp_get(parms->ulp_ctx, tbl->session_type);
 	/* Initialize the blob data */
-	if (!ulp_blob_init(&data, tbl->result_bit_size,
-			   parms->device_params->result_byte_order)) {
+	if (ulp_blob_init(&data, tbl->result_bit_size,
+			  parms->device_params->result_byte_order)) {
 		BNXT_DRV_DBG(ERR, "Failed initial index table blob\n");
 		return -EINVAL;
 	}
@@ -966,7 +966,7 @@ ulp_mapper_tf_if_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		idx = ULP_COMP_FLD_IDX_RD(parms, tbl->tbl_operand);
 		break;
 	case BNXT_ULP_IF_TBL_OPC_WR_REGFILE:
-		if (!ulp_regfile_read(parms->regfile, tbl->tbl_operand, &idx)) {
+		if (ulp_regfile_read(parms->regfile, tbl->tbl_operand, &idx)) {
 			BNXT_DRV_DBG(ERR, "regfile[%d] read oob\n",
 				     tbl->tbl_operand);
 			return -EINVAL;
@@ -978,8 +978,8 @@ ulp_mapper_tf_if_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		break;
 	case BNXT_ULP_IF_TBL_OPC_RD_COMP_FIELD:
 		/* Initialize the result blob */
-		if (!ulp_blob_init(&res_blob, tbl->result_bit_size,
-				   parms->device_params->result_byte_order)) {
+		if (ulp_blob_init(&res_blob, tbl->result_bit_size,
+				  parms->device_params->result_byte_order)) {
 			BNXT_DRV_DBG(ERR, "Failed initial result blob\n");
 			return -EINVAL;
 		}
diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper_tfc.c b/drivers/net/bnxt/tf_ulp/ulp_mapper_tfc.c
index b3fcc73975..f5c0aca1f1 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper_tfc.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper_tfc.c
@@ -116,7 +116,7 @@ ulp_mapper_tfc_wc_tcam_post_process(struct bnxt_ulp_device_params *dparms,
 
 	/* The new length accounts for the ctrl word length and num slices */
 	tlen = tlen + (clen + 1) * num_slices;
-	if (!ulp_blob_init(tkey, tlen, key->byte_order)) {
+	if (ulp_blob_init(tkey, tlen, key->byte_order)) {
 		BNXT_DRV_DBG(ERR, "Unable to post process wc tcam entry\n");
 		return -EINVAL;
 	}
@@ -225,9 +225,9 @@ ulp_mapper_tfc_tcam_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		key_byte_order = dparms->key_byte_order;
 
 	res_byte_order = dparms->result_byte_order;
-	if (!ulp_blob_init(key, tbl->blob_key_bit_size, key_byte_order) ||
-	    !ulp_blob_init(mask, tbl->blob_key_bit_size, key_byte_order) ||
-	    !ulp_blob_init(&data, tbl->result_bit_size, res_byte_order)) {
+	if (ulp_blob_init(key, tbl->blob_key_bit_size, key_byte_order) ||
+	    ulp_blob_init(mask, tbl->blob_key_bit_size, key_byte_order) ||
+	    ulp_blob_init(&data, tbl->result_bit_size, res_byte_order)) {
 		BNXT_DRV_DBG(ERR, "blob inits failed.\n");
 		return -EINVAL;
 	}
@@ -491,8 +491,8 @@ ulp_mapper_tfc_em_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 
 	byte_order = dparms->em_byte_order;
 	/* Initialize the key/result blobs */
-	if (!ulp_blob_init(&key, tbl->blob_key_bit_size, byte_order) ||
-	    !ulp_blob_init(&data, tbl->result_bit_size, byte_order)) {
+	if (ulp_blob_init(&key, tbl->blob_key_bit_size, byte_order) ||
+	    ulp_blob_init(&data, tbl->result_bit_size, byte_order)) {
 		BNXT_DRV_DBG(ERR, "blob inits failed.\n");
 		return -EINVAL;
 	}
@@ -780,8 +780,8 @@ ulp_mapper_tfc_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	bit_size = ulp_mapper_tfc_dyn_blob_size_get(parms, tbl);
 
 	/* Initialize the blob data */
-	if (!ulp_blob_init(&data, bit_size,
-			   parms->device_params->result_byte_order)) {
+	if (ulp_blob_init(&data, bit_size,
+			  parms->device_params->result_byte_order)) {
 		BNXT_DRV_DBG(ERR, "Failed to initialize index table blob\n");
 		return -EINVAL;
 	}
@@ -846,8 +846,8 @@ ulp_mapper_tfc_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		 * with the index from the regfile, scan and store the
 		 * identifiers, and return.
 		 */
-		if (!ulp_regfile_read(parms->regfile,
-				      tbl->tbl_operand, &regval)) {
+		if (ulp_regfile_read(parms->regfile,
+				     tbl->tbl_operand, &regval)) {
 			BNXT_DRV_DBG(ERR,
 				     "Failed to get tbl idx from regfile[%d]\n",
 				     tbl->tbl_operand);
@@ -894,9 +894,9 @@ ulp_mapper_tfc_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 
 	/* read the CMM identifier from the regfile, it is not allocated */
 	if (!alloc && regfile) {
-		if (!ulp_regfile_read(parms->regfile,
-				      tbl->tbl_operand,
-				      &regval)) {
+		if (ulp_regfile_read(parms->regfile,
+				     tbl->tbl_operand,
+				     &regval)) {
 			BNXT_DRV_DBG(ERR,
 				    "Failed to get tbl idx from regfile[%d].\n",
 				     tbl->tbl_operand);
@@ -1093,8 +1093,8 @@ ulp_mapper_tfc_cmm_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	bit_size = ulp_mapper_tfc_dyn_blob_size_get(parms, tbl);
 
 	/* Initialize the blob data */
-	if (!ulp_blob_init(&data, bit_size,
-			   parms->device_params->result_byte_order)) {
+	if (ulp_blob_init(&data, bit_size,
+			  parms->device_params->result_byte_order)) {
 		BNXT_DRV_DBG(ERR, "Failed to initialize cmm table blob\n");
 		return -EINVAL;
 	}
@@ -1159,8 +1159,8 @@ ulp_mapper_tfc_cmm_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		 * with the index from the regfile, scan and store the
 		 * identifiers, and return.
 		 */
-		if (!ulp_regfile_read(parms->regfile,
-				      tbl->tbl_operand, &regval)) {
+		if (ulp_regfile_read(parms->regfile,
+				     tbl->tbl_operand, &regval)) {
 			BNXT_DRV_DBG(ERR,
 				     "Failed to get tbl idx from regfile[%d]\n",
 				     tbl->tbl_operand);
@@ -1180,9 +1180,9 @@ ulp_mapper_tfc_cmm_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 
 	/* read the CMM handle from the regfile, it is not allocated */
 	if (!alloc && regfile) {
-		if (!ulp_regfile_read(parms->regfile,
-				      tbl->tbl_operand,
-				      &regval)) {
+		if (ulp_regfile_read(parms->regfile,
+				     tbl->tbl_operand,
+				     &regval)) {
 			BNXT_DRV_DBG(ERR,
 				    "Failed to get tbl idx from regfile[%d].\n",
 				     tbl->tbl_operand);
@@ -1449,8 +1449,8 @@ ulp_mapper_tfc_if_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	}
 
 	/* Initialize the blob data */
-	if (!ulp_blob_init(&data, tbl->result_bit_size,
-			   parms->device_params->result_byte_order)) {
+	if (ulp_blob_init(&data, tbl->result_bit_size,
+			  parms->device_params->result_byte_order)) {
 		BNXT_DRV_DBG(ERR, "Failed initial index table blob\n");
 		return -EINVAL;
 	}
@@ -1468,7 +1468,7 @@ ulp_mapper_tfc_if_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		idx = ULP_COMP_FLD_IDX_RD(parms, tbl->tbl_operand);
 		break;
 	case BNXT_ULP_IF_TBL_OPC_WR_REGFILE:
-		if (!ulp_regfile_read(parms->regfile, tbl->tbl_operand, &idx)) {
+		if (ulp_regfile_read(parms->regfile, tbl->tbl_operand, &idx)) {
 			BNXT_DRV_DBG(ERR, "regfile[%d] read oob\n",
 				     tbl->tbl_operand);
 			return -EINVAL;
@@ -1480,8 +1480,8 @@ ulp_mapper_tfc_if_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		break;
 	case BNXT_ULP_IF_TBL_OPC_RD_COMP_FIELD:
 		/* Initialize the result blob */
-		if (!ulp_blob_init(&res_blob, tbl->result_bit_size,
-				   parms->device_params->result_byte_order)) {
+		if (ulp_blob_init(&res_blob, tbl->result_bit_size,
+				  parms->device_params->result_byte_order)) {
 			BNXT_DRV_DBG(ERR, "Failed initial result blob\n");
 			return -EINVAL;
 		}
diff --git a/drivers/net/bnxt/tf_ulp/ulp_utils.c b/drivers/net/bnxt/tf_ulp/ulp_utils.c
index cf6d1df9f2..c9dbcea4d2 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_utils.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_utils.c
@@ -12,18 +12,18 @@
  *
  * regfile [in] Ptr to a regfile instance
  *
- * returns 0 on error or 1 on success
+ * returns zero on success
  */
-uint32_t
+int32_t
 ulp_regfile_init(struct ulp_regfile *regfile)
 {
 	/* validate the arguments */
 	if (!regfile) {
 		BNXT_DRV_DBG(ERR, "invalid argument\n");
-		return 0; /* failure */
+		return -EINVAL;
 	}
 	memset(regfile, 0, sizeof(struct ulp_regfile));
-	return 1; /* Success */
+	return 0; /* Success */
 }
 
 /*
@@ -35,9 +35,9 @@ ulp_regfile_init(struct ulp_regfile *regfile)
  *
  * data [in/out]
  *
- * returns size, zero on failure
+ * returns zero on success
  */
-uint32_t
+int32_t
 ulp_regfile_read(struct ulp_regfile *regfile,
 		 enum bnxt_ulp_rf_idx field,
 		 uint64_t *data)
@@ -45,11 +45,11 @@ ulp_regfile_read(struct ulp_regfile *regfile,
 	/* validate the arguments */
 	if (!regfile || field >= BNXT_ULP_RF_IDX_LAST) {
 		BNXT_DRV_DBG(ERR, "invalid argument\n");
-		return 0; /* failure */
+		return -EINVAL;
 	}
 
 	*data = regfile->entry[field].data;
-	return sizeof(*data);
+	return 0;
 }
 
 /*
@@ -229,10 +229,10 @@ ulp_bs_push_msb(uint8_t *bs, uint16_t pos, uint8_t len, uint8_t *val)
  * order [in] The byte order for the blob.  Currently only supporting
  * big endian.  All fields are packed with this order.
  *
- * returns 0 on error or 1 on success
+ * returns zero on success
  * Notes - If bitlen is zero then set it to max.
  */
-uint32_t
+int32_t
 ulp_blob_init(struct ulp_blob *blob,
 	      uint16_t bitlen,
 	      enum bnxt_ulp_byte_order order)
@@ -240,7 +240,7 @@ ulp_blob_init(struct ulp_blob *blob,
 	/* validate the arguments */
 	if (!blob || bitlen > (8 * sizeof(blob->data))) {
 		BNXT_DRV_DBG(ERR, "invalid argument\n");
-		return 0; /* failure */
+		return -EINVAL;
 	}
 	if (bitlen)
 		blob->bitlen = bitlen;
@@ -249,7 +249,7 @@ ulp_blob_init(struct ulp_blob *blob,
 	blob->byte_order = order;
 	blob->write_idx = 0;
 	memset(blob->data, 0, sizeof(blob->data));
-	return 1; /* Success */
+	return 0; /* Success */
 }
 
 /*
@@ -263,12 +263,13 @@ ulp_blob_init(struct ulp_blob *blob,
  * datalen [in] The number of bits to be added to the blob.
  *
  * The offset of the data is updated after each push of data.
- * NULL returned on error.
+ *
+ * returns zero on success
  */
 #define ULP_BLOB_BYTE		8
 #define ULP_BLOB_BYTE_HEX	0xFF
 #define BLOB_MASK_CAL(x)	((0xFF << (x)) & 0xFF)
-uint32_t
+int32_t
 ulp_blob_push(struct ulp_blob *blob,
 	      uint8_t *data,
 	      uint32_t datalen)
@@ -278,7 +279,7 @@ ulp_blob_push(struct ulp_blob *blob,
 	/* validate the arguments */
 	if (!blob || datalen > (uint32_t)(blob->bitlen - blob->write_idx)) {
 		BNXT_DRV_DBG(ERR, "invalid argument\n");
-		return 0; /* failure */
+		return -EINVAL;
 	}
 
 	if (blob->byte_order == BNXT_ULP_BYTE_ORDER_BE)
@@ -293,10 +294,10 @@ ulp_blob_push(struct ulp_blob *blob,
 				     data);
 	if (!rc) {
 		BNXT_DRV_DBG(ERR, "Failed to write blob\n");
-		return 0;
+		return -EINVAL;
 	}
 	blob->write_idx += datalen;
-	return datalen;
+	return 0;
 }
 
 /*
@@ -312,9 +313,10 @@ ulp_blob_push(struct ulp_blob *blob,
  * datalen [in] The number of bits to be added to the blob.
  *
  * The offset of the data is updated after each push of data.
- * NULL returned on error.
+ *
+ * returns zero on success
  */
-uint32_t
+int32_t
 ulp_blob_insert(struct ulp_blob *blob, uint32_t offset,
 		uint8_t *data, uint32_t datalen)
 {
@@ -326,7 +328,7 @@ ulp_blob_insert(struct ulp_blob *blob, uint32_t offset,
 	if (!blob || datalen > (uint32_t)(blob->bitlen - blob->write_idx) ||
 	    offset > blob->write_idx) {
 		BNXT_DRV_DBG(ERR, "invalid argument\n");
-		return 0; /* failure */
+		return -EINVAL;
 	}
 
 	mov_len = blob->write_idx - offset;
@@ -334,7 +336,7 @@ ulp_blob_insert(struct ulp_blob *blob, uint32_t offset,
 	if (ULP_BITS_IS_BYTE_NOT_ALIGNED(offset) ||
 	    ULP_BITS_IS_BYTE_NOT_ALIGNED(datalen)) {
 		BNXT_DRV_DBG(ERR, "invalid argument, not aligned\n");
-		return 0; /* failure */
+		return -EINVAL;
 	}
 
 	/* copy the data so we can move the data */
@@ -353,13 +355,13 @@ ulp_blob_insert(struct ulp_blob *blob, uint32_t offset,
 				     data);
 	if (!rc) {
 		BNXT_DRV_DBG(ERR, "Failed to write blob\n");
-		return 0;
+		return -EINVAL;
 	}
 	/* copy the previously stored data */
 	memcpy(&blob->data[ULP_BITS_2_BYTE_NR(offset + datalen)], local_data,
 	       ULP_BITS_2_BYTE(mov_len));
 	blob->write_idx += (mov_len + datalen);
-	return datalen;
+	return 0;
 }
 
 /*
@@ -388,12 +390,12 @@ ulp_blob_push_64(struct ulp_blob *blob,
 	if (!blob || !data ||
 	    datalen > (uint32_t)(blob->bitlen - blob->write_idx)) {
 		BNXT_DRV_DBG(ERR, "invalid argument\n");
-		return 0;
+		return NULL;
 	}
 
 	rc = ulp_blob_push(blob, &val[8 - size], datalen);
-	if (!rc)
-		return 0;
+	if (rc)
+		return NULL;
 
 	return &val[8 - size];
 }
@@ -422,12 +424,12 @@ ulp_blob_push_32(struct ulp_blob *blob,
 
 	if (!data || size > sizeof(uint32_t)) {
 		BNXT_DRV_DBG(ERR, "invalid argument\n");
-		return 0;
+		return NULL;
 	}
 
 	rc = ulp_blob_push(blob, &val[sizeof(uint32_t) - size], datalen);
-	if (!rc)
-		return 0;
+	if (rc)
+		return NULL;
 
 	return &val[sizeof(uint32_t) - size];
 }
@@ -474,7 +476,7 @@ ulp_blob_push_encap(struct ulp_blob *blob,
 		} else {
 			size = write_size;
 		}
-		if (!ulp_blob_push(blob, val, size)) {
+		if (ulp_blob_push(blob, val, size)) {
 			BNXT_DRV_DBG(ERR, "push field failed\n");
 			return -1;
 		}
@@ -1028,9 +1030,9 @@ ulp_blob_buffer_copy(struct ulp_blob *dst, struct ulp_blob *src)
  *
  * bytes [in] The number of bytes to read into val
  *
- * returns number of bits read, zero on error
+ * returns zero on success.
  */
-uint16_t
+int32_t
 ulp_operand_read(uint8_t *operand,
 		 uint8_t *val,
 		 uint16_t bytes)
@@ -1038,10 +1040,10 @@ ulp_operand_read(uint8_t *operand,
 	/* validate the arguments */
 	if (!operand || !val) {
 		BNXT_DRV_DBG(ERR, "invalid argument\n");
-		return 0; /* failure */
+		return -EINVAL;
 	}
 	memcpy(val, operand, bytes);
-	return bytes;
+	return 0;
 }
 
 /*
diff --git a/drivers/net/bnxt/tf_ulp/ulp_utils.h b/drivers/net/bnxt/tf_ulp/ulp_utils.h
index 420b7c6815..f0dc6dbfec 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_utils.h
+++ b/drivers/net/bnxt/tf_ulp/ulp_utils.h
@@ -108,9 +108,9 @@ struct ulp_regfile {
  *
  * regfile [in] Ptr to a regfile instance
  *
- * returns 0 on error or 1 on success
+ * returns zero on success
  */
-uint32_t
+int32_t
 ulp_regfile_init(struct ulp_regfile *regfile);
 
 /*
@@ -120,9 +120,9 @@ ulp_regfile_init(struct ulp_regfile *regfile);
  *
  * field [in] The field to be read within the regfile.
  *
- * returns the byte array
+ * returns zero on success
  */
-uint32_t
+int32_t
 ulp_regfile_read(struct ulp_regfile *regfile,
 		 enum bnxt_ulp_rf_idx field,
 		 uint64_t *data);
@@ -186,9 +186,9 @@ ulp_bs_push_msb(uint8_t *bs, uint16_t pos, uint8_t len, uint8_t *val);
  * order [in] The byte order for the blob.  Currently only supporting
  * big endian.  All fields are packed with this order.
  *
- * returns 0 on error or 1 on success
+ * returns zero on success
  */
-uint32_t
+int32_t
 ulp_blob_init(struct ulp_blob *blob,
 	      uint16_t bitlen,
 	      enum bnxt_ulp_byte_order order);
@@ -204,9 +204,10 @@ ulp_blob_init(struct ulp_blob *blob,
  * datalen [in] The number of bits to be added to the blob.
  *
  * The offset of the data is updated after each push of data.
- * NULL returned on error.
+ *
+ * returns zero on success
  */
-uint32_t
+int32_t
 ulp_blob_push(struct ulp_blob *blob,
 	      uint8_t *data,
 	      uint32_t datalen);
@@ -224,9 +225,10 @@ ulp_blob_push(struct ulp_blob *blob,
  * datalen [in] The number of bits to be added to the blob.
  *
  * The offset of the data is updated after each push of data.
- * NULL returned on error.
+ *
+ * returns zero on success
  */
-uint32_t
+int32_t
 ulp_blob_insert(struct ulp_blob *blob, uint32_t offset,
 		uint8_t *data, uint32_t datalen);
 
@@ -503,9 +505,9 @@ ulp_blob_buffer_copy(struct ulp_blob *dst, struct ulp_blob *src);
  *
  * bitlen [in] The number of bits to read into val
  *
- * returns number of bits read, zero on error
+ * returns zero on success.
  */
-uint16_t
+int32_t
 ulp_operand_read(uint8_t *operand,
 		 uint8_t *val,
 		 uint16_t bitlen);
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 29/47] net/bnxt: tf_ulp: update template files
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (20 preceding siblings ...)
  2024-10-01  5:58 ` [PATCH v3 28/47] net/bnxt: tf_ulp: modify return values to adhere to C coding standard Sriharsha Basavapatna
@ 2024-10-01  5:58 ` Sriharsha Basavapatna
  2024-10-01  5:58 ` [PATCH v3 30/47] net/bnxt: tf_ulp: add mask defaults when mask is not specified Sriharsha Basavapatna
                   ` (11 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:58 UTC (permalink / raw)
  To: dev
  Cc: Kishore Padmanabha, Sriharsha Basavapatna, Michael Baucom, Ajit Khaparde

From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>

This patch updates template files for the following list
of changes, that are being added in the next patch.

dynamic support for VF representor mode (template files only)
	The configurable VF representor mode is removed and it is
	dynamic. The action record is not populated for packets
	transmitted to network, only packets being sent to VF rep
	are sent with action records in the mbuf.

Thor2 priority for l2 tcam records not adhered to

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Michael Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 .../generic_templates/ulp_template_db_enum.h  |    8 +-
 .../ulp_template_db_thor2_class.c             |   28 +-
 .../ulp_template_db_thor_class.c              | 1748 +++++++++++------
 3 files changed, 1116 insertions(+), 668 deletions(-)

diff --git a/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_enum.h b/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_enum.h
index ddd65a62b1..21972cc4ea 100644
--- a/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_enum.h
+++ b/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_enum.h
@@ -31,12 +31,12 @@
 #define ULP_WH_PLUS_CLASS_COND_LIST_SIZE 50
 #define ULP_WH_PLUS_CLASS_COND_OPER_LIST_SIZE 0
 #define ULP_THOR_CLASS_TMPL_LIST_SIZE 5
-#define ULP_THOR_CLASS_TBL_LIST_SIZE 126
-#define ULP_THOR_CLASS_KEY_INFO_LIST_SIZE 605
+#define ULP_THOR_CLASS_TBL_LIST_SIZE 120
+#define ULP_THOR_CLASS_KEY_INFO_LIST_SIZE 646
 #define ULP_THOR_CLASS_KEY_EXT_LIST_SIZE 615
 #define ULP_THOR_CLASS_IDENT_LIST_SIZE 43
-#define ULP_THOR_CLASS_RESULT_FIELD_LIST_SIZE 1252
-#define ULP_THOR_CLASS_COND_LIST_SIZE 3077
+#define ULP_THOR_CLASS_RESULT_FIELD_LIST_SIZE 1253
+#define ULP_THOR_CLASS_COND_LIST_SIZE 3075
 #define ULP_THOR_CLASS_COND_OPER_LIST_SIZE 7
 #define ULP_THOR2_CLASS_TMPL_LIST_SIZE 5
 #define ULP_THOR2_CLASS_TBL_LIST_SIZE 125
diff --git a/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor2_class.c b/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor2_class.c
index 99c56fea0c..bef9e7571c 100644
--- a/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor2_class.c
+++ b/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor2_class.c
@@ -290,8 +290,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
 	.fdb_operand = BNXT_ULP_RF_IDX_RID,
-	.pri_opcode  = BNXT_ULP_PRI_OPC_APP_PRI_OR_CONST,
-	.pri_operand = ULP_THOR2_SYM_L2_CTXT_PRI_APP,
+	.pri_opcode  = BNXT_ULP_PRI_OPC_CONST,
+	.pri_operand = 140,
 	.ident_start_idx = 10,
 	.ident_nums = 1
 	},
@@ -310,8 +310,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor2_class_tbl_list[] = {
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
 	.fdb_operand = BNXT_ULP_RF_IDX_RID,
-	.pri_opcode  = BNXT_ULP_PRI_OPC_APP_PRI_OR_CONST,
-	.pri_operand = ULP_THOR2_SYM_L2_CTXT_PRI_APP,
+	.pri_opcode  = BNXT_ULP_PRI_OPC_CONST,
+	.pri_operand = 140,
 	.key_start_idx = 15,
 	.blob_key_bit_size = 256,
 	.key_bit_size = 256,
@@ -17602,7 +17602,9 @@ struct bnxt_ulp_mapper_key_info ulp_thor2_class_key_info_list[] = {
 		.description = "loopback",
 		.field_bit_size = 1,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		.field_src1 = BNXT_ULP_FIELD_SRC_ONES,
+		.field_opr1 = {
+			0xff}
 		},
 	.field_info_spec = {
 		.description = "loopback",
@@ -30502,17 +30504,13 @@ struct bnxt_ulp_mapper_key_info ulp_thor2_class_key_info_list[] = {
 		.description = "tun_hdr_type",
 		.field_bit_size = 5,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-		.field_src1 = BNXT_ULP_FIELD_SRC_CONST,
-		.field_opr1 = {
-		ULP_THOR2_SYM_TUN_HDR_TYPE_NONE}
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
 		},
 	.field_info_spec = {
 		.description = "tun_hdr_type",
 		.field_bit_size = 5,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-		.field_src1 = BNXT_ULP_FIELD_SRC_CONST,
-		.field_opr1 = {
-		ULP_THOR2_SYM_TUN_HDR_TYPE_NONE}
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
 		}
 	},
 	{
@@ -30520,17 +30518,13 @@ struct bnxt_ulp_mapper_key_info ulp_thor2_class_key_info_list[] = {
 		.description = "out_tun_hdr_type",
 		.field_bit_size = 5,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-		.field_src1 = BNXT_ULP_FIELD_SRC_CONST,
-		.field_opr1 = {
-		ULP_THOR2_SYM_TUN_HDR_TYPE_NONE}
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
 		},
 	.field_info_spec = {
 		.description = "out_tun_hdr_type",
 		.field_bit_size = 5,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-		.field_src1 = BNXT_ULP_FIELD_SRC_CONST,
-		.field_opr1 = {
-		ULP_THOR2_SYM_TUN_HDR_TYPE_NONE}
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
 		}
 	},
 	{
diff --git a/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor_class.c b/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor_class.c
index f2fb25d7b6..1a8cd315b6 100644
--- a/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor_class.c
+++ b/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor_class.c
@@ -33,7 +33,7 @@ struct bnxt_ulp_mapper_tmpl_info ulp_thor_class_tmpl_list[] = {
 	/* class_tid: 3, ingress */
 	[3] = {
 	.device_name = BNXT_ULP_DEVICE_ID_THOR,
-	.num_tbls = 23,
+	.num_tbls = 17,
 	.start_tbl_idx = 68,
 	.reject_info = {
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_FALSE,
@@ -44,10 +44,10 @@ struct bnxt_ulp_mapper_tmpl_info ulp_thor_class_tmpl_list[] = {
 	[4] = {
 	.device_name = BNXT_ULP_DEVICE_ID_THOR,
 	.num_tbls = 35,
-	.start_tbl_idx = 91,
+	.start_tbl_idx = 85,
 	.reject_info = {
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_FALSE,
-		.cond_start_idx = 3073,
+		.cond_start_idx = 3071,
 		.cond_nums = 0 }
 	}
 };
@@ -1420,7 +1420,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.key_bit_size = 11,
 	.key_num_fields = 1,
 	.ident_start_idx = 36,
-	.ident_nums = 0
+	.ident_nums = 1
 	},
 	{ /* class_tid: 3, , table: control.ing_0 */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_CTRL_TABLE,
@@ -1461,7 +1461,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.result_start_idx = 739,
 	.result_bit_size = 43,
 	.result_num_fields = 6,
-	.ident_start_idx = 36,
+	.ident_start_idx = 37,
 	.ident_nums = 2
 	},
 	{ /* class_tid: 3, , table: l2_cntxt_tcam_cache.ing_wr */
@@ -1512,7 +1512,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.result_start_idx = 750,
 	.result_bit_size = 33,
 	.result_num_fields = 8,
-	.ident_start_idx = 38,
+	.ident_start_idx = 39,
 	.ident_nums = 0
 	},
 	{ /* class_tid: 3, , table: parif_def_arec_ptr.ing_0 */
@@ -1555,7 +1555,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
 	.resource_type = TF_TBL_TYPE_FULL_ACT_RECORD,
 	.resource_sub_type =
-		BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_VFR_CFA_ACTION,
+		BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_NORMAL,
 	.direction = TF_DIR_TX,
 	.execute_info = {
 		.cond_true_goto  = 1,
@@ -1596,74 +1596,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.result_bit_size = 179,
 	.result_num_fields = 8
 	},
-	{ /* class_tid: 3, , table: control.egr_0 */
-	.resource_func = BNXT_ULP_RESOURCE_FUNC_CTRL_TABLE,
-	.direction = TF_DIR_RX,
-	.execute_info = {
-		.cond_true_goto  = 1,
-		.cond_false_goto = 6,
-		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 3070,
-		.cond_nums = 1 },
-	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
-	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP
-	},
-	{ /* class_tid: 3, , table: l2_cntxt_tcam_cache.egr_rd_vfr */
-	.resource_func = BNXT_ULP_RESOURCE_FUNC_GENERIC_TABLE,
-	.resource_sub_type =
-		BNXT_ULP_RESOURCE_SUB_TYPE_GENERIC_TABLE_L2_CNTXT_TCAM,
-	.direction = TF_DIR_TX,
-	.execute_info = {
-		.cond_true_goto  = 1,
-		.cond_false_goto = 1,
-		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3071,
-		.cond_nums = 0 },
-	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_READ,
-	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
-	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
-	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
-	.key_start_idx = 366,
-	.blob_key_bit_size = 11,
-	.key_bit_size = 11,
-	.key_num_fields = 1,
-	.ident_start_idx = 38,
-	.ident_nums = 0
-	},
-	{ /* class_tid: 3, , table: control.egr_1 */
-	.resource_func = BNXT_ULP_RESOURCE_FUNC_CTRL_TABLE,
-	.direction = TF_DIR_RX,
-	.execute_info = {
-		.cond_true_goto  = 1,
-		.cond_false_goto = 0,
-		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 3071,
-		.cond_nums = 1 },
-	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
-	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
-	.fdb_operand = BNXT_ULP_RF_IDX_RID
-	},
-	{ /* class_tid: 3, , table: l2_cntxt_tcam.drv_func_prof_func_alloc */
-	.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
-	.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
-	.direction = TF_DIR_TX,
-	.execute_info = {
-		.cond_true_goto  = 1,
-		.cond_false_goto = 1,
-		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3072,
-		.cond_nums = 0 },
-	.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_IDENT,
-	.tbl_operand = BNXT_ULP_RF_IDX_L2_CNTXT_TCAM_INDEX_0,
-	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
-	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
-	.fdb_operand = BNXT_ULP_RF_IDX_RID,
-	.pri_opcode  = BNXT_ULP_PRI_OPC_CONST,
-	.pri_operand = 0,
-	.ident_start_idx = 38,
-	.ident_nums = 1
-	},
-	{ /* class_tid: 3, , table: ilt_tbl.egr_vfr */
+	{ /* class_tid: 3, , table: ilt_tbl.egr */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_IF_TABLE,
 	.resource_type = TF_IF_TBL_TYPE_ILT,
 	.direction = TF_DIR_TX,
@@ -1671,41 +1604,17 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3072,
+		.cond_start_idx = 3070,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_IF_TBL_OPC_WR_COMP_FIELD,
 	.tbl_operand = BNXT_ULP_CF_IDX_DRV_FUNC_SVIF,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
-	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
-	.fdb_operand = BNXT_ULP_RF_IDX_RID,
+	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.result_start_idx = 785,
 	.result_bit_size = 64,
 	.result_num_fields = 8
 	},
-	{ /* class_tid: 3, , table: l2_cntxt_tcam_cache.egr_wr_vfr */
-	.resource_func = BNXT_ULP_RESOURCE_FUNC_GENERIC_TABLE,
-	.resource_sub_type =
-		BNXT_ULP_RESOURCE_SUB_TYPE_GENERIC_TABLE_L2_CNTXT_TCAM,
-	.direction = TF_DIR_TX,
-	.execute_info = {
-		.cond_true_goto  = 0,
-		.cond_false_goto = 1,
-		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3072,
-		.cond_nums = 0 },
-	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_WRITE,
-	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
-	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
-	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
-	.key_start_idx = 367,
-	.blob_key_bit_size = 11,
-	.key_bit_size = 11,
-	.key_num_fields = 1,
-	.result_start_idx = 793,
-	.result_bit_size = 70,
-	.result_num_fields = 5
-	},
-	{ /* class_tid: 3, , table: l2_cntxt_tcam_cache.egr_rd */
+	{ /* class_tid: 3, , table: l2_cntxt_tcam_cache.non_vfr_egr_rd */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_GENERIC_TABLE,
 	.resource_sub_type =
 		BNXT_ULP_RESOURCE_SUB_TYPE_GENERIC_TABLE_L2_CNTXT_TCAM,
@@ -1714,33 +1623,33 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3072,
+		.cond_start_idx = 3070,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_READ,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
-	.key_start_idx = 368,
+	.key_start_idx = 366,
 	.blob_key_bit_size = 11,
 	.key_bit_size = 11,
 	.key_num_fields = 1,
 	.ident_start_idx = 39,
 	.ident_nums = 0
 	},
-	{ /* class_tid: 3, , table: control.egr_2 */
+	{ /* class_tid: 3, , table: control.non_vfr_egr_2 */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_CTRL_TABLE,
 	.direction = TF_DIR_RX,
 	.execute_info = {
 		.cond_true_goto  = 1,
-		.cond_false_goto = 3,
+		.cond_false_goto = 0,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 3072,
+		.cond_start_idx = 3070,
 		.cond_nums = 1 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
 	.fdb_operand = BNXT_ULP_RF_IDX_RID
 	},
-	{ /* class_tid: 3, , table: l2_cntxt_tcam.egr_0 */
+	{ /* class_tid: 3, , table: l2_cntxt_tcam.non_vfr_egr_0 */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
 	.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,
 	.direction = TF_DIR_TX,
@@ -1748,7 +1657,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3073,
+		.cond_start_idx = 3071,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_L2_CNTXT_TCAM_INDEX_0,
@@ -1757,74 +1666,66 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.fdb_operand = BNXT_ULP_RF_IDX_RID,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
 	.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_NO,
-	.key_start_idx = 369,
+	.key_start_idx = 367,
 	.blob_key_bit_size = 213,
 	.key_bit_size = 213,
 	.key_num_fields = 21,
-	.result_start_idx = 798,
+	.result_start_idx = 793,
 	.result_bit_size = 43,
 	.result_num_fields = 6,
 	.ident_start_idx = 39,
 	.ident_nums = 2
 	},
-	{ /* class_tid: 3, , table: l2_cntxt_tcam_cache.egr_wr */
-	.resource_func = BNXT_ULP_RESOURCE_FUNC_GENERIC_TABLE,
-	.resource_sub_type =
-		BNXT_ULP_RESOURCE_SUB_TYPE_GENERIC_TABLE_L2_CNTXT_TCAM,
-	.direction = TF_DIR_TX,
-	.execute_info = {
-		.cond_true_goto  = 1,
-		.cond_false_goto = 1,
-		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3073,
-		.cond_nums = 0 },
-	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_WRITE,
-	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
-	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
-	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
-	.key_start_idx = 390,
-	.blob_key_bit_size = 11,
-	.key_bit_size = 11,
-	.key_num_fields = 1,
-	.result_start_idx = 804,
-	.result_bit_size = 70,
-	.result_num_fields = 5
-	},
-	{ /* class_tid: 3, , table: parif_def_arec_ptr.egr_0 */
-	.resource_func = BNXT_ULP_RESOURCE_FUNC_IF_TABLE,
-	.resource_type = TF_IF_TBL_TYPE_PROF_PARIF_DFLT_ACT_REC_PTR,
+	{ /* class_tid: 3, , table: profile_tcam.non_vfr_prof_func_egr_catch_all */
+	.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+	.resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,
 	.direction = TF_DIR_TX,
 	.execute_info = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3073,
+		.cond_start_idx = 3071,
 		.cond_nums = 0 },
-	.tbl_opcode = BNXT_ULP_IF_TBL_OPC_WR_COMP_FIELD,
-	.tbl_operand = BNXT_ULP_CF_IDX_DRV_FUNC_PARIF,
+	.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+	.tbl_operand = BNXT_ULP_RF_IDX_PROFILE_TCAM_INDEX_0,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
-	.result_start_idx = 809,
-	.result_bit_size = 32,
-	.result_num_fields = 1
+	.pri_opcode  = BNXT_ULP_PRI_OPC_CONST,
+	.pri_operand = 5,
+	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
+	.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_NO,
+	.key_start_idx = 388,
+	.blob_key_bit_size = 94,
+	.key_bit_size = 94,
+	.key_num_fields = 43,
+	.result_start_idx = 799,
+	.result_bit_size = 33,
+	.result_num_fields = 8,
+	.ident_start_idx = 41,
+	.ident_nums = 0
 	},
-	{ /* class_tid: 3, , table: parif_def_err_arec_ptr.egr_0 */
-	.resource_func = BNXT_ULP_RESOURCE_FUNC_IF_TABLE,
-	.resource_type = TF_IF_TBL_TYPE_PROF_PARIF_ERR_ACT_REC_PTR,
+	{ /* class_tid: 3, , table: l2_cntxt_tcam_cache.non_vfr_egr_wr */
+	.resource_func = BNXT_ULP_RESOURCE_FUNC_GENERIC_TABLE,
+	.resource_sub_type =
+		BNXT_ULP_RESOURCE_SUB_TYPE_GENERIC_TABLE_L2_CNTXT_TCAM,
 	.direction = TF_DIR_TX,
 	.execute_info = {
 		.cond_true_goto  = 0,
 		.cond_false_goto = 0,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3073,
+		.cond_start_idx = 3071,
 		.cond_nums = 0 },
-	.tbl_opcode = BNXT_ULP_IF_TBL_OPC_WR_COMP_FIELD,
-	.tbl_operand = BNXT_ULP_CF_IDX_DRV_FUNC_PARIF,
+	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_WRITE,
+	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
-	.result_start_idx = 810,
-	.result_bit_size = 32,
-	.result_num_fields = 1
+	.key_start_idx = 431,
+	.blob_key_bit_size = 11,
+	.key_bit_size = 11,
+	.key_num_fields = 1,
+	.result_start_idx = 807,
+	.result_bit_size = 70,
+	.result_num_fields = 5
 	},
 	{ /* class_tid: 4, , table: profile_tcam_cache.vfr_glb_act_rec_rd */
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_GENERIC_TABLE,
@@ -1836,13 +1737,13 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3073,
+		.cond_start_idx = 3071,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_READ,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
-	.key_start_idx = 391,
+	.key_start_idx = 432,
 	.blob_key_bit_size = 15,
 	.key_bit_size = 15,
 	.key_num_fields = 3,
@@ -1856,7 +1757,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 6,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 3073,
+		.cond_start_idx = 3071,
 		.cond_nums = 1 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
@@ -1872,13 +1773,13 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3074,
+		.cond_start_idx = 3072,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_WR_GLB_REGFILE,
 	.tbl_operand = BNXT_ULP_GLB_RF_IDX_GLB_MODIFY_PTR,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
-	.result_start_idx = 811,
+	.result_start_idx = 812,
 	.result_bit_size = 0,
 	.result_num_fields = 0,
 	.encap_num_fields = 20
@@ -1893,14 +1794,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3074,
+		.cond_start_idx = 3072,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_WR_GLB_REGFILE,
 	.tbl_operand = BNXT_ULP_GLB_RF_IDX_GLB_LB_AREC_PTR,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
-	.result_start_idx = 831,
+	.result_start_idx = 832,
 	.result_bit_size = 128,
 	.result_num_fields = 17,
 	.encap_num_fields = 0
@@ -1913,14 +1814,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3074,
+		.cond_start_idx = 3072,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_IF_TBL_OPC_WR_CONST,
 	.tbl_operand = ULP_THOR_SYM_LOOPBACK_PARIF,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
 	.fdb_operand = BNXT_ULP_RF_IDX_RID,
-	.result_start_idx = 848,
+	.result_start_idx = 849,
 	.result_bit_size = 32,
 	.result_num_fields = 1
 	},
@@ -1932,14 +1833,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3074,
+		.cond_start_idx = 3072,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_IF_TBL_OPC_WR_CONST,
 	.tbl_operand = ULP_THOR_SYM_LOOPBACK_PARIF,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
 	.fdb_operand = BNXT_ULP_RF_IDX_RID,
-	.result_start_idx = 849,
+	.result_start_idx = 850,
 	.result_bit_size = 32,
 	.result_num_fields = 1
 	},
@@ -1953,17 +1854,17 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3074,
+		.cond_start_idx = 3072,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_WRITE,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
-	.key_start_idx = 394,
+	.key_start_idx = 435,
 	.blob_key_bit_size = 15,
 	.key_bit_size = 15,
 	.key_num_fields = 3,
-	.result_start_idx = 850,
+	.result_start_idx = 851,
 	.result_bit_size = 138,
 	.result_num_fields = 7
 	},
@@ -1976,13 +1877,13 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3074,
+		.cond_start_idx = 3072,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_READ,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
-	.key_start_idx = 397,
+	.key_start_idx = 438,
 	.blob_key_bit_size = 11,
 	.key_bit_size = 11,
 	.key_num_fields = 1,
@@ -1996,7 +1897,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 5,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 3074,
+		.cond_start_idx = 3072,
 		.cond_nums = 1 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
@@ -2011,13 +1912,13 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3075,
+		.cond_start_idx = 3073,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_READ,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
-	.key_start_idx = 398,
+	.key_start_idx = 439,
 	.blob_key_bit_size = 11,
 	.key_bit_size = 11,
 	.key_num_fields = 1,
@@ -2032,7 +1933,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3075,
+		.cond_start_idx = 3073,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_L2_CNTXT_TCAM_INDEX_0,
@@ -2041,11 +1942,11 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.fdb_operand = BNXT_ULP_RF_IDX_RID,
 	.pri_opcode  = BNXT_ULP_PRI_OPC_CONST,
 	.pri_operand = 0,
-	.key_start_idx = 399,
+	.key_start_idx = 440,
 	.blob_key_bit_size = 213,
 	.key_bit_size = 213,
 	.key_num_fields = 21,
-	.result_start_idx = 857,
+	.result_start_idx = 858,
 	.result_bit_size = 43,
 	.result_num_fields = 6,
 	.ident_start_idx = 42,
@@ -2059,7 +1960,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3075,
+		.cond_start_idx = 3073,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_PROFILE_TCAM_INDEX_0,
@@ -2070,11 +1971,11 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.pri_operand = 5,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
 	.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_NO,
-	.key_start_idx = 420,
+	.key_start_idx = 461,
 	.blob_key_bit_size = 94,
 	.key_bit_size = 94,
 	.key_num_fields = 43,
-	.result_start_idx = 863,
+	.result_start_idx = 864,
 	.result_bit_size = 33,
 	.result_num_fields = 8,
 	.ident_start_idx = 43,
@@ -2089,17 +1990,17 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3075,
+		.cond_start_idx = 3073,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_WRITE,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
-	.key_start_idx = 463,
+	.key_start_idx = 504,
 	.blob_key_bit_size = 11,
 	.key_bit_size = 11,
 	.key_num_fields = 1,
-	.result_start_idx = 871,
+	.result_start_idx = 872,
 	.result_bit_size = 70,
 	.result_num_fields = 5
 	},
@@ -2113,14 +2014,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3075,
+		.cond_start_idx = 3073,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_PUSH_AND_SET_VFR_FLAG,
-	.result_start_idx = 876,
+	.result_start_idx = 877,
 	.result_bit_size = 128,
 	.result_num_fields = 17
 	},
@@ -2134,13 +2035,13 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3075,
+		.cond_start_idx = 3073,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_READ,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
-	.key_start_idx = 464,
+	.key_start_idx = 505,
 	.blob_key_bit_size = 15,
 	.key_bit_size = 15,
 	.key_num_fields = 3,
@@ -2154,7 +2055,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 10,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 3075,
+		.cond_start_idx = 3073,
 		.cond_nums = 1 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
@@ -2170,14 +2071,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3076,
+		.cond_start_idx = 3074,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_WR_GLB_REGFILE,
 	.tbl_operand = BNXT_ULP_GLB_RF_IDX_GLB_DROP_AREC_PTR,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
-	.result_start_idx = 893,
+	.result_start_idx = 894,
 	.result_bit_size = 128,
 	.result_num_fields = 17,
 	.encap_num_fields = 0
@@ -2190,7 +2091,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3076,
+		.cond_start_idx = 3074,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_L2_CNTXT_TCAM_INDEX_0,
@@ -2201,11 +2102,11 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.pri_operand = 0,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
 	.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_NO,
-	.key_start_idx = 467,
+	.key_start_idx = 508,
 	.blob_key_bit_size = 213,
 	.key_bit_size = 213,
 	.key_num_fields = 21,
-	.result_start_idx = 910,
+	.result_start_idx = 911,
 	.result_bit_size = 43,
 	.result_num_fields = 6,
 	.ident_start_idx = 43,
@@ -2219,7 +2120,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3076,
+		.cond_start_idx = 3074,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_L2_CNTXT_TCAM_INDEX_0,
@@ -2230,11 +2131,11 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.pri_operand = 0,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
 	.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_NO,
-	.key_start_idx = 488,
+	.key_start_idx = 529,
 	.blob_key_bit_size = 213,
 	.key_bit_size = 213,
 	.key_num_fields = 21,
-	.result_start_idx = 916,
+	.result_start_idx = 917,
 	.result_bit_size = 43,
 	.result_num_fields = 6,
 	.ident_start_idx = 43,
@@ -2248,13 +2149,13 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3076,
+		.cond_start_idx = 3074,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_WR_GLB_REGFILE,
 	.tbl_operand = BNXT_ULP_GLB_RF_IDX_GLB_VFR_EM_KEY_ID_0,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
-	.result_start_idx = 922,
+	.result_start_idx = 923,
 	.result_bit_size = 106,
 	.result_num_fields = 106
 	},
@@ -2266,13 +2167,13 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3076,
+		.cond_start_idx = 3074,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_WR_GLB_REGFILE,
 	.tbl_operand = BNXT_ULP_GLB_RF_IDX_GLB_VFR_EM_KEY_ID_1,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
-	.result_start_idx = 1028,
+	.result_start_idx = 1029,
 	.result_bit_size = 106,
 	.result_num_fields = 106
 	},
@@ -2284,7 +2185,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3076,
+		.cond_start_idx = 3074,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_PROFILE_TCAM_INDEX_0,
@@ -2295,11 +2196,11 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.pri_operand = 0,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
 	.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_NO,
-	.key_start_idx = 509,
+	.key_start_idx = 550,
 	.blob_key_bit_size = 94,
 	.key_bit_size = 94,
 	.key_num_fields = 43,
-	.result_start_idx = 1134,
+	.result_start_idx = 1135,
 	.result_bit_size = 33,
 	.result_num_fields = 8
 	},
@@ -2311,7 +2212,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3076,
+		.cond_start_idx = 3074,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_PROFILE_TCAM_INDEX_0,
@@ -2322,11 +2223,11 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.pri_operand = 0,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
 	.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_NO,
-	.key_start_idx = 552,
+	.key_start_idx = 593,
 	.blob_key_bit_size = 94,
 	.key_bit_size = 94,
 	.key_num_fields = 43,
-	.result_start_idx = 1142,
+	.result_start_idx = 1143,
 	.result_bit_size = 33,
 	.result_num_fields = 8
 	},
@@ -2340,17 +2241,17 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3076,
+		.cond_start_idx = 3074,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_WRITE,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
-	.key_start_idx = 595,
+	.key_start_idx = 636,
 	.blob_key_bit_size = 15,
 	.key_bit_size = 15,
 	.key_num_fields = 3,
-	.result_start_idx = 1150,
+	.result_start_idx = 1151,
 	.result_bit_size = 138,
 	.result_num_fields = 7
 	},
@@ -2362,13 +2263,13 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3076,
+		.cond_start_idx = 3074,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_IF_TBL_OPC_WR_COMP_FIELD,
 	.tbl_operand = BNXT_ULP_CF_IDX_VF_FUNC_SVIF,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
-	.result_start_idx = 1157,
+	.result_start_idx = 1158,
 	.result_bit_size = 64,
 	.result_num_fields = 8
 	},
@@ -2380,16 +2281,16 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3076,
+		.cond_start_idx = 3074,
 		.cond_nums = 0 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_NO,
-	.key_start_idx = 598,
+	.key_start_idx = 639,
 	.blob_key_bit_size = 0,
 	.key_bit_size = 0,
 	.key_num_fields = 3,
-	.result_start_idx = 1165,
+	.result_start_idx = 1166,
 	.result_bit_size = 0,
 	.result_num_fields = 6
 	},
@@ -2403,13 +2304,13 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3076,
+		.cond_start_idx = 3074,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_READ,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
-	.key_start_idx = 601,
+	.key_start_idx = 642,
 	.blob_key_bit_size = 11,
 	.key_bit_size = 11,
 	.key_num_fields = 1,
@@ -2423,7 +2324,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 4,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 3076,
+		.cond_start_idx = 3074,
 		.cond_nums = 1 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
@@ -2437,14 +2338,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3077,
+		.cond_start_idx = 3075,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_IF_TBL_OPC_WR_COMP_FIELD,
 	.tbl_operand = BNXT_ULP_CF_IDX_DRV_FUNC_SVIF,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_RID_REGFILE,
 	.fdb_operand = BNXT_ULP_RF_IDX_RID,
-	.result_start_idx = 1171,
+	.result_start_idx = 1172,
 	.result_bit_size = 64,
 	.result_num_fields = 8
 	},
@@ -2457,17 +2358,17 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3077,
+		.cond_start_idx = 3075,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_WRITE,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
-	.key_start_idx = 602,
+	.key_start_idx = 643,
 	.blob_key_bit_size = 11,
 	.key_bit_size = 11,
 	.key_num_fields = 1,
-	.result_start_idx = 1179,
+	.result_start_idx = 1180,
 	.result_bit_size = 70,
 	.result_num_fields = 5
 	},
@@ -2479,13 +2380,13 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3077,
+		.cond_start_idx = 3075,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_IF_TBL_OPC_WR_COMP_FIELD,
 	.tbl_operand = BNXT_ULP_CF_IDX_VF_FUNC_SVIF,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
-	.result_start_idx = 1184,
+	.result_start_idx = 1185,
 	.result_bit_size = 64,
 	.result_num_fields = 8
 	},
@@ -2499,13 +2400,13 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3077,
+		.cond_start_idx = 3075,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_MODIFY_PTR,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
-	.result_start_idx = 1192,
+	.result_start_idx = 1193,
 	.result_bit_size = 0,
 	.result_num_fields = 0,
 	.encap_num_fields = 20
@@ -2520,14 +2421,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3077,
+		.cond_start_idx = 3075,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
-	.result_start_idx = 1212,
+	.result_start_idx = 1213,
 	.result_bit_size = 128,
 	.result_num_fields = 17
 	},
@@ -2541,14 +2442,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3077,
+		.cond_start_idx = 3075,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
-	.result_start_idx = 1229,
+	.result_start_idx = 1230,
 	.result_bit_size = 128,
 	.result_num_fields = 17
 	},
@@ -2560,16 +2461,16 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 0,
 		.cond_false_goto = 0,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3077,
+		.cond_start_idx = 3075,
 		.cond_nums = 0 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_YES,
-	.key_start_idx = 603,
+	.key_start_idx = 644,
 	.blob_key_bit_size = 0,
 	.key_bit_size = 0,
 	.key_num_fields = 2,
-	.result_start_idx = 1246,
+	.result_start_idx = 1247,
 	.result_bit_size = 0,
 	.result_num_fields = 6
 	}
@@ -16015,37 +15916,27 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_RF_IS_SET,
 	.cond_operand = BNXT_ULP_RF_IDX_GENERIC_TBL_MISS
 	},
-	/* cond_execute: class_tid: 3, control.egr_0:3070*/
-	{
-	.cond_opcode = BNXT_ULP_COND_OPC_CF_IS_SET,
-	.cond_operand = BNXT_ULP_CF_IDX_VFR_MODE
-	},
-	/* cond_execute: class_tid: 3, control.egr_1:3071*/
-	{
-	.cond_opcode = BNXT_ULP_COND_OPC_RF_IS_SET,
-	.cond_operand = BNXT_ULP_RF_IDX_GENERIC_TBL_MISS
-	},
-	/* cond_execute: class_tid: 3, control.egr_2:3072*/
+	/* cond_execute: class_tid: 3, control.non_vfr_egr_2:3070*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_RF_IS_SET,
 	.cond_operand = BNXT_ULP_RF_IDX_GENERIC_TBL_MISS
 	},
-	/* cond_execute: class_tid: 4, control.prof_tcam_cache.vfr_glb_act_rec_rd.0:3073*/
+	/* cond_execute: class_tid: 4, control.prof_tcam_cache.vfr_glb_act_rec_rd.0:3071*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_RF_IS_SET,
 	.cond_operand = BNXT_ULP_RF_IDX_GENERIC_TBL_MISS
 	},
-	/* cond_execute: class_tid: 4, control.vf_2_vfr.0:3074*/
+	/* cond_execute: class_tid: 4, control.vf_2_vfr.0:3072*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_RF_IS_SET,
 	.cond_operand = BNXT_ULP_RF_IDX_GENERIC_TBL_MISS
 	},
-	/* cond_execute: class_tid: 4, control.prof_tcam_cache.vfr.0:3075*/
+	/* cond_execute: class_tid: 4, control.prof_tcam_cache.vfr.0:3073*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_RF_IS_SET,
 	.cond_operand = BNXT_ULP_RF_IDX_GENERIC_TBL_MISS
 	},
-	/* cond_execute: class_tid: 4, control.0:3076*/
+	/* cond_execute: class_tid: 4, control.0:3074*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_RF_IS_SET,
 	.cond_operand = BNXT_ULP_RF_IDX_GENERIC_TBL_MISS
@@ -25485,49 +25376,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		BNXT_ULP_CF_IDX_DEV_PORT_ID & 0xff}
 		}
 	},
-	/* class_tid: 3, , table: l2_cntxt_tcam_cache.egr_rd_vfr */
-	{
-	.field_info_mask = {
-		.description = "svif",
-		.field_bit_size = 11,
-		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-		.field_src1 = BNXT_ULP_FIELD_SRC_ONES,
-		.field_opr1 = {
-			0xff,
-			0xff}
-		},
-	.field_info_spec = {
-		.description = "svif",
-		.field_bit_size = 11,
-		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-		.field_src1 = BNXT_ULP_FIELD_SRC_CF,
-		.field_opr1 = {
-		(BNXT_ULP_CF_IDX_DRV_FUNC_SVIF >> 8) & 0xff,
-		BNXT_ULP_CF_IDX_DRV_FUNC_SVIF & 0xff}
-		}
-	},
-	/* class_tid: 3, , table: l2_cntxt_tcam_cache.egr_wr_vfr */
-	{
-	.field_info_mask = {
-		.description = "svif",
-		.field_bit_size = 11,
-		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-		.field_src1 = BNXT_ULP_FIELD_SRC_ONES,
-		.field_opr1 = {
-			0xff,
-			0xff}
-		},
-	.field_info_spec = {
-		.description = "svif",
-		.field_bit_size = 11,
-		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-		.field_src1 = BNXT_ULP_FIELD_SRC_CF,
-		.field_opr1 = {
-		(BNXT_ULP_CF_IDX_DRV_FUNC_SVIF >> 8) & 0xff,
-		BNXT_ULP_CF_IDX_DRV_FUNC_SVIF & 0xff}
-		}
-	},
-	/* class_tid: 3, , table: l2_cntxt_tcam_cache.egr_rd */
+	/* class_tid: 3, , table: l2_cntxt_tcam_cache.non_vfr_egr_rd */
 	{
 	.field_info_mask = {
 		.description = "svif",
@@ -25548,7 +25397,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		BNXT_ULP_CF_IDX_DRV_FUNC_SVIF & 0xff}
 		}
 	},
-	/* class_tid: 3, , table: l2_cntxt_tcam.egr_0 */
+	/* class_tid: 3, , table: l2_cntxt_tcam.non_vfr_egr_0 */
 	{
 	.field_info_mask = {
 		.description = "etype",
@@ -25855,7 +25704,619 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		1}
 		}
 	},
-	/* class_tid: 3, , table: l2_cntxt_tcam_cache.egr_wr */
+	/* class_tid: 3, , table: profile_tcam.non_vfr_prof_func_egr_catch_all */
+	{
+	.field_info_mask = {
+		.description = "l4_hdr_is_udp_tcp",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "l4_hdr_is_udp_tcp",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "l4_hdr_type",
+		.field_bit_size = 4,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "l4_hdr_type",
+		.field_bit_size = 4,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "l4_hdr_error",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "l4_hdr_error",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "l4_hdr_valid",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "l4_hdr_valid",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "ieh",
+		.field_bit_size = 8,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "ieh",
+		.field_bit_size = 8,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "l3_ipv6_cmp_dst",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "l3_ipv6_cmp_dst",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "l3_ipv6_cmp_src",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "l3_ipv6_cmp_src",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "l3_hdr_isIP",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "l3_hdr_isIP",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "l3_hdr_type",
+		.field_bit_size = 4,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "l3_hdr_type",
+		.field_bit_size = 4,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "l3_hdr_error",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "l3_hdr_error",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "l3_hdr_valid",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "l3_hdr_valid",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "l2_two_vtags",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "l2_two_vtags",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "l2_vtag_present",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "l2_vtag_present",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "l2_uc_mc_bc",
+		.field_bit_size = 2,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "l2_uc_mc_bc",
+		.field_bit_size = 2,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "l2_hdr_type",
+		.field_bit_size = 2,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "l2_hdr_type",
+		.field_bit_size = 2,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "l2_hdr_error",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "l2_hdr_error",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "l2_hdr_valid",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "l2_hdr_valid",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "tun_hdr_flags",
+		.field_bit_size = 3,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "tun_hdr_flags",
+		.field_bit_size = 3,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "tun_hdr_type",
+		.field_bit_size = 4,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "tun_hdr_type",
+		.field_bit_size = 4,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "tun_hdr_err",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "tun_hdr_err",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "tun_hdr_valid",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "tun_hdr_valid",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "tl4_hdr_is_udp_tcp",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "tl4_hdr_is_udp_tcp",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "tl4_hdr_type",
+		.field_bit_size = 4,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "tl4_hdr_type",
+		.field_bit_size = 4,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "tl4_hdr_error",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "tl4_hdr_error",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "tl4_hdr_valid",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "tl4_hdr_valid",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "tl3_ipv6_cmp_dst",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "tl3_ipv6_cmp_dst",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "tl3_ipv6_cmp_src",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "tl3_ipv6_cmp_src",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "tl3_hdr_isIP",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "tl3_hdr_isIP",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "tl3_hdr_type",
+		.field_bit_size = 4,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "tl3_hdr_type",
+		.field_bit_size = 4,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "tl3_hdr_error",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "tl3_hdr_error",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "tl3_hdr_valid",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "tl3_hdr_valid",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "tl2_two_vtags",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "tl2_two_vtags",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "tl2_vtag_present",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "tl2_vtag_present",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "tl2_uc_mc_bc",
+		.field_bit_size = 2,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "tl2_uc_mc_bc",
+		.field_bit_size = 2,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "tl2_hdr_type",
+		.field_bit_size = 2,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "tl2_hdr_type",
+		.field_bit_size = 2,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "tl2_hdr_valid",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "tl2_hdr_valid",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "hrec_next",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "hrec_next",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "prof_func_id",
+		.field_bit_size = 7,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ONES,
+		.field_opr1 = {
+			0xff}
+		},
+	.field_info_spec = {
+		.description = "prof_func_id",
+		.field_bit_size = 7,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_RF,
+		.field_opr1 = {
+		(BNXT_ULP_RF_IDX_PROF_FUNC_ID_0 >> 8) & 0xff,
+		BNXT_ULP_RF_IDX_PROF_FUNC_ID_0 & 0xff}
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "agg_error",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "agg_error",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "metadata",
+		.field_bit_size = 16,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "metadata",
+		.field_bit_size = 16,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "pkt_type_0",
+		.field_bit_size = 2,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "pkt_type_0",
+		.field_bit_size = 2,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "pkt_type_1",
+		.field_bit_size = 2,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		},
+	.field_info_spec = {
+		.description = "pkt_type_1",
+		.field_bit_size = 2,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+		}
+	},
+	{
+	.field_info_mask = {
+		.description = "valid",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_CONST,
+		.field_opr1 = {
+		1}
+		},
+	.field_info_spec = {
+		.description = "valid",
+		.field_bit_size = 1,
+		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+		.field_src1 = BNXT_ULP_FIELD_SRC_CONST,
+		.field_opr1 = {
+		1}
+		}
+	},
+	/* class_tid: 3, , table: l2_cntxt_tcam_cache.non_vfr_egr_wr */
 	{
 	.field_info_mask = {
 		.description = "svif",
@@ -44996,333 +45457,348 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
 	},
-	/* class_tid: 3, , table: parif_def_arec_ptr.ing_0 */
-	{
-	.description = "act_rec_ptr",
-	.field_bit_size = 32,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
-	.field_opr1 = {
-	(BNXT_ULP_RF_IDX_DEFAULT_AREC_PTR >> 8) & 0xff,
-	BNXT_ULP_RF_IDX_DEFAULT_AREC_PTR & 0xff}
-	},
-	/* class_tid: 3, , table: parif_def_err_arec_ptr.ing_0 */
-	{
-	.description = "act_rec_ptr",
-	.field_bit_size = 32,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
-	.field_opr1 = {
-	(BNXT_ULP_RF_IDX_DEFAULT_AREC_PTR >> 8) & 0xff,
-	BNXT_ULP_RF_IDX_DEFAULT_AREC_PTR & 0xff}
-	},
-	/* class_tid: 3, , table: int_full_act_record.egr_0 */
-	{
-	.description = "sp_rec_ptr",
-	.field_bit_size = 16,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "encap_ptr",
-	.field_bit_size = 16,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "mod_rec_ptr",
-	.field_bit_size = 16,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "rsvd1",
-	.field_bit_size = 16,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "rsvd0",
-	.field_bit_size = 8,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "decap_func",
-	.field_bit_size = 5,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "meter",
-	.field_bit_size = 10,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "stats_op",
-	.field_bit_size = 1,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_CONST,
-	.field_opr1 = {
-	1}
-	},
-	{
-	.description = "stats_ptr",
-	.field_bit_size = 16,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "vnic_or_vport",
-	.field_bit_size = 11,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_CF,
-	.field_opr1 = {
-	(BNXT_ULP_CF_IDX_PHY_PORT_VPORT >> 8) & 0xff,
-	BNXT_ULP_CF_IDX_PHY_PORT_VPORT & 0xff}
-	},
-	{
-	.description = "use_default",
-	.field_bit_size = 1,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "mirror",
-	.field_bit_size = 4,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "cond_copy",
-	.field_bit_size = 1,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "vlan_del_rpt",
-	.field_bit_size = 2,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "drop",
-	.field_bit_size = 1,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "hit",
-	.field_bit_size = 1,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "type",
-	.field_bit_size = 3,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_CONST,
-	.field_opr1 = {
-	1}
-	},
-	/* class_tid: 3, , table: port_table.egr_wr_0 */
-	{
-	.description = "rid",
-	.field_bit_size = 32,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "drv_func.mac",
-	.field_bit_size = 48,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "drv_func.parent.mac",
-	.field_bit_size = 48,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "phy_port",
-	.field_bit_size = 8,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "port_is_pf",
-	.field_bit_size = 1,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "default_arec_ptr",
-	.field_bit_size = 16,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
-	.field_opr1 = {
-	(BNXT_ULP_RF_IDX_MAIN_ACTION_PTR >> 8) & 0xff,
-	BNXT_ULP_RF_IDX_MAIN_ACTION_PTR & 0xff}
-	},
-	{
-	.description = "l2_cntxt_id",
-	.field_bit_size = 10,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "sp_rec_ptr",
-	.field_bit_size = 16,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	/* class_tid: 3, , table: ilt_tbl.egr_vfr */
-	{
-	.description = "ilt_destination",
-	.field_bit_size = 16,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "act_rec_ptr",
-	.field_bit_size = 16,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "fwd_op",
-	.field_bit_size = 2,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_CONST,
-	.field_opr1 = {
-	ULP_THOR_SYM_FWD_OP_BYPASS_LKUP}
-	},
-	{
-	.description = "en_ilt_dest",
-	.field_bit_size = 1,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "en_bd_action",
-	.field_bit_size = 1,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_CONST,
-	.field_opr1 = {
-	1}
-	},
-	{
-	.description = "en_bd_meta",
-	.field_bit_size = 1,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "parif",
-	.field_bit_size = 4,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_CF,
-	.field_opr1 = {
-	(BNXT_ULP_CF_IDX_DRV_FUNC_PARIF >> 8) & 0xff,
-	BNXT_ULP_CF_IDX_DRV_FUNC_PARIF & 0xff}
-	},
-	{
-	.description = "reserved",
-	.field_bit_size = 23,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	/* class_tid: 3, , table: l2_cntxt_tcam_cache.egr_wr_vfr */
-	{
-	.description = "rid",
-	.field_bit_size = 32,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
-	.field_opr1 = {
-	(BNXT_ULP_RF_IDX_RID >> 8) & 0xff,
-	BNXT_ULP_RF_IDX_RID & 0xff}
-	},
-	{
-	.description = "l2_cntxt_tcam_index",
-	.field_bit_size = 10,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "l2_cntxt_id",
-	.field_bit_size = 10,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "src_property_ptr",
-	.field_bit_size = 10,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "prof_func_id",
-	.field_bit_size = 8,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
-	.field_opr1 = {
-	(BNXT_ULP_RF_IDX_PROF_FUNC_ID_0 >> 8) & 0xff,
-	BNXT_ULP_RF_IDX_PROF_FUNC_ID_0 & 0xff}
-	},
-	/* class_tid: 3, , table: l2_cntxt_tcam.egr_0 */
-	{
-	.description = "prof_func_id",
-	.field_bit_size = 7,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
-	.field_opr1 = {
-	(BNXT_ULP_RF_IDX_PROF_FUNC_ID_0 >> 8) & 0xff,
-	BNXT_ULP_RF_IDX_PROF_FUNC_ID_0 & 0xff}
-	},
-	{
-	.description = "ctxt_meta_prof",
-	.field_bit_size = 3,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
-	},
-	{
-	.description = "def_ctxt_data",
-	.field_bit_size = 16,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
-	.field_opr1 = {
-	(BNXT_ULP_RF_IDX_MAIN_ACTION_PTR >> 8) & 0xff,
-	BNXT_ULP_RF_IDX_MAIN_ACTION_PTR & 0xff}
-	},
-	{
-	.description = "ctxt_opcode",
-	.field_bit_size = 3,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_CONST,
-	.field_opr1 = {
-	ULP_THOR_SYM_CTXT_OPCODE_NORMAL_FLOW}
-	},
-	{
-	.description = "l2_cntxt_id",
-	.field_bit_size = 10,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
-	.field_opr1 = {
-	(BNXT_ULP_RF_IDX_L2_CNTXT_ID_0 >> 8) & 0xff,
-	BNXT_ULP_RF_IDX_L2_CNTXT_ID_0 & 0xff}
-	},
-	{
-	.description = "parif",
-	.field_bit_size = 4,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_CF,
-	.field_opr1 = {
-	(BNXT_ULP_CF_IDX_DRV_FUNC_PARIF >> 8) & 0xff,
-	BNXT_ULP_CF_IDX_DRV_FUNC_PARIF & 0xff}
-	},
-	/* class_tid: 3, , table: l2_cntxt_tcam_cache.egr_wr */
+	/* class_tid: 3, , table: parif_def_arec_ptr.ing_0 */
+	{
+	.description = "act_rec_ptr",
+	.field_bit_size = 32,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
+	.field_opr1 = {
+	(BNXT_ULP_RF_IDX_DEFAULT_AREC_PTR >> 8) & 0xff,
+	BNXT_ULP_RF_IDX_DEFAULT_AREC_PTR & 0xff}
+	},
+	/* class_tid: 3, , table: parif_def_err_arec_ptr.ing_0 */
+	{
+	.description = "act_rec_ptr",
+	.field_bit_size = 32,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
+	.field_opr1 = {
+	(BNXT_ULP_RF_IDX_DEFAULT_AREC_PTR >> 8) & 0xff,
+	BNXT_ULP_RF_IDX_DEFAULT_AREC_PTR & 0xff}
+	},
+	/* class_tid: 3, , table: int_full_act_record.egr_0 */
+	{
+	.description = "sp_rec_ptr",
+	.field_bit_size = 16,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "encap_ptr",
+	.field_bit_size = 16,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "mod_rec_ptr",
+	.field_bit_size = 16,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "rsvd1",
+	.field_bit_size = 16,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "rsvd0",
+	.field_bit_size = 8,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "decap_func",
+	.field_bit_size = 5,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "meter",
+	.field_bit_size = 10,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "stats_op",
+	.field_bit_size = 1,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_CONST,
+	.field_opr1 = {
+	1}
+	},
+	{
+	.description = "stats_ptr",
+	.field_bit_size = 16,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "vnic_or_vport",
+	.field_bit_size = 11,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_CF,
+	.field_opr1 = {
+	(BNXT_ULP_CF_IDX_PHY_PORT_VPORT >> 8) & 0xff,
+	BNXT_ULP_CF_IDX_PHY_PORT_VPORT & 0xff}
+	},
+	{
+	.description = "use_default",
+	.field_bit_size = 1,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "mirror",
+	.field_bit_size = 4,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "cond_copy",
+	.field_bit_size = 1,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "vlan_del_rpt",
+	.field_bit_size = 2,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "drop",
+	.field_bit_size = 1,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "hit",
+	.field_bit_size = 1,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "type",
+	.field_bit_size = 3,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_CONST,
+	.field_opr1 = {
+	1}
+	},
+	/* class_tid: 3, , table: port_table.egr_wr_0 */
+	{
+	.description = "rid",
+	.field_bit_size = 32,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "drv_func.mac",
+	.field_bit_size = 48,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "drv_func.parent.mac",
+	.field_bit_size = 48,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "phy_port",
+	.field_bit_size = 8,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "port_is_pf",
+	.field_bit_size = 1,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "default_arec_ptr",
+	.field_bit_size = 16,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
+	.field_opr1 = {
+	(BNXT_ULP_RF_IDX_MAIN_ACTION_PTR >> 8) & 0xff,
+	BNXT_ULP_RF_IDX_MAIN_ACTION_PTR & 0xff}
+	},
+	{
+	.description = "l2_cntxt_id",
+	.field_bit_size = 10,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "sp_rec_ptr",
+	.field_bit_size = 16,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	/* class_tid: 3, , table: ilt_tbl.egr */
+	{
+	.description = "ilt_destination",
+	.field_bit_size = 16,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "act_rec_ptr",
+	.field_bit_size = 16,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
+	.field_opr1 = {
+	(BNXT_ULP_RF_IDX_MAIN_ACTION_PTR >> 8) & 0xff,
+	BNXT_ULP_RF_IDX_MAIN_ACTION_PTR & 0xff}
+	},
+	{
+	.description = "fwd_op",
+	.field_bit_size = 2,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_CONST,
+	.field_opr1 = {
+	ULP_THOR_SYM_FWD_OP_NORMAL_FLOW}
+	},
+	{
+	.description = "en_ilt_dest",
+	.field_bit_size = 1,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "en_bd_action",
+	.field_bit_size = 1,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_CONST,
+	.field_opr1 = {
+	1}
+	},
+	{
+	.description = "en_bd_meta",
+	.field_bit_size = 1,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "parif",
+	.field_bit_size = 4,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_CF,
+	.field_opr1 = {
+	(BNXT_ULP_CF_IDX_DRV_FUNC_PARIF >> 8) & 0xff,
+	BNXT_ULP_CF_IDX_DRV_FUNC_PARIF & 0xff}
+	},
+	{
+	.description = "reserved",
+	.field_bit_size = 23,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	/* class_tid: 3, , table: l2_cntxt_tcam.non_vfr_egr_0 */
+	{
+	.description = "prof_func_id",
+	.field_bit_size = 7,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
+	.field_opr1 = {
+	(BNXT_ULP_RF_IDX_PROF_FUNC_ID_0 >> 8) & 0xff,
+	BNXT_ULP_RF_IDX_PROF_FUNC_ID_0 & 0xff}
+	},
+	{
+	.description = "ctxt_meta_prof",
+	.field_bit_size = 3,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "def_ctxt_data",
+	.field_bit_size = 16,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
+	.field_opr1 = {
+	(BNXT_ULP_RF_IDX_MAIN_ACTION_PTR >> 8) & 0xff,
+	BNXT_ULP_RF_IDX_MAIN_ACTION_PTR & 0xff}
+	},
+	{
+	.description = "ctxt_opcode",
+	.field_bit_size = 3,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_CONST,
+	.field_opr1 = {
+	ULP_THOR_SYM_CTXT_OPCODE_NORMAL_FLOW}
+	},
+	{
+	.description = "l2_cntxt_id",
+	.field_bit_size = 10,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
+	.field_opr1 = {
+	(BNXT_ULP_RF_IDX_L2_CNTXT_ID_0 >> 8) & 0xff,
+	BNXT_ULP_RF_IDX_L2_CNTXT_ID_0 & 0xff}
+	},
+	{
+	.description = "parif",
+	.field_bit_size = 4,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_CF,
+	.field_opr1 = {
+	(BNXT_ULP_CF_IDX_DRV_FUNC_PARIF >> 8) & 0xff,
+	BNXT_ULP_CF_IDX_DRV_FUNC_PARIF & 0xff}
+	},
+	/* class_tid: 3, , table: profile_tcam.non_vfr_prof_func_egr_catch_all */
+	{
+	.description = "wc_key_id",
+	.field_bit_size = 6,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "wc_profile_id",
+	.field_bit_size = 8,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "wc_search_en",
+	.field_bit_size = 1,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "em_key_type",
+	.field_bit_size = 2,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "em_key_id",
+	.field_bit_size = 6,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "em_profile_id",
+	.field_bit_size = 8,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "em_search_en",
+	.field_bit_size = 1,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	{
+	.description = "pl_byp_lkup_en",
+	.field_bit_size = 1,
+	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
+	.field_src1 = BNXT_ULP_FIELD_SRC_ZERO
+	},
+	/* class_tid: 3, , table: l2_cntxt_tcam_cache.non_vfr_egr_wr */
 	{
 	.description = "rid",
 	.field_bit_size = 32,
@@ -45365,26 +45841,6 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	(BNXT_ULP_RF_IDX_PROF_FUNC_ID_0 >> 8) & 0xff,
 	BNXT_ULP_RF_IDX_PROF_FUNC_ID_0 & 0xff}
 	},
-	/* class_tid: 3, , table: parif_def_arec_ptr.egr_0 */
-	{
-	.description = "act_rec_ptr",
-	.field_bit_size = 32,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
-	.field_opr1 = {
-	(BNXT_ULP_RF_IDX_MAIN_ACTION_PTR >> 8) & 0xff,
-	BNXT_ULP_RF_IDX_MAIN_ACTION_PTR & 0xff}
-	},
-	/* class_tid: 3, , table: parif_def_err_arec_ptr.egr_0 */
-	{
-	.description = "act_rec_ptr",
-	.field_bit_size = 32,
-	.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
-	.field_src1 = BNXT_ULP_FIELD_SRC_RF,
-	.field_opr1 = {
-	(BNXT_ULP_RF_IDX_MAIN_ACTION_PTR >> 8) & 0xff,
-	BNXT_ULP_RF_IDX_MAIN_ACTION_PTR & 0xff}
-	},
 	/* class_tid: 4, , table: mod_record.vf_2_vfr_egr */
 	{
 	.description = "metadata_en",
@@ -48480,6 +48936,13 @@ struct bnxt_ulp_mapper_ident_info ulp_thor_class_ident_list[] = {
 	.ident_bit_size = 64,
 	.ident_bit_pos = 32
 	},
+	/* class_tid: 3, , table: l2_cntxt_tcam_cache.ing_rd */
+	{
+	.description = "l2_cntxt_id",
+	.regfile_idx = BNXT_ULP_RF_IDX_L2_CNTXT_ID_0,
+	.ident_bit_size = 10,
+	.ident_bit_pos = 42
+	},
 	/* class_tid: 3, , table: l2_cntxt_tcam.ing_0 */
 	{
 	.description = "l2_cntxt_id_low",
@@ -48497,16 +48960,7 @@ struct bnxt_ulp_mapper_ident_info ulp_thor_class_ident_list[] = {
 	.ident_bit_size = 7,
 	.ident_bit_pos = 0
 	},
-	/* class_tid: 3, , table: l2_cntxt_tcam.drv_func_prof_func_alloc */
-	{
-	.description = "prof_func_id",
-	.resource_func = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
-	.ident_type = TF_IDENT_TYPE_PROF_FUNC,
-	.regfile_idx = BNXT_ULP_RF_IDX_PROF_FUNC_ID_0,
-	.ident_bit_size = 7,
-	.ident_bit_pos = 0
-	},
-	/* class_tid: 3, , table: l2_cntxt_tcam.egr_0 */
+	/* class_tid: 3, , table: l2_cntxt_tcam.non_vfr_egr_0 */
 	{
 	.description = "l2_cntxt_id_low",
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 30/47] net/bnxt: tf_ulp: add mask defaults when mask is not specified
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (21 preceding siblings ...)
  2024-10-01  5:58 ` [PATCH v3 29/47] net/bnxt: tf_ulp: update template files Sriharsha Basavapatna
@ 2024-10-01  5:58 ` Sriharsha Basavapatna
  2024-10-01  5:58 ` [PATCH v3 32/47] net/bnxt: tf_ulp: add support for flow priority Sriharsha Basavapatna
                   ` (10 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:58 UTC (permalink / raw)
  To: dev
  Cc: Kishore Padmanabha, Sriharsha Basavapatna, Shuanglin Wang,
	Shahaji Bhosle, Ajit Khaparde

From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>

If application does not specify mask in a field description then
use the default mask values from dpdk header files.

This patch also includes the following related changes.

fix stats collection for shared session
	The stats accumulation was being performed on default session,
	it needs to get the correct session type to get shared session
	counters.

updated ulp flow db for 64 bit handles
	Updated the ulp flow database so that all the hardware handles
	are 64 bit for all the resource types.

Template rejection with no tables fails for vf to vf
	Fixed the template rejection logic to include the table even on
	unconditional rejection.  This was exposed for vf to vf traffic on
	Thor 2 and resulted in a segmentation fault.

fix spec and default mask parsing for flow items.
	Fixed the protocol header parsing when bith spec and mask are
	not given.

Thor2 priority for l2 tcam records not adhered to
	Fix l2 context records priority in template compiler
	Fix flow handle mask offset
	Fix cpu_to_le_16 macro issues
	Fix misspellings in code

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Shuanglin Wang <shuanglin.wang@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c     |  6 +-
 drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h     |  2 +
 drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tf.c  | 17 +++--
 drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c |  1 +
 drivers/net/bnxt/tf_ulp/ulp_flow_db.c    | 92 +++++-------------------
 drivers/net/bnxt/tf_ulp/ulp_flow_db.h    | 27 +++----
 drivers/net/bnxt/tf_ulp/ulp_mapper.c     |  7 +-
 drivers/net/bnxt/tf_ulp/ulp_mapper_tfc.c |  4 +-
 drivers/net/bnxt/tf_ulp/ulp_matcher.c    | 10 +--
 drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 64 +++++++++++++++--
 10 files changed, 118 insertions(+), 112 deletions(-)

diff --git a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
index 0c46c7d4c9..eb2d14f3be 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
@@ -525,6 +525,7 @@ int ulp_fc_mgr_query_count_get(struct bnxt_ulp_context *ctxt,
 	bool found_cntr_resource = false;
 	bool found_parent_flow = false;
 	uint32_t pc_idx = 0;
+	uint32_t session_type = 0;
 	uint8_t dir;
 
 	ulp_fc_info = bnxt_ulp_cntxt_ptr2_fc_info_get(ctxt);
@@ -569,8 +570,9 @@ int ulp_fc_mgr_query_count_get(struct bnxt_ulp_context *ctxt,
 	}
 
 	dir = params.direction;
+	session_type = ulp_flow_db_shared_session_get(&params);
 	if (!(ulp_fc_info->flags & ULP_FLAG_FC_SW_AGG_EN)) {
-		rc = fc_ops->ulp_flow_stat_get(ctxt, dir,
+		rc = fc_ops->ulp_flow_stat_get(ctxt, dir, session_type,
 					       params.resource_hndl, count);
 		bnxt_ulp_cntxt_release_fdb_lock(ctxt);
 		return rc;
@@ -581,7 +583,7 @@ int ulp_fc_mgr_query_count_get(struct bnxt_ulp_context *ctxt,
 			BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_INT_COUNT) {
 		hw_cntr_id = params.resource_hndl;
 		if (!ulp_fc_info->num_counters) {
-			rc = fc_ops->ulp_flow_stat_get(ctxt, dir,
+			rc = fc_ops->ulp_flow_stat_get(ctxt, dir, session_type,
 						       hw_cntr_id, count);
 			bnxt_ulp_cntxt_release_fdb_lock(ctxt);
 			return rc;
diff --git a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h
index daa2210728..0b81be7af9 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h
+++ b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h
@@ -7,6 +7,7 @@
 #define _ULP_FC_MGR_H_
 
 #include "bnxt_ulp.h"
+#include "ulp_flow_db.h"
 
 #define ULP_FLAG_FC_THREAD			BIT(0)
 #define ULP_FLAG_FC_SW_AGG_EN			BIT(1)
@@ -28,6 +29,7 @@ struct bnxt_ulp_fc_core_ops {
 	int32_t
 	(*ulp_flow_stat_get)(struct bnxt_ulp_context *ctxt,
 			     uint8_t direction,
+			     uint32_t session_type,
 			     uint64_t handle,
 			     struct rte_flow_query_count *count);
 	int32_t
diff --git a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tf.c b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tf.c
index 9c91569473..cd6d067bc9 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tf.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tf.c
@@ -157,17 +157,19 @@ ulp_fc_tf_update_accum_stats(struct bnxt_ulp_context *ctxt,
 	enum tf_dir dir;
 	struct tf *tfp;
 
-	tfp = bnxt_ulp_cntxt_tfp_get(ctxt, BNXT_ULP_SESSION_TYPE_DEFAULT);
-	if (!tfp) {
-		BNXT_DRV_DBG(ERR, "Failed to get the truflow pointer\n");
-		return 0; /* This can happen, return for now with success */
-	}
-
 	num_entries = dparms->flow_count_db_entries / 2;
 	for (dir = 0; dir < TF_DIR_MAX; dir++) {
 		for (j = 0; j < num_entries; j++) {
 			if (!fc_info->sw_acc_tbl[dir][j].valid)
 				continue;
+			tfp = bnxt_ulp_cntxt_tfp_get(ctxt,
+						     fc_info->sw_acc_tbl[dir][j].session_type);
+			if (!tfp) {
+				BNXT_DRV_DBG(ERR,
+					     "Failed to get the tfp\n");
+				return 0;
+			}
+
 			hw_cntr_id = fc_info->sw_acc_tbl[dir][j].hw_cntr_id;
 
 			rc = ulp_fc_tf_flow_stat_update(ctxt, tfp, fc_info, dir,
@@ -183,6 +185,7 @@ ulp_fc_tf_update_accum_stats(struct bnxt_ulp_context *ctxt,
 static int32_t
 ulp_fc_tf_flow_stat_get(struct bnxt_ulp_context *ctxt,
 			uint8_t direction,
+			uint32_t session_type,
 			uint64_t handle,
 			struct rte_flow_query_count *qcount)
 {
@@ -195,7 +198,7 @@ ulp_fc_tf_flow_stat_get(struct bnxt_ulp_context *ctxt,
 	uint32_t dev_id = 0;
 	int32_t rc = 0;
 
-	tfp = bnxt_ulp_cntxt_tfp_get(ctxt, BNXT_ULP_SESSION_TYPE_DEFAULT);
+	tfp = bnxt_ulp_cntxt_tfp_get(ctxt, session_type);
 	if (!tfp) {
 		BNXT_DRV_DBG(ERR, "Failed to get the truflow pointer\n");
 		return -EINVAL;
diff --git a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c
index 24299a269b..7c404685df 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c
@@ -43,6 +43,7 @@ static uint8_t *data;
 static int32_t
 ulp_fc_tfc_flow_stat_get(struct bnxt_ulp_context *ctxt,
 			 uint8_t direction,
+			 uint32_t session_type __rte_unused,
 			 uint64_t handle,
 			 struct rte_flow_query_count *count)
 {
diff --git a/drivers/net/bnxt/tf_ulp/ulp_flow_db.c b/drivers/net/bnxt/tf_ulp/ulp_flow_db.c
index 679dab0f17..79e2931e43 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_flow_db.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_flow_db.c
@@ -15,12 +15,7 @@
 
 #define ULP_FLOW_DB_RES_DIR_BIT		31
 #define ULP_FLOW_DB_RES_DIR_MASK	0x80000000
-#define ULP_FLOW_DB_RES_FUNC_BITS	28
-#define ULP_FLOW_DB_RES_FUNC_MASK	0x70000000
-#define ULP_FLOW_DB_RES_NXT_MASK	0x0FFFFFFF
-#define ULP_FLOW_DB_RES_FUNC_UPPER	5
-#define ULP_FLOW_DB_RES_FUNC_NEED_LOWER	0x80
-#define ULP_FLOW_DB_RES_FUNC_LOWER_MASK	0x1F
+#define ULP_FLOW_DB_RES_NXT_MASK	0x7FFFFFFF
 
 /* Macro to copy the nxt_resource_idx */
 #define ULP_FLOW_DB_RES_NXT_SET(dst, src)	{(dst) |= ((src) &\
@@ -109,17 +104,10 @@ ulp_flow_db_resource_dir_get(struct ulp_fdb_resource_info *res_info)
 		ULP_FLOW_DB_RES_DIR_BIT);
 }
 
-static uint8_t
+static inline uint8_t
 ulp_flow_db_resource_func_get(struct ulp_fdb_resource_info *res_info)
 {
-	uint8_t func;
-
-	func = (((res_info->nxt_resource_idx & ULP_FLOW_DB_RES_FUNC_MASK) >>
-		 ULP_FLOW_DB_RES_FUNC_BITS) << ULP_FLOW_DB_RES_FUNC_UPPER);
-	/* The resource func is split into upper and lower */
-	if (func & ULP_FLOW_DB_RES_FUNC_NEED_LOWER)
-		return (func | res_info->resource_func_lower);
-	return func;
+	return res_info->resource_func;
 }
 
 /*
@@ -134,35 +122,14 @@ static void
 ulp_flow_db_res_params_to_info(struct ulp_fdb_resource_info *resource_info,
 			       struct ulp_flow_db_res_params *params)
 {
-	uint32_t resource_func;
-
 	resource_info->nxt_resource_idx |= ((params->direction <<
 				      ULP_FLOW_DB_RES_DIR_BIT) &
 				     ULP_FLOW_DB_RES_DIR_MASK);
-	resource_func = (params->resource_func >> ULP_FLOW_DB_RES_FUNC_UPPER);
-	resource_info->nxt_resource_idx |= ((resource_func <<
-					     ULP_FLOW_DB_RES_FUNC_BITS) &
-					    ULP_FLOW_DB_RES_FUNC_MASK);
-
-	if (params->resource_func & ULP_FLOW_DB_RES_FUNC_NEED_LOWER) {
-		/* Break the resource func into two parts */
-		resource_func = (params->resource_func &
-				 ULP_FLOW_DB_RES_FUNC_LOWER_MASK);
-		resource_info->resource_func_lower = resource_func;
-	}
-
-	/* Store the handle as 64bit only for EM table entries */
-	if (params->resource_func != BNXT_ULP_RESOURCE_FUNC_EM_TABLE &&
-	    params->resource_func != BNXT_ULP_RESOURCE_FUNC_CMM_TABLE &&
-	    params->resource_func != BNXT_ULP_RESOURCE_FUNC_CMM_STAT) {
-		resource_info->resource_hndl = (uint32_t)params->resource_hndl;
-		resource_info->resource_type = params->resource_type;
-		resource_info->resource_sub_type = params->resource_sub_type;
-		resource_info->fdb_flags = params->fdb_flags;
-	} else {
-		resource_info->resource_em_handle = params->resource_hndl;
-		resource_info->reserve_flag = params->reserve_flag;
-	}
+	resource_info->resource_func = params->resource_func;
+	resource_info->resource_type = params->resource_type;
+	resource_info->resource_sub_type = params->resource_sub_type;
+	resource_info->fdb_flags = params->fdb_flags;
+	resource_info->resource_hndl = params->resource_hndl;
 }
 
 /*
@@ -179,22 +146,13 @@ ulp_flow_db_res_info_to_params(struct ulp_fdb_resource_info *resource_info,
 			       struct ulp_flow_db_res_params *params)
 {
 	memset(params, 0, sizeof(struct ulp_flow_db_res_params));
-
 	/* use the helper function to get the resource func */
 	params->direction = ulp_flow_db_resource_dir_get(resource_info);
 	params->resource_func = ulp_flow_db_resource_func_get(resource_info);
-
-	if (params->resource_func == BNXT_ULP_RESOURCE_FUNC_EM_TABLE ||
-	    params->resource_func == BNXT_ULP_RESOURCE_FUNC_CMM_TABLE ||
-	    params->resource_func == BNXT_ULP_RESOURCE_FUNC_CMM_STAT) {
-		params->resource_hndl = resource_info->resource_em_handle;
-		params->reserve_flag = resource_info->reserve_flag;
-	} else if (params->resource_func & ULP_FLOW_DB_RES_FUNC_NEED_LOWER) {
-		params->resource_hndl = resource_info->resource_hndl;
-		params->resource_type = resource_info->resource_type;
-		params->resource_sub_type = resource_info->resource_sub_type;
-		params->fdb_flags = resource_info->fdb_flags;
-	}
+	params->resource_type = resource_info->resource_type;
+	params->resource_sub_type = resource_info->resource_sub_type;
+	params->fdb_flags = resource_info->fdb_flags;
+	params->resource_hndl = resource_info->resource_hndl;
 }
 
 /*
@@ -627,7 +585,8 @@ ulp_flow_db_resource_add(struct bnxt_ulp_context *ulp_ctxt,
 	}
 	fid_resource = &flow_tbl->flow_resources[fid];
 
-	if (params->critical_resource && fid_resource->resource_em_handle) {
+	if (params->critical_resource && (fid_resource->fdb_flags &
+					  ULP_FDB_FLAG_CRITICAL_RES)) {
 		BNXT_DRV_DBG(DEBUG, "Ignore multiple critical resources\n");
 		/* Ignore the multiple critical resources */
 		params->critical_resource = BNXT_ULP_CRITICAL_RESOURCE_NO;
@@ -650,6 +609,7 @@ ulp_flow_db_resource_add(struct bnxt_ulp_context *ulp_ctxt,
 	} else {
 		/* critical resource. Just update the fid resource */
 		ulp_flow_db_res_params_to_info(fid_resource, params);
+		fid_resource->fdb_flags |= ULP_FDB_FLAG_CRITICAL_RES;
 	}
 
 	ulp_fc_info = bnxt_ulp_cntxt_ptr2_fc_info_get(ulp_ctxt);
@@ -1148,24 +1108,10 @@ ulp_flow_db_resource_params_get(struct bnxt_ulp_context *ulp_ctx,
 	memset(params, 0, sizeof(struct ulp_flow_db_res_params));
 	while (res_id) {
 		fid_res = &flow_tbl->flow_resources[res_id];
-		if (ulp_flow_db_resource_func_get(fid_res) == resource_func) {
-			if (resource_func & ULP_FLOW_DB_RES_FUNC_NEED_LOWER) {
-				if (res_subtype == fid_res->resource_sub_type) {
-					ulp_flow_db_res_info_to_params(fid_res,
-								       params);
-					return 0;
-				}
-
-			} else if (resource_func ==
-				   BNXT_ULP_RESOURCE_FUNC_EM_TABLE ||
-				   resource_func ==
-				   BNXT_ULP_RESOURCE_FUNC_CMM_TABLE ||
-				   resource_func ==
-				   BNXT_ULP_RESOURCE_FUNC_CMM_STAT) {
-				ulp_flow_db_res_info_to_params(fid_res,
-							       params);
-				return 0;
-			}
+		if (ulp_flow_db_resource_func_get(fid_res) == resource_func &&
+		    fid_res->resource_sub_type == res_subtype) {
+			ulp_flow_db_res_info_to_params(fid_res, params);
+			return 0;
 		}
 		res_id = 0;
 		ULP_FLOW_DB_RES_NXT_SET(res_id, fid_res->nxt_resource_idx);
diff --git a/drivers/net/bnxt/tf_ulp/ulp_flow_db.h b/drivers/net/bnxt/tf_ulp/ulp_flow_db.h
index 5a4b5a1ebf..762ebb039d 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_flow_db.h
+++ b/drivers/net/bnxt/tf_ulp/ulp_flow_db.h
@@ -16,30 +16,22 @@
 /* Defines for the fdb flag */
 #define ULP_FDB_FLAG_SHARED_SESSION	0x1
 #define ULP_FDB_FLAG_SHARED_WC_SESSION	0x2
+#define ULP_FDB_FLAG_SW_ONLY		0x4
+#define ULP_FDB_FLAG_CRITICAL_RES	0x8
 
 /*
  * Structure for the flow database resource information
  * The below structure is based on the below partitions
- * nxt_resource_idx = dir[31],resource_func_upper[30:28],nxt_resource_idx[27:0]
- * If resource_func is EM_TBL then use resource_em_handle.
- * Else the other part of the union is used and
- * resource_func is resource_func_upper[30:28] << 5 | resource_func_lower
+ * nxt_resource_idx = dir[31],nxt_resource_idx[30:0]
  */
 struct ulp_fdb_resource_info {
 	/* Points to next resource in the chained list. */
-	uint32_t			nxt_resource_idx;
-	/* TBD: used for tfc stat resource for now */
-	uint32_t			reserve_flag;
-	union {
-		uint64_t		resource_em_handle;
-		struct {
-			uint8_t		resource_func_lower;
-			uint8_t		resource_type;
-			uint8_t		resource_sub_type;
-			uint8_t		fdb_flags;
-			uint32_t	resource_hndl;
-		};
-	};
+	uint32_t	nxt_resource_idx;
+	uint8_t		resource_func;
+	uint8_t		resource_type;
+	uint8_t		resource_sub_type;
+	uint8_t		fdb_flags;
+	uint64_t	resource_hndl;
 };
 
 /* Structure for the flow database resource information. */
@@ -97,7 +89,6 @@ struct ulp_flow_db_res_params {
 	uint8_t				fdb_flags;
 	uint8_t				critical_resource;
 	uint64_t			resource_hndl;
-	uint32_t			reserve_flag;
 };
 
 /*
diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.c b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
index ff57469aa3..3034397166 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
@@ -585,7 +585,7 @@ ulp_mapper_fdb_opc_process(struct bnxt_ulp_mapper_parms *parms,
 	case BNXT_ULP_FDB_OPC_PUSH_FID_SW_ONLY:
 		push_fid = parms->flow_id;
 		flow_type = parms->flow_type;
-		fid_parms->reserve_flag = 0x1;
+		fid_parms->fdb_flags = ULP_FDB_FLAG_SW_ONLY;
 		break;
 	default:
 		return rc; /* Nothing to be done */
@@ -3804,6 +3804,11 @@ ulp_mapper_cond_reject_list_process(struct bnxt_ulp_mapper_parms *parms,
 	/* get the reject condition list */
 	reject_info = ulp_mapper_tmpl_reject_list_get(parms, tid);
 
+	if (reject_info->cond_list_opcode == BNXT_ULP_COND_LIST_OPC_TRUE) {
+		cond_list_res  = 1;
+		goto jump_exit;
+	}
+
 	/* If there are no reject conditions then skip */
 	if (!reject_info->cond_nums)
 		return rc;
diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper_tfc.c b/drivers/net/bnxt/tf_ulp/ulp_mapper_tfc.c
index f5c0aca1f1..834516dc56 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper_tfc.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper_tfc.c
@@ -1381,8 +1381,8 @@ ulp_mapper_tfc_cmm_entry_free(struct bnxt_ulp_context *ulp_ctx,
 	uint16_t fw_fid = 0;
 	int32_t rc = 0;
 
-	/* skip cmm processing if reserve flag is enabled */
-	if (res->reserve_flag)
+	/* skip cmm processing if fdb flag is sw only */
+	if (res->fdb_flags & ULP_FDB_FLAG_SW_ONLY)
 		return 0;
 
 	if (bnxt_ulp_cntxt_fid_get(ulp_ctx, &fw_fid)) {
diff --git a/drivers/net/bnxt/tf_ulp/ulp_matcher.c b/drivers/net/bnxt/tf_ulp/ulp_matcher.c
index 9e0a9458e7..06fdaccbd4 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_matcher.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_matcher.c
@@ -43,7 +43,7 @@ ulp_matcher_action_list_lookup(struct ulp_rte_parser_params *params,
 	uint32_t idx = 0;
 
 	while (++idx < BNXT_ULP_ACT_MATCH_LIST_MAX_SZ) {
-		/* iterate the list of class matches to find header match */
+		/* iterate the list of action matches to find header match */
 		if ((act_bits & act_list[idx].act_bitmap.bits) == act_bits) {
 			/* Found the match */
 			*act_tmpl_idx = act_list[idx].act_tid;
@@ -111,7 +111,7 @@ ulp_matcher_class_hash_lookup(struct bnxt_ulp_matcher_data *matcher_data,
 	int32_t idx;
 	int32_t rc = -ENOENT;
 
-	/* popoulate the key for the search */
+	/* populate the key for the search */
 	key.app_id = params->app_id;
 	key.hdr_bitmap = params->hdr_bitmap;
 
@@ -142,7 +142,7 @@ ulp_matcher_class_hash_add(struct bnxt_ulp_matcher_data *matcher_data,
 	int32_t hash_idx;
 	int32_t rc = -EINVAL;
 
-	/* popoulate the key for the search */
+	/* populate the key for the search */
 	key.app_id = params->app_id;
 	key.hdr_bitmap = params->hdr_bitmap;
 
@@ -239,7 +239,7 @@ ulp_matcher_action_hash_lookup(struct bnxt_ulp_matcher_data *matcher_data,
 	struct ulp_matcher_act_db_node *node;
 	int32_t idx;
 
-	/* popoulate the key for the search */
+	/* populate the key for the search */
 	key.act_bitmap = params->act_bitmap;
 
 	/* search the hash table for the hdr bit match */
@@ -263,7 +263,7 @@ ulp_matcher_action_hash_add(struct bnxt_ulp_matcher_data *matcher_data,
 	int32_t hash_idx;
 	int32_t rc = -EINVAL;
 
-	/* popoulate the key for the search */
+	/* populate the key for the search */
 	key.act_bitmap = params->act_bitmap;
 
 	/* add to the hash table for the hdr bit match */
diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
index 82197cde86..335cdcc130 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
@@ -106,7 +106,8 @@ ulp_rte_prsr_fld_mask(struct ulp_rte_parser_params *params,
 	field->size = size;
 
 	/* copy the mask specifications only if mask is not null */
-	if (!(prsr_act & ULP_PRSR_ACT_MASK_IGNORE) && mask_buff) {
+	if (!(prsr_act & ULP_PRSR_ACT_MASK_IGNORE) && mask_buff &&
+	    spec_buff && ulp_bitmap_notzero(spec_buff, size)) {
 		memcpy(field->mask, mask_buff, size);
 		ulp_rte_parser_field_bitmap_update(params, *idx, prsr_act);
 	}
@@ -724,8 +725,13 @@ ulp_rte_eth_hdr_handler(const struct rte_flow_item *item,
 		eth_type = eth_spec->hdr.ether_type;
 		has_vlan = eth_spec->has_vlan;
 	}
+
+	/* If mask is not specified then use the default mask */
+	if (eth_spec && !eth_mask)
+		eth_mask = &rte_flow_item_eth_mask;
+
 	if (eth_mask) {
-		eth_type &= eth_mask->hdr.ether_type;
+		eth_type &= eth_mask->type;
 		has_vlan_mask = eth_mask->has_vlan;
 	}
 
@@ -808,11 +814,14 @@ ulp_rte_vlan_hdr_handler(const struct rte_flow_item *item,
 		eth_type = vlan_spec->hdr.eth_proto;
 	}
 
+	/* assign default vlan mask if spec is valid and mask is not */
+	if (vlan_spec && !vlan_mask)
+		vlan_mask = &rte_flow_item_vlan_mask;
+
 	if (vlan_mask) {
-		vlan_tag_mask = ntohs(vlan_mask->hdr.vlan_tci);
+		vlan_tag_mask = ntohs(vlan_mask->tci);
 		priority_mask = htons(vlan_tag_mask >> ULP_VLAN_PRIORITY_SHIFT);
 		vlan_tag_mask &= 0xfff;
-
 		/*
 		 * the storage for priority and vlan tag is 2 bytes
 		 * The mask of priority which is 3 bits if it is all 1's
@@ -1018,6 +1027,10 @@ ulp_rte_ipv4_hdr_handler(const struct rte_flow_item *item,
 		return BNXT_TF_RC_ERROR;
 	}
 
+	/* If mask is not specified then use the default mask */
+	if (ipv4_spec && !ipv4_mask)
+		ipv4_mask = &rte_flow_item_ipv4_mask;
+
 	/*
 	 * Copy the rte_flow_item for ipv4 into hdr_field using ipv4
 	 * header fields
@@ -1166,6 +1179,10 @@ ulp_rte_ipv6_hdr_handler(const struct rte_flow_item *item,
 		return BNXT_TF_RC_ERROR;
 	}
 
+	/* If mask is not specified then use the default mask */
+	if (ipv6_spec && !ipv6_mask)
+		ipv6_mask = &rte_flow_item_ipv6_mask;
+
 	/*
 	 * Copy the rte_flow_item for ipv6 into hdr_field using ipv6
 	 * header fields
@@ -1399,6 +1416,9 @@ ulp_rte_udp_hdr_handler(const struct rte_flow_item *item,
 		sport = udp_spec->hdr.src_port;
 		dport = udp_spec->hdr.dst_port;
 	}
+	if (udp_spec && !udp_mask)
+		udp_mask = &rte_flow_item_udp_mask;
+
 	if (udp_mask) {
 		sport_mask = udp_mask->hdr.src_port;
 		dport_mask = udp_mask->hdr.dst_port;
@@ -1475,6 +1495,10 @@ ulp_rte_tcp_hdr_handler(const struct rte_flow_item *item,
 		sport = tcp_spec->hdr.src_port;
 		dport = tcp_spec->hdr.dst_port;
 	}
+
+	if (tcp_spec && !tcp_mask)
+		tcp_mask = &rte_flow_item_tcp_mask;
+
 	if (tcp_mask) {
 		sport_mask = tcp_mask->hdr.src_port;
 		dport_mask = tcp_mask->hdr.dst_port;
@@ -1574,6 +1598,8 @@ ulp_rte_vxlan_hdr_handler(const struct rte_flow_item *item,
 		return BNXT_TF_RC_ERROR;
 	}
 
+	if (vxlan_spec && !vxlan_mask)
+		vxlan_mask = &rte_flow_item_vxlan_mask;
 	/*
 	 * Copy the rte_flow_item for vxlan into hdr_field using vxlan
 	 * header fields
@@ -1646,6 +1672,8 @@ ulp_rte_vxlan_gpe_hdr_handler(const struct rte_flow_item *item,
 		return BNXT_TF_RC_ERROR;
 	}
 
+	if (vxlan_gpe_spec && !vxlan_gpe_mask)
+		vxlan_gpe_mask = &rte_flow_item_vxlan_gpe_mask;
 	/*
 	 * Copy the rte_flow_item for vxlan gpe into hdr_field using vxlan
 	 * header fields
@@ -1724,6 +1752,9 @@ ulp_rte_geneve_hdr_handler(const struct rte_flow_item *item,
 		return BNXT_TF_RC_ERROR;
 	}
 
+	if (geneve_spec && !geneve_mask)
+		geneve_mask = &rte_flow_item_geneve_mask;
+
 	/*
 	 * Copy the rte_flow_item for geneve into hdr_field using geneve
 	 * header fields
@@ -1784,6 +1815,9 @@ ulp_rte_gre_hdr_handler(const struct rte_flow_item *item,
 		return BNXT_TF_RC_ERROR;
 	}
 
+	if (gre_spec && !gre_mask)
+		gre_mask = &rte_flow_item_gre_mask;
+
 	size = sizeof(((struct rte_flow_item_gre *)NULL)->c_rsvd0_ver);
 	ulp_rte_prsr_fld_mask(params, &idx, size,
 			      ulp_deference_struct(gre_spec, c_rsvd0_ver),
@@ -1827,6 +1861,9 @@ ulp_rte_icmp_hdr_handler(const struct rte_flow_item *item,
 		return BNXT_TF_RC_ERROR;
 	}
 
+	if (icmp_spec && !icmp_mask)
+		icmp_mask = &rte_flow_item_icmp_mask;
+
 	size = sizeof(((struct rte_flow_item_icmp *)NULL)->hdr.icmp_type);
 	ulp_rte_prsr_fld_mask(params, &idx, size,
 			      ulp_deference_struct(icmp_spec, hdr.icmp_type),
@@ -1882,6 +1919,9 @@ ulp_rte_icmp6_hdr_handler(const struct rte_flow_item *item,
 		return BNXT_TF_RC_ERROR;
 	}
 
+	if (icmp_spec && !icmp_mask)
+		icmp_mask = &rte_flow_item_icmp6_mask;
+
 	size = sizeof(((struct rte_flow_item_icmp6 *)NULL)->type);
 	ulp_rte_prsr_fld_mask(params, &idx, size,
 			      ulp_deference_struct(icmp_spec, type),
@@ -1933,6 +1973,9 @@ ulp_rte_ecpri_hdr_handler(const struct rte_flow_item *item,
 		return BNXT_TF_RC_ERROR;
 	}
 
+	if (ecpri_spec && !ecpri_mask)
+		ecpri_mask = &rte_flow_item_ecpri_mask;
+
 	/* Figure out if eCPRI is within L4(UDP), unsupported, for now */
 	cnt = ULP_COMP_FLD_IDX_RD(params, BNXT_ULP_CF_IDX_L4_HDR_CNT);
 	if (cnt >= 1) {
@@ -2652,6 +2695,19 @@ ulp_rte_parser_act_port_set(struct ulp_rte_parser_params *param,
 					BNXT_ULP_CF_IDX_MP_VPORT_B :
 					BNXT_ULP_CF_IDX_MP_VPORT_A,
 				    pid_s);
+
+		/* Setup the VF_TO_VF VNIC information */
+		if (!multi_port && port_type == BNXT_ULP_INTF_TYPE_VF_REP) {
+			if (ulp_port_db_default_vnic_get(param->ulp_ctx,
+							 ifindex,
+							 BNXT_ULP_VF_FUNC_VNIC,
+							 &pid_s))
+				return BNXT_TF_RC_ERROR;
+			pid = pid_s;
+
+			/* Allows use of func_opcode with VNIC */
+			ULP_COMP_FLD_IDX_WR(param, BNXT_ULP_CF_IDX_VNIC, pid);
+		}
 	} else {
 		/* For ingress direction, fill vnic */
 		/*
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 32/47] net/bnxt: tf_ulp: add support for flow priority
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (22 preceding siblings ...)
  2024-10-01  5:58 ` [PATCH v3 30/47] net/bnxt: tf_ulp: add mask defaults when mask is not specified Sriharsha Basavapatna
@ 2024-10-01  5:58 ` Sriharsha Basavapatna
  2024-10-01  5:58 ` [PATCH v3 34/47] net/bnxt: tf_ulp: add rte_mtr support for Thor2 Sriharsha Basavapatna
                   ` (9 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:58 UTC (permalink / raw)
  To: dev
  Cc: Kishore Padmanabha, Sriharsha Basavapatna, Shahaji Bhosle, Ajit Khaparde

From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>

Enabled support for application flow priority. When flows are specified
with priority then the flow is placed in tcam at the appropriate
location based on the prioirty.

This patch also updates template files needed to support
this feature.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/bnxt_ulp.c            |   70 +-
 drivers/net/bnxt/tf_ulp/bnxt_ulp.h            |   29 +-
 drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c       |   39 +-
 drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c         |    9 +-
 .../generic_templates/ulp_template_db_enum.h  |    5 +-
 .../generic_templates/ulp_template_db_tbl.c   |   15 +-
 .../ulp_template_db_thor_class.c              | 3504 +++++++++--------
 drivers/net/bnxt/tf_ulp/ulp_mapper.c          |    6 +
 drivers/net/bnxt/tf_ulp/ulp_template_struct.h |    3 +
 9 files changed, 1920 insertions(+), 1760 deletions(-)

diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
index a942af4486..67dea3bff3 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
@@ -235,7 +235,17 @@ bnxt_ulp_cntxt_vxlan_port_get(struct bnxt_ulp_context *ulp_ctx)
 	return (unsigned int)ulp_ctx->cfg_data->vxlan_port;
 }
 
-/* Function to retrieve the default app priority from the context. */
+int
+bnxt_ulp_default_app_priority_set(struct bnxt_ulp_context *ulp_ctx,
+				  uint32_t prio)
+{
+	if (!ulp_ctx || !ulp_ctx->cfg_data)
+		return -EINVAL;
+
+	ulp_ctx->cfg_data->default_priority = prio;
+	return 0;
+}
+
 unsigned int
 bnxt_ulp_default_app_priority_get(struct bnxt_ulp_context *ulp_ctx)
 {
@@ -245,6 +255,64 @@ bnxt_ulp_default_app_priority_get(struct bnxt_ulp_context *ulp_ctx)
 	return (unsigned int)ulp_ctx->cfg_data->default_priority;
 }
 
+int
+bnxt_ulp_max_def_priority_set(struct bnxt_ulp_context *ulp_ctx,
+			      uint32_t prio)
+{
+	if (!ulp_ctx || !ulp_ctx->cfg_data)
+		return -EINVAL;
+
+	ulp_ctx->cfg_data->max_def_priority = prio;
+	return 0;
+}
+
+unsigned int
+bnxt_ulp_max_def_priority_get(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (!ulp_ctx || !ulp_ctx->cfg_data)
+		return 0;
+
+	return (unsigned int)ulp_ctx->cfg_data->max_def_priority;
+}
+
+int
+bnxt_ulp_min_flow_priority_set(struct bnxt_ulp_context *ulp_ctx, uint32_t prio)
+{
+	if (!ulp_ctx || !ulp_ctx->cfg_data)
+		return -EINVAL;
+
+	ulp_ctx->cfg_data->min_flow_priority = prio;
+	return 0;
+}
+
+unsigned int
+bnxt_ulp_min_flow_priority_get(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (!ulp_ctx || !ulp_ctx->cfg_data)
+		return 0;
+
+	return ulp_ctx->cfg_data->min_flow_priority;
+}
+
+int
+bnxt_ulp_max_flow_priority_set(struct bnxt_ulp_context *ulp_ctx, uint32_t prio)
+{
+	if (!ulp_ctx || !ulp_ctx->cfg_data)
+		return -EINVAL;
+
+	ulp_ctx->cfg_data->max_flow_priority = prio;
+	return 0;
+}
+
+unsigned int
+bnxt_ulp_max_flow_priority_get(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (!ulp_ctx || !ulp_ctx->cfg_data)
+		return 0;
+
+	return ulp_ctx->cfg_data->max_flow_priority;
+}
+
 /* The function to initialize bp flags with truflow features */
 static int32_t
 ulp_dparms_dev_port_intf_update(struct bnxt *bp,
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.h b/drivers/net/bnxt/tf_ulp/bnxt_ulp.h
index 9ea34eab3b..148828e1ab 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.h
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.h
@@ -123,6 +123,9 @@ struct bnxt_ulp_data {
 	uint8_t				num_shared_clients;
 	struct bnxt_flow_app_tun_ent	app_tun[BNXT_ULP_MAX_TUN_CACHE_ENTRIES];
 	uint32_t			default_priority;
+	uint32_t			max_def_priority;
+	uint32_t			min_flow_priority;
+	uint32_t			max_flow_priority;
 	uint32_t			vxlan_port;
 	uint32_t			vxlan_gpe_port;
 	uint32_t			vxlan_ip_port;
@@ -497,9 +500,6 @@ bnxt_ulp_vxlan_port_set(struct bnxt_ulp_context *ulp_ctx,
 unsigned int
 bnxt_ulp_vxlan_port_get(struct bnxt_ulp_context *ulp_ctx);
 
-unsigned int
-bnxt_ulp_default_app_priority_get(struct bnxt_ulp_context *ulp_ctx);
-
 int
 bnxt_ulp_vxlan_ip_port_set(struct bnxt_ulp_context *ulp_ctx,
 			   uint32_t vxlan_ip_port);
@@ -527,9 +527,32 @@ bnxt_ulp_cntxt_vxlan_port_set(struct bnxt_ulp_context *ulp_ctx,
 unsigned int
 bnxt_ulp_cntxt_vxlan_port_get(struct bnxt_ulp_context *ulp_ctx);
 
+int
+bnxt_ulp_default_app_priority_set(struct bnxt_ulp_context *ulp_ctx,
+				  uint32_t prio);
+
 unsigned int
 bnxt_ulp_default_app_priority_get(struct bnxt_ulp_context *ulp_ctx);
 
+int
+bnxt_ulp_max_def_priority_set(struct bnxt_ulp_context *ulp_ctx,
+			      uint32_t prio);
+
+unsigned int
+bnxt_ulp_max_def_priority_get(struct bnxt_ulp_context *ulp_ctx);
+
+int
+bnxt_ulp_min_flow_priority_set(struct bnxt_ulp_context *ulp_ctx, uint32_t prio);
+
+unsigned int
+bnxt_ulp_min_flow_priority_get(struct bnxt_ulp_context *ulp_ctx);
+
+int
+bnxt_ulp_max_flow_priority_set(struct bnxt_ulp_context *ulp_ctx, uint32_t prio);
+
+unsigned int
+bnxt_ulp_max_flow_priority_get(struct bnxt_ulp_context *ulp_ctx);
+
 int
 bnxt_ulp_cntxt_vxlan_ip_port_set(struct bnxt_ulp_context *ulp_ctx,
 			uint32_t vxlan_ip_port);
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c
index 2fa57f30e3..85fb03e922 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c
@@ -85,6 +85,37 @@ bnxt_ulp_set_dir_attributes(struct ulp_rte_parser_params *params,
 	}
 }
 
+static int32_t
+bnxt_ulp_set_prio_attribute(struct ulp_rte_parser_params *params,
+			    const struct rte_flow_attr *attr)
+{
+	uint32_t max_p = bnxt_ulp_max_flow_priority_get(params->ulp_ctx);
+	uint32_t min_p = bnxt_ulp_min_flow_priority_get(params->ulp_ctx);
+
+	if (max_p < min_p) {
+		if (attr->priority > min_p || attr->priority < max_p) {
+			BNXT_DRV_DBG(ERR, "invalid prio, not in range %u:%u\n",
+				     max_p, min_p);
+			return -EINVAL;
+		}
+		params->priority = attr->priority;
+	} else {
+		if (attr->priority > max_p || attr->priority < min_p) {
+			BNXT_DRV_DBG(ERR, "invalid prio, not in range %u:%u\n",
+				     min_p, max_p);
+			return -EINVAL;
+		}
+		params->priority = max_p - attr->priority;
+	}
+	/* flows with priority zero is considered as highest and put in EM */
+	if (attr->priority >=
+	    bnxt_ulp_default_app_priority_get(params->ulp_ctx) &&
+	    attr->priority <= bnxt_ulp_max_def_priority_get(params->ulp_ctx)) {
+		ULP_BITMAP_SET(params->cf_bitmap, BNXT_ULP_CF_BIT_DEF_PRIO);
+	}
+	return 0;
+}
+
 static inline void
 bnxt_ulp_init_parser_cf_defaults(struct ulp_rte_parser_params *params,
 				 uint16_t port_id)
@@ -282,6 +313,9 @@ bnxt_ulp_flow_create(struct rte_eth_dev *dev,
 	/* Set the flow attributes */
 	bnxt_ulp_set_dir_attributes(&params, attr);
 
+	if (bnxt_ulp_set_prio_attribute(&params, attr))
+		goto flow_error;
+
 	bnxt_ulp_init_parser_cf_defaults(&params, dev->data->port_id);
 
 	/* Get the function id */
@@ -321,7 +355,6 @@ bnxt_ulp_flow_create(struct rte_eth_dev *dev,
 
 	mparms.flow_id = fid;
 	mparms.func_id = func_id;
-	mparms.app_priority = attr->priority;
 	mparms.port_id = dev->data->port_id;
 
 	/* Perform the rte flow post process */
@@ -403,6 +436,10 @@ bnxt_ulp_flow_validate(struct rte_eth_dev *dev,
 
 	/* Set the flow attributes */
 	bnxt_ulp_set_dir_attributes(&params, attr);
+
+	if (bnxt_ulp_set_prio_attribute(&params, attr))
+		goto parse_error;
+
 	bnxt_ulp_init_parser_cf_defaults(&params, dev->data->port_id);
 
 	/* Parse the rte flow pattern */
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
index 0cc2b4e81d..384f3f64ed 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
@@ -468,7 +468,14 @@ ulp_tf_cntxt_app_caps_init(struct bnxt *bp,
 		bnxt_ulp_cntxt_ha_reg_set(ulp_ctx, info[i].ha_reg_state,
 				    info[i].ha_reg_cnt);
 		ulp_ctx->cfg_data->ha_pool_id = info[i].ha_pool_id;
-		ulp_ctx->cfg_data->default_priority = info[i].default_priority;
+		bnxt_ulp_default_app_priority_set(ulp_ctx,
+						  info[i].default_priority);
+		bnxt_ulp_max_def_priority_set(ulp_ctx,
+					      info[i].max_def_priority);
+		bnxt_ulp_min_flow_priority_set(ulp_ctx,
+					       info[i].min_flow_priority);
+		bnxt_ulp_max_flow_priority_set(ulp_ctx,
+					       info[i].max_flow_priority);
 		ulp_ctx->cfg_data->feature_bits = info[i].feature_bits;
 	}
 	if (!found) {
diff --git a/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_enum.h b/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_enum.h
index e4d9deec94..6ea371b051 100644
--- a/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_enum.h
+++ b/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_enum.h
@@ -37,7 +37,7 @@
 #define ULP_THOR_CLASS_KEY_EXT_LIST_SIZE 615
 #define ULP_THOR_CLASS_IDENT_LIST_SIZE 47
 #define ULP_THOR_CLASS_RESULT_FIELD_LIST_SIZE 1265
-#define ULP_THOR_CLASS_COND_LIST_SIZE 3091
+#define ULP_THOR_CLASS_COND_LIST_SIZE 3093
 #define ULP_THOR_CLASS_COND_OPER_LIST_SIZE 7
 #define ULP_THOR2_CLASS_TMPL_LIST_SIZE 5
 #define ULP_THOR2_CLASS_TBL_LIST_SIZE 125
@@ -128,7 +128,8 @@ enum bnxt_ulp_cf_bit {
 	BNXT_ULP_CF_BIT_L2_ONLY              = 0x0000000000000040,
 	BNXT_ULP_CF_BIT_DIX_TRAFFIC          = 0x0000000000000080,
 	BNXT_ULP_CF_BIT_GROUP_ID             = 0x0000000000000100,
-	BNXT_ULP_CF_BIT_LAST                 = 0x0000000000000200
+	BNXT_ULP_CF_BIT_DEF_PRIO             = 0x0000000000000200,
+	BNXT_ULP_CF_BIT_LAST                 = 0x0000000000000400
 };
 
 enum bnxt_ulp_dev_ft {
diff --git a/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_tbl.c b/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_tbl.c
index 9b0ac2ae1e..4599485c8c 100644
--- a/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_tbl.c
+++ b/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_tbl.c
@@ -2268,6 +2268,9 @@ struct bnxt_ulp_app_capabilities_info ulp_app_cap_info_list[] = {
 	.device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.flags                   = BNXT_ULP_APP_CAP_L2_ETYPE,
 	.default_priority        = 0,
+	.max_def_priority        = 0,
+	.min_flow_priority       = 65535,
+	.max_flow_priority       = 0,
 	.vxlan_port              = 4789,
 	.vxlan_ip_port           = 0
 	},
@@ -2276,6 +2279,9 @@ struct bnxt_ulp_app_capabilities_info ulp_app_cap_info_list[] = {
 	.device_id               = BNXT_ULP_DEVICE_ID_THOR,
 	.flags                   = 0,
 	.default_priority        = 0,
+	.max_def_priority        = 0,
+	.min_flow_priority       = 65535,
+	.max_flow_priority       = 0,
 	.vxlan_port              = 0,
 	.vxlan_ip_port           = 0,
 	.num_key_recipes_per_dir = 256
@@ -2285,12 +2291,15 @@ struct bnxt_ulp_app_capabilities_info ulp_app_cap_info_list[] = {
 	.device_id               = BNXT_ULP_DEVICE_ID_THOR2,
 	.flags                   = 0,
 	.default_priority        = 0,
+	.max_def_priority        = 0,
+	.min_flow_priority       = 256,
+	.max_flow_priority       = 0,
 	.vxlan_port              = 0,
 	.vxlan_ip_port           = 0,
 	.max_pools               = 1,
-	.em_multiplier           = 1,
-	.num_rx_flows            = 65536,
-	.num_tx_flows            = 65536,
+	.em_multiplier           = 4,
+	.num_rx_flows            = 262144,
+	.num_tx_flows            = 262144,
 	.act_rx_max_sz           = 256,
 	.act_tx_max_sz           = 256,
 	.em_rx_key_max_sz        = 112,
diff --git a/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor_class.c b/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor_class.c
index b0a36bf0a5..4a56aa5751 100644
--- a/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor_class.c
+++ b/drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor_class.c
@@ -27,7 +27,7 @@ struct bnxt_ulp_mapper_tmpl_info ulp_thor_class_tmpl_list[] = {
 	.start_tbl_idx = 51,
 	.reject_info = {
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_FALSE,
-		.cond_start_idx = 1554,
+		.cond_start_idx = 1555,
 		.cond_nums = 0 }
 	},
 	/* class_tid: 3, ingress */
@@ -37,7 +37,7 @@ struct bnxt_ulp_mapper_tmpl_info ulp_thor_class_tmpl_list[] = {
 	.start_tbl_idx = 84,
 	.reject_info = {
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_FALSE,
-		.cond_start_idx = 3085,
+		.cond_start_idx = 3087,
 		.cond_nums = 0 }
 	},
 	/* class_tid: 4, egress */
@@ -47,7 +47,7 @@ struct bnxt_ulp_mapper_tmpl_info ulp_thor_class_tmpl_list[] = {
 	.start_tbl_idx = 101,
 	.reject_info = {
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_FALSE,
-		.cond_start_idx = 3087,
+		.cond_start_idx = 3089,
 		.cond_nums = 0 }
 	}
 };
@@ -983,7 +983,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_false_goto = 2,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
 		.cond_start_idx = 1551,
-		.cond_nums = 2 },
+		.cond_nums = 3 },
 	.tbl_opcode = BNXT_ULP_EM_TBL_OPC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_EM_INSERT_FAIL,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_DYN_KEY,
@@ -1001,7 +1001,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 0,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 1553,
+		.cond_start_idx = 1554,
 		.cond_nums = 1 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP
@@ -1014,15 +1014,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 0,
 		.cond_false_goto = 0,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 1554,
+		.cond_start_idx = 1555,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_WC_TCAM_INDEX_0,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_DYN_KEY,
 	.key_recipe_operand = BNXT_ULP_RF_IDX_WC_RECIPE_ID,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
-	.pri_opcode  = BNXT_ULP_PRI_OPC_CONST,
-	.pri_operand = 0,
+	.pri_opcode  = BNXT_ULP_PRI_OPC_APP_PRI,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
 	.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_YES,
 	.result_start_idx = 369,
@@ -1038,7 +1037,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 1554,
+		.cond_start_idx = 1555,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_READ,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
@@ -1084,7 +1083,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 1572,
+		.cond_start_idx = 1573,
 		.cond_nums = 0 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
@@ -1102,7 +1101,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 6,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 1580,
+		.cond_start_idx = 1581,
 		.cond_nums = 1 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP
@@ -1116,7 +1115,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 1581,
+		.cond_start_idx = 1582,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_READ,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_HASH,
@@ -1136,7 +1135,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 4,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 1581,
+		.cond_start_idx = 1582,
 		.cond_nums = 1 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
@@ -1151,7 +1150,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 1582,
+		.cond_start_idx = 1583,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_ALLOC_TBL_OPC_ALLOC,
 	.tbl_operand = BNXT_ULP_RF_IDX_JUMP_META_IDX,
@@ -1169,7 +1168,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 1582,
+		.cond_start_idx = 1583,
 		.cond_nums = 0 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
@@ -1191,7 +1190,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 1582,
+		.cond_start_idx = 1583,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_WRITE,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_HASH,
@@ -1214,7 +1213,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 1582,
+		.cond_start_idx = 1583,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_READ,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_HASH,
@@ -1234,7 +1233,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 13,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 1583,
+		.cond_start_idx = 1584,
 		.cond_nums = 1 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP
@@ -1248,7 +1247,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 1584,
+		.cond_start_idx = 1585,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_READ,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_HASH,
@@ -1271,7 +1270,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 4,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 1585,
+		.cond_start_idx = 1586,
 		.cond_nums = 1 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
@@ -1285,7 +1284,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 1586,
+		.cond_start_idx = 1587,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_IDENT,
 	.tbl_operand = BNXT_ULP_RF_IDX_PROFILE_TCAM_INDEX_0,
@@ -1305,7 +1304,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 1586,
+		.cond_start_idx = 1587,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_WC_KEY_ID_0,
@@ -1325,7 +1324,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 1797,
+		.cond_start_idx = 1798,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_WRITE,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_HASH,
@@ -1349,7 +1348,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 1798,
+		.cond_start_idx = 1799,
 		.cond_nums = 0 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
@@ -1363,7 +1362,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 1798,
+		.cond_start_idx = 1799,
 		.cond_nums = 1 },
 	.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_EM_KEY_ID_0,
@@ -1383,7 +1382,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 1799,
+		.cond_start_idx = 1800,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_KEY_RECIPE_TBL_OPC_ALLOC_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_EM_RECIPE_ID,
@@ -1401,7 +1400,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 1799,
+		.cond_start_idx = 1800,
 		.cond_nums = 0 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
@@ -1420,7 +1419,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 1815,
+		.cond_start_idx = 1816,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_PROFILE_TCAM_INDEX_0,
@@ -1450,7 +1449,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 2057,
+		.cond_start_idx = 2058,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_KEY_RECIPE_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_WC_RECIPE_ID,
@@ -1474,7 +1473,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 2479,
+		.cond_start_idx = 2480,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_WRITE,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_HASH,
@@ -1497,7 +1496,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 8,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 2480,
+		.cond_start_idx = 2481,
 		.cond_nums = 2 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_READ,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_HASH,
@@ -1517,7 +1516,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 4,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 2482,
+		.cond_start_idx = 2483,
 		.cond_nums = 1 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
@@ -1531,7 +1530,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 2483,
+		.cond_start_idx = 2484,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_EM_KEY_ID_0,
@@ -1550,7 +1549,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 2682,
+		.cond_start_idx = 2683,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_KEY_RECIPE_TBL_OPC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_EM_RECIPE_ID,
@@ -1573,7 +1572,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 2,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3080,
+		.cond_start_idx = 3081,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_WRITE,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_HASH,
@@ -1594,7 +1593,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 3,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 3080,
+		.cond_start_idx = 3081,
 		.cond_nums = 2 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP,
@@ -1614,8 +1613,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 2,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 3082,
-		.cond_nums = 2 },
+		.cond_start_idx = 3083,
+		.cond_nums = 3 },
 	.tbl_opcode = BNXT_ULP_EM_TBL_OPC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_EM_INSERT_FAIL,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_DYN_KEY,
@@ -1633,7 +1632,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 0,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 3084,
+		.cond_start_idx = 3086,
 		.cond_nums = 1 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_NOP
@@ -1646,15 +1645,14 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 0,
 		.cond_false_goto = 0,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3085,
+		.cond_start_idx = 3087,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_WC_TCAM_INDEX_0,
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_DYN_KEY,
 	.key_recipe_operand = BNXT_ULP_RF_IDX_WC_RECIPE_ID,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
-	.pri_opcode  = BNXT_ULP_PRI_OPC_CONST,
-	.pri_operand = 0,
+	.pri_opcode  = BNXT_ULP_PRI_OPC_APP_PRI,
 	.mark_db_opcode = BNXT_ULP_MARK_DB_OPC_NOP,
 	.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_YES,
 	.result_start_idx = 721,
@@ -1671,7 +1669,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3085,
+		.cond_start_idx = 3087,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_DEFAULT_AREC_PTR,
@@ -1691,7 +1689,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3085,
+		.cond_start_idx = 3087,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_WRITE,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
@@ -1714,7 +1712,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3085,
+		.cond_start_idx = 3087,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_READ,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
@@ -1734,7 +1732,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 4,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 3085,
+		.cond_start_idx = 3087,
 		.cond_nums = 1 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
@@ -1748,7 +1746,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3086,
+		.cond_start_idx = 3088,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_L2_CNTXT_TCAM_INDEX_0,
@@ -1778,7 +1776,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3086,
+		.cond_start_idx = 3088,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_WRITE,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
@@ -1800,7 +1798,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3086,
+		.cond_start_idx = 3088,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_PROFILE_TCAM_INDEX_0,
@@ -1828,7 +1826,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3086,
+		.cond_start_idx = 3088,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_IF_TBL_OPC_WR_COMP_FIELD,
 	.tbl_operand = BNXT_ULP_CF_IDX_PHY_PORT_PARIF,
@@ -1846,7 +1844,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3086,
+		.cond_start_idx = 3088,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_IF_TBL_OPC_WR_COMP_FIELD,
 	.tbl_operand = BNXT_ULP_CF_IDX_PHY_PORT_PARIF,
@@ -1866,7 +1864,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3086,
+		.cond_start_idx = 3088,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
@@ -1887,7 +1885,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3086,
+		.cond_start_idx = 3088,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_WRITE,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
@@ -1909,7 +1907,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3086,
+		.cond_start_idx = 3088,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_IF_TBL_OPC_WR_COMP_FIELD,
 	.tbl_operand = BNXT_ULP_CF_IDX_DRV_FUNC_SVIF,
@@ -1928,7 +1926,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3086,
+		.cond_start_idx = 3088,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_READ,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
@@ -1948,7 +1946,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 0,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 3086,
+		.cond_start_idx = 3088,
 		.cond_nums = 1 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
@@ -1962,7 +1960,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3087,
+		.cond_start_idx = 3089,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_L2_CNTXT_TCAM_INDEX_0,
@@ -1989,7 +1987,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3087,
+		.cond_start_idx = 3089,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_PROFILE_TCAM_INDEX_0,
@@ -2018,7 +2016,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 0,
 		.cond_false_goto = 0,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3087,
+		.cond_start_idx = 3089,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_WRITE,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
@@ -2042,7 +2040,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3087,
+		.cond_start_idx = 3089,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_READ,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
@@ -2062,7 +2060,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 6,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 3087,
+		.cond_start_idx = 3089,
 		.cond_nums = 1 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
@@ -2078,7 +2076,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3088,
+		.cond_start_idx = 3090,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_WR_GLB_REGFILE,
 	.tbl_operand = BNXT_ULP_GLB_RF_IDX_GLB_MODIFY_PTR,
@@ -2099,7 +2097,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3088,
+		.cond_start_idx = 3090,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_WR_GLB_REGFILE,
 	.tbl_operand = BNXT_ULP_GLB_RF_IDX_GLB_LB_AREC_PTR,
@@ -2119,7 +2117,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3088,
+		.cond_start_idx = 3090,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_IF_TBL_OPC_WR_CONST,
 	.tbl_operand = ULP_THOR_SYM_LOOPBACK_PARIF,
@@ -2138,7 +2136,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3088,
+		.cond_start_idx = 3090,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_IF_TBL_OPC_WR_CONST,
 	.tbl_operand = ULP_THOR_SYM_LOOPBACK_PARIF,
@@ -2159,7 +2157,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3088,
+		.cond_start_idx = 3090,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_WRITE,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
@@ -2182,7 +2180,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3088,
+		.cond_start_idx = 3090,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_READ,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
@@ -2202,7 +2200,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 5,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 3088,
+		.cond_start_idx = 3090,
 		.cond_nums = 1 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
@@ -2217,7 +2215,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3089,
+		.cond_start_idx = 3091,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_READ,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
@@ -2238,7 +2236,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3089,
+		.cond_start_idx = 3091,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_L2_CNTXT_TCAM_INDEX_0,
@@ -2265,7 +2263,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3089,
+		.cond_start_idx = 3091,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_PROFILE_TCAM_INDEX_0,
@@ -2295,7 +2293,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3089,
+		.cond_start_idx = 3091,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_WRITE,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
@@ -2319,7 +2317,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3089,
+		.cond_start_idx = 3091,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
@@ -2340,7 +2338,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3089,
+		.cond_start_idx = 3091,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_READ,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
@@ -2360,7 +2358,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 10,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 3089,
+		.cond_start_idx = 3091,
 		.cond_nums = 1 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
@@ -2376,7 +2374,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3090,
+		.cond_start_idx = 3092,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_WR_GLB_REGFILE,
 	.tbl_operand = BNXT_ULP_GLB_RF_IDX_GLB_DROP_AREC_PTR,
@@ -2396,7 +2394,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3090,
+		.cond_start_idx = 3092,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_L2_CNTXT_TCAM_INDEX_0,
@@ -2425,7 +2423,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3090,
+		.cond_start_idx = 3092,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_L2_CNTXT_TCAM_INDEX_0,
@@ -2454,7 +2452,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3090,
+		.cond_start_idx = 3092,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_WR_GLB_REGFILE,
 	.tbl_operand = BNXT_ULP_GLB_RF_IDX_GLB_VFR_EM_KEY_ID_0,
@@ -2472,7 +2470,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3090,
+		.cond_start_idx = 3092,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_WR_GLB_REGFILE,
 	.tbl_operand = BNXT_ULP_GLB_RF_IDX_GLB_VFR_EM_KEY_ID_1,
@@ -2490,7 +2488,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3090,
+		.cond_start_idx = 3092,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_PROFILE_TCAM_INDEX_0,
@@ -2517,7 +2515,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3090,
+		.cond_start_idx = 3092,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_PROFILE_TCAM_INDEX_0,
@@ -2546,7 +2544,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3090,
+		.cond_start_idx = 3092,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_WRITE,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
@@ -2568,7 +2566,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3090,
+		.cond_start_idx = 3092,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_IF_TBL_OPC_WR_COMP_FIELD,
 	.tbl_operand = BNXT_ULP_CF_IDX_VF_FUNC_SVIF,
@@ -2586,7 +2584,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3090,
+		.cond_start_idx = 3092,
 		.cond_nums = 0 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
@@ -2609,7 +2607,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3090,
+		.cond_start_idx = 3092,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_READ,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
@@ -2629,7 +2627,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 4,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 3090,
+		.cond_start_idx = 3092,
 		.cond_nums = 1 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE,
@@ -2643,7 +2641,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3091,
+		.cond_start_idx = 3093,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_IF_TBL_OPC_WR_COMP_FIELD,
 	.tbl_operand = BNXT_ULP_CF_IDX_DRV_FUNC_SVIF,
@@ -2663,7 +2661,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3091,
+		.cond_start_idx = 3093,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_GENERIC_TBL_OPC_WRITE,
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
@@ -2685,7 +2683,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3091,
+		.cond_start_idx = 3093,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_IF_TBL_OPC_WR_COMP_FIELD,
 	.tbl_operand = BNXT_ULP_CF_IDX_VF_FUNC_SVIF,
@@ -2705,7 +2703,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3091,
+		.cond_start_idx = 3093,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_MODIFY_PTR,
@@ -2726,7 +2724,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3091,
+		.cond_start_idx = 3093,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
@@ -2747,7 +2745,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 1,
 		.cond_false_goto = 1,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3091,
+		.cond_start_idx = 3093,
 		.cond_nums = 0 },
 	.tbl_opcode = BNXT_ULP_INDEX_TBL_OPC_ALLOC_WR_REGFILE,
 	.tbl_operand = BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
@@ -2766,7 +2764,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 		.cond_true_goto  = 0,
 		.cond_false_goto = 0,
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_TRUE,
-		.cond_start_idx = 3091,
+		.cond_start_idx = 3093,
 		.cond_nums = 0 },
 	.key_recipe_opcode = BNXT_ULP_KEY_RECIPE_OPC_NOP,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
@@ -2800,28 +2798,28 @@ struct bnxt_ulp_mapper_cond_list_info ulp_thor_class_cond_oper_list[] = {
 		.cond_start_idx = 33,
 		.cond_nums = 5
 	},
-	/* cond_execute: class_tid: 2, control.l2_only_check:1554*/
+	/* cond_execute: class_tid: 2, control.l2_only_check:1555*/
 	{
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 1554,
+		.cond_start_idx = 1555,
 		.cond_nums = 5
 	},
-	/* cond_execute: class_tid: 2, control.l2_only_check:1554*/
+	/* cond_execute: class_tid: 2, control.l2_only_check:1555*/
 	{
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 1559,
+		.cond_start_idx = 1560,
 		.cond_nums = 5
 	},
-	/* cond_execute: class_tid: 2, control.tunnel_ipv6_sip_check:1564*/
+	/* cond_execute: class_tid: 2, control.tunnel_ipv6_sip_check:1565*/
 	{
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 1564,
+		.cond_start_idx = 1565,
 		.cond_nums = 4
 	},
-	/* cond_execute: class_tid: 2, control.tunnel_ipv6_sip_check:1564*/
+	/* cond_execute: class_tid: 2, control.tunnel_ipv6_sip_check:1565*/
 	{
 		.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_AND,
-		.cond_start_idx = 1568,
+		.cond_start_idx = 1569,
 		.cond_nums = 4
 	}
 };
@@ -9611,12 +9609,16 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_RF_IS_SET,
 	.cond_operand = BNXT_ULP_RF_IDX_TERM_FLOW
 	},
-	/* cond_execute: class_tid: 1, control.em_add_check:1553*/
+	{
+	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
+	.cond_operand = BNXT_ULP_CF_BIT_DEF_PRIO
+	},
+	/* cond_execute: class_tid: 1, control.em_add_check:1554*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_RF_IS_SET,
 	.cond_operand = BNXT_ULP_RF_IDX_EM_INSERT_FAIL
 	},
-	/* cond_execute: class_tid: 2, control.l2_only_check:1554*/
+	/* cond_execute: class_tid: 2, control.l2_only_check:1555*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -9637,7 +9639,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_TYPE
 	},
-	/* cond_execute: class_tid: 2, control.l2_only_check:1554*/
+	/* cond_execute: class_tid: 2, control.l2_only_check:1555*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -9658,7 +9660,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_ETH_TYPE
 	},
-	/* cond_execute: class_tid: 2, control.tunnel_ipv6_sip_check:1564*/
+	/* cond_execute: class_tid: 2, control.tunnel_ipv6_sip_check:1565*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -9675,7 +9677,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_SRC_ADDR
 	},
-	/* cond_execute: class_tid: 2, control.tunnel_ipv6_sip_check:1564*/
+	/* cond_execute: class_tid: 2, control.tunnel_ipv6_sip_check:1565*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -9692,7 +9694,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_SMAC
 	},
-	/* field_cond: class_tid: 2, control.terminating_flow:1572*/
+	/* field_cond: class_tid: 2, control.terminating_flow:1573*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -9701,7 +9703,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_TCP
 	},
-	/* field_cond: class_tid: 2, control.terminating_flow:1574*/
+	/* field_cond: class_tid: 2, control.terminating_flow:1575*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -9710,7 +9712,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_UDP
 	},
-	/* field_cond: class_tid: 2, control.terminating_flow:1576*/
+	/* field_cond: class_tid: 2, control.terminating_flow:1577*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -9719,7 +9721,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_TCP
 	},
-	/* field_cond: class_tid: 2, control.terminating_flow:1578*/
+	/* field_cond: class_tid: 2, control.terminating_flow:1579*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -9728,52 +9730,52 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_UDP
 	},
-	/* cond_execute: class_tid: 2, control.group_id_check:1580*/
+	/* cond_execute: class_tid: 2, control.group_id_check:1581*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_GROUP_ID
 	},
-	/* cond_execute: class_tid: 2, control.flow_chain_group_id:1581*/
+	/* cond_execute: class_tid: 2, control.flow_chain_group_id:1582*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_RF_IS_SET,
 	.cond_operand = BNXT_ULP_RF_IDX_GENERIC_TBL_MISS
 	},
-	/* field_cond: class_tid: 2, proto_header_cache.rd:1582*/
+	/* field_cond: class_tid: 2, proto_header_cache.rd:1583*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_GROUP_ID
 	},
-	/* cond_execute: class_tid: 2, control.proto_header_cache_miss:1583*/
+	/* cond_execute: class_tid: 2, control.proto_header_cache_miss:1584*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_RF_IS_SET,
 	.cond_operand = BNXT_ULP_RF_IDX_GENERIC_TBL_MISS
 	},
-	/* field_cond: class_tid: 2, hdr_overlap_cache.overlap_check:1584*/
+	/* field_cond: class_tid: 2, hdr_overlap_cache.overlap_check:1585*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_GROUP_ID
 	},
-	/* cond_execute: class_tid: 2, control.overlap_miss:1585*/
+	/* cond_execute: class_tid: 2, control.overlap_miss:1586*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_RF_IS_SET,
 	.cond_operand = BNXT_ULP_RF_IDX_GENERIC_TBL_MISS
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1586*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1587*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_CNTXT_ID
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1587*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1588*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_GROUP_ID
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1588*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1589*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_RECYCLE_CNT
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1589*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1590*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -9786,7 +9788,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_DMAC
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1592*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1593*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -9799,7 +9801,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_SMAC
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1595*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1596*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV6
@@ -9808,7 +9810,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_IPV6
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1597*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1598*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -9825,7 +9827,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1601*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1602*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -9842,7 +9844,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OI_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1605*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1606*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -9859,7 +9861,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1609*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1610*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -9876,7 +9878,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_TYPE
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1613*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1614*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -9889,7 +9891,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1616*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1617*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -9902,7 +9904,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1619*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1620*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -9915,7 +9917,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1622*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1623*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -9928,7 +9930,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1625*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1626*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -9941,7 +9943,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_TTL
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1628*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1629*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -9954,7 +9956,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_TTL
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1631*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1632*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -9967,7 +9969,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1634*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1635*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -9980,7 +9982,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1637*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1638*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -9993,7 +9995,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_QOS
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1640*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1641*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10006,7 +10008,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_QOS
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1643*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1644*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10019,7 +10021,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_UDP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1646*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1647*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10032,7 +10034,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_TCP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1649*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1650*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10045,7 +10047,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_UDP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1652*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1653*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10058,7 +10060,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_TCP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1655*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1656*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_T_VXLAN
@@ -10067,7 +10069,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_T_VXLAN_VNI
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1657*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1658*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_T_VXLAN_GPE
@@ -10076,7 +10078,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_T_VXLAN_GPE_VNI
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1659*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1660*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10089,7 +10091,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_ETH_DMAC
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1662*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1663*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10102,7 +10104,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_DMAC
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1665*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1666*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10115,7 +10117,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_ETH_SMAC
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1668*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1669*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10128,7 +10130,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_SMAC
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1671*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1672*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10145,7 +10147,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_IO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1675*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1676*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10162,7 +10164,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1679*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1680*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10179,7 +10181,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_II_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1683*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1684*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10196,7 +10198,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_IO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1687*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1688*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10213,7 +10215,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OI_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1691*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1692*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10230,7 +10232,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1695*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1696*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -10247,7 +10249,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_ETH_TYPE
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1699*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1700*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -10264,7 +10266,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_TYPE
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1703*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1704*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -10281,7 +10283,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1707*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1708*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -10298,7 +10300,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1711*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1712*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -10315,7 +10317,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1715*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1716*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -10332,7 +10334,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1719*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1720*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -10349,7 +10351,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1723*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1724*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -10366,7 +10368,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1727*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1728*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -10383,7 +10385,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1731*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1732*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -10400,7 +10402,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1735*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1736*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -10417,7 +10419,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_TTL
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1739*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1740*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -10434,7 +10436,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_TTL
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1743*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1744*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -10451,7 +10453,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_TTL
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1747*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1748*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -10468,7 +10470,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_TTL
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1751*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1752*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -10485,7 +10487,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1755*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1756*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -10502,7 +10504,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1759*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1760*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -10519,7 +10521,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1763*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1764*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -10536,7 +10538,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1767*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1768*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -10553,7 +10555,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_QOS
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1771*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1772*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -10570,7 +10572,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_QOS
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1775*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1776*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -10587,7 +10589,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_QOS
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1779*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1780*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -10604,12 +10606,12 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_QOS
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1783*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1784*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1784*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1785*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_IPV4
@@ -10622,7 +10624,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_ICMP
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1787*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1788*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV4
@@ -10635,12 +10637,12 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_ICMP
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1790*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1791*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1791*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1792*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_IPV4
@@ -10653,7 +10655,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_ICMP
 	},
-	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1794*/
+	/* field_cond: class_tid: 2, fkb_select.wc_gen_template:1795*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV4
@@ -10666,17 +10668,17 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_ICMP
 	},
-	/* field_cond: class_tid: 2, hdr_overlap_cache.overlap_wr:1797*/
+	/* field_cond: class_tid: 2, hdr_overlap_cache.overlap_wr:1798*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_GROUP_ID
 	},
-	/* cond_execute: class_tid: 2, fkb_select.em_gen_template_alloc:1798*/
+	/* cond_execute: class_tid: 2, fkb_select.em_gen_template_alloc:1799*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_RF_IS_SET,
 	.cond_operand = BNXT_ULP_RF_IDX_TERM_FLOW
 	},
-	/* field_cond: class_tid: 2, control.profile_tcam_priority:1799*/
+	/* field_cond: class_tid: 2, control.profile_tcam_priority:1800*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10685,7 +10687,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_TCP
 	},
-	/* field_cond: class_tid: 2, control.profile_tcam_priority:1801*/
+	/* field_cond: class_tid: 2, control.profile_tcam_priority:1802*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10694,7 +10696,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_UDP
 	},
-	/* field_cond: class_tid: 2, control.profile_tcam_priority:1803*/
+	/* field_cond: class_tid: 2, control.profile_tcam_priority:1804*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10703,7 +10705,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_TCP
 	},
-	/* field_cond: class_tid: 2, control.profile_tcam_priority:1805*/
+	/* field_cond: class_tid: 2, control.profile_tcam_priority:1806*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10712,7 +10714,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_UDP
 	},
-	/* field_cond: class_tid: 2, control.profile_tcam_priority:1807*/
+	/* field_cond: class_tid: 2, control.profile_tcam_priority:1808*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10721,7 +10723,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_IPV4
 	},
-	/* field_cond: class_tid: 2, control.profile_tcam_priority:1809*/
+	/* field_cond: class_tid: 2, control.profile_tcam_priority:1810*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10730,7 +10732,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_IPV6
 	},
-	/* field_cond: class_tid: 2, control.profile_tcam_priority:1811*/
+	/* field_cond: class_tid: 2, control.profile_tcam_priority:1812*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10739,7 +10741,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV4
 	},
-	/* field_cond: class_tid: 2, control.profile_tcam_priority:1813*/
+	/* field_cond: class_tid: 2, control.profile_tcam_priority:1814*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10748,7 +10750,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV6
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1815*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1816*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10757,7 +10759,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_TCP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1817*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1818*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10766,7 +10768,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_TCP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1819*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1820*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10775,7 +10777,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_UDP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1821*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1822*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10784,7 +10786,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_UDP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1823*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1824*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10793,7 +10795,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_TCP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1825*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1826*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10802,7 +10804,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_TCP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1827*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1828*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10811,7 +10813,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_UDP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1829*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1830*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10820,7 +10822,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_UDP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1831*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1832*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10829,7 +10831,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_TCP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1833*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1834*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10838,7 +10840,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_TCP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1835*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1836*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10847,7 +10849,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_UDP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1837*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1838*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10856,7 +10858,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_UDP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1839*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1840*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10865,7 +10867,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_TCP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1841*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1842*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10874,7 +10876,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_TCP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1843*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1844*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10883,7 +10885,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_UDP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1845*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1846*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10892,7 +10894,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_UDP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1847*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1848*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10901,7 +10903,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_TCP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1849*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1850*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10910,7 +10912,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_TCP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1851*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1852*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10919,7 +10921,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_UDP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1853*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1854*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10928,7 +10930,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_UDP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1855*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1856*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10937,7 +10939,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_TCP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1857*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1858*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10946,7 +10948,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_TCP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1859*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1860*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10955,7 +10957,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_UDP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1861*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1862*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10964,7 +10966,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_UDP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1863*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1864*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10973,7 +10975,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_TCP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1865*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1866*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10982,7 +10984,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_TCP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1867*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1868*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -10991,7 +10993,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_UDP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1869*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1870*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11000,7 +11002,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_UDP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1871*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1872*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11009,7 +11011,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_TCP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1873*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1874*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11018,7 +11020,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_TCP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1875*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1876*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11027,7 +11029,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_UDP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1877*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1878*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11036,7 +11038,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_UDP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1879*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1880*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11045,7 +11047,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_IPV6
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1881*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1882*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11054,7 +11056,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV6
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1883*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1884*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11063,7 +11065,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_IPV4
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1885*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1886*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11072,7 +11074,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV4
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1887*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1888*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11081,7 +11083,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_IPV6
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1889*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1890*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11090,7 +11092,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV6
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1891*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1892*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11099,7 +11101,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_IPV4
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1893*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1894*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11108,7 +11110,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV4
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1895*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1896*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11117,7 +11119,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_IPV6
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1897*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1898*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11126,7 +11128,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV6
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1899*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1900*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11135,7 +11137,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_IPV4
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1901*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1902*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11144,7 +11146,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV4
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1903*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1904*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11153,7 +11155,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_IPV6
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1905*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1906*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11162,7 +11164,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_IPV4
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1907*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1908*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11171,7 +11173,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV6
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1909*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1910*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11180,7 +11182,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV4
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1911*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1912*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11189,7 +11191,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_IPV6
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1913*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1914*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11198,7 +11200,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_IPV4
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1915*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1916*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11207,7 +11209,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV6
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1917*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1918*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11216,7 +11218,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV4
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1919*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1920*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11225,7 +11227,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_IPV6
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1921*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1922*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11234,7 +11236,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_IPV4
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1923*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1924*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11243,7 +11245,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV6
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1925*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1926*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11252,7 +11254,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV4
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1927*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1928*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11261,7 +11263,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_IPV6
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1929*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1930*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11270,7 +11272,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_IPV4
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1931*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1932*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11279,7 +11281,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV6
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1933*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1934*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11288,7 +11290,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV4
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1935*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1936*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11301,7 +11303,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_II_VLAN
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1938*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1939*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11314,7 +11316,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_OI_VLAN
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1941*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1942*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11327,7 +11329,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_IO_VLAN
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1944*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1945*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11340,17 +11342,17 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_OO_VLAN
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1947*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1948*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_DIX_TRAFFIC
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1948*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1949*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_DIX_TRAFFIC
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1949*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1950*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11359,7 +11361,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_ETH
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1951*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1952*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11368,7 +11370,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_ETH
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1953*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1954*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11377,7 +11379,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_ETH
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1955*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1956*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11386,7 +11388,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_ETH
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1957*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1958*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11395,7 +11397,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_ETH
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1959*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1960*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11404,7 +11406,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_ETH
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1961*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1962*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11413,7 +11415,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_T_VXLAN
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1963*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1964*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11422,7 +11424,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_T_VXLAN_GPE
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1965*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1966*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11431,7 +11433,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_T_GENEVE
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1967*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1968*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11440,7 +11442,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_T_GRE
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1969*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1970*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11449,7 +11451,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_UPAR1
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1971*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1972*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11458,7 +11460,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_UPAR2
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1973*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1974*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11467,7 +11469,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_T_VXLAN
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1975*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1976*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11476,7 +11478,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_T_VXLAN_GPE
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1977*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1978*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11485,7 +11487,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_T_GENEVE
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1979*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1980*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11494,7 +11496,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_T_GRE
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1981*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1982*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11503,7 +11505,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_UPAR1
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1983*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1984*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11512,22 +11514,22 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_UPAR2
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1985*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1986*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1986*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1987*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1987*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1988*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1988*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1989*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11536,7 +11538,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_TCP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1990*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1991*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11545,7 +11547,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_UDP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1992*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1993*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11554,7 +11556,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_TCP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1994*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1995*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11563,7 +11565,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_UDP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1996*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1997*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11572,7 +11574,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_TCP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:1998*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:1999*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11581,7 +11583,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_UDP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2000*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2001*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11590,7 +11592,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_TCP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2002*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2003*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11599,7 +11601,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_UDP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2004*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2005*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11608,7 +11610,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_TCP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2006*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2007*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11617,7 +11619,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_UDP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2008*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2009*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11626,7 +11628,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_TCP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2010*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2011*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11635,7 +11637,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_UDP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2012*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2013*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11644,7 +11646,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_TCP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2014*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2015*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11653,12 +11655,12 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_UDP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2016*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2017*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2017*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2018*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11667,7 +11669,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_TCP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2019*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2020*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11676,12 +11678,12 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_UDP
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2021*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2022*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2022*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2023*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11690,7 +11692,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV6
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2024*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2025*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11699,7 +11701,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV4
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2026*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2027*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11708,7 +11710,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV6
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2028*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2029*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11717,7 +11719,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV4
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2030*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2031*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11726,7 +11728,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV6
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2032*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2033*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11735,7 +11737,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV4
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2034*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2035*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11744,7 +11746,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV6
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2036*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2037*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11753,7 +11755,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV4
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2038*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2039*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11762,7 +11764,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV6
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2040*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2041*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11771,7 +11773,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV4
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2042*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2043*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11780,7 +11782,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV6
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2044*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2045*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11789,7 +11791,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV4
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2046*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2047*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11802,7 +11804,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_OI_VLAN
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2049*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2050*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11815,17 +11817,17 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_OO_VLAN
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2052*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2053*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_DIX_TRAFFIC
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2053*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2054*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_DIX_TRAFFIC
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2054*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2055*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11834,16 +11836,11 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_ETH
 	},
-	/* field_cond: class_tid: 2, profile_tcam.gen_template:2056*/
+	/* field_cond: class_tid: 2, profile_tcam.gen_template:2057*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_GROUP_ID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2057*/
-	{
-	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
-	.cond_operand = BNXT_ULP_CF_BIT_L2_CNTXT_ID
-	},
 	/* field_cond: class_tid: 2, wm_key_recipe.0:2058*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
@@ -11852,7 +11849,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	/* field_cond: class_tid: 2, wm_key_recipe.0:2059*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
-	.cond_operand = BNXT_ULP_CF_BIT_GROUP_ID
+	.cond_operand = BNXT_ULP_CF_BIT_L2_CNTXT_ID
 	},
 	/* field_cond: class_tid: 2, wm_key_recipe.0:2060*/
 	{
@@ -11862,7 +11859,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	/* field_cond: class_tid: 2, wm_key_recipe.0:2061*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
-	.cond_operand = BNXT_ULP_CF_BIT_RECYCLE_CNT
+	.cond_operand = BNXT_ULP_CF_BIT_GROUP_ID
 	},
 	/* field_cond: class_tid: 2, wm_key_recipe.0:2062*/
 	{
@@ -11872,6 +11869,11 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	/* field_cond: class_tid: 2, wm_key_recipe.0:2063*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
+	.cond_operand = BNXT_ULP_CF_BIT_RECYCLE_CNT
+	},
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2064*/
+	{
+	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
 	},
 	{
@@ -11882,7 +11884,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_DMAC
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2066*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2067*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11895,7 +11897,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_DMAC
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2069*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2070*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11908,7 +11910,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_SMAC
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2072*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2073*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV6
@@ -11917,7 +11919,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_IPV6
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2074*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2075*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11930,7 +11932,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_SMAC
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2077*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2078*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_IPV6
@@ -11939,7 +11941,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_IPV6
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2079*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2080*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11956,7 +11958,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2083*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2084*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11973,7 +11975,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2087*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2088*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -11990,7 +11992,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OI_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2091*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2092*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12007,7 +12009,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2095*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2096*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12024,7 +12026,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OI_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2099*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2100*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12041,7 +12043,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2103*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2104*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -12058,7 +12060,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_TYPE
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2107*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2108*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -12075,7 +12077,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_TYPE
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2111*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2112*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12088,7 +12090,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2114*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2115*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12101,7 +12103,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2117*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2118*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12114,7 +12116,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2120*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2121*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12127,7 +12129,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2123*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2124*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12140,7 +12142,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2126*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2127*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12153,7 +12155,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2129*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2130*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12166,7 +12168,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2132*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2133*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12179,7 +12181,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2135*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2136*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12192,7 +12194,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_TTL
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2138*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2139*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12205,7 +12207,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_TTL
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2141*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2142*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12218,7 +12220,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_TTL
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2144*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2145*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12231,7 +12233,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_TTL
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2147*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2148*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12244,7 +12246,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2150*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2151*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12257,7 +12259,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2153*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2154*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12270,7 +12272,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2156*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2157*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12283,7 +12285,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2159*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2160*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12296,7 +12298,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_QOS
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2162*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2163*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12309,7 +12311,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_QOS
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2165*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2166*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12322,7 +12324,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_QOS
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2168*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2169*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12335,7 +12337,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_QOS
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2171*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2172*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12348,7 +12350,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_UDP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2174*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2175*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12361,7 +12363,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_TCP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2177*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2178*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12374,7 +12376,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_UDP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2180*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2181*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12387,7 +12389,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_TCP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2183*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2184*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12400,7 +12402,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_UDP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2186*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2187*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12413,7 +12415,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_TCP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2189*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2190*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12426,7 +12428,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_UDP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2192*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2193*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12439,7 +12441,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_TCP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2195*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2196*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_T_VXLAN
@@ -12448,7 +12450,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_T_VXLAN_VNI
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2197*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2198*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_T_VXLAN_GPE
@@ -12457,7 +12459,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_T_VXLAN_GPE_VNI
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2199*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2200*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_T_VXLAN
@@ -12466,7 +12468,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_T_VXLAN_VNI
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2201*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2202*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_T_VXLAN_GPE
@@ -12475,7 +12477,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_T_VXLAN_GPE_VNI
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2203*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2204*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12488,7 +12490,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_ETH_DMAC
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2206*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2207*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12501,7 +12503,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_DMAC
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2209*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2210*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12514,7 +12516,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_ETH_DMAC
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2212*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2213*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12527,7 +12529,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_DMAC
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2215*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2216*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12540,7 +12542,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_ETH_SMAC
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2218*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2219*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12553,7 +12555,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_SMAC
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2221*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2222*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12566,7 +12568,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_ETH_SMAC
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2224*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2225*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12579,7 +12581,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_SMAC
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2227*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2228*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12596,7 +12598,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_IO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2231*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2232*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12613,7 +12615,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2235*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2236*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12630,7 +12632,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_IO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2239*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2240*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12647,7 +12649,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2243*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2244*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12664,7 +12666,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_II_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2247*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2248*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12681,7 +12683,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_IO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2251*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2252*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12698,7 +12700,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OI_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2255*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2256*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12715,7 +12717,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2259*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2260*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12732,7 +12734,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_II_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2263*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2264*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12749,7 +12751,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_IO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2267*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2268*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12766,7 +12768,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OI_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2271*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2272*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12783,7 +12785,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2275*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2276*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -12800,7 +12802,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_ETH_TYPE
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2279*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2280*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -12817,7 +12819,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_TYPE
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2283*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2284*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -12834,7 +12836,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_ETH_TYPE
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2287*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2288*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -12851,7 +12853,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_TYPE
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2291*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2292*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12864,7 +12866,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2294*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2295*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12877,7 +12879,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2297*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2298*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12890,7 +12892,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2300*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2301*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12903,7 +12905,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2303*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2304*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12916,7 +12918,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2306*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2307*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12929,7 +12931,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2309*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2310*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12942,7 +12944,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2312*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2313*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12955,7 +12957,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2315*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2316*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12968,7 +12970,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2318*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2319*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12981,7 +12983,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2321*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2322*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -12994,7 +12996,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2324*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2325*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13007,7 +13009,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2327*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2328*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13020,7 +13022,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2330*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2331*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13033,7 +13035,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2333*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2334*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13046,7 +13048,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2336*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2337*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13059,7 +13061,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2339*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2340*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13072,7 +13074,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_TTL
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2342*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2343*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13085,7 +13087,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_TTL
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2345*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2346*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13098,7 +13100,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_TTL
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2348*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2349*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13111,7 +13113,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_TTL
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2351*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2352*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13124,7 +13126,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_TTL
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2354*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2355*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13137,7 +13139,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_TTL
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2357*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2358*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13150,7 +13152,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_TTL
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2360*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2361*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13163,7 +13165,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_TTL
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2363*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2364*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13172,7 +13174,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_TCP
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2365*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2366*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13181,7 +13183,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_UDP
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2367*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2368*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13190,7 +13192,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_TCP
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2369*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2370*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13199,7 +13201,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_UDP
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2371*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2372*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13212,7 +13214,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2374*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2375*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13225,7 +13227,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2377*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2378*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13238,7 +13240,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2380*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2381*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13251,7 +13253,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2383*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2384*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13260,7 +13262,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_TCP
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2385*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2386*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13269,7 +13271,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_I_UDP
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2387*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2388*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13278,7 +13280,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_TCP
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2389*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2390*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13287,7 +13289,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_O_UDP
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2391*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2392*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13300,7 +13302,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2394*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2395*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13313,7 +13315,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2397*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2398*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13326,7 +13328,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2400*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2401*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13339,7 +13341,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2403*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2404*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13352,7 +13354,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_QOS
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2406*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2407*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13365,7 +13367,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_QOS
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2409*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2410*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13378,7 +13380,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_QOS
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2412*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2413*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13391,7 +13393,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_QOS
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2415*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2416*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13404,7 +13406,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_QOS
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2418*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2419*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13417,7 +13419,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_QOS
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2421*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2422*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13430,7 +13432,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_QOS
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2424*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2425*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13443,7 +13445,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_QOS
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2427*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2428*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13456,7 +13458,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_UDP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2430*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2431*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13469,7 +13471,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_TCP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2433*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2434*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13482,7 +13484,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_UDP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2436*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2437*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13495,12 +13497,12 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_TCP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2439*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2440*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2440*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2441*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13513,7 +13515,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_UDP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2443*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2444*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13526,7 +13528,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_TCP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2446*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2447*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13539,7 +13541,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_UDP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2449*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2450*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13552,12 +13554,12 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_TCP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2452*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2453*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2453*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2454*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13570,7 +13572,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_UDP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2456*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2457*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13583,7 +13585,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_TCP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2459*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2460*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13596,7 +13598,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_UDP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2462*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2463*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13609,12 +13611,12 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_TCP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2465*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2466*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2466*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2467*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13627,7 +13629,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_UDP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2469*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2470*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13640,7 +13642,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_TCP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2472*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2473*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13653,7 +13655,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_UDP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2475*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2476*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13666,17 +13668,17 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_TCP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, wm_key_recipe.0:2478*/
+	/* field_cond: class_tid: 2, wm_key_recipe.0:2479*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
 	},
-	/* field_cond: class_tid: 2, proto_header_cache.wr:2479*/
+	/* field_cond: class_tid: 2, proto_header_cache.wr:2480*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_GROUP_ID
 	},
-	/* cond_execute: class_tid: 2, em_flow_conflict_cache.rd:2480*/
+	/* cond_execute: class_tid: 2, em_flow_conflict_cache.rd:2481*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_IDX_WC_MATCH
@@ -13685,27 +13687,27 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_RF_IS_SET,
 	.cond_operand = BNXT_ULP_RF_IDX_TERM_FLOW
 	},
-	/* cond_execute: class_tid: 2, control.em_flow_conflict_cache_miss:2482*/
+	/* cond_execute: class_tid: 2, control.em_flow_conflict_cache_miss:2483*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_RF_IS_SET,
 	.cond_operand = BNXT_ULP_RF_IDX_GENERIC_TBL_MISS
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2483*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2484*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_CNTXT_ID
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2484*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2485*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_GROUP_ID
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2485*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2486*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_RECYCLE_CNT
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2486*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2487*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13718,7 +13720,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_DMAC
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2489*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2490*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13731,7 +13733,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_SMAC
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2492*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2493*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13748,7 +13750,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2496*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2497*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13765,7 +13767,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OI_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2500*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2501*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13782,7 +13784,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2504*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2505*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -13799,7 +13801,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_TYPE
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2508*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2509*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13812,7 +13814,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2511*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2512*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13825,7 +13827,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2514*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2515*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13838,7 +13840,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2517*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2518*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13851,7 +13853,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2520*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2521*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13864,7 +13866,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_TTL
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2523*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2524*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13877,7 +13879,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_TTL
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2526*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2527*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13890,7 +13892,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2529*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2530*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13903,7 +13905,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2532*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2533*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13916,7 +13918,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_QOS
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2535*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2536*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13929,7 +13931,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_QOS
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2538*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2539*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13942,7 +13944,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_UDP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2541*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2542*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13955,7 +13957,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_TCP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2544*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2545*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13968,7 +13970,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_UDP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2547*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2548*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -13981,7 +13983,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_TCP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2550*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2551*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_T_VXLAN
@@ -13990,7 +13992,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_T_VXLAN_VNI
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2552*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2553*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_T_VXLAN_GPE
@@ -13999,7 +14001,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_T_VXLAN_GPE_VNI
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2554*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2555*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14012,7 +14014,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_ETH_DMAC
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2557*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2558*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14025,7 +14027,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_DMAC
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2560*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2561*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14038,7 +14040,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_ETH_SMAC
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2563*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2564*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14051,7 +14053,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_SMAC
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2566*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2567*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14068,7 +14070,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_IO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2570*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2571*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14085,7 +14087,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2574*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2575*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14102,7 +14104,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_II_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2578*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2579*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14119,7 +14121,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_IO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2582*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2583*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14136,7 +14138,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OI_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2586*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2587*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14153,7 +14155,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2590*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2591*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -14170,7 +14172,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_ETH_TYPE
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2594*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2595*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -14187,7 +14189,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_TYPE
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2598*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2599*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14200,7 +14202,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2601*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2602*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14213,7 +14215,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2604*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2605*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14226,7 +14228,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2607*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2608*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14239,7 +14241,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2610*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2611*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14252,7 +14254,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2613*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2614*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14265,7 +14267,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2616*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2617*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14278,7 +14280,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2619*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2620*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14291,7 +14293,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2622*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2623*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14304,7 +14306,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_TTL
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2625*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2626*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14317,7 +14319,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_TTL
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2628*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2629*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14330,7 +14332,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_TTL
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2631*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2632*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14343,7 +14345,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_TTL
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2634*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2635*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14356,7 +14358,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2637*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2638*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14369,7 +14371,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2640*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2641*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14382,7 +14384,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2643*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2644*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14395,7 +14397,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2646*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2647*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14408,7 +14410,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_QOS
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2649*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2650*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14421,7 +14423,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_QOS
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2652*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2653*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14434,7 +14436,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_QOS
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2655*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2656*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14447,7 +14449,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_QOS
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2658*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2659*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14460,7 +14462,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_UDP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2661*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2662*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14473,7 +14475,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_TCP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2664*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2665*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14486,7 +14488,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_UDP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2667*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2668*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14499,7 +14501,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_TCP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2670*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2671*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14512,7 +14514,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_UDP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2673*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2674*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14525,7 +14527,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_TCP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2676*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2677*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14538,7 +14540,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_UDP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2679*/
+	/* field_cond: class_tid: 2, fkb_select.em_gen_template:2680*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14551,11 +14553,6 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_TCP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2682*/
-	{
-	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
-	.cond_operand = BNXT_ULP_CF_BIT_L2_CNTXT_ID
-	},
 	/* field_cond: class_tid: 2, em_key_recipe.0:2683*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
@@ -14564,7 +14561,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	/* field_cond: class_tid: 2, em_key_recipe.0:2684*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
-	.cond_operand = BNXT_ULP_CF_BIT_GROUP_ID
+	.cond_operand = BNXT_ULP_CF_BIT_L2_CNTXT_ID
 	},
 	/* field_cond: class_tid: 2, em_key_recipe.0:2685*/
 	{
@@ -14574,7 +14571,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	/* field_cond: class_tid: 2, em_key_recipe.0:2686*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
-	.cond_operand = BNXT_ULP_CF_BIT_RECYCLE_CNT
+	.cond_operand = BNXT_ULP_CF_BIT_GROUP_ID
 	},
 	/* field_cond: class_tid: 2, em_key_recipe.0:2687*/
 	{
@@ -14584,6 +14581,11 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	/* field_cond: class_tid: 2, em_key_recipe.0:2688*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
+	.cond_operand = BNXT_ULP_CF_BIT_RECYCLE_CNT
+	},
+	/* field_cond: class_tid: 2, em_key_recipe.0:2689*/
+	{
+	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
 	},
 	{
@@ -14594,7 +14596,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_DMAC
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2691*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2692*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14607,7 +14609,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_DMAC
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2694*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2695*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14620,7 +14622,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_SMAC
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2697*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2698*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14633,7 +14635,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_SMAC
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2700*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2701*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14650,7 +14652,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2704*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2705*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14667,7 +14669,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2708*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2709*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14684,7 +14686,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OI_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2712*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2713*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14701,7 +14703,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2716*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2717*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14718,7 +14720,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OI_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2720*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2721*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14735,7 +14737,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2724*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2725*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -14752,7 +14754,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_TYPE
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2728*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2729*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -14769,7 +14771,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_TYPE
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2732*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2733*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14782,7 +14784,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2735*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2736*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14795,7 +14797,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2738*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2739*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14808,7 +14810,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2741*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2742*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14821,7 +14823,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2744*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2745*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14834,7 +14836,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2747*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2748*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14847,7 +14849,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2750*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2751*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14860,7 +14862,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2753*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2754*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14873,7 +14875,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2756*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2757*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14886,7 +14888,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_TTL
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2759*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2760*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14899,7 +14901,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_TTL
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2762*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2763*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14912,7 +14914,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_TTL
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2765*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2766*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14925,7 +14927,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_TTL
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2768*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2769*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14938,7 +14940,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2771*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2772*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14951,7 +14953,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2774*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2775*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14964,7 +14966,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2777*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2778*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14977,7 +14979,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2780*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2781*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -14990,7 +14992,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_QOS
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2783*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2784*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15003,7 +15005,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_QOS
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2786*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2787*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15016,7 +15018,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_QOS
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2789*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2790*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15029,7 +15031,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_QOS
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2792*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2793*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15042,7 +15044,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_UDP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2795*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2796*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15055,7 +15057,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_TCP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2798*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2799*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15068,7 +15070,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_UDP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2801*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2802*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15081,7 +15083,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_TCP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2804*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2805*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15094,7 +15096,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_UDP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2807*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2808*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15107,7 +15109,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_TCP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2810*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2811*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15120,7 +15122,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_UDP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2813*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2814*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15133,7 +15135,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_TCP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2816*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2817*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_T_VXLAN
@@ -15142,7 +15144,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_T_VXLAN_VNI
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2818*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2819*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_T_VXLAN_GPE
@@ -15151,7 +15153,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_T_VXLAN_GPE_VNI
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2820*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2821*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_T_VXLAN
@@ -15160,7 +15162,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_T_VXLAN_VNI
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2822*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2823*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_HDR_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_HDR_BIT_T_VXLAN_GPE
@@ -15169,7 +15171,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_T_VXLAN_GPE_VNI
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2824*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2825*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15182,7 +15184,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_ETH_DMAC
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2827*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2828*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15195,7 +15197,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_DMAC
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2830*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2831*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15208,7 +15210,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_ETH_DMAC
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2833*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2834*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15221,7 +15223,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_DMAC
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2836*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2837*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15234,7 +15236,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_ETH_SMAC
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2839*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2840*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15247,7 +15249,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_SMAC
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2842*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2843*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15260,7 +15262,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_ETH_SMAC
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2845*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2846*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15273,7 +15275,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_SMAC
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2848*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2849*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15290,7 +15292,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_IO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2852*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2853*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15307,7 +15309,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2856*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2857*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15324,7 +15326,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_IO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2860*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2861*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15341,7 +15343,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2864*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2865*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15358,7 +15360,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_II_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2868*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2869*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15375,7 +15377,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_IO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2872*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2873*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15392,7 +15394,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OI_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2876*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2877*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15409,7 +15411,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2880*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2881*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15426,7 +15428,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_II_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2884*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2885*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15443,7 +15445,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_IO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2888*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2889*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15460,7 +15462,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OI_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2892*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2893*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15477,7 +15479,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_OO_VLAN_VID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2896*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2897*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -15494,7 +15496,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_ETH_TYPE
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2900*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2901*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -15511,7 +15513,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_TYPE
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2904*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2905*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -15528,7 +15530,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_ETH_TYPE
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2908*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2909*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_L2_ONLY
@@ -15545,7 +15547,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_ETH_TYPE
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2912*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2913*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15558,7 +15560,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2915*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2916*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15571,7 +15573,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2918*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2919*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15584,7 +15586,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2921*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2922*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15597,7 +15599,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2924*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2925*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15610,7 +15612,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2927*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2928*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15623,7 +15625,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2930*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2931*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15636,7 +15638,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2933*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2934*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15649,7 +15651,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_SRC_ADDR
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2936*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2937*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15662,7 +15664,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2939*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2940*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15675,7 +15677,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2942*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2943*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15688,7 +15690,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2945*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2946*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15701,7 +15703,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2948*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2949*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15714,7 +15716,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2951*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2952*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15727,7 +15729,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2954*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2955*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15740,7 +15742,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2957*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2958*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15753,7 +15755,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_DST_ADDR
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2960*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2961*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15766,7 +15768,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_TTL
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2963*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2964*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15779,7 +15781,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_TTL
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2966*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2967*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15792,7 +15794,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_TTL
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2969*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2970*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15805,7 +15807,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_TTL
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2972*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2973*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15818,7 +15820,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_TTL
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2975*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2976*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15831,7 +15833,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_TTL
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2978*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2979*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15844,7 +15846,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_TTL
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2981*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2982*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15857,7 +15859,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_TTL
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2984*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2985*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15870,7 +15872,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2987*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2988*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15883,7 +15885,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2990*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2991*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15896,7 +15898,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2993*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2994*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15909,7 +15911,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2996*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:2997*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15922,7 +15924,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:2999*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:3000*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15935,7 +15937,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:3002*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:3003*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15948,7 +15950,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:3005*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:3006*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15961,7 +15963,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_PROTO_ID
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:3008*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:3009*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15974,7 +15976,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_QOS
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:3011*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:3012*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -15987,7 +15989,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_QOS
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:3014*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:3015*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -16000,7 +16002,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_QOS
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:3017*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:3018*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -16013,7 +16015,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_QOS
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:3020*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:3021*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -16026,7 +16028,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV6_QOS
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:3023*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:3024*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -16039,7 +16041,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_IPV4_QOS
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:3026*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:3027*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -16052,7 +16054,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV6_QOS
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:3029*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:3030*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -16065,7 +16067,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_IPV4_QOS
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:3032*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:3033*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -16078,7 +16080,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_UDP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:3035*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:3036*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -16091,7 +16093,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_TCP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:3038*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:3039*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -16104,7 +16106,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_UDP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:3041*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:3042*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -16117,7 +16119,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_TCP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:3044*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:3045*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -16130,7 +16132,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_UDP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:3047*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:3048*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -16143,7 +16145,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_TCP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:3050*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:3051*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -16156,7 +16158,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_UDP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:3053*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:3054*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -16169,7 +16171,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_TCP_SRC_PORT
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:3056*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:3057*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -16182,7 +16184,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_UDP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:3059*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:3060*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -16195,7 +16197,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_TCP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:3062*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:3063*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -16208,7 +16210,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_UDP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:3065*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:3066*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -16221,7 +16223,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_TCP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:3068*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:3069*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -16234,7 +16236,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_UDP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:3071*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:3072*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -16247,7 +16249,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_I_TCP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:3074*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:3075*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -16260,7 +16262,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_UDP_DST_PORT
 	},
-	/* field_cond: class_tid: 2, em_key_recipe.0:3077*/
+	/* field_cond: class_tid: 2, em_key_recipe.0:3078*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_BIT_IS_TUNNEL
@@ -16273,7 +16275,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET,
 	.cond_operand = BNXT_ULP_GLB_HF_ID_O_TCP_DST_PORT
 	},
-	/* cond_execute: class_tid: 2, control.field_sig_validation:3080*/
+	/* cond_execute: class_tid: 2, control.field_sig_validation:3081*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_RF_NOT_SET,
 	.cond_operand = BNXT_ULP_RF_IDX_CC
@@ -16282,7 +16284,7 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_RF_IS_SET,
 	.cond_operand = BNXT_ULP_RF_IDX_FLOW_SIG_ID
 	},
-	/* cond_execute: class_tid: 2, em.egress_generic_template:3082*/
+	/* cond_execute: class_tid: 2, em.egress_generic_template:3083*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_CF_NOT_SET,
 	.cond_operand = BNXT_ULP_CF_IDX_WC_MATCH
@@ -16291,37 +16293,41 @@ struct bnxt_ulp_mapper_cond_info ulp_thor_class_cond_list[] = {
 	.cond_opcode = BNXT_ULP_COND_OPC_RF_IS_SET,
 	.cond_operand = BNXT_ULP_RF_IDX_TERM_FLOW
 	},
-	/* cond_execute: class_tid: 2, control.em_add_check:3084*/
+	{
+	.cond_opcode = BNXT_ULP_COND_OPC_CF_BIT_IS_SET,
+	.cond_operand = BNXT_ULP_CF_BIT_DEF_PRIO
+	},
+	/* cond_execute: class_tid: 2, control.em_add_check:3086*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_RF_IS_SET,
 	.cond_operand = BNXT_ULP_RF_IDX_EM_INSERT_FAIL
 	},
-	/* cond_execute: class_tid: 3, control.ing_0:3085*/
+	/* cond_execute: class_tid: 3, control.ing_0:3087*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_RF_IS_SET,
 	.cond_operand = BNXT_ULP_RF_IDX_GENERIC_TBL_MISS
 	},
-	/* cond_execute: class_tid: 3, control.non_vfr_egr_2:3086*/
+	/* cond_execute: class_tid: 3, control.non_vfr_egr_2:3088*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_RF_IS_SET,
 	.cond_operand = BNXT_ULP_RF_IDX_GENERIC_TBL_MISS
 	},
-	/* cond_execute: class_tid: 4, control.prof_tcam_cache.vfr_glb_act_rec_rd.0:3087*/
+	/* cond_execute: class_tid: 4, control.prof_tcam_cache.vfr_glb_act_rec_rd.0:3089*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_RF_IS_SET,
 	.cond_operand = BNXT_ULP_RF_IDX_GENERIC_TBL_MISS
 	},
-	/* cond_execute: class_tid: 4, control.vf_2_vfr.0:3088*/
+	/* cond_execute: class_tid: 4, control.vf_2_vfr.0:3090*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_RF_IS_SET,
 	.cond_operand = BNXT_ULP_RF_IDX_GENERIC_TBL_MISS
 	},
-	/* cond_execute: class_tid: 4, control.prof_tcam_cache.vfr.0:3089*/
+	/* cond_execute: class_tid: 4, control.prof_tcam_cache.vfr.0:3091*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_RF_IS_SET,
 	.cond_operand = BNXT_ULP_RF_IDX_GENERIC_TBL_MISS
 	},
-	/* cond_execute: class_tid: 4, control.0:3090*/
+	/* cond_execute: class_tid: 4, control.0:3092*/
 	{
 	.cond_opcode = BNXT_ULP_COND_OPC_RF_IS_SET,
 	.cond_operand = BNXT_ULP_RF_IDX_GENERIC_TBL_MISS
@@ -21460,8 +21466,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1582 >> 8) & 0xff,
-			1582 & 0xff,
+			(1583 >> 8) & 0xff,
+			1583 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -21531,8 +21537,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1584 >> 8) & 0xff,
-			1584 & 0xff,
+			(1585 >> 8) & 0xff,
+			1585 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -21603,8 +21609,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1797 >> 8) & 0xff,
-			1797 & 0xff,
+			(1798 >> 8) & 0xff,
+			1798 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -21667,8 +21673,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1815 >> 8) & 0xff,
-			1815 & 0xff,
+			(1816 >> 8) & 0xff,
+			1816 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -21683,8 +21689,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1823 >> 8) & 0xff,
-			1823 & 0xff,
+			(1824 >> 8) & 0xff,
+			1824 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -21703,8 +21709,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1831 >> 8) & 0xff,
-			1831 & 0xff,
+			(1832 >> 8) & 0xff,
+			1832 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -21719,8 +21725,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1839 >> 8) & 0xff,
-			1839 & 0xff,
+			(1840 >> 8) & 0xff,
+			1840 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -21737,8 +21743,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1847 >> 8) & 0xff,
-			1847 & 0xff,
+			(1848 >> 8) & 0xff,
+			1848 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -21753,8 +21759,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1855 >> 8) & 0xff,
-			1855 & 0xff,
+			(1856 >> 8) & 0xff,
+			1856 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -21771,8 +21777,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1863 >> 8) & 0xff,
-			1863 & 0xff,
+			(1864 >> 8) & 0xff,
+			1864 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -21787,8 +21793,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1871 >> 8) & 0xff,
-			1871 & 0xff,
+			(1872 >> 8) & 0xff,
+			1872 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -21857,8 +21863,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1879 >> 8) & 0xff,
-			1879 & 0xff,
+			(1880 >> 8) & 0xff,
+			1880 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -21877,8 +21883,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1887 >> 8) & 0xff,
-			1887 & 0xff,
+			(1888 >> 8) & 0xff,
+			1888 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -21893,8 +21899,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1895 >> 8) & 0xff,
-			1895 & 0xff,
+			(1896 >> 8) & 0xff,
+			1896 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -21913,8 +21919,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1903 >> 8) & 0xff,
-			1903 & 0xff,
+			(1904 >> 8) & 0xff,
+			1904 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -21929,8 +21935,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1911 >> 8) & 0xff,
-			1911 & 0xff,
+			(1912 >> 8) & 0xff,
+			1912 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -21947,8 +21953,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1919 >> 8) & 0xff,
-			1919 & 0xff,
+			(1920 >> 8) & 0xff,
+			1920 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -21963,8 +21969,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1927 >> 8) & 0xff,
-			1927 & 0xff,
+			(1928 >> 8) & 0xff,
+			1928 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -21991,8 +21997,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1935 >> 8) & 0xff,
-			1935 & 0xff,
+			(1936 >> 8) & 0xff,
+			1936 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -22019,8 +22025,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1941 >> 8) & 0xff,
-			1941 & 0xff,
+			(1942 >> 8) & 0xff,
+			1942 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -22055,8 +22061,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1947 >> 8) & 0xff,
-			1947 & 0xff,
+			(1948 >> 8) & 0xff,
+			1948 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -22068,8 +22074,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1948 >> 8) & 0xff,
-			1948 & 0xff,
+			(1949 >> 8) & 0xff,
+			1949 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -22083,8 +22089,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1949 >> 8) & 0xff,
-			1949 & 0xff,
+			(1950 >> 8) & 0xff,
+			1950 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -22099,8 +22105,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1953 >> 8) & 0xff,
-			1953 & 0xff,
+			(1954 >> 8) & 0xff,
+			1954 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -22125,8 +22131,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1957 >> 8) & 0xff,
-			1957 & 0xff,
+			(1958 >> 8) & 0xff,
+			1958 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -22159,8 +22165,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1961 >> 8) & 0xff,
-			1961 & 0xff,
+			(1962 >> 8) & 0xff,
+			1962 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -22175,8 +22181,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1973 >> 8) & 0xff,
-			1973 & 0xff,
+			(1974 >> 8) & 0xff,
+			1974 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -22193,8 +22199,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1985 >> 8) & 0xff,
-			1985 & 0xff,
+			(1986 >> 8) & 0xff,
+			1986 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -22206,8 +22212,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1986 >> 8) & 0xff,
-			1986 & 0xff,
+			(1987 >> 8) & 0xff,
+			1987 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -22229,8 +22235,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1987 >> 8) & 0xff,
-			1987 & 0xff,
+			(1988 >> 8) & 0xff,
+			1988 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -22246,8 +22252,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1988 >> 8) & 0xff,
-			1988 & 0xff,
+			(1989 >> 8) & 0xff,
+			1989 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -22262,8 +22268,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1992 >> 8) & 0xff,
-			1992 & 0xff,
+			(1993 >> 8) & 0xff,
+			1993 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -22282,8 +22288,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1996 >> 8) & 0xff,
-			1996 & 0xff,
+			(1997 >> 8) & 0xff,
+			1997 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -22298,8 +22304,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2000 >> 8) & 0xff,
-			2000 & 0xff,
+			(2001 >> 8) & 0xff,
+			2001 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -22316,8 +22322,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2004 >> 8) & 0xff,
-			2004 & 0xff,
+			(2005 >> 8) & 0xff,
+			2005 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -22332,8 +22338,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2008 >> 8) & 0xff,
-			2008 & 0xff,
+			(2009 >> 8) & 0xff,
+			2009 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -22350,8 +22356,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2012 >> 8) & 0xff,
-			2012 & 0xff,
+			(2013 >> 8) & 0xff,
+			2013 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -22366,8 +22372,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2017 >> 8) & 0xff,
-			2017 & 0xff,
+			(2018 >> 8) & 0xff,
+			2018 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -22422,8 +22428,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2022 >> 8) & 0xff,
-			2022 & 0xff,
+			(2023 >> 8) & 0xff,
+			2023 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -22442,8 +22448,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2026 >> 8) & 0xff,
-			2026 & 0xff,
+			(2027 >> 8) & 0xff,
+			2027 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -22458,8 +22464,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2030 >> 8) & 0xff,
-			2030 & 0xff,
+			(2031 >> 8) & 0xff,
+			2031 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -22478,8 +22484,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2034 >> 8) & 0xff,
-			2034 & 0xff,
+			(2035 >> 8) & 0xff,
+			2035 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -22494,8 +22500,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2038 >> 8) & 0xff,
-			2038 & 0xff,
+			(2039 >> 8) & 0xff,
+			2039 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -22520,8 +22526,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2042 >> 8) & 0xff,
-			2042 & 0xff,
+			(2043 >> 8) & 0xff,
+			2043 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -22548,8 +22554,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2046 >> 8) & 0xff,
-			2046 & 0xff,
+			(2047 >> 8) & 0xff,
+			2047 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -22573,8 +22579,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2049 >> 8) & 0xff,
-			2049 & 0xff,
+			(2050 >> 8) & 0xff,
+			2050 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -22604,8 +22610,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2052 >> 8) & 0xff,
-			2052 & 0xff,
+			(2053 >> 8) & 0xff,
+			2053 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -22617,8 +22623,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2053 >> 8) & 0xff,
-			2053 & 0xff,
+			(2054 >> 8) & 0xff,
+			2054 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -22640,8 +22646,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2054 >> 8) & 0xff,
-			2054 & 0xff,
+			(2055 >> 8) & 0xff,
+			2055 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -22713,8 +22719,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2056 >> 8) & 0xff,
-			2056 & 0xff,
+			(2057 >> 8) & 0xff,
+			2057 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_RF,
@@ -22799,8 +22805,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2057 >> 8) & 0xff,
-			2057 & 0xff,
+			(2058 >> 8) & 0xff,
+			2058 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -22812,8 +22818,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2058 >> 8) & 0xff,
-			2058 & 0xff,
+			(2059 >> 8) & 0xff,
+			2059 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_RF,
@@ -22830,8 +22836,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2059 >> 8) & 0xff,
-			2059 & 0xff,
+			(2060 >> 8) & 0xff,
+			2060 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -22843,8 +22849,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2060 >> 8) & 0xff,
-			2060 & 0xff,
+			(2061 >> 8) & 0xff,
+			2061 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_RF,
@@ -22861,8 +22867,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2061 >> 8) & 0xff,
-			2061 & 0xff,
+			(2062 >> 8) & 0xff,
+			2062 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -22874,8 +22880,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2062 >> 8) & 0xff,
-			2062 & 0xff,
+			(2063 >> 8) & 0xff,
+			2063 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_RF,
@@ -22892,8 +22898,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2063 >> 8) & 0xff,
-			2063 & 0xff,
+			(2064 >> 8) & 0xff,
+			2064 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -22908,8 +22914,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2066 >> 8) & 0xff,
-			2066 & 0xff,
+			(2067 >> 8) & 0xff,
+			2067 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -22926,8 +22932,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2069 >> 8) & 0xff,
-			2069 & 0xff,
+			(2070 >> 8) & 0xff,
+			2070 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_NEXT,
@@ -22942,8 +22948,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2074 >> 8) & 0xff,
-			2074 & 0xff,
+			(2075 >> 8) & 0xff,
+			2075 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_NEXT,
@@ -22960,8 +22966,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2079 >> 8) & 0xff,
-			2079 & 0xff,
+			(2080 >> 8) & 0xff,
+			2080 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -22976,8 +22982,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2083 >> 8) & 0xff,
-			2083 & 0xff,
+			(2084 >> 8) & 0xff,
+			2084 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -22994,8 +23000,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2087 >> 8) & 0xff,
-			2087 & 0xff,
+			(2088 >> 8) & 0xff,
+			2088 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23013,8 +23019,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2095 >> 8) & 0xff,
-			2095 & 0xff,
+			(2096 >> 8) & 0xff,
+			2096 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23034,8 +23040,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2103 >> 8) & 0xff,
-			2103 & 0xff,
+			(2104 >> 8) & 0xff,
+			2104 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23050,8 +23056,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2107 >> 8) & 0xff,
-			2107 & 0xff,
+			(2108 >> 8) & 0xff,
+			2108 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23068,8 +23074,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2111 >> 8) & 0xff,
-			2111 & 0xff,
+			(2112 >> 8) & 0xff,
+			2112 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23084,8 +23090,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2114 >> 8) & 0xff,
-			2114 & 0xff,
+			(2115 >> 8) & 0xff,
+			2115 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23102,8 +23108,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2117 >> 8) & 0xff,
-			2117 & 0xff,
+			(2118 >> 8) & 0xff,
+			2118 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23118,8 +23124,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2120 >> 8) & 0xff,
-			2120 & 0xff,
+			(2121 >> 8) & 0xff,
+			2121 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23136,8 +23142,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2123 >> 8) & 0xff,
-			2123 & 0xff,
+			(2124 >> 8) & 0xff,
+			2124 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23152,8 +23158,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2126 >> 8) & 0xff,
-			2126 & 0xff,
+			(2127 >> 8) & 0xff,
+			2127 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23170,8 +23176,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2129 >> 8) & 0xff,
-			2129 & 0xff,
+			(2130 >> 8) & 0xff,
+			2130 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23186,8 +23192,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2132 >> 8) & 0xff,
-			2132 & 0xff,
+			(2133 >> 8) & 0xff,
+			2133 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23204,8 +23210,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2135 >> 8) & 0xff,
-			2135 & 0xff,
+			(2136 >> 8) & 0xff,
+			2136 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23223,8 +23229,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2141 >> 8) & 0xff,
-			2141 & 0xff,
+			(2142 >> 8) & 0xff,
+			2142 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23244,8 +23250,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2147 >> 8) & 0xff,
-			2147 & 0xff,
+			(2148 >> 8) & 0xff,
+			2148 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23263,8 +23269,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2153 >> 8) & 0xff,
-			2153 & 0xff,
+			(2154 >> 8) & 0xff,
+			2154 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23284,8 +23290,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2159 >> 8) & 0xff,
-			2159 & 0xff,
+			(2160 >> 8) & 0xff,
+			2160 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23303,8 +23309,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2165 >> 8) & 0xff,
-			2165 & 0xff,
+			(2166 >> 8) & 0xff,
+			2166 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23324,8 +23330,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2171 >> 8) & 0xff,
-			2171 & 0xff,
+			(2172 >> 8) & 0xff,
+			2172 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23343,8 +23349,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2177 >> 8) & 0xff,
-			2177 & 0xff,
+			(2178 >> 8) & 0xff,
+			2178 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23364,8 +23370,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2183 >> 8) & 0xff,
-			2183 & 0xff,
+			(2184 >> 8) & 0xff,
+			2184 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23383,8 +23389,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2189 >> 8) & 0xff,
-			2189 & 0xff,
+			(2190 >> 8) & 0xff,
+			2190 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23404,8 +23410,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2195 >> 8) & 0xff,
-			2195 & 0xff,
+			(2196 >> 8) & 0xff,
+			2196 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23423,8 +23429,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2199 >> 8) & 0xff,
-			2199 & 0xff,
+			(2200 >> 8) & 0xff,
+			2200 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23444,8 +23450,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2203 >> 8) & 0xff,
-			2203 & 0xff,
+			(2204 >> 8) & 0xff,
+			2204 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23463,8 +23469,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2209 >> 8) & 0xff,
-			2209 & 0xff,
+			(2210 >> 8) & 0xff,
+			2210 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23484,8 +23490,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2215 >> 8) & 0xff,
-			2215 & 0xff,
+			(2216 >> 8) & 0xff,
+			2216 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23503,8 +23509,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2221 >> 8) & 0xff,
-			2221 & 0xff,
+			(2222 >> 8) & 0xff,
+			2222 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23524,8 +23530,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2227 >> 8) & 0xff,
-			2227 & 0xff,
+			(2228 >> 8) & 0xff,
+			2228 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23543,8 +23549,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2235 >> 8) & 0xff,
-			2235 & 0xff,
+			(2236 >> 8) & 0xff,
+			2236 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23564,8 +23570,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2243 >> 8) & 0xff,
-			2243 & 0xff,
+			(2244 >> 8) & 0xff,
+			2244 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23583,8 +23589,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2259 >> 8) & 0xff,
-			2259 & 0xff,
+			(2260 >> 8) & 0xff,
+			2260 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23604,8 +23610,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2275 >> 8) & 0xff,
-			2275 & 0xff,
+			(2276 >> 8) & 0xff,
+			2276 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23623,8 +23629,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2283 >> 8) & 0xff,
-			2283 & 0xff,
+			(2284 >> 8) & 0xff,
+			2284 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23644,8 +23650,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2291 >> 8) & 0xff,
-			2291 & 0xff,
+			(2292 >> 8) & 0xff,
+			2292 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23663,8 +23669,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2297 >> 8) & 0xff,
-			2297 & 0xff,
+			(2298 >> 8) & 0xff,
+			2298 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23684,8 +23690,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2303 >> 8) & 0xff,
-			2303 & 0xff,
+			(2304 >> 8) & 0xff,
+			2304 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23703,8 +23709,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2309 >> 8) & 0xff,
-			2309 & 0xff,
+			(2310 >> 8) & 0xff,
+			2310 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23724,8 +23730,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2315 >> 8) & 0xff,
-			2315 & 0xff,
+			(2316 >> 8) & 0xff,
+			2316 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23743,8 +23749,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2321 >> 8) & 0xff,
-			2321 & 0xff,
+			(2322 >> 8) & 0xff,
+			2322 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23764,8 +23770,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2327 >> 8) & 0xff,
-			2327 & 0xff,
+			(2328 >> 8) & 0xff,
+			2328 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23783,8 +23789,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2333 >> 8) & 0xff,
-			2333 & 0xff,
+			(2334 >> 8) & 0xff,
+			2334 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23804,8 +23810,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2339 >> 8) & 0xff,
-			2339 & 0xff,
+			(2340 >> 8) & 0xff,
+			2340 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23823,8 +23829,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2351 >> 8) & 0xff,
-			2351 & 0xff,
+			(2352 >> 8) & 0xff,
+			2352 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23844,8 +23850,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2363 >> 8) & 0xff,
-			2363 & 0xff,
+			(2364 >> 8) & 0xff,
+			2364 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -23860,8 +23866,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2383 >> 8) & 0xff,
-			2383 & 0xff,
+			(2384 >> 8) & 0xff,
+			2384 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -23880,8 +23886,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2403 >> 8) & 0xff,
-			2403 & 0xff,
+			(2404 >> 8) & 0xff,
+			2404 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23899,8 +23905,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2415 >> 8) & 0xff,
-			2415 & 0xff,
+			(2416 >> 8) & 0xff,
+			2416 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23920,8 +23926,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2427 >> 8) & 0xff,
-			2427 & 0xff,
+			(2428 >> 8) & 0xff,
+			2428 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23939,8 +23945,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2440 >> 8) & 0xff,
-			2440 & 0xff,
+			(2441 >> 8) & 0xff,
+			2441 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23960,8 +23966,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2453 >> 8) & 0xff,
-			2453 & 0xff,
+			(2454 >> 8) & 0xff,
+			2454 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -23979,8 +23985,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2466 >> 8) & 0xff,
-			2466 & 0xff,
+			(2467 >> 8) & 0xff,
+			2467 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -24009,8 +24015,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2479 >> 8) & 0xff,
-			2479 & 0xff,
+			(2480 >> 8) & 0xff,
+			2480 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -24151,8 +24157,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2682 >> 8) & 0xff,
-			2682 & 0xff,
+			(2683 >> 8) & 0xff,
+			2683 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -24164,8 +24170,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2683 >> 8) & 0xff,
-			2683 & 0xff,
+			(2684 >> 8) & 0xff,
+			2684 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_RF,
@@ -24182,8 +24188,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2684 >> 8) & 0xff,
-			2684 & 0xff,
+			(2685 >> 8) & 0xff,
+			2685 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -24195,8 +24201,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2685 >> 8) & 0xff,
-			2685 & 0xff,
+			(2686 >> 8) & 0xff,
+			2686 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_RF,
@@ -24213,8 +24219,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2686 >> 8) & 0xff,
-			2686 & 0xff,
+			(2687 >> 8) & 0xff,
+			2687 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -24226,8 +24232,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2687 >> 8) & 0xff,
-			2687 & 0xff,
+			(2688 >> 8) & 0xff,
+			2688 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_RF,
@@ -24244,8 +24250,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2688 >> 8) & 0xff,
-			2688 & 0xff,
+			(2689 >> 8) & 0xff,
+			2689 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -24257,8 +24263,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2691 >> 8) & 0xff,
-			2691 & 0xff,
+			(2692 >> 8) & 0xff,
+			2692 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -24275,8 +24281,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2694 >> 8) & 0xff,
-			2694 & 0xff,
+			(2695 >> 8) & 0xff,
+			2695 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -24288,8 +24294,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2697 >> 8) & 0xff,
-			2697 & 0xff,
+			(2698 >> 8) & 0xff,
+			2698 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -24306,8 +24312,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2700 >> 8) & 0xff,
-			2700 & 0xff,
+			(2701 >> 8) & 0xff,
+			2701 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -24319,8 +24325,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2704 >> 8) & 0xff,
-			2704 & 0xff,
+			(2705 >> 8) & 0xff,
+			2705 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -24337,8 +24343,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2708 >> 8) & 0xff,
-			2708 & 0xff,
+			(2709 >> 8) & 0xff,
+			2709 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -24353,8 +24359,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2716 >> 8) & 0xff,
-			2716 & 0xff,
+			(2717 >> 8) & 0xff,
+			2717 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -24374,8 +24380,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2724 >> 8) & 0xff,
-			2724 & 0xff,
+			(2725 >> 8) & 0xff,
+			2725 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -24387,8 +24393,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2728 >> 8) & 0xff,
-			2728 & 0xff,
+			(2729 >> 8) & 0xff,
+			2729 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -24405,8 +24411,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2732 >> 8) & 0xff,
-			2732 & 0xff,
+			(2733 >> 8) & 0xff,
+			2733 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -24418,8 +24424,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2735 >> 8) & 0xff,
-			2735 & 0xff,
+			(2736 >> 8) & 0xff,
+			2736 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -24436,8 +24442,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2738 >> 8) & 0xff,
-			2738 & 0xff,
+			(2739 >> 8) & 0xff,
+			2739 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -24449,8 +24455,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2741 >> 8) & 0xff,
-			2741 & 0xff,
+			(2742 >> 8) & 0xff,
+			2742 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -24467,8 +24473,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2744 >> 8) & 0xff,
-			2744 & 0xff,
+			(2745 >> 8) & 0xff,
+			2745 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -24480,8 +24486,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2747 >> 8) & 0xff,
-			2747 & 0xff,
+			(2748 >> 8) & 0xff,
+			2748 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -24498,8 +24504,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2750 >> 8) & 0xff,
-			2750 & 0xff,
+			(2751 >> 8) & 0xff,
+			2751 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -24511,8 +24517,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2753 >> 8) & 0xff,
-			2753 & 0xff,
+			(2754 >> 8) & 0xff,
+			2754 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -24529,8 +24535,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2756 >> 8) & 0xff,
-			2756 & 0xff,
+			(2757 >> 8) & 0xff,
+			2757 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -24545,8 +24551,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2762 >> 8) & 0xff,
-			2762 & 0xff,
+			(2763 >> 8) & 0xff,
+			2763 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -24566,8 +24572,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2768 >> 8) & 0xff,
-			2768 & 0xff,
+			(2769 >> 8) & 0xff,
+			2769 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -24582,8 +24588,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2774 >> 8) & 0xff,
-			2774 & 0xff,
+			(2775 >> 8) & 0xff,
+			2775 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -24603,8 +24609,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2780 >> 8) & 0xff,
-			2780 & 0xff,
+			(2781 >> 8) & 0xff,
+			2781 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -24619,8 +24625,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2786 >> 8) & 0xff,
-			2786 & 0xff,
+			(2787 >> 8) & 0xff,
+			2787 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -24640,8 +24646,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2792 >> 8) & 0xff,
-			2792 & 0xff,
+			(2793 >> 8) & 0xff,
+			2793 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -24656,8 +24662,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2798 >> 8) & 0xff,
-			2798 & 0xff,
+			(2799 >> 8) & 0xff,
+			2799 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -24677,8 +24683,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2804 >> 8) & 0xff,
-			2804 & 0xff,
+			(2805 >> 8) & 0xff,
+			2805 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -24693,8 +24699,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2810 >> 8) & 0xff,
-			2810 & 0xff,
+			(2811 >> 8) & 0xff,
+			2811 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -24714,8 +24720,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2816 >> 8) & 0xff,
-			2816 & 0xff,
+			(2817 >> 8) & 0xff,
+			2817 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -24730,8 +24736,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2820 >> 8) & 0xff,
-			2820 & 0xff,
+			(2821 >> 8) & 0xff,
+			2821 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -24751,8 +24757,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2824 >> 8) & 0xff,
-			2824 & 0xff,
+			(2825 >> 8) & 0xff,
+			2825 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -24767,8 +24773,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2830 >> 8) & 0xff,
-			2830 & 0xff,
+			(2831 >> 8) & 0xff,
+			2831 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -24788,8 +24794,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2836 >> 8) & 0xff,
-			2836 & 0xff,
+			(2837 >> 8) & 0xff,
+			2837 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -24804,8 +24810,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2842 >> 8) & 0xff,
-			2842 & 0xff,
+			(2843 >> 8) & 0xff,
+			2843 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -24825,8 +24831,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2848 >> 8) & 0xff,
-			2848 & 0xff,
+			(2849 >> 8) & 0xff,
+			2849 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -24841,8 +24847,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2856 >> 8) & 0xff,
-			2856 & 0xff,
+			(2857 >> 8) & 0xff,
+			2857 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -24862,8 +24868,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2864 >> 8) & 0xff,
-			2864 & 0xff,
+			(2865 >> 8) & 0xff,
+			2865 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -24878,8 +24884,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2880 >> 8) & 0xff,
-			2880 & 0xff,
+			(2881 >> 8) & 0xff,
+			2881 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -24899,8 +24905,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2896 >> 8) & 0xff,
-			2896 & 0xff,
+			(2897 >> 8) & 0xff,
+			2897 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -24915,8 +24921,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2904 >> 8) & 0xff,
-			2904 & 0xff,
+			(2905 >> 8) & 0xff,
+			2905 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -24936,8 +24942,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2912 >> 8) & 0xff,
-			2912 & 0xff,
+			(2913 >> 8) & 0xff,
+			2913 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -24952,8 +24958,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2918 >> 8) & 0xff,
-			2918 & 0xff,
+			(2919 >> 8) & 0xff,
+			2919 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -24973,8 +24979,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2924 >> 8) & 0xff,
-			2924 & 0xff,
+			(2925 >> 8) & 0xff,
+			2925 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -24989,8 +24995,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2930 >> 8) & 0xff,
-			2930 & 0xff,
+			(2931 >> 8) & 0xff,
+			2931 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -25010,8 +25016,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2936 >> 8) & 0xff,
-			2936 & 0xff,
+			(2937 >> 8) & 0xff,
+			2937 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -25026,8 +25032,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2942 >> 8) & 0xff,
-			2942 & 0xff,
+			(2943 >> 8) & 0xff,
+			2943 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -25047,8 +25053,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2948 >> 8) & 0xff,
-			2948 & 0xff,
+			(2949 >> 8) & 0xff,
+			2949 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -25063,8 +25069,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2954 >> 8) & 0xff,
-			2954 & 0xff,
+			(2955 >> 8) & 0xff,
+			2955 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -25084,8 +25090,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2960 >> 8) & 0xff,
-			2960 & 0xff,
+			(2961 >> 8) & 0xff,
+			2961 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -25100,8 +25106,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2972 >> 8) & 0xff,
-			2972 & 0xff,
+			(2973 >> 8) & 0xff,
+			2973 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -25121,8 +25127,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2984 >> 8) & 0xff,
-			2984 & 0xff,
+			(2985 >> 8) & 0xff,
+			2985 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -25137,8 +25143,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2996 >> 8) & 0xff,
-			2996 & 0xff,
+			(2997 >> 8) & 0xff,
+			2997 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -25158,8 +25164,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(3008 >> 8) & 0xff,
-			3008 & 0xff,
+			(3009 >> 8) & 0xff,
+			3009 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -25174,8 +25180,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(3020 >> 8) & 0xff,
-			3020 & 0xff,
+			(3021 >> 8) & 0xff,
+			3021 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -25195,8 +25201,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(3032 >> 8) & 0xff,
-			3032 & 0xff,
+			(3033 >> 8) & 0xff,
+			3033 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -25211,8 +25217,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(3044 >> 8) & 0xff,
-			3044 & 0xff,
+			(3045 >> 8) & 0xff,
+			3045 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -25232,8 +25238,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(3056 >> 8) & 0xff,
-			3056 & 0xff,
+			(3057 >> 8) & 0xff,
+			3057 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -25248,8 +25254,8 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(3068 >> 8) & 0xff,
-			3068 & 0xff,
+			(3069 >> 8) & 0xff,
+			3069 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -35435,8 +35441,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1572 >> 8) & 0xff,
-		1572 & 0xff,
+		(1573 >> 8) & 0xff,
+		1573 & 0xff,
 		(2 >> 8) & 0xff,
 		2 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35453,8 +35459,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1574 >> 8) & 0xff,
-		1574 & 0xff,
+		(1575 >> 8) & 0xff,
+		1575 & 0xff,
 		(2 >> 8) & 0xff,
 		2 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35471,8 +35477,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1576 >> 8) & 0xff,
-		1576 & 0xff,
+		(1577 >> 8) & 0xff,
+		1577 & 0xff,
 		(2 >> 8) & 0xff,
 		2 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35489,8 +35495,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1578 >> 8) & 0xff,
-		1578 & 0xff,
+		(1579 >> 8) & 0xff,
+		1579 & 0xff,
 		(2 >> 8) & 0xff,
 		2 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35504,8 +35510,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1595 >> 8) & 0xff,
-		1595 & 0xff,
+		(1596 >> 8) & 0xff,
+		1596 & 0xff,
 		(2 >> 8) & 0xff,
 		2 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -35519,8 +35525,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1605 >> 8) & 0xff,
-		1605 & 0xff,
+		(1606 >> 8) & 0xff,
+		1606 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35534,8 +35540,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1616 >> 8) & 0xff,
-		1616 & 0xff,
+		(1617 >> 8) & 0xff,
+		1617 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35549,8 +35555,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1622 >> 8) & 0xff,
-		1622 & 0xff,
+		(1623 >> 8) & 0xff,
+		1623 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35564,8 +35570,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1628 >> 8) & 0xff,
-		1628 & 0xff,
+		(1629 >> 8) & 0xff,
+		1629 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35579,8 +35585,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1634 >> 8) & 0xff,
-		1634 & 0xff,
+		(1635 >> 8) & 0xff,
+		1635 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35594,8 +35600,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1640 >> 8) & 0xff,
-		1640 & 0xff,
+		(1641 >> 8) & 0xff,
+		1641 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35609,8 +35615,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1646 >> 8) & 0xff,
-		1646 & 0xff,
+		(1647 >> 8) & 0xff,
+		1647 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35624,8 +35630,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1652 >> 8) & 0xff,
-		1652 & 0xff,
+		(1653 >> 8) & 0xff,
+		1653 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35639,8 +35645,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1657 >> 8) & 0xff,
-		1657 & 0xff,
+		(1658 >> 8) & 0xff,
+		1658 & 0xff,
 		(2 >> 8) & 0xff,
 		2 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35654,8 +35660,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1662 >> 8) & 0xff,
-		1662 & 0xff,
+		(1663 >> 8) & 0xff,
+		1663 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35669,8 +35675,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1668 >> 8) & 0xff,
-		1668 & 0xff,
+		(1669 >> 8) & 0xff,
+		1669 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35684,8 +35690,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1675 >> 8) & 0xff,
-		1675 & 0xff,
+		(1676 >> 8) & 0xff,
+		1676 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35699,8 +35705,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1683 >> 8) & 0xff,
-		1683 & 0xff,
+		(1684 >> 8) & 0xff,
+		1684 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35717,8 +35723,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1687 >> 8) & 0xff,
-		1687 & 0xff,
+		(1688 >> 8) & 0xff,
+		1688 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35735,8 +35741,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1691 >> 8) & 0xff,
-		1691 & 0xff,
+		(1692 >> 8) & 0xff,
+		1692 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35750,8 +35756,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1699 >> 8) & 0xff,
-		1699 & 0xff,
+		(1700 >> 8) & 0xff,
+		1700 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35765,8 +35771,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1707 >> 8) & 0xff,
-		1707 & 0xff,
+		(1708 >> 8) & 0xff,
+		1708 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35783,8 +35789,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1711 >> 8) & 0xff,
-		1711 & 0xff,
+		(1712 >> 8) & 0xff,
+		1712 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35801,8 +35807,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1715 >> 8) & 0xff,
-		1715 & 0xff,
+		(1716 >> 8) & 0xff,
+		1716 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35816,8 +35822,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1723 >> 8) & 0xff,
-		1723 & 0xff,
+		(1724 >> 8) & 0xff,
+		1724 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35834,8 +35840,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1727 >> 8) & 0xff,
-		1727 & 0xff,
+		(1728 >> 8) & 0xff,
+		1728 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35852,8 +35858,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1731 >> 8) & 0xff,
-		1731 & 0xff,
+		(1732 >> 8) & 0xff,
+		1732 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35867,8 +35873,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1739 >> 8) & 0xff,
-		1739 & 0xff,
+		(1740 >> 8) & 0xff,
+		1740 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35885,8 +35891,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1743 >> 8) & 0xff,
-		1743 & 0xff,
+		(1744 >> 8) & 0xff,
+		1744 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35903,8 +35909,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1747 >> 8) & 0xff,
-		1747 & 0xff,
+		(1748 >> 8) & 0xff,
+		1748 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35918,8 +35924,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1755 >> 8) & 0xff,
-		1755 & 0xff,
+		(1756 >> 8) & 0xff,
+		1756 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35936,8 +35942,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1759 >> 8) & 0xff,
-		1759 & 0xff,
+		(1760 >> 8) & 0xff,
+		1760 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35954,8 +35960,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1763 >> 8) & 0xff,
-		1763 & 0xff,
+		(1764 >> 8) & 0xff,
+		1764 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35969,8 +35975,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1771 >> 8) & 0xff,
-		1771 & 0xff,
+		(1772 >> 8) & 0xff,
+		1772 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -35987,8 +35993,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1775 >> 8) & 0xff,
-		1775 & 0xff,
+		(1776 >> 8) & 0xff,
+		1776 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36005,8 +36011,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1779 >> 8) & 0xff,
-		1779 & 0xff,
+		(1780 >> 8) & 0xff,
+		1780 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36020,8 +36026,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_OR,
 	.field_opr1 = {
-		(1784 >> 8) & 0xff,
-		1784 & 0xff,
+		(1785 >> 8) & 0xff,
+		1785 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36035,8 +36041,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_OR,
 	.field_opr1 = {
-		(1787 >> 8) & 0xff,
-		1787 & 0xff,
+		(1788 >> 8) & 0xff,
+		1788 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36050,8 +36056,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_OR,
 	.field_opr1 = {
-		(1791 >> 8) & 0xff,
-		1791 & 0xff,
+		(1792 >> 8) & 0xff,
+		1792 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36065,8 +36071,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_OR,
 	.field_opr1 = {
-		(1794 >> 8) & 0xff,
-		1794 & 0xff,
+		(1795 >> 8) & 0xff,
+		1795 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36081,8 +36087,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1799 >> 8) & 0xff,
-		1799 & 0xff,
+		(1800 >> 8) & 0xff,
+		1800 & 0xff,
 		(2 >> 8) & 0xff,
 		2 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -36097,8 +36103,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1801 >> 8) & 0xff,
-		1801 & 0xff,
+		(1802 >> 8) & 0xff,
+		1802 & 0xff,
 		(2 >> 8) & 0xff,
 		2 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -36113,8 +36119,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1803 >> 8) & 0xff,
-		1803 & 0xff,
+		(1804 >> 8) & 0xff,
+		1804 & 0xff,
 		(2 >> 8) & 0xff,
 		2 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -36129,8 +36135,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1805 >> 8) & 0xff,
-		1805 & 0xff,
+		(1806 >> 8) & 0xff,
+		1806 & 0xff,
 		(2 >> 8) & 0xff,
 		2 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -36145,8 +36151,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1807 >> 8) & 0xff,
-		1807 & 0xff,
+		(1808 >> 8) & 0xff,
+		1808 & 0xff,
 		(2 >> 8) & 0xff,
 		2 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36163,8 +36169,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1809 >> 8) & 0xff,
-		1809 & 0xff,
+		(1810 >> 8) & 0xff,
+		1810 & 0xff,
 		(2 >> 8) & 0xff,
 		2 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36181,8 +36187,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1811 >> 8) & 0xff,
-		1811 & 0xff,
+		(1812 >> 8) & 0xff,
+		1812 & 0xff,
 		(2 >> 8) & 0xff,
 		2 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36199,8 +36205,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1813 >> 8) & 0xff,
-		1813 & 0xff,
+		(1814 >> 8) & 0xff,
+		1814 & 0xff,
 		(2 >> 8) & 0xff,
 		2 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36216,8 +36222,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1817 >> 8) & 0xff,
-			1817 & 0xff,
+			(1818 >> 8) & 0xff,
+			1818 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -36232,8 +36238,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1819 >> 8) & 0xff,
-			1819 & 0xff,
+			(1820 >> 8) & 0xff,
+			1820 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -36248,8 +36254,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1821 >> 8) & 0xff,
-			1821 & 0xff,
+			(1822 >> 8) & 0xff,
+			1822 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -36261,8 +36267,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1825 >> 8) & 0xff,
-			1825 & 0xff,
+			(1826 >> 8) & 0xff,
+			1826 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36279,8 +36285,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1827 >> 8) & 0xff,
-			1827 & 0xff,
+			(1828 >> 8) & 0xff,
+			1828 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36297,8 +36303,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1829 >> 8) & 0xff,
-			1829 & 0xff,
+			(1830 >> 8) & 0xff,
+			1830 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36312,8 +36318,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1833 >> 8) & 0xff,
-			1833 & 0xff,
+			(1834 >> 8) & 0xff,
+			1834 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -36328,8 +36334,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1835 >> 8) & 0xff,
-			1835 & 0xff,
+			(1836 >> 8) & 0xff,
+			1836 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -36344,8 +36350,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1837 >> 8) & 0xff,
-			1837 & 0xff,
+			(1838 >> 8) & 0xff,
+			1838 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -36357,8 +36363,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1841 >> 8) & 0xff,
-			1841 & 0xff,
+			(1842 >> 8) & 0xff,
+			1842 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -36373,8 +36379,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1843 >> 8) & 0xff,
-			1843 & 0xff,
+			(1844 >> 8) & 0xff,
+			1844 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36391,8 +36397,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1845 >> 8) & 0xff,
-			1845 & 0xff,
+			(1846 >> 8) & 0xff,
+			1846 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36406,8 +36412,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1849 >> 8) & 0xff,
-			1849 & 0xff,
+			(1850 >> 8) & 0xff,
+			1850 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -36422,8 +36428,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1851 >> 8) & 0xff,
-			1851 & 0xff,
+			(1852 >> 8) & 0xff,
+			1852 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -36438,8 +36444,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1853 >> 8) & 0xff,
-			1853 & 0xff,
+			(1854 >> 8) & 0xff,
+			1854 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -36451,8 +36457,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1857 >> 8) & 0xff,
-			1857 & 0xff,
+			(1858 >> 8) & 0xff,
+			1858 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -36467,8 +36473,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1859 >> 8) & 0xff,
-			1859 & 0xff,
+			(1860 >> 8) & 0xff,
+			1860 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -36483,8 +36489,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1861 >> 8) & 0xff,
-			1861 & 0xff,
+			(1862 >> 8) & 0xff,
+			1862 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -36496,8 +36502,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1865 >> 8) & 0xff,
-			1865 & 0xff,
+			(1866 >> 8) & 0xff,
+			1866 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -36512,8 +36518,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1867 >> 8) & 0xff,
-			1867 & 0xff,
+			(1868 >> 8) & 0xff,
+			1868 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -36528,8 +36534,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1869 >> 8) & 0xff,
-			1869 & 0xff,
+			(1870 >> 8) & 0xff,
+			1870 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -36541,8 +36547,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1873 >> 8) & 0xff,
-			1873 & 0xff,
+			(1874 >> 8) & 0xff,
+			1874 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36559,8 +36565,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1875 >> 8) & 0xff,
-			1875 & 0xff,
+			(1876 >> 8) & 0xff,
+			1876 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36577,8 +36583,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1877 >> 8) & 0xff,
-			1877 & 0xff,
+			(1878 >> 8) & 0xff,
+			1878 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36592,8 +36598,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1881 >> 8) & 0xff,
-			1881 & 0xff,
+			(1882 >> 8) & 0xff,
+			1882 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36610,8 +36616,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1883 >> 8) & 0xff,
-			1883 & 0xff,
+			(1884 >> 8) & 0xff,
+			1884 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36628,8 +36634,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1885 >> 8) & 0xff,
-			1885 & 0xff,
+			(1886 >> 8) & 0xff,
+			1886 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36643,8 +36649,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1889 >> 8) & 0xff,
-			1889 & 0xff,
+			(1890 >> 8) & 0xff,
+			1890 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -36659,8 +36665,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1891 >> 8) & 0xff,
-			1891 & 0xff,
+			(1892 >> 8) & 0xff,
+			1892 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -36675,8 +36681,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1893 >> 8) & 0xff,
-			1893 & 0xff,
+			(1894 >> 8) & 0xff,
+			1894 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -36688,8 +36694,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1897 >> 8) & 0xff,
-			1897 & 0xff,
+			(1898 >> 8) & 0xff,
+			1898 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36706,8 +36712,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1899 >> 8) & 0xff,
-			1899 & 0xff,
+			(1900 >> 8) & 0xff,
+			1900 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -36722,8 +36728,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1901 >> 8) & 0xff,
-			1901 & 0xff,
+			(1902 >> 8) & 0xff,
+			1902 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -36735,8 +36741,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1905 >> 8) & 0xff,
-			1905 & 0xff,
+			(1906 >> 8) & 0xff,
+			1906 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -36751,8 +36757,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1907 >> 8) & 0xff,
-			1907 & 0xff,
+			(1908 >> 8) & 0xff,
+			1908 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -36767,8 +36773,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1909 >> 8) & 0xff,
-			1909 & 0xff,
+			(1910 >> 8) & 0xff,
+			1910 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -36780,8 +36786,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1913 >> 8) & 0xff,
-			1913 & 0xff,
+			(1914 >> 8) & 0xff,
+			1914 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -36796,8 +36802,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1915 >> 8) & 0xff,
-			1915 & 0xff,
+			(1916 >> 8) & 0xff,
+			1916 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -36812,8 +36818,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1917 >> 8) & 0xff,
-			1917 & 0xff,
+			(1918 >> 8) & 0xff,
+			1918 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -36825,8 +36831,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1921 >> 8) & 0xff,
-			1921 & 0xff,
+			(1922 >> 8) & 0xff,
+			1922 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -36841,8 +36847,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1923 >> 8) & 0xff,
-			1923 & 0xff,
+			(1924 >> 8) & 0xff,
+			1924 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -36857,8 +36863,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1925 >> 8) & 0xff,
-			1925 & 0xff,
+			(1926 >> 8) & 0xff,
+			1926 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -36870,8 +36876,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1929 >> 8) & 0xff,
-			1929 & 0xff,
+			(1930 >> 8) & 0xff,
+			1930 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36888,8 +36894,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1931 >> 8) & 0xff,
-			1931 & 0xff,
+			(1932 >> 8) & 0xff,
+			1932 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36906,8 +36912,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1933 >> 8) & 0xff,
-			1933 & 0xff,
+			(1934 >> 8) & 0xff,
+			1934 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36921,8 +36927,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1938 >> 8) & 0xff,
-			1938 & 0xff,
+			(1939 >> 8) & 0xff,
+			1939 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36936,8 +36942,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1944 >> 8) & 0xff,
-			1944 & 0xff,
+			(1945 >> 8) & 0xff,
+			1945 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36951,8 +36957,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1951 >> 8) & 0xff,
-			1951 & 0xff,
+			(1952 >> 8) & 0xff,
+			1952 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -36964,8 +36970,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1955 >> 8) & 0xff,
-			1955 & 0xff,
+			(1956 >> 8) & 0xff,
+			1956 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -36977,8 +36983,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1959 >> 8) & 0xff,
-			1959 & 0xff,
+			(1960 >> 8) & 0xff,
+			1960 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -36992,8 +36998,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1963 >> 8) & 0xff,
-			1963 & 0xff,
+			(1964 >> 8) & 0xff,
+			1964 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -37008,8 +37014,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1965 >> 8) & 0xff,
-			1965 & 0xff,
+			(1966 >> 8) & 0xff,
+			1966 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -37024,8 +37030,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1967 >> 8) & 0xff,
-			1967 & 0xff,
+			(1968 >> 8) & 0xff,
+			1968 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -37040,8 +37046,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1969 >> 8) & 0xff,
-			1969 & 0xff,
+			(1970 >> 8) & 0xff,
+			1970 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -37056,8 +37062,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1971 >> 8) & 0xff,
-			1971 & 0xff,
+			(1972 >> 8) & 0xff,
+			1972 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -37069,8 +37075,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1975 >> 8) & 0xff,
-			1975 & 0xff,
+			(1976 >> 8) & 0xff,
+			1976 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -37085,8 +37091,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1977 >> 8) & 0xff,
-			1977 & 0xff,
+			(1978 >> 8) & 0xff,
+			1978 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -37103,8 +37109,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1979 >> 8) & 0xff,
-			1979 & 0xff,
+			(1980 >> 8) & 0xff,
+			1980 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -37121,8 +37127,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1981 >> 8) & 0xff,
-			1981 & 0xff,
+			(1982 >> 8) & 0xff,
+			1982 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -37139,8 +37145,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1983 >> 8) & 0xff,
-			1983 & 0xff,
+			(1984 >> 8) & 0xff,
+			1984 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -37154,8 +37160,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1990 >> 8) & 0xff,
-			1990 & 0xff,
+			(1991 >> 8) & 0xff,
+			1991 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -37167,8 +37173,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1994 >> 8) & 0xff,
-			1994 & 0xff,
+			(1995 >> 8) & 0xff,
+			1995 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -37182,8 +37188,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(1998 >> 8) & 0xff,
-			1998 & 0xff,
+			(1999 >> 8) & 0xff,
+			1999 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -37195,8 +37201,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2002 >> 8) & 0xff,
-			2002 & 0xff,
+			(2003 >> 8) & 0xff,
+			2003 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -37210,8 +37216,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2006 >> 8) & 0xff,
-			2006 & 0xff,
+			(2007 >> 8) & 0xff,
+			2007 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -37223,8 +37229,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2010 >> 8) & 0xff,
-			2010 & 0xff,
+			(2011 >> 8) & 0xff,
+			2011 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -37236,8 +37242,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2014 >> 8) & 0xff,
-			2014 & 0xff,
+			(2015 >> 8) & 0xff,
+			2015 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -37252,8 +37258,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2016 >> 8) & 0xff,
-			2016 & 0xff,
+			(2017 >> 8) & 0xff,
+			2017 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -37265,8 +37271,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2019 >> 8) & 0xff,
-			2019 & 0xff,
+			(2020 >> 8) & 0xff,
+			2020 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -37283,8 +37289,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2021 >> 8) & 0xff,
-			2021 & 0xff,
+			(2022 >> 8) & 0xff,
+			2022 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -37296,8 +37302,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2024 >> 8) & 0xff,
-			2024 & 0xff,
+			(2025 >> 8) & 0xff,
+			2025 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -37311,8 +37317,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2028 >> 8) & 0xff,
-			2028 & 0xff,
+			(2029 >> 8) & 0xff,
+			2029 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -37324,8 +37330,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2032 >> 8) & 0xff,
-			2032 & 0xff,
+			(2033 >> 8) & 0xff,
+			2033 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -37337,8 +37343,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2036 >> 8) & 0xff,
-			2036 & 0xff,
+			(2037 >> 8) & 0xff,
+			2037 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -37350,8 +37356,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2040 >> 8) & 0xff,
-			2040 & 0xff,
+			(2041 >> 8) & 0xff,
+			2041 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ZERO,
@@ -37363,8 +37369,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2044 >> 8) & 0xff,
-			2044 & 0xff,
+			(2045 >> 8) & 0xff,
+			2045 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -37378,8 +37384,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2072 >> 8) & 0xff,
-			2072 & 0xff,
+			(2073 >> 8) & 0xff,
+			2073 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_SKIP,
@@ -37394,8 +37400,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2077 >> 8) & 0xff,
-			2077 & 0xff,
+			(2078 >> 8) & 0xff,
+			2078 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_SKIP,
@@ -37410,8 +37416,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2091 >> 8) & 0xff,
-			2091 & 0xff,
+			(2092 >> 8) & 0xff,
+			2092 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37426,8 +37432,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2099 >> 8) & 0xff,
-			2099 & 0xff,
+			(2100 >> 8) & 0xff,
+			2100 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37442,8 +37448,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2138 >> 8) & 0xff,
-			2138 & 0xff,
+			(2139 >> 8) & 0xff,
+			2139 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37458,8 +37464,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2144 >> 8) & 0xff,
-			2144 & 0xff,
+			(2145 >> 8) & 0xff,
+			2145 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37474,8 +37480,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2150 >> 8) & 0xff,
-			2150 & 0xff,
+			(2151 >> 8) & 0xff,
+			2151 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37490,8 +37496,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2156 >> 8) & 0xff,
-			2156 & 0xff,
+			(2157 >> 8) & 0xff,
+			2157 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37506,8 +37512,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2162 >> 8) & 0xff,
-			2162 & 0xff,
+			(2163 >> 8) & 0xff,
+			2163 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37522,8 +37528,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2168 >> 8) & 0xff,
-			2168 & 0xff,
+			(2169 >> 8) & 0xff,
+			2169 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37538,8 +37544,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2174 >> 8) & 0xff,
-			2174 & 0xff,
+			(2175 >> 8) & 0xff,
+			2175 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37554,8 +37560,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2180 >> 8) & 0xff,
-			2180 & 0xff,
+			(2181 >> 8) & 0xff,
+			2181 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37570,8 +37576,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2186 >> 8) & 0xff,
-			2186 & 0xff,
+			(2187 >> 8) & 0xff,
+			2187 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37586,8 +37592,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2192 >> 8) & 0xff,
-			2192 & 0xff,
+			(2193 >> 8) & 0xff,
+			2193 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37602,8 +37608,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2197 >> 8) & 0xff,
-			2197 & 0xff,
+			(2198 >> 8) & 0xff,
+			2198 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37618,8 +37624,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2201 >> 8) & 0xff,
-			2201 & 0xff,
+			(2202 >> 8) & 0xff,
+			2202 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37634,8 +37640,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2206 >> 8) & 0xff,
-			2206 & 0xff,
+			(2207 >> 8) & 0xff,
+			2207 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37650,8 +37656,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2212 >> 8) & 0xff,
-			2212 & 0xff,
+			(2213 >> 8) & 0xff,
+			2213 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37666,8 +37672,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2218 >> 8) & 0xff,
-			2218 & 0xff,
+			(2219 >> 8) & 0xff,
+			2219 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37682,8 +37688,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2224 >> 8) & 0xff,
-			2224 & 0xff,
+			(2225 >> 8) & 0xff,
+			2225 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37698,8 +37704,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2231 >> 8) & 0xff,
-			2231 & 0xff,
+			(2232 >> 8) & 0xff,
+			2232 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37714,8 +37720,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2239 >> 8) & 0xff,
-			2239 & 0xff,
+			(2240 >> 8) & 0xff,
+			2240 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37730,8 +37736,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2247 >> 8) & 0xff,
-			2247 & 0xff,
+			(2248 >> 8) & 0xff,
+			2248 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37749,8 +37755,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2251 >> 8) & 0xff,
-			2251 & 0xff,
+			(2252 >> 8) & 0xff,
+			2252 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37768,8 +37774,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2255 >> 8) & 0xff,
-			2255 & 0xff,
+			(2256 >> 8) & 0xff,
+			2256 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37784,8 +37790,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2263 >> 8) & 0xff,
-			2263 & 0xff,
+			(2264 >> 8) & 0xff,
+			2264 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37803,8 +37809,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2267 >> 8) & 0xff,
-			2267 & 0xff,
+			(2268 >> 8) & 0xff,
+			2268 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37822,8 +37828,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2271 >> 8) & 0xff,
-			2271 & 0xff,
+			(2272 >> 8) & 0xff,
+			2272 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37838,8 +37844,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2279 >> 8) & 0xff,
-			2279 & 0xff,
+			(2280 >> 8) & 0xff,
+			2280 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37854,8 +37860,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2287 >> 8) & 0xff,
-			2287 & 0xff,
+			(2288 >> 8) & 0xff,
+			2288 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37870,8 +37876,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2294 >> 8) & 0xff,
-			2294 & 0xff,
+			(2295 >> 8) & 0xff,
+			2295 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37886,8 +37892,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2300 >> 8) & 0xff,
-			2300 & 0xff,
+			(2301 >> 8) & 0xff,
+			2301 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37902,8 +37908,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2306 >> 8) & 0xff,
-			2306 & 0xff,
+			(2307 >> 8) & 0xff,
+			2307 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37918,8 +37924,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2312 >> 8) & 0xff,
-			2312 & 0xff,
+			(2313 >> 8) & 0xff,
+			2313 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37934,8 +37940,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2318 >> 8) & 0xff,
-			2318 & 0xff,
+			(2319 >> 8) & 0xff,
+			2319 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37950,8 +37956,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2324 >> 8) & 0xff,
-			2324 & 0xff,
+			(2325 >> 8) & 0xff,
+			2325 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37966,8 +37972,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2330 >> 8) & 0xff,
-			2330 & 0xff,
+			(2331 >> 8) & 0xff,
+			2331 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37982,8 +37988,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2336 >> 8) & 0xff,
-			2336 & 0xff,
+			(2337 >> 8) & 0xff,
+			2337 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -37998,8 +38004,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2342 >> 8) & 0xff,
-			2342 & 0xff,
+			(2343 >> 8) & 0xff,
+			2343 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38017,8 +38023,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2345 >> 8) & 0xff,
-			2345 & 0xff,
+			(2346 >> 8) & 0xff,
+			2346 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38036,8 +38042,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2348 >> 8) & 0xff,
-			2348 & 0xff,
+			(2349 >> 8) & 0xff,
+			2349 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38052,8 +38058,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2354 >> 8) & 0xff,
-			2354 & 0xff,
+			(2355 >> 8) & 0xff,
+			2355 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38071,8 +38077,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2357 >> 8) & 0xff,
-			2357 & 0xff,
+			(2358 >> 8) & 0xff,
+			2358 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38090,8 +38096,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2360 >> 8) & 0xff,
-			2360 & 0xff,
+			(2361 >> 8) & 0xff,
+			2361 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38106,8 +38112,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2365 >> 8) & 0xff,
-			2365 & 0xff,
+			(2366 >> 8) & 0xff,
+			2366 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -38122,8 +38128,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2367 >> 8) & 0xff,
-			2367 & 0xff,
+			(2368 >> 8) & 0xff,
+			2368 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -38138,8 +38144,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2369 >> 8) & 0xff,
-			2369 & 0xff,
+			(2370 >> 8) & 0xff,
+			2370 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -38154,8 +38160,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2371 >> 8) & 0xff,
-			2371 & 0xff,
+			(2372 >> 8) & 0xff,
+			2372 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38173,8 +38179,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2374 >> 8) & 0xff,
-			2374 & 0xff,
+			(2375 >> 8) & 0xff,
+			2375 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38192,8 +38198,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2377 >> 8) & 0xff,
-			2377 & 0xff,
+			(2378 >> 8) & 0xff,
+			2378 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38211,8 +38217,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2380 >> 8) & 0xff,
-			2380 & 0xff,
+			(2381 >> 8) & 0xff,
+			2381 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38227,8 +38233,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2385 >> 8) & 0xff,
-			2385 & 0xff,
+			(2386 >> 8) & 0xff,
+			2386 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -38245,8 +38251,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2387 >> 8) & 0xff,
-			2387 & 0xff,
+			(2388 >> 8) & 0xff,
+			2388 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -38263,8 +38269,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2389 >> 8) & 0xff,
-			2389 & 0xff,
+			(2390 >> 8) & 0xff,
+			2390 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -38281,8 +38287,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2391 >> 8) & 0xff,
-			2391 & 0xff,
+			(2392 >> 8) & 0xff,
+			2392 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38300,8 +38306,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2394 >> 8) & 0xff,
-			2394 & 0xff,
+			(2395 >> 8) & 0xff,
+			2395 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38319,8 +38325,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2397 >> 8) & 0xff,
-			2397 & 0xff,
+			(2398 >> 8) & 0xff,
+			2398 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38338,8 +38344,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2400 >> 8) & 0xff,
-			2400 & 0xff,
+			(2401 >> 8) & 0xff,
+			2401 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38354,8 +38360,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2406 >> 8) & 0xff,
-			2406 & 0xff,
+			(2407 >> 8) & 0xff,
+			2407 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38373,8 +38379,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2409 >> 8) & 0xff,
-			2409 & 0xff,
+			(2410 >> 8) & 0xff,
+			2410 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38392,8 +38398,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2412 >> 8) & 0xff,
-			2412 & 0xff,
+			(2413 >> 8) & 0xff,
+			2413 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38408,8 +38414,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2418 >> 8) & 0xff,
-			2418 & 0xff,
+			(2419 >> 8) & 0xff,
+			2419 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38427,8 +38433,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2421 >> 8) & 0xff,
-			2421 & 0xff,
+			(2422 >> 8) & 0xff,
+			2422 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38446,8 +38452,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2424 >> 8) & 0xff,
-			2424 & 0xff,
+			(2425 >> 8) & 0xff,
+			2425 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38462,8 +38468,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2430 >> 8) & 0xff,
-			2430 & 0xff,
+			(2431 >> 8) & 0xff,
+			2431 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38481,8 +38487,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2433 >> 8) & 0xff,
-			2433 & 0xff,
+			(2434 >> 8) & 0xff,
+			2434 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38500,8 +38506,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2436 >> 8) & 0xff,
-			2436 & 0xff,
+			(2437 >> 8) & 0xff,
+			2437 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38519,8 +38525,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2439 >> 8) & 0xff,
-			2439 & 0xff,
+			(2440 >> 8) & 0xff,
+			2440 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_SKIP,
@@ -38532,8 +38538,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2443 >> 8) & 0xff,
-			2443 & 0xff,
+			(2444 >> 8) & 0xff,
+			2444 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38551,8 +38557,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2446 >> 8) & 0xff,
-			2446 & 0xff,
+			(2447 >> 8) & 0xff,
+			2447 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38570,8 +38576,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2449 >> 8) & 0xff,
-			2449 & 0xff,
+			(2450 >> 8) & 0xff,
+			2450 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38589,8 +38595,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2452 >> 8) & 0xff,
-			2452 & 0xff,
+			(2453 >> 8) & 0xff,
+			2453 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_SKIP,
@@ -38602,8 +38608,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2456 >> 8) & 0xff,
-			2456 & 0xff,
+			(2457 >> 8) & 0xff,
+			2457 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38621,8 +38627,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2459 >> 8) & 0xff,
-			2459 & 0xff,
+			(2460 >> 8) & 0xff,
+			2460 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38640,8 +38646,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2462 >> 8) & 0xff,
-			2462 & 0xff,
+			(2463 >> 8) & 0xff,
+			2463 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38659,8 +38665,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2465 >> 8) & 0xff,
-			2465 & 0xff,
+			(2466 >> 8) & 0xff,
+			2466 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_SKIP,
@@ -38672,8 +38678,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2469 >> 8) & 0xff,
-			2469 & 0xff,
+			(2470 >> 8) & 0xff,
+			2470 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38691,8 +38697,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2472 >> 8) & 0xff,
-			2472 & 0xff,
+			(2473 >> 8) & 0xff,
+			2473 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38710,8 +38716,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2475 >> 8) & 0xff,
-			2475 & 0xff,
+			(2476 >> 8) & 0xff,
+			2476 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -38729,8 +38735,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2478 >> 8) & 0xff,
-			2478 & 0xff,
+			(2479 >> 8) & 0xff,
+			2479 & 0xff,
 			(1 >> 8) & 0xff,
 			1 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_SKIP,
@@ -38742,8 +38748,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2500 >> 8) & 0xff,
-		2500 & 0xff,
+		(2501 >> 8) & 0xff,
+		2501 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -38757,8 +38763,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2511 >> 8) & 0xff,
-		2511 & 0xff,
+		(2512 >> 8) & 0xff,
+		2512 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -38772,8 +38778,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2517 >> 8) & 0xff,
-		2517 & 0xff,
+		(2518 >> 8) & 0xff,
+		2518 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -38787,8 +38793,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2523 >> 8) & 0xff,
-		2523 & 0xff,
+		(2524 >> 8) & 0xff,
+		2524 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -38802,8 +38808,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2529 >> 8) & 0xff,
-		2529 & 0xff,
+		(2530 >> 8) & 0xff,
+		2530 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -38817,8 +38823,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2535 >> 8) & 0xff,
-		2535 & 0xff,
+		(2536 >> 8) & 0xff,
+		2536 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -38832,8 +38838,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2541 >> 8) & 0xff,
-		2541 & 0xff,
+		(2542 >> 8) & 0xff,
+		2542 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -38847,8 +38853,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2547 >> 8) & 0xff,
-		2547 & 0xff,
+		(2548 >> 8) & 0xff,
+		2548 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -38862,8 +38868,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2552 >> 8) & 0xff,
-		2552 & 0xff,
+		(2553 >> 8) & 0xff,
+		2553 & 0xff,
 		(2 >> 8) & 0xff,
 		2 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -38877,8 +38883,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2557 >> 8) & 0xff,
-		2557 & 0xff,
+		(2558 >> 8) & 0xff,
+		2558 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -38892,8 +38898,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2563 >> 8) & 0xff,
-		2563 & 0xff,
+		(2564 >> 8) & 0xff,
+		2564 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -38907,8 +38913,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2570 >> 8) & 0xff,
-		2570 & 0xff,
+		(2571 >> 8) & 0xff,
+		2571 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -38922,8 +38928,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2578 >> 8) & 0xff,
-		2578 & 0xff,
+		(2579 >> 8) & 0xff,
+		2579 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -38940,8 +38946,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2582 >> 8) & 0xff,
-		2582 & 0xff,
+		(2583 >> 8) & 0xff,
+		2583 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -38958,8 +38964,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2586 >> 8) & 0xff,
-		2586 & 0xff,
+		(2587 >> 8) & 0xff,
+		2587 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -38973,8 +38979,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2594 >> 8) & 0xff,
-		2594 & 0xff,
+		(2595 >> 8) & 0xff,
+		2595 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -38988,8 +38994,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2601 >> 8) & 0xff,
-		2601 & 0xff,
+		(2602 >> 8) & 0xff,
+		2602 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -39006,8 +39012,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2604 >> 8) & 0xff,
-		2604 & 0xff,
+		(2605 >> 8) & 0xff,
+		2605 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -39024,8 +39030,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2607 >> 8) & 0xff,
-		2607 & 0xff,
+		(2608 >> 8) & 0xff,
+		2608 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -39039,8 +39045,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2613 >> 8) & 0xff,
-		2613 & 0xff,
+		(2614 >> 8) & 0xff,
+		2614 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -39057,8 +39063,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2616 >> 8) & 0xff,
-		2616 & 0xff,
+		(2617 >> 8) & 0xff,
+		2617 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -39075,8 +39081,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2619 >> 8) & 0xff,
-		2619 & 0xff,
+		(2620 >> 8) & 0xff,
+		2620 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -39090,8 +39096,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2625 >> 8) & 0xff,
-		2625 & 0xff,
+		(2626 >> 8) & 0xff,
+		2626 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -39108,8 +39114,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2628 >> 8) & 0xff,
-		2628 & 0xff,
+		(2629 >> 8) & 0xff,
+		2629 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -39126,8 +39132,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2631 >> 8) & 0xff,
-		2631 & 0xff,
+		(2632 >> 8) & 0xff,
+		2632 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -39141,8 +39147,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2637 >> 8) & 0xff,
-		2637 & 0xff,
+		(2638 >> 8) & 0xff,
+		2638 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -39159,8 +39165,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2640 >> 8) & 0xff,
-		2640 & 0xff,
+		(2641 >> 8) & 0xff,
+		2641 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -39177,8 +39183,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2643 >> 8) & 0xff,
-		2643 & 0xff,
+		(2644 >> 8) & 0xff,
+		2644 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -39192,8 +39198,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2649 >> 8) & 0xff,
-		2649 & 0xff,
+		(2650 >> 8) & 0xff,
+		2650 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -39210,8 +39216,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2652 >> 8) & 0xff,
-		2652 & 0xff,
+		(2653 >> 8) & 0xff,
+		2653 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -39228,8 +39234,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2655 >> 8) & 0xff,
-		2655 & 0xff,
+		(2656 >> 8) & 0xff,
+		2656 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -39243,8 +39249,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2661 >> 8) & 0xff,
-		2661 & 0xff,
+		(2662 >> 8) & 0xff,
+		2662 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -39261,8 +39267,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2664 >> 8) & 0xff,
-		2664 & 0xff,
+		(2665 >> 8) & 0xff,
+		2665 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -39279,8 +39285,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2667 >> 8) & 0xff,
-		2667 & 0xff,
+		(2668 >> 8) & 0xff,
+		2668 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -39294,8 +39300,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2673 >> 8) & 0xff,
-		2673 & 0xff,
+		(2674 >> 8) & 0xff,
+		2674 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -39312,8 +39318,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2676 >> 8) & 0xff,
-		2676 & 0xff,
+		(2677 >> 8) & 0xff,
+		2677 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -39330,8 +39336,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2679 >> 8) & 0xff,
-		2679 & 0xff,
+		(2680 >> 8) & 0xff,
+		2680 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -39345,8 +39351,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2712 >> 8) & 0xff,
-			2712 & 0xff,
+			(2713 >> 8) & 0xff,
+			2713 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -39358,8 +39364,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2720 >> 8) & 0xff,
-			2720 & 0xff,
+			(2721 >> 8) & 0xff,
+			2721 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -39374,8 +39380,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2759 >> 8) & 0xff,
-			2759 & 0xff,
+			(2760 >> 8) & 0xff,
+			2760 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -39387,8 +39393,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2765 >> 8) & 0xff,
-			2765 & 0xff,
+			(2766 >> 8) & 0xff,
+			2766 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -39403,8 +39409,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2771 >> 8) & 0xff,
-			2771 & 0xff,
+			(2772 >> 8) & 0xff,
+			2772 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -39416,8 +39422,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2777 >> 8) & 0xff,
-			2777 & 0xff,
+			(2778 >> 8) & 0xff,
+			2778 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -39432,8 +39438,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2783 >> 8) & 0xff,
-			2783 & 0xff,
+			(2784 >> 8) & 0xff,
+			2784 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -39445,8 +39451,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2789 >> 8) & 0xff,
-			2789 & 0xff,
+			(2790 >> 8) & 0xff,
+			2790 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -39461,8 +39467,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2795 >> 8) & 0xff,
-			2795 & 0xff,
+			(2796 >> 8) & 0xff,
+			2796 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -39474,8 +39480,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2801 >> 8) & 0xff,
-			2801 & 0xff,
+			(2802 >> 8) & 0xff,
+			2802 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -39490,8 +39496,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2807 >> 8) & 0xff,
-			2807 & 0xff,
+			(2808 >> 8) & 0xff,
+			2808 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -39503,8 +39509,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2813 >> 8) & 0xff,
-			2813 & 0xff,
+			(2814 >> 8) & 0xff,
+			2814 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -39519,8 +39525,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2818 >> 8) & 0xff,
-			2818 & 0xff,
+			(2819 >> 8) & 0xff,
+			2819 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -39532,8 +39538,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2822 >> 8) & 0xff,
-			2822 & 0xff,
+			(2823 >> 8) & 0xff,
+			2823 & 0xff,
 			(2 >> 8) & 0xff,
 			2 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -39548,8 +39554,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2827 >> 8) & 0xff,
-			2827 & 0xff,
+			(2828 >> 8) & 0xff,
+			2828 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -39561,8 +39567,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2833 >> 8) & 0xff,
-			2833 & 0xff,
+			(2834 >> 8) & 0xff,
+			2834 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -39577,8 +39583,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2839 >> 8) & 0xff,
-			2839 & 0xff,
+			(2840 >> 8) & 0xff,
+			2840 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -39590,8 +39596,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2845 >> 8) & 0xff,
-			2845 & 0xff,
+			(2846 >> 8) & 0xff,
+			2846 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -39606,8 +39612,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2852 >> 8) & 0xff,
-			2852 & 0xff,
+			(2853 >> 8) & 0xff,
+			2853 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -39619,8 +39625,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2860 >> 8) & 0xff,
-			2860 & 0xff,
+			(2861 >> 8) & 0xff,
+			2861 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -39635,8 +39641,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2868 >> 8) & 0xff,
-			2868 & 0xff,
+			(2869 >> 8) & 0xff,
+			2869 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -39651,8 +39657,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2872 >> 8) & 0xff,
-			2872 & 0xff,
+			(2873 >> 8) & 0xff,
+			2873 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -39667,8 +39673,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2876 >> 8) & 0xff,
-			2876 & 0xff,
+			(2877 >> 8) & 0xff,
+			2877 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -39680,8 +39686,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2884 >> 8) & 0xff,
-			2884 & 0xff,
+			(2885 >> 8) & 0xff,
+			2885 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -39699,8 +39705,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2888 >> 8) & 0xff,
-			2888 & 0xff,
+			(2889 >> 8) & 0xff,
+			2889 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -39718,8 +39724,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2892 >> 8) & 0xff,
-			2892 & 0xff,
+			(2893 >> 8) & 0xff,
+			2893 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -39734,8 +39740,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2900 >> 8) & 0xff,
-			2900 & 0xff,
+			(2901 >> 8) & 0xff,
+			2901 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -39747,8 +39753,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2908 >> 8) & 0xff,
-			2908 & 0xff,
+			(2909 >> 8) & 0xff,
+			2909 & 0xff,
 			(4 >> 8) & 0xff,
 			4 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -39763,8 +39769,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2915 >> 8) & 0xff,
-			2915 & 0xff,
+			(2916 >> 8) & 0xff,
+			2916 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -39776,8 +39782,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2921 >> 8) & 0xff,
-			2921 & 0xff,
+			(2922 >> 8) & 0xff,
+			2922 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -39792,8 +39798,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2927 >> 8) & 0xff,
-			2927 & 0xff,
+			(2928 >> 8) & 0xff,
+			2928 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -39805,8 +39811,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2933 >> 8) & 0xff,
-			2933 & 0xff,
+			(2934 >> 8) & 0xff,
+			2934 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -39821,8 +39827,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2939 >> 8) & 0xff,
-			2939 & 0xff,
+			(2940 >> 8) & 0xff,
+			2940 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -39834,8 +39840,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2945 >> 8) & 0xff,
-			2945 & 0xff,
+			(2946 >> 8) & 0xff,
+			2946 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -39850,8 +39856,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2951 >> 8) & 0xff,
-			2951 & 0xff,
+			(2952 >> 8) & 0xff,
+			2952 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -39863,8 +39869,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2957 >> 8) & 0xff,
-			2957 & 0xff,
+			(2958 >> 8) & 0xff,
+			2958 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -39879,8 +39885,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2963 >> 8) & 0xff,
-			2963 & 0xff,
+			(2964 >> 8) & 0xff,
+			2964 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -39895,8 +39901,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2966 >> 8) & 0xff,
-			2966 & 0xff,
+			(2967 >> 8) & 0xff,
+			2967 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -39911,8 +39917,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2969 >> 8) & 0xff,
-			2969 & 0xff,
+			(2970 >> 8) & 0xff,
+			2970 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -39924,8 +39930,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2975 >> 8) & 0xff,
-			2975 & 0xff,
+			(2976 >> 8) & 0xff,
+			2976 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -39943,8 +39949,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2978 >> 8) & 0xff,
-			2978 & 0xff,
+			(2979 >> 8) & 0xff,
+			2979 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -39962,8 +39968,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2981 >> 8) & 0xff,
-			2981 & 0xff,
+			(2982 >> 8) & 0xff,
+			2982 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -39978,8 +39984,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2987 >> 8) & 0xff,
-			2987 & 0xff,
+			(2988 >> 8) & 0xff,
+			2988 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -39994,8 +40000,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2990 >> 8) & 0xff,
-			2990 & 0xff,
+			(2991 >> 8) & 0xff,
+			2991 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -40010,8 +40016,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2993 >> 8) & 0xff,
-			2993 & 0xff,
+			(2994 >> 8) & 0xff,
+			2994 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -40023,8 +40029,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(2999 >> 8) & 0xff,
-			2999 & 0xff,
+			(3000 >> 8) & 0xff,
+			3000 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -40042,8 +40048,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(3002 >> 8) & 0xff,
-			3002 & 0xff,
+			(3003 >> 8) & 0xff,
+			3003 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -40061,8 +40067,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(3005 >> 8) & 0xff,
-			3005 & 0xff,
+			(3006 >> 8) & 0xff,
+			3006 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -40077,8 +40083,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(3011 >> 8) & 0xff,
-			3011 & 0xff,
+			(3012 >> 8) & 0xff,
+			3012 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -40093,8 +40099,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(3014 >> 8) & 0xff,
-			3014 & 0xff,
+			(3015 >> 8) & 0xff,
+			3015 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -40109,8 +40115,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(3017 >> 8) & 0xff,
-			3017 & 0xff,
+			(3018 >> 8) & 0xff,
+			3018 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -40122,8 +40128,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(3023 >> 8) & 0xff,
-			3023 & 0xff,
+			(3024 >> 8) & 0xff,
+			3024 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -40141,8 +40147,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(3026 >> 8) & 0xff,
-			3026 & 0xff,
+			(3027 >> 8) & 0xff,
+			3027 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -40160,8 +40166,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(3029 >> 8) & 0xff,
-			3029 & 0xff,
+			(3030 >> 8) & 0xff,
+			3030 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -40176,8 +40182,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(3035 >> 8) & 0xff,
-			3035 & 0xff,
+			(3036 >> 8) & 0xff,
+			3036 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -40192,8 +40198,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(3038 >> 8) & 0xff,
-			3038 & 0xff,
+			(3039 >> 8) & 0xff,
+			3039 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -40208,8 +40214,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(3041 >> 8) & 0xff,
-			3041 & 0xff,
+			(3042 >> 8) & 0xff,
+			3042 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -40221,8 +40227,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(3047 >> 8) & 0xff,
-			3047 & 0xff,
+			(3048 >> 8) & 0xff,
+			3048 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -40240,8 +40246,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(3050 >> 8) & 0xff,
-			3050 & 0xff,
+			(3051 >> 8) & 0xff,
+			3051 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -40259,8 +40265,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(3053 >> 8) & 0xff,
-			3053 & 0xff,
+			(3054 >> 8) & 0xff,
+			3054 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -40275,8 +40281,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(3059 >> 8) & 0xff,
-			3059 & 0xff,
+			(3060 >> 8) & 0xff,
+			3060 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -40291,8 +40297,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(3062 >> 8) & 0xff,
-			3062 & 0xff,
+			(3063 >> 8) & 0xff,
+			3063 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -40307,8 +40313,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(3065 >> 8) & 0xff,
-			3065 & 0xff,
+			(3066 >> 8) & 0xff,
+			3066 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_ONES,
@@ -40320,8 +40326,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(3071 >> 8) & 0xff,
-			3071 & 0xff,
+			(3072 >> 8) & 0xff,
+			3072 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -40339,8 +40345,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(3074 >> 8) & 0xff,
-			3074 & 0xff,
+			(3075 >> 8) & 0xff,
+			3075 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -40358,8 +40364,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_key_ext_list[] = {
 		.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 		.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 		.field_opr1 = {
-			(3077 >> 8) & 0xff,
-			3077 & 0xff,
+			(3078 >> 8) & 0xff,
+			3078 & 0xff,
 			(3 >> 8) & 0xff,
 			3 & 0xff},
 		.field_src2 = BNXT_ULP_FIELD_SRC_HF,
@@ -43408,8 +43414,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1586 >> 8) & 0xff,
-		1586 & 0xff,
+		(1587 >> 8) & 0xff,
+		1587 & 0xff,
 		(1 >> 8) & 0xff,
 		1 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -43447,8 +43453,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1587 >> 8) & 0xff,
-		1587 & 0xff,
+		(1588 >> 8) & 0xff,
+		1588 & 0xff,
 		(1 >> 8) & 0xff,
 		1 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -43462,8 +43468,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1588 >> 8) & 0xff,
-		1588 & 0xff,
+		(1589 >> 8) & 0xff,
+		1589 & 0xff,
 		(1 >> 8) & 0xff,
 		1 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -43489,8 +43495,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1589 >> 8) & 0xff,
-		1589 & 0xff,
+		(1590 >> 8) & 0xff,
+		1590 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -43504,8 +43510,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1592 >> 8) & 0xff,
-		1592 & 0xff,
+		(1593 >> 8) & 0xff,
+		1593 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_NEXT,
@@ -43550,8 +43556,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1597 >> 8) & 0xff,
-		1597 & 0xff,
+		(1598 >> 8) & 0xff,
+		1598 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -43583,8 +43589,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1601 >> 8) & 0xff,
-		1601 & 0xff,
+		(1602 >> 8) & 0xff,
+		1602 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -43607,8 +43613,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1609 >> 8) & 0xff,
-		1609 & 0xff,
+		(1610 >> 8) & 0xff,
+		1610 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -43628,8 +43634,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1613 >> 8) & 0xff,
-		1613 & 0xff,
+		(1614 >> 8) & 0xff,
+		1614 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -43652,8 +43658,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1619 >> 8) & 0xff,
-		1619 & 0xff,
+		(1620 >> 8) & 0xff,
+		1620 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -43676,8 +43682,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1625 >> 8) & 0xff,
-		1625 & 0xff,
+		(1626 >> 8) & 0xff,
+		1626 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -43694,8 +43700,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1631 >> 8) & 0xff,
-		1631 & 0xff,
+		(1632 >> 8) & 0xff,
+		1632 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -43718,8 +43724,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1637 >> 8) & 0xff,
-		1637 & 0xff,
+		(1638 >> 8) & 0xff,
+		1638 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -43802,8 +43808,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1643 >> 8) & 0xff,
-		1643 & 0xff,
+		(1644 >> 8) & 0xff,
+		1644 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -43820,8 +43826,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1649 >> 8) & 0xff,
-		1649 & 0xff,
+		(1650 >> 8) & 0xff,
+		1650 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -43886,8 +43892,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1655 >> 8) & 0xff,
-		1655 & 0xff,
+		(1656 >> 8) & 0xff,
+		1656 & 0xff,
 		(2 >> 8) & 0xff,
 		2 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -43940,8 +43946,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1659 >> 8) & 0xff,
-		1659 & 0xff,
+		(1660 >> 8) & 0xff,
+		1660 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -43958,8 +43964,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1665 >> 8) & 0xff,
-		1665 & 0xff,
+		(1666 >> 8) & 0xff,
+		1666 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -44006,8 +44012,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1671 >> 8) & 0xff,
-		1671 & 0xff,
+		(1672 >> 8) & 0xff,
+		1672 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -44042,8 +44048,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1679 >> 8) & 0xff,
-		1679 & 0xff,
+		(1680 >> 8) & 0xff,
+		1680 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -44066,8 +44072,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1695 >> 8) & 0xff,
-		1695 & 0xff,
+		(1696 >> 8) & 0xff,
+		1696 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -44090,8 +44096,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1703 >> 8) & 0xff,
-		1703 & 0xff,
+		(1704 >> 8) & 0xff,
+		1704 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -44114,8 +44120,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1719 >> 8) & 0xff,
-		1719 & 0xff,
+		(1720 >> 8) & 0xff,
+		1720 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -44138,8 +44144,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1735 >> 8) & 0xff,
-		1735 & 0xff,
+		(1736 >> 8) & 0xff,
+		1736 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -44156,8 +44162,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1751 >> 8) & 0xff,
-		1751 & 0xff,
+		(1752 >> 8) & 0xff,
+		1752 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -44180,8 +44186,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1767 >> 8) & 0xff,
-		1767 & 0xff,
+		(1768 >> 8) & 0xff,
+		1768 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -44264,8 +44270,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1783 >> 8) & 0xff,
-		1783 & 0xff,
+		(1784 >> 8) & 0xff,
+		1784 & 0xff,
 		(1 >> 8) & 0xff,
 		1 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_NEXT,
@@ -44283,8 +44289,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(1790 >> 8) & 0xff,
-		1790 & 0xff,
+		(1791 >> 8) & 0xff,
+		1791 & 0xff,
 		(1 >> 8) & 0xff,
 		1 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_NEXT,
@@ -45167,8 +45173,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2483 >> 8) & 0xff,
-		2483 & 0xff,
+		(2484 >> 8) & 0xff,
+		2484 & 0xff,
 		(1 >> 8) & 0xff,
 		1 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -45206,8 +45212,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2484 >> 8) & 0xff,
-		2484 & 0xff,
+		(2485 >> 8) & 0xff,
+		2485 & 0xff,
 		(1 >> 8) & 0xff,
 		1 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -45221,8 +45227,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2485 >> 8) & 0xff,
-		2485 & 0xff,
+		(2486 >> 8) & 0xff,
+		2486 & 0xff,
 		(1 >> 8) & 0xff,
 		1 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -45248,8 +45254,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2486 >> 8) & 0xff,
-		2486 & 0xff,
+		(2487 >> 8) & 0xff,
+		2487 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -45263,8 +45269,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2489 >> 8) & 0xff,
-		2489 & 0xff,
+		(2490 >> 8) & 0xff,
+		2490 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -45308,8 +45314,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2492 >> 8) & 0xff,
-		2492 & 0xff,
+		(2493 >> 8) & 0xff,
+		2493 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -45341,8 +45347,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2496 >> 8) & 0xff,
-		2496 & 0xff,
+		(2497 >> 8) & 0xff,
+		2497 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -45365,8 +45371,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2504 >> 8) & 0xff,
-		2504 & 0xff,
+		(2505 >> 8) & 0xff,
+		2505 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -45386,8 +45392,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2508 >> 8) & 0xff,
-		2508 & 0xff,
+		(2509 >> 8) & 0xff,
+		2509 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -45410,8 +45416,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2514 >> 8) & 0xff,
-		2514 & 0xff,
+		(2515 >> 8) & 0xff,
+		2515 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -45434,8 +45440,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2520 >> 8) & 0xff,
-		2520 & 0xff,
+		(2521 >> 8) & 0xff,
+		2521 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -45452,8 +45458,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2526 >> 8) & 0xff,
-		2526 & 0xff,
+		(2527 >> 8) & 0xff,
+		2527 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -45476,8 +45482,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2532 >> 8) & 0xff,
-		2532 & 0xff,
+		(2533 >> 8) & 0xff,
+		2533 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -45560,8 +45566,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2538 >> 8) & 0xff,
-		2538 & 0xff,
+		(2539 >> 8) & 0xff,
+		2539 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -45578,8 +45584,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2544 >> 8) & 0xff,
-		2544 & 0xff,
+		(2545 >> 8) & 0xff,
+		2545 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -45644,8 +45650,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2550 >> 8) & 0xff,
-		2550 & 0xff,
+		(2551 >> 8) & 0xff,
+		2551 & 0xff,
 		(2 >> 8) & 0xff,
 		2 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -45698,8 +45704,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2554 >> 8) & 0xff,
-		2554 & 0xff,
+		(2555 >> 8) & 0xff,
+		2555 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -45716,8 +45722,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2560 >> 8) & 0xff,
-		2560 & 0xff,
+		(2561 >> 8) & 0xff,
+		2561 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -45764,8 +45770,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2566 >> 8) & 0xff,
-		2566 & 0xff,
+		(2567 >> 8) & 0xff,
+		2567 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -45800,8 +45806,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2574 >> 8) & 0xff,
-		2574 & 0xff,
+		(2575 >> 8) & 0xff,
+		2575 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -45824,8 +45830,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2590 >> 8) & 0xff,
-		2590 & 0xff,
+		(2591 >> 8) & 0xff,
+		2591 & 0xff,
 		(4 >> 8) & 0xff,
 		4 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -45848,8 +45854,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2598 >> 8) & 0xff,
-		2598 & 0xff,
+		(2599 >> 8) & 0xff,
+		2599 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -45872,8 +45878,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2610 >> 8) & 0xff,
-		2610 & 0xff,
+		(2611 >> 8) & 0xff,
+		2611 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -45896,8 +45902,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2622 >> 8) & 0xff,
-		2622 & 0xff,
+		(2623 >> 8) & 0xff,
+		2623 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -45914,8 +45920,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2634 >> 8) & 0xff,
-		2634 & 0xff,
+		(2635 >> 8) & 0xff,
+		2635 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -45938,8 +45944,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2646 >> 8) & 0xff,
-		2646 & 0xff,
+		(2647 >> 8) & 0xff,
+		2647 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -46022,8 +46028,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2658 >> 8) & 0xff,
-		2658 & 0xff,
+		(2659 >> 8) & 0xff,
+		2659 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
@@ -46040,8 +46046,8 @@ struct bnxt_ulp_mapper_field_info ulp_thor_class_result_field_list[] = {
 	.field_opc = BNXT_ULP_FIELD_OPC_TERNARY_LIST,
 	.field_src1 = BNXT_ULP_FIELD_SRC_LIST_AND,
 	.field_opr1 = {
-		(2670 >> 8) & 0xff,
-		2670 & 0xff,
+		(2671 >> 8) & 0xff,
+		2671 & 0xff,
 		(3 >> 8) & 0xff,
 		3 & 0xff},
 	.field_src2 = BNXT_ULP_FIELD_SRC_CONST,
diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.c b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
index b35821eb2a..9cbc894fd2 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
@@ -654,6 +654,12 @@ ulp_mapper_priority_opc_process(struct bnxt_ulp_mapper_parms *parms,
 		rc = -EINVAL;
 		break;
 	}
+#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
+#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_MAPPER
+	if (!rc)
+		BNXT_DRV_DBG(DEBUG, "Tcam priority = 0x%x\n", *priority);
+#endif
+#endif
 	return rc;
 }
 
diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_struct.h b/drivers/net/bnxt/tf_ulp/ulp_template_struct.h
index 675363cdd6..fd14b5bf99 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_template_struct.h
+++ b/drivers/net/bnxt/tf_ulp/ulp_template_struct.h
@@ -396,6 +396,9 @@ struct bnxt_ulp_resource_resv_info {
 struct bnxt_ulp_app_capabilities_info {
 	uint8_t				app_id;
 	uint32_t			default_priority;
+	uint32_t			max_def_priority;
+	uint32_t			min_flow_priority;
+	uint32_t			max_flow_priority;
 	uint32_t			vxlan_port;
 	uint32_t			vxlan_ip_port;
 	uint32_t			ecpri_udp_port;
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 34/47] net/bnxt: tf_ulp: add rte_mtr support for Thor2
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (23 preceding siblings ...)
  2024-10-01  5:58 ` [PATCH v3 32/47] net/bnxt: tf_ulp: add support for flow priority Sriharsha Basavapatna
@ 2024-10-01  5:58 ` Sriharsha Basavapatna
  2024-10-01  5:58 ` [PATCH v3 35/47] net/bnxt: tf_ulp: TF support flow scale query Sriharsha Basavapatna
                   ` (8 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:58 UTC (permalink / raw)
  To: dev; +Cc: Jay Ding, Sriharsha Basavapatna, Michael Baucom, Ajit Khaparde

From: Jay Ding <jay.ding@broadcom.com>

1. Implement Thor2 meter template tables
2. Add Thor2 meter support in ULP
3. Make rte_mtr API implementation device independent
   to adapt Thor2 meter hw change
4. Fix the round issue in xir calculation

Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Michael Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/bnxt_ulp.h       |  12 +-
 drivers/net/bnxt/tf_ulp/bnxt_ulp_meter.c | 273 +++++++----------------
 drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c    | 113 +++++++++-
 drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c   |  47 +++-
 drivers/net/bnxt/tf_ulp/ulp_rte_parser.c |  12 +-
 5 files changed, 246 insertions(+), 211 deletions(-)

diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.h b/drivers/net/bnxt/tf_ulp/bnxt_ulp.h
index d62a9df5f0..4868339478 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.h
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.h
@@ -12,6 +12,7 @@
 
 #include "rte_version.h"
 #include "rte_ethdev.h"
+#include "rte_mtr.h"
 
 #include "bnxt.h"
 #include "ulp_template_db_enum.h"
@@ -231,6 +232,10 @@ struct bnxt_ulp_core_ops {
 	int32_t
 	(*ulp_vfr_session_fid_rem)(struct bnxt_ulp_context *ulp_ctx,
 				  uint16_t rep_fid);
+
+	int32_t
+	(*ulp_mtr_cap_get)(struct bnxt *bp,
+			   struct rte_mtr_capabilities *cap);
 };
 
 extern const struct bnxt_ulp_core_ops bnxt_ulp_tf_core_ops;
@@ -566,9 +571,6 @@ bnxt_ulp_cntxt_ecpri_udp_port_set(struct bnxt_ulp_context *ulp_ctx,
 unsigned int
 bnxt_ulp_cntxt_ecpri_udp_port_get(struct bnxt_ulp_context *ulp_ctx);
 
-int32_t
-bnxt_flow_meter_init(struct bnxt *bp);
-
 uint32_t
 bnxt_ulp_cntxt_convert_dev_id(uint32_t ulp_dev_id);
 
@@ -618,4 +620,8 @@ bnxt_ulp_vfr_session_fid_add(struct bnxt_ulp_context *ulp_ctx,
 int32_t
 bnxt_ulp_vfr_session_fid_rem(struct bnxt_ulp_context *ulp_ctx,
 			     uint16_t vfr_fid);
+
+int32_t
+bnxt_flow_mtr_init(struct bnxt *bp __rte_unused);
+
 #endif /* _BNXT_ULP_H_ */
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_meter.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_meter.c
index 61d006fc08..37b5cc4dfb 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_meter.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_meter.c
@@ -40,122 +40,24 @@
 /**
  * Meter init status
  */
-int bnxt_meter_initialized;
+int bnxt_mtr_initialized;
 
-/**
- * Internal api to config global config.
- * returns 0 on success.
- */
-static int32_t
-bnxt_meter_global_cfg_update(struct bnxt *bp,
-			     enum tf_dir dir,
-			     enum tf_global_config_type type,
-			     uint32_t offset,
-			     uint32_t value,
-			     uint32_t set_flag)
-{
-	uint32_t global_cfg = 0;
-	struct tf_global_cfg_parms parms = { 0 };
-	struct tf *tfp;
-	int32_t rc = 0;
-
-	parms.dir = dir,
-	parms.type = type,
-	parms.offset = offset,
-	parms.config = (uint8_t *)&global_cfg,
-	parms.config_sz_in_bytes = sizeof(global_cfg);
-
-	tfp = bnxt_ulp_bp_tfp_get(bp, BNXT_ULP_SESSION_TYPE_DEFAULT);
-	rc = tf_get_global_cfg(tfp, &parms);
-	if (rc) {
-		BNXT_DRV_DBG(ERR, "Failed to get global cfg 0x%x rc:%d\n",
-			     type, rc);
-		return rc;
-	}
-
-	if (set_flag)
-		global_cfg |= value;
-	else
-		global_cfg &= ~value;
-
-	rc = tf_set_global_cfg(tfp, &parms);
-	if (rc) {
-		BNXT_DRV_DBG(ERR, "Failed to set global cfg 0x%x rc:%d\n",
-			     type, rc);
-		return rc;
-	}
-	return rc;
-}
-
-/**
- * When a port is initialized by dpdk. This functions is called
- * to enable the meter and initializes the meter global configurations.
- */
-#define BNXT_THOR_FMTCR_NUM_MET_MET_1K (0x7UL << 20)
-#define BNXT_THOR_FMTCR_CNTRS_ENABLE (0x1UL << 25)
-#define BNXT_THOR_FMTCR_INTERVAL_1K (1024)
 int32_t
-bnxt_flow_meter_init(struct bnxt *bp)
+bnxt_flow_mtr_init(struct bnxt *bp __rte_unused)
 {
-	int rc = 0;
-
-	/*
-	 * Enable metering. Set the meter global configuration register.
-	 * Set number of meter to 1K. Disable the drop counter for now.
-	 */
-	rc = bnxt_meter_global_cfg_update(bp, TF_DIR_RX, TF_METER_CFG,
-					  0,
-					  BNXT_THOR_FMTCR_NUM_MET_MET_1K,
-					  1);
-	if (rc) {
-		BNXT_DRV_DBG(ERR, "Failed to set rx meter configuration\n");
-		goto jump_to_error;
-	}
-
-	rc = bnxt_meter_global_cfg_update(bp, TF_DIR_TX, TF_METER_CFG,
-					0,
-					BNXT_THOR_FMTCR_NUM_MET_MET_1K,
-					1);
-	if (rc) {
-		BNXT_DRV_DBG(ERR, "Failed to set tx meter configuration\n");
-		goto jump_to_error;
-	}
-
 	/*
-	 * Set meter refresh rate to 1024 clock cycle. This value works for
-	 * most bit rates especially for high rates.
-	 */
-	rc = bnxt_meter_global_cfg_update(bp, TF_DIR_RX, TF_METER_INTERVAL_CFG,
-					  0,
-					  BNXT_THOR_FMTCR_INTERVAL_1K,
-					  1);
-	if (rc) {
-		BNXT_DRV_DBG(ERR, "Failed to set rx meter interval\n");
-		goto jump_to_error;
-	}
-
-	rc = bnxt_meter_global_cfg_update(bp, TF_DIR_TX, TF_METER_INTERVAL_CFG,
-					  0,
-					  BNXT_THOR_FMTCR_INTERVAL_1K,
-					  1);
-	if (rc) {
-		BNXT_DRV_DBG(ERR, "Failed to set tx meter interval\n");
-		goto jump_to_error;
-	}
-
-	bnxt_meter_initialized = 1;
+	 ** Enable metering. The meter refresh interval is set to 1K
+	 ** in FW. The meters is set to drop packet and meter cache is
+	 ** enabled by HW default.
+	 **/
+	bnxt_mtr_initialized = 1;
 	BNXT_DRV_DBG(DEBUG, "Bnxt flow meter has been initialized\n");
-	return rc;
-
-jump_to_error:
-	return rc;
+	return 0;
 }
 
 /**
  * Get meter capabilities.
  */
-#define MAX_FLOW_PER_METER 1024
-#define MAX_METER_RATE_100GBPS ((1ULL << 30) * 100 / 8)
 static int
 bnxt_flow_mtr_cap_get(struct rte_eth_dev *dev,
 		      struct rte_mtr_capabilities *cap,
@@ -163,11 +65,9 @@ bnxt_flow_mtr_cap_get(struct rte_eth_dev *dev,
 {
 	struct bnxt *bp = dev->data->dev_private;
 	uint32_t ulp_dev_id = BNXT_ULP_DEVICE_ID_LAST;
-	struct tf_get_session_info_parms iparms;
-	struct tf *tfp;
 	int32_t rc = 0;
 
-	if (!bnxt_meter_initialized)
+	if (!bnxt_mtr_initialized)
 		return -rte_mtr_error_set(error, ENOTSUP,
 					  RTE_MTR_ERROR_TYPE_UNSPECIFIED,
 					  NULL,
@@ -180,35 +80,12 @@ bnxt_flow_mtr_cap_get(struct rte_eth_dev *dev,
 					  NULL,
 					  "Unable to get device id from ulp");
 
-	/* Get number of meter reserved for this session */
-	memset(&iparms, 0, sizeof(iparms));
-	tfp = bnxt_ulp_bp_tfp_get(bp, BNXT_ULP_SESSION_TYPE_DEFAULT);
-	rc = tf_get_session_info(tfp, &iparms);
-	if (rc != 0)
+	rc = bp->ulp_ctx->ops->ulp_mtr_cap_get(bp, cap);
+	if (rc)
 		return -rte_mtr_error_set(error, ENOTSUP,
 					  RTE_MTR_ERROR_TYPE_UNSPECIFIED,
 					  NULL,
-					  "Failed to get session resource info");
-
-	memset(cap, 0, sizeof(struct rte_mtr_capabilities));
-
-	cap->n_max = iparms.session_info.tbl[TF_DIR_RX].info[TF_TBL_TYPE_METER_INST].stride;
-	if (!cap->n_max)
-		return -rte_mtr_error_set(error, ENOTSUP,
-					  RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
-					  "Meter is not supported");
-
-	cap->srtcm_rfc2697_byte_mode_supported = 1;
-	cap->n_shared_max = cap->n_max;
-	/* No meter is identical */
-	cap->identical = 1;
-	cap->shared_identical = 1;
-	cap->shared_n_flows_per_mtr_max = MAX_FLOW_PER_METER;
-	cap->chaining_n_mtrs_per_flow_max = 1; /* Chaining is not supported. */
-	cap->meter_srtcm_rfc2697_n_max = cap->n_max;
-	cap->meter_rate_max = MAX_METER_RATE_100GBPS;
-	/* No stats supported now */
-	cap->stats_mask = 0;
+					  "Unable to get meter capabilities");
 
 	return 0;
 }
@@ -218,9 +95,8 @@ bnxt_flow_mtr_cap_get(struct rte_eth_dev *dev,
  */
 #define BNXT_CPU_CLOCK 800
 #define MEGA 1000000
-#define NUM_BIT_PER_BYTE 8
 static inline void
-bnxt_ulp_flow_meter_xir_calc(int64_t xir, uint32_t *reg)
+bnxt_ulp_flow_mtr_xir_calc(int64_t xir, uint32_t *reg)
 {
 	int64_t temp;
 	uint16_t m = 0;
@@ -248,7 +124,7 @@ bnxt_ulp_flow_meter_xir_calc(int64_t xir, uint32_t *reg)
 	 *   = round(b*2^(38-e) - 2^11)
 	 *
 	 */
-	m = xir * (1 << (38 - e)) / BNXT_CPU_CLOCK / MEGA - (1 << 11);
+	m = (xir * (1 << (38 - e)) / BNXT_CPU_CLOCK / (MEGA / 10) + 5) / 10  - (1 << 11);
 	*reg = ((m & 0x7FF) << 6) | (e & 0x3F);
 	swap = (uint8_t *)reg;
 	*reg = swap[0] << 16 | swap[1] << 8 | swap[2];
@@ -258,7 +134,7 @@ bnxt_ulp_flow_meter_xir_calc(int64_t xir, uint32_t *reg)
  * Calculate mantissa and exponent for cbs / ebs reg.
  */
 static inline void
-bnxt_ulp_flow_meter_xbs_calc(int64_t xbs, uint16_t *reg)
+bnxt_ulp_flow_mtr_xbs_calc(int64_t xbs, uint16_t *reg)
 {
 	uint16_t m = 0;
 	uint16_t e = 0;
@@ -288,7 +164,7 @@ bnxt_ulp_flow_meter_xbs_calc(int64_t xbs, uint16_t *reg)
  * Parse the meter profile.
  */
 static inline int
-bnxt_ulp_meter_profile_parse(struct ulp_rte_act_prop *act_prop,
+bnxt_ulp_mtr_profile_parse(struct ulp_rte_act_prop *act_prop,
 			     const struct rte_mtr_meter_profile *profile,
 			     struct rte_mtr_error *error)
 {
@@ -357,22 +233,22 @@ bnxt_ulp_meter_profile_parse(struct ulp_rte_act_prop *act_prop,
 					  NULL,
 					  "PIR must be equal to or greater than CIR");
 
-	bnxt_ulp_flow_meter_xir_calc(cir, &cir_reg);
+	bnxt_ulp_flow_mtr_xir_calc(cir, &cir_reg);
 	memcpy(&act_prop->act_details[BNXT_ULP_ACT_PROP_IDX_METER_PROF_CIR],
 	       &cir_reg,
 	       BNXT_ULP_ACT_PROP_SZ_METER_PROF_CIR);
 
-	bnxt_ulp_flow_meter_xir_calc(eir, &eir_reg);
+	bnxt_ulp_flow_mtr_xir_calc(eir, &eir_reg);
 	memcpy(&act_prop->act_details[BNXT_ULP_ACT_PROP_IDX_METER_PROF_EIR],
 	       &eir_reg,
 	       BNXT_ULP_ACT_PROP_SZ_METER_PROF_EIR);
 
-	bnxt_ulp_flow_meter_xbs_calc(cbs, &cbs_reg);
+	bnxt_ulp_flow_mtr_xbs_calc(cbs, &cbs_reg);
 	memcpy(&act_prop->act_details[BNXT_ULP_ACT_PROP_IDX_METER_PROF_CBS],
 	       &cbs_reg,
 	       BNXT_ULP_ACT_PROP_SZ_METER_PROF_CBS);
 
-	bnxt_ulp_flow_meter_xbs_calc(ebs, &ebs_reg);
+	bnxt_ulp_flow_mtr_xbs_calc(ebs, &ebs_reg);
 	memcpy(&act_prop->act_details[BNXT_ULP_ACT_PROP_IDX_METER_PROF_EBS],
 	       &ebs_reg,
 	       BNXT_ULP_ACT_PROP_SZ_METER_PROF_EBS);
@@ -392,8 +268,8 @@ bnxt_ulp_meter_profile_parse(struct ulp_rte_act_prop *act_prop,
  * Add MTR profile.
  */
 static int
-bnxt_flow_meter_profile_add(struct rte_eth_dev *dev,
-			    uint32_t meter_profile_id,
+bnxt_flow_mtr_profile_add(struct rte_eth_dev *dev,
+			    uint32_t mtr_profile_id,
 			    struct rte_mtr_meter_profile *profile,
 			    struct rte_mtr_error *error)
 {
@@ -406,7 +282,7 @@ bnxt_flow_meter_profile_add(struct rte_eth_dev *dev,
 	int ret;
 	uint32_t tmp_profile_id;
 
-	if (!bnxt_meter_initialized)
+	if (!bnxt_mtr_initialized)
 		return -rte_mtr_error_set(error, ENOTSUP,
 					  RTE_MTR_ERROR_TYPE_UNSPECIFIED,
 					  NULL,
@@ -426,12 +302,12 @@ bnxt_flow_meter_profile_add(struct rte_eth_dev *dev,
 	/* not direction from rte_mtr. Set ingress by default */
 	params.dir_attr |= BNXT_ULP_FLOW_ATTR_INGRESS;
 
-	tmp_profile_id = tfp_cpu_to_be_32(meter_profile_id);
+	tmp_profile_id = tfp_cpu_to_be_32(mtr_profile_id);
 	memcpy(&act_prop->act_details[BNXT_ULP_ACT_PROP_IDX_METER_PROF_ID],
 	       &tmp_profile_id,
 	       BNXT_ULP_ACT_PROP_SZ_METER_PROF_ID);
 
-	ret = bnxt_ulp_meter_profile_parse(act_prop, profile, error);
+	ret = bnxt_ulp_mtr_profile_parse(act_prop, profile, error);
 	if (ret)
 		goto parse_error;
 
@@ -478,8 +354,8 @@ bnxt_flow_meter_profile_add(struct rte_eth_dev *dev,
  * Delete meter profile.
  */
 static int
-bnxt_flow_meter_profile_delete(struct rte_eth_dev *dev,
-			       uint32_t meter_profile_id,
+bnxt_flow_mtr_profile_delete(struct rte_eth_dev *dev,
+			       uint32_t mtr_profile_id,
 			       struct rte_mtr_error *error)
 {
 	struct bnxt_ulp_context *ulp_ctx;
@@ -491,7 +367,7 @@ bnxt_flow_meter_profile_delete(struct rte_eth_dev *dev,
 	int ret;
 	uint32_t tmp_profile_id;
 
-	if (!bnxt_meter_initialized)
+	if (!bnxt_mtr_initialized)
 		return -rte_mtr_error_set(error, ENOTSUP,
 					  RTE_MTR_ERROR_TYPE_UNSPECIFIED,
 					  NULL,
@@ -512,7 +388,7 @@ bnxt_flow_meter_profile_delete(struct rte_eth_dev *dev,
 	/* not direction from rte_mtr. Set ingress by default */
 	params.dir_attr |= BNXT_ULP_FLOW_ATTR_INGRESS;
 
-	tmp_profile_id = tfp_cpu_to_be_32(meter_profile_id);
+	tmp_profile_id = tfp_cpu_to_be_32(mtr_profile_id);
 	memcpy(&act_prop->act_details[BNXT_ULP_ACT_PROP_IDX_METER_PROF_ID],
 	       &tmp_profile_id,
 	       BNXT_ULP_ACT_PROP_SZ_METER_PROF_ID);
@@ -547,7 +423,7 @@ bnxt_flow_meter_profile_delete(struct rte_eth_dev *dev,
 		goto parse_error;
 
 	BNXT_DRV_DBG(DEBUG, "Bnxt flow meter profile %d deleted\n",
-		     meter_profile_id);
+		     mtr_profile_id);
 
 	return 0;
 
@@ -562,7 +438,7 @@ bnxt_flow_meter_profile_delete(struct rte_eth_dev *dev,
  * Create meter.
  */
 static int
-bnxt_flow_meter_create(struct rte_eth_dev *dev, uint32_t meter_id,
+bnxt_flow_mtr_create(struct rte_eth_dev *dev, uint32_t mtr_id,
 		       struct rte_mtr_params *params, int shared __rte_unused,
 		       struct rte_mtr_error *error)
 {
@@ -572,11 +448,11 @@ bnxt_flow_meter_create(struct rte_eth_dev *dev, uint32_t meter_id,
 	struct bnxt_ulp_mapper_parms mparms = { 0 };
 	uint32_t act_tid;
 	uint16_t func_id;
-	bool meter_en = params->meter_enable ? true : false;
+	bool mtr_en = params->meter_enable ? true : false;
 	int ret;
-	uint32_t tmp_meter_id, tmp_profile_id;
+	uint32_t tmp_mtr_id, tmp_profile_id;
 
-	if (!bnxt_meter_initialized)
+	if (!bnxt_mtr_initialized)
 		return -rte_mtr_error_set(error, ENOTSUP,
 					  RTE_MTR_ERROR_TYPE_UNSPECIFIED,
 					  NULL,
@@ -596,9 +472,9 @@ bnxt_flow_meter_create(struct rte_eth_dev *dev, uint32_t meter_id,
 	/* not direction from rte_mtr. Set ingress by default */
 	pparams.dir_attr |= BNXT_ULP_FLOW_ATTR_INGRESS;
 
-	tmp_meter_id = tfp_cpu_to_be_32(meter_id);
+	tmp_mtr_id = tfp_cpu_to_be_32(mtr_id);
 	memcpy(&act_prop->act_details[BNXT_ULP_ACT_PROP_IDX_METER_INST_ID],
-	       &tmp_meter_id,
+	       &tmp_mtr_id,
 	       BNXT_ULP_ACT_PROP_SZ_METER_INST_ID);
 
 	tmp_profile_id = tfp_cpu_to_be_32(params->meter_profile_id);
@@ -607,7 +483,7 @@ bnxt_flow_meter_create(struct rte_eth_dev *dev, uint32_t meter_id,
 	       BNXT_ULP_ACT_PROP_SZ_METER_PROF_ID);
 
 	memcpy(&act_prop->act_details[BNXT_ULP_ACT_PROP_IDX_METER_INST_MTR_VAL],
-	       &meter_en,
+	       &mtr_en,
 	       BNXT_ULP_ACT_PROP_SZ_METER_INST_MTR_VAL);
 
 	ret = ulp_matcher_action_match(&pparams, &act_tid);
@@ -639,7 +515,7 @@ bnxt_flow_meter_create(struct rte_eth_dev *dev, uint32_t meter_id,
 	if (ret)
 		goto parse_error;
 
-	BNXT_DRV_DBG(DEBUG, "Bnxt flow meter %d is created\n", meter_id);
+	BNXT_DRV_DBG(DEBUG, "Bnxt flow meter %d is created\n", mtr_id);
 
 	return 0;
 parse_error:
@@ -653,8 +529,8 @@ bnxt_flow_meter_create(struct rte_eth_dev *dev, uint32_t meter_id,
  * Destroy meter.
  */
 static int
-bnxt_flow_meter_destroy(struct rte_eth_dev *dev,
-			uint32_t meter_id,
+bnxt_flow_mtr_destroy(struct rte_eth_dev *dev,
+			uint32_t mtr_id,
 			struct rte_mtr_error *error)
 {
 	struct bnxt_ulp_context *ulp_ctx;
@@ -664,9 +540,9 @@ bnxt_flow_meter_destroy(struct rte_eth_dev *dev,
 	uint32_t act_tid;
 	uint16_t func_id;
 	int ret;
-	uint32_t tmp_meter_id;
+	uint32_t tmp_mtr_id;
 
-	if (!bnxt_meter_initialized)
+	if (!bnxt_mtr_initialized)
 		return -rte_mtr_error_set(error, ENOTSUP,
 					  RTE_MTR_ERROR_TYPE_UNSPECIFIED,
 					  NULL,
@@ -687,9 +563,9 @@ bnxt_flow_meter_destroy(struct rte_eth_dev *dev,
 	/* not direction from rte_mtr. Set ingress by default */
 	pparams.dir_attr |= BNXT_ULP_FLOW_ATTR_INGRESS;
 
-	tmp_meter_id = tfp_cpu_to_be_32(meter_id);
+	tmp_mtr_id = tfp_cpu_to_be_32(mtr_id);
 	memcpy(&act_prop->act_details[BNXT_ULP_ACT_PROP_IDX_METER_INST_ID],
-	       &tmp_meter_id,
+	       &tmp_mtr_id,
 	       BNXT_ULP_ACT_PROP_SZ_METER_INST_ID);
 
 	ret = ulp_matcher_action_match(&pparams, &act_tid);
@@ -721,7 +597,7 @@ bnxt_flow_meter_destroy(struct rte_eth_dev *dev,
 	if (ret)
 		goto parse_error;
 
-	BNXT_DRV_DBG(DEBUG, "Bnxt flow meter %d is deleted\n", meter_id);
+	BNXT_DRV_DBG(DEBUG, "Bnxt flow meter %d is deleted\n", mtr_id);
 
 	return 0;
 parse_error:
@@ -735,8 +611,8 @@ bnxt_flow_meter_destroy(struct rte_eth_dev *dev,
  * Set meter valid/invalid.
  */
 static int
-bnxt_flow_meter_enable_set(struct rte_eth_dev *dev,
-			   uint32_t meter_id,
+bnxt_flow_mtr_enable_set(struct rte_eth_dev *dev,
+			   uint32_t mtr_id,
 			   uint8_t val,
 			   struct rte_mtr_error *error)
 {
@@ -747,9 +623,9 @@ bnxt_flow_meter_enable_set(struct rte_eth_dev *dev,
 	uint32_t act_tid;
 	uint16_t func_id;
 	int ret;
-	uint32_t tmp_meter_id;
+	uint32_t tmp_mtr_id;
 
-	if (!bnxt_meter_initialized)
+	if (!bnxt_mtr_initialized)
 		return -rte_mtr_error_set(error, ENOTSUP,
 					  RTE_MTR_ERROR_TYPE_UNSPECIFIED,
 					  NULL,
@@ -770,9 +646,9 @@ bnxt_flow_meter_enable_set(struct rte_eth_dev *dev,
 	/* not direction from rte_mtr. Set ingress by default */
 	pparams.dir_attr |= BNXT_ULP_FLOW_ATTR_INGRESS;
 
-	tmp_meter_id = tfp_cpu_to_be_32(meter_id);
+	tmp_mtr_id = tfp_cpu_to_be_32(mtr_id);
 	memcpy(&act_prop->act_details[BNXT_ULP_ACT_PROP_IDX_METER_INST_ID],
-	       &tmp_meter_id,
+	       &tmp_mtr_id,
 	       BNXT_ULP_ACT_PROP_SZ_METER_INST_ID);
 	act_prop->act_details[BNXT_ULP_ACT_PROP_IDX_METER_INST_MTR_VAL_UPDATE] = 1;
 	act_prop->act_details[BNXT_ULP_ACT_PROP_IDX_METER_INST_MTR_VAL] = val;
@@ -807,7 +683,7 @@ bnxt_flow_meter_enable_set(struct rte_eth_dev *dev,
 		goto parse_error;
 
 	BNXT_DRV_DBG(DEBUG, "Bnxt flow meter %d is %s\n",
-		     meter_id, val ? "enabled" : "disabled");
+		     mtr_id, val ? "enabled" : "disabled");
 
 	return 0;
 parse_error:
@@ -821,31 +697,31 @@ bnxt_flow_meter_enable_set(struct rte_eth_dev *dev,
  * Enable flow meter.
  */
 static int
-bnxt_flow_meter_enable(struct rte_eth_dev *dev,
-		       uint32_t meter_id,
+bnxt_flow_mtr_enable(struct rte_eth_dev *dev,
+		       uint32_t mtr_id,
 		       struct rte_mtr_error *error)
 {
-	return bnxt_flow_meter_enable_set(dev, meter_id, 1, error);
+	return bnxt_flow_mtr_enable_set(dev, mtr_id, 1, error);
 }
 
 /**
  * Disable flow meter.
  */
 static int
-bnxt_flow_meter_disable(struct rte_eth_dev *dev,
-			uint32_t meter_id,
+bnxt_flow_mtr_disable(struct rte_eth_dev *dev,
+			uint32_t mtr_id,
 			struct rte_mtr_error *error)
 {
-	return bnxt_flow_meter_enable_set(dev, meter_id, 0, error);
+	return bnxt_flow_mtr_enable_set(dev, mtr_id, 0, error);
 }
 
 /**
  * Update meter profile.
  */
 static int
-bnxt_flow_meter_profile_update(struct rte_eth_dev *dev __rte_unused,
-			       uint32_t meter_id __rte_unused,
-			       uint32_t meter_profile_id __rte_unused,
+bnxt_flow_mtr_profile_update(struct rte_eth_dev *dev __rte_unused,
+			       uint32_t mtr_id __rte_unused,
+			       uint32_t mtr_profile_id __rte_unused,
 			       struct rte_mtr_error *error)
 {
 	return -rte_mtr_error_set(error, ENOTSUP,
@@ -858,8 +734,8 @@ bnxt_flow_meter_profile_update(struct rte_eth_dev *dev __rte_unused,
  * Udate meter stats mask.
  */
 static int
-bnxt_flow_meter_stats_update(struct rte_eth_dev *dev __rte_unused,
-			     uint32_t meter_id __rte_unused,
+bnxt_flow_mtr_stats_update(struct rte_eth_dev *dev __rte_unused,
+			     uint32_t mtr_id __rte_unused,
 			     uint64_t stats_mask __rte_unused,
 			     struct rte_mtr_error *error)
 {
@@ -873,8 +749,8 @@ bnxt_flow_meter_stats_update(struct rte_eth_dev *dev __rte_unused,
  * Read meter statistics.
  */
 static int
-bnxt_flow_meter_stats_read(struct rte_eth_dev *dev __rte_unused,
-			   uint32_t meter_id __rte_unused,
+bnxt_flow_mtr_stats_read(struct rte_eth_dev *dev __rte_unused,
+			   uint32_t mtr_id __rte_unused,
 			   struct rte_mtr_stats *stats __rte_unused,
 			   uint64_t *stats_mask __rte_unused,
 			   int clear __rte_unused,
@@ -888,19 +764,19 @@ bnxt_flow_meter_stats_read(struct rte_eth_dev *dev __rte_unused,
 
 static const struct rte_mtr_ops bnxt_flow_mtr_ops = {
 	.capabilities_get = bnxt_flow_mtr_cap_get,
-	.meter_profile_add = bnxt_flow_meter_profile_add,
-	.meter_profile_delete = bnxt_flow_meter_profile_delete,
+	.meter_profile_add = bnxt_flow_mtr_profile_add,
+	.meter_profile_delete = bnxt_flow_mtr_profile_delete,
 	.meter_policy_validate = NULL,
 	.meter_policy_add = NULL,
 	.meter_policy_delete = NULL,
-	.create = bnxt_flow_meter_create,
-	.destroy = bnxt_flow_meter_destroy,
-	.meter_enable = bnxt_flow_meter_enable,
-	.meter_disable = bnxt_flow_meter_disable,
-	.meter_profile_update = bnxt_flow_meter_profile_update,
+	.create = bnxt_flow_mtr_create,
+	.destroy = bnxt_flow_mtr_destroy,
+	.meter_enable = bnxt_flow_mtr_enable,
+	.meter_disable = bnxt_flow_mtr_disable,
+	.meter_profile_update = bnxt_flow_mtr_profile_update,
 	.meter_dscp_table_update = NULL,
-	.stats_update = bnxt_flow_meter_stats_update,
-	.stats_read = bnxt_flow_meter_stats_read,
+	.stats_update = bnxt_flow_mtr_stats_update,
+	.stats_read = bnxt_flow_mtr_stats_read,
 };
 
 /**
@@ -910,5 +786,6 @@ int
 bnxt_flow_meter_ops_get(struct rte_eth_dev *dev __rte_unused, void *arg)
 {
 	*(const struct rte_mtr_ops **)arg = &bnxt_flow_mtr_ops;
+
 	return 0;
 }
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
index eb8ecdbace..c7a712b8c8 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
@@ -9,6 +9,8 @@
 #include <rte_flow_driver.h>
 #include <rte_tailq.h>
 #include <rte_spinlock.h>
+#include <rte_mtr.h>
+#include <rte_version.h>
 
 #include "bnxt.h"
 #include "bnxt_ulp.h"
@@ -1316,6 +1318,65 @@ ulp_tf_global_cfg_update(struct bnxt *bp,
 	return rc;
 }
 
+/**
+ * When a port is initialized by dpdk. This functions is called
+ * to enable the meter and initializes the meter global configurations.
+ */
+#define BNXT_THOR_FMTCR_NUM_MET_MET_1K (0x7UL << 20)
+#define BNXT_THOR_FMTCR_CNTRS_ENABLE (0x1UL << 25)
+#define BNXT_THOR_FMTCR_INTERVAL_1K (1024)
+static int32_t
+ulp_tf_flow_mtr_init(struct bnxt *bp)
+{
+	int rc = 0;
+
+	/*
+	 * Enable metering. Set the meter global configuration register.
+	 * Set number of meter to 1K. Disable the drop counter for now.
+	 */
+	rc = ulp_tf_global_cfg_update(bp, TF_DIR_RX, TF_METER_CFG,
+				      0,
+				      BNXT_THOR_FMTCR_NUM_MET_MET_1K,
+				      1);
+	if (rc) {
+		BNXT_DRV_DBG(ERR, "Failed to set rx meter configuration\n");
+		goto jump_to_error;
+	}
+
+	rc = ulp_tf_global_cfg_update(bp, TF_DIR_TX, TF_METER_CFG,
+				      0,
+				      BNXT_THOR_FMTCR_NUM_MET_MET_1K,
+				      1);
+	if (rc) {
+		BNXT_DRV_DBG(ERR, "Failed to set tx meter configuration\n");
+		goto jump_to_error;
+	}
+
+	/*
+	 * Set meter refresh rate to 1024 clock cycle. This value works for
+	 * most bit rates especially for high rates.
+	 */
+	rc = ulp_tf_global_cfg_update(bp, TF_DIR_RX, TF_METER_INTERVAL_CFG,
+				      0,
+				      BNXT_THOR_FMTCR_INTERVAL_1K,
+				      1);
+	if (rc) {
+		BNXT_DRV_DBG(ERR, "Failed to set rx meter interval\n");
+		goto jump_to_error;
+	}
+
+	rc = bnxt_flow_mtr_init(bp);
+	if (rc) {
+		BNXT_DRV_DBG(ERR, "Failed to config meter\n");
+		goto jump_to_error;
+	}
+
+	return rc;
+
+jump_to_error:
+	return rc;
+}
+
 /*
  * When a port is deinit'ed by dpdk. This function is called
  * and this function clears the ULP context and rest of the
@@ -1498,7 +1559,7 @@ ulp_tf_init(struct bnxt *bp,
 	}
 
 	if (ulp_dev_id == BNXT_ULP_DEVICE_ID_THOR) {
-		rc = bnxt_flow_meter_init(bp);
+		rc = ulp_tf_flow_mtr_init(bp);
 		if (rc) {
 			BNXT_DRV_DBG(ERR, "Failed to config meter\n");
 			goto jump_to_error;
@@ -1513,11 +1574,59 @@ ulp_tf_init(struct bnxt *bp,
 	return rc;
 }
 
+/**
+ * Get meter capabilities.
+ */
+#define MAX_FLOW_PER_METER 1024
+#define MAX_METER_RATE_100GBPS ((1ULL << 30) * 100 / 8)
+static int
+ulp_tf_mtr_cap_get(struct bnxt *bp,
+		   struct rte_mtr_capabilities *cap)
+{
+	struct tf_get_session_info_parms iparms;
+	struct tf *tfp;
+	int32_t rc = 0;
+
+	/* Get number of meter reserved for this session */
+	memset(&iparms, 0, sizeof(iparms));
+	tfp = bnxt_ulp_bp_tfp_get(bp, BNXT_ULP_SESSION_TYPE_DEFAULT);
+	rc = tf_get_session_info(tfp, &iparms);
+	if (rc != 0) {
+		BNXT_DRV_DBG(ERR, "Failed to get session resource info\n");
+		return rc;
+	}
+
+	memset(cap, 0, sizeof(struct rte_mtr_capabilities));
+
+	cap->n_max = iparms.session_info.tbl[TF_DIR_RX].info[TF_TBL_TYPE_METER_INST].stride;
+	if (!cap->n_max) {
+		BNXT_DRV_DBG(ERR, "Meter is not supported\n");
+		return -EINVAL;
+	}
+
+#if (RTE_VERSION_NUM(21, 05, 0, 0) <= RTE_VERSION)
+	cap->srtcm_rfc2697_byte_mode_supported = 1;
+#endif
+	cap->n_shared_max = cap->n_max;
+	/* No meter is identical */
+	cap->identical = 1;
+	cap->shared_identical = 1;
+	cap->shared_n_flows_per_mtr_max = MAX_FLOW_PER_METER;
+	cap->chaining_n_mtrs_per_flow_max = 1; /* Chaining is not supported. */
+	cap->meter_srtcm_rfc2697_n_max = cap->n_max;
+	cap->meter_rate_max = MAX_METER_RATE_100GBPS;
+	/* No stats supported now */
+	cap->stats_mask = 0;
+
+	return 0;
+}
+
 const struct bnxt_ulp_core_ops bnxt_ulp_tf_core_ops = {
 	.ulp_ctx_attach = ulp_tf_ctx_attach,
 	.ulp_ctx_detach = ulp_tf_ctx_detach,
 	.ulp_deinit =  ulp_tf_deinit,
 	.ulp_init =  ulp_tf_init,
 	.ulp_vfr_session_fid_add = NULL,
-	.ulp_vfr_session_fid_rem = NULL
+	.ulp_vfr_session_fid_rem = NULL,
+	.ulp_mtr_cap_get = ulp_tf_mtr_cap_get
 };
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
index 2011ab6599..42ad944b2c 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
@@ -9,6 +9,8 @@
 #include <rte_flow_driver.h>
 #include <rte_tailq.h>
 #include <rte_spinlock.h>
+#include <rte_mtr.h>
+#include <rte_version.h>
 
 #include "bnxt.h"
 #include "bnxt_ulp.h"
@@ -1017,6 +1019,20 @@ ulp_tfc_init(struct bnxt *bp,
 		goto jump_to_error;
 	}
 
+	rc = bnxt_ulp_cntxt_dev_id_get(bp->ulp_ctx, &ulp_dev_id);
+	if (rc) {
+		BNXT_DRV_DBG(ERR, "Unable to get device id from ulp.\n");
+		return rc;
+	}
+
+	if (ulp_dev_id == BNXT_ULP_DEVICE_ID_THOR2) {
+		rc = bnxt_flow_mtr_init(bp);
+		if (rc) {
+			BNXT_DRV_DBG(ERR, "Failed to config meter\n");
+			goto jump_to_error;
+		}
+	}
+
 	BNXT_DRV_DBG(DEBUG, "ulp ctx has been initialized\n");
 	return rc;
 
@@ -1025,11 +1041,40 @@ ulp_tfc_init(struct bnxt *bp,
 	return rc;
 }
 
+/**
+ * Get meter capabilities.
+ */
+#define MAX_FLOW_PER_METER 1024
+#define MAX_NUM_METER 1024
+#define MAX_METER_RATE_200GBPS ((1ULL << 31) * 100 / 8)
+static int
+ulp_tfc_mtr_cap_get(struct bnxt *bp __rte_unused,
+		    struct rte_mtr_capabilities *cap)
+{
+#if (RTE_VERSION_NUM(21, 05, 0, 0) <= RTE_VERSION)
+	cap->srtcm_rfc2697_byte_mode_supported = 1;
+#endif
+	cap->n_max = MAX_NUM_METER;
+	cap->n_shared_max = cap->n_max;
+	/* No meter is identical */
+	cap->identical = 1;
+	cap->shared_identical = 1;
+	cap->shared_n_flows_per_mtr_max = MAX_FLOW_PER_METER;
+	cap->chaining_n_mtrs_per_flow_max = 1; /* Chaining is not supported. */
+	cap->meter_srtcm_rfc2697_n_max = cap->n_max;
+	cap->meter_rate_max = MAX_METER_RATE_200GBPS;
+	/* No stats supported now */
+	cap->stats_mask = 0;
+
+	return 0;
+}
+
 const struct bnxt_ulp_core_ops bnxt_ulp_tfc_core_ops = {
 	.ulp_ctx_attach = ulp_tfc_ctx_attach,
 	.ulp_ctx_detach = ulp_tfc_ctx_detach,
 	.ulp_deinit =  ulp_tfc_deinit,
 	.ulp_init =  ulp_tfc_init,
 	.ulp_vfr_session_fid_add = ulp_tfc_vfr_session_fid_add,
-	.ulp_vfr_session_fid_rem = ulp_tfc_vfr_session_fid_rem
+	.ulp_vfr_session_fid_rem = ulp_tfc_vfr_session_fid_rem,
+	.ulp_mtr_cap_get = ulp_tfc_mtr_cap_get
 };
diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
index b647b2b83f..d313b7da07 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
@@ -3401,13 +3401,11 @@ ulp_rte_meter_act_handler(const struct rte_flow_action *action_item,
 	}
 
 	meter = action_item->conf;
-	if (meter) {
-		/* validate the mtr_id and update the reference counter */
-		tmp_meter_id = tfp_cpu_to_be_32(meter->mtr_id);
-		memcpy(&act_prop->act_details[BNXT_ULP_ACT_PROP_IDX_METER],
-		       &tmp_meter_id,
-		       BNXT_ULP_ACT_PROP_SZ_METER);
-	}
+	/* validate the mtr_id and update the reference counter */
+	tmp_meter_id = tfp_cpu_to_be_32(meter->mtr_id);
+	memcpy(&act_prop->act_details[BNXT_ULP_ACT_PROP_IDX_METER],
+	       &tmp_meter_id,
+	       BNXT_ULP_ACT_PROP_SZ_METER);
 
 	/* set the meter action header bit */
 	ULP_BITMAP_SET(params->act_bitmap.bits, BNXT_ULP_ACT_BIT_METER);
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 35/47] net/bnxt: tf_ulp: TF support flow scale query
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (24 preceding siblings ...)
  2024-10-01  5:58 ` [PATCH v3 34/47] net/bnxt: tf_ulp: add rte_mtr support for Thor2 Sriharsha Basavapatna
@ 2024-10-01  5:58 ` Sriharsha Basavapatna
  2024-10-01  5:58 ` [PATCH v3 36/47] net/bnxt: tf_ulp: add support for rss flow query to ULP Sriharsha Basavapatna
                   ` (7 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:58 UTC (permalink / raw)
  To: dev
  Cc: Shuanglin Wang, Sriharsha Basavapatna, Kishore Padmanabha, Ajit Khaparde

From: Shuanglin Wang <shuanglin.wang@broadcom.com>

TF supports the flow scale query feature for OVS application.
The resource usage is tracked when opening a TF session
or adding/deleting a flow. The resources includes WC TCAM,
EM, Action, Counter, Meter, ACT_ENCAP, ACT_ENCAP, and SP_SMAC.
User can query the resource usage using niccli.

This feature is disabled by default. Using the build flag
-DTF_FLOW_SCALE_QUERY to enable it.

Improvement on flow scale query feature

Several improvements on flow scale query feature:
1. Some default rules require both RX and TX resources;
   need to update usage states on both direcitons.
2. Update resoure usage state for regular flows only.
3. Added a buffer dirty state to avoid unnecessary
   state sync with firmware.

Signed-off-by: Shuanglin Wang <shuanglin.wang@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/ulp_flow_db.c | 17 +++++++++++++++++
 drivers/net/bnxt/tf_ulp/ulp_mapper.c  | 13 +++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/drivers/net/bnxt/tf_ulp/ulp_flow_db.c b/drivers/net/bnxt/tf_ulp/ulp_flow_db.c
index 79e2931e43..e7ac617d7a 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_flow_db.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_flow_db.c
@@ -12,6 +12,9 @@
 #include "ulp_flow_db.h"
 #include "ulp_fc_mgr.h"
 #include "ulp_tun.h"
+#ifdef TF_FLOW_SCALE_QUERY
+#include "tf_resources.h"
+#endif /* TF_FLOW_SCALE_QUERY */
 
 #define ULP_FLOW_DB_RES_DIR_BIT		31
 #define ULP_FLOW_DB_RES_DIR_MASK	0x80000000
@@ -956,8 +959,15 @@ ulp_flow_db_flush_flows(struct bnxt_ulp_context *ulp_ctx,
 		return -EINVAL;
 	}
 
+#ifdef TF_FLOW_SCALE_QUERY
+	tf_resc_pause_usage_update();
+#endif
 	while (!ulp_flow_db_next_entry_get(flow_db, flow_type, &fid))
 		ulp_mapper_resources_free(ulp_ctx, flow_type, fid, NULL);
+#ifdef TF_FLOW_SCALE_QUERY
+	tf_resc_resume_usage_update();
+	tf_resc_usage_update_all(ulp_ctx->bp);
+#endif
 
 	bnxt_ulp_cntxt_release_fdb_lock(ulp_ctx);
 
@@ -994,6 +1004,9 @@ ulp_flow_db_function_flow_flush(struct bnxt_ulp_context *ulp_ctx,
 		return -EINVAL;
 	}
 
+#ifdef TF_FLOW_SCALE_QUERY
+	tf_resc_pause_usage_update();
+#endif
 	while (!ulp_flow_db_next_entry_get(flow_db, BNXT_ULP_FDB_TYPE_REGULAR,
 					   &flow_id)) {
 		if (flow_db->func_id_tbl[flow_id] == func_id)
@@ -1002,6 +1015,10 @@ ulp_flow_db_function_flow_flush(struct bnxt_ulp_context *ulp_ctx,
 						  flow_id,
 						  NULL);
 	}
+#ifdef TF_FLOW_SCALE_QUERY
+	tf_resc_resume_usage_update();
+	tf_resc_usage_update_all(ulp_ctx->bp);
+#endif
 	bnxt_ulp_cntxt_release_fdb_lock(ulp_ctx);
 	return 0;
 }
diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.c b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
index 17e5b99562..3bf0307980 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
@@ -21,6 +21,9 @@
 #include "ulp_port_db.h"
 #include "ulp_ha_mgr.h"
 #include "bnxt_tf_pmd_shim.h"
+#ifdef TF_FLOW_SCALE_QUERY
+#include "tf_resources.h"
+#endif /* TF_FLOW_SCALE_QUERY */
 
 static uint8_t mapper_fld_zeros[16] = { 0 };
 
@@ -4315,6 +4318,12 @@ ulp_mapper_resources_free(struct bnxt_ulp_context *ulp_ctx,
 	if (rc)
 		frc = rc;
 
+#ifdef TF_FLOW_SCALE_QUERY
+	/* update for regular flows only */
+	if (flow_type == BNXT_ULP_FDB_TYPE_REGULAR)
+		tf_resc_usage_update_all(ulp_ctx->bp);
+#endif /* TF_FLOW_SCALE_QUERY */
+
 	return frc;
 }
 
@@ -4464,6 +4473,10 @@ ulp_mapper_flow_create(struct bnxt_ulp_context *ulp_ctx,
 			goto flow_error;
 	}
 
+#ifdef TF_FLOW_SCALE_QUERY
+	tf_resc_usage_update_all(ulp_ctx->bp);
+#endif /* TF_FLOW_SCALE_QUERY */
+
 	return rc;
 
 batch_error:
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 36/47] net/bnxt: tf_ulp: add support for rss flow query to ULP
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (25 preceding siblings ...)
  2024-10-01  5:58 ` [PATCH v3 35/47] net/bnxt: tf_ulp: TF support flow scale query Sriharsha Basavapatna
@ 2024-10-01  5:58 ` Sriharsha Basavapatna
  2024-10-01  5:58 ` [PATCH v3 38/47] net/bnxt: tf_ulp: inline utility functions and use likely/unlikely Sriharsha Basavapatna
                   ` (6 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:58 UTC (permalink / raw)
  To: dev
  Cc: Randy Schacher, Sriharsha Basavapatna, Kishore Padmanabha, Ajit Khaparde

From: Randy Schacher <stuart.schacher@broadcom.com>

Support flow query rss command for truflow in ULP layer.

Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_vnic.c            | 39 +++++++++++++-
 drivers/net/bnxt/bnxt_vnic.h            |  6 +++
 drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c | 71 +++++++++++++++++++++++++
 3 files changed, 114 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
index 16373be015..6b31b35715 100644
--- a/drivers/net/bnxt/bnxt_vnic.c
+++ b/drivers/net/bnxt/bnxt_vnic.c
@@ -30,6 +30,7 @@
 			((BNXT_VNIC_BITMAP_SIZE - 1) - \
 			((i) % BNXT_VNIC_BITMAP_SIZE))) & 1)
 
+static uint16_t rss_query_queues[BNXT_VNIC_MAX_QUEUE_SIZE];
 /*
  * VNIC Functions
  */
@@ -777,16 +778,21 @@ bnxt_vnic_rss_create(struct bnxt *bp,
 	}
 
 	/* hwrm_type conversion */
+	vnic->hash_f = rss_info->rss_func;
+	vnic->rss_types = rss_info->rss_types;
 	vnic->hash_type = bnxt_rte_to_hwrm_hash_types(rss_info->rss_types);
 	vnic->hash_mode = bnxt_rte_to_hwrm_hash_level(bp, rss_info->rss_types,
 						      rss_info->rss_level);
 
 	/* configure the key */
-	if (!rss_info->key_len)
+	if (!rss_info->key_len) {
 		/* If hash key has not been specified, use random hash key.*/
 		bnxt_prandom_bytes(vnic->rss_hash_key, HW_HASH_KEY_SIZE);
-	else
+		vnic->key_len = HW_HASH_KEY_SIZE;
+	} else {
 		memcpy(vnic->rss_hash_key, rss_info->key, rss_info->key_len);
+		vnic->key_len = rss_info->key_len;
+	}
 
 	/* Prepare the indirection table */
 	bnxt_vnic_populate_rss_table(bp, vnic);
@@ -820,6 +826,35 @@ bnxt_vnic_rss_create(struct bnxt *bp,
 	return NULL;
 }
 
+void
+bnxt_vnic_rss_query_info_fill(struct bnxt *bp,
+			      struct rte_flow_action_rss *rss_conf,
+			      uint16_t vnic_id)
+{
+	struct bnxt_vnic_info *vnic_info;
+	int idx;
+
+	vnic_info = bnxt_vnic_queue_db_get_vnic(bp, vnic_id);
+	if (vnic_info == NULL) {
+		PMD_DRV_LOG(ERR, "lookup failed for id %d\n", vnic_id);
+		return;
+	}
+
+	rss_conf->key_len = vnic_info->key_len;
+	rss_conf->key = vnic_info->rss_hash_key;
+	rss_conf->func = vnic_info->hash_f;
+	rss_conf->level = vnic_info->hash_mode;
+	rss_conf->types = vnic_info->rss_types;
+
+	memset(rss_query_queues, 0, sizeof(rss_query_queues));
+	for (idx = 0; idx < BNXT_VNIC_MAX_QUEUE_SIZE; idx++)
+		if (BNXT_VNIC_BITMAP_GET(vnic_info->queue_bitmap, idx)) {
+			rss_query_queues[rss_conf->queue_num] = idx;
+			rss_conf->queue_num += 1;
+		}
+	rss_conf->queue = (const uint16_t *)&rss_query_queues;
+}
+
 int32_t
 bnxt_vnic_rss_queue_status_update(struct bnxt *bp, struct bnxt_vnic_info *vnic)
 {
diff --git a/drivers/net/bnxt/bnxt_vnic.h b/drivers/net/bnxt/bnxt_vnic.h
index fe3fc4e540..c4a7c5257c 100644
--- a/drivers/net/bnxt/bnxt_vnic.h
+++ b/drivers/net/bnxt/bnxt_vnic.h
@@ -75,10 +75,13 @@ struct bnxt_vnic_info {
 	bool		rss_dflt_cr;
 	uint16_t	ref_cnt;
 	uint64_t	queue_bitmap[BNXT_VNIC_MAX_QUEUE_SZ_IN_64BITS];
+	uint64_t	rss_types;
+	uint32_t	key_len; /**< Hash key length in bytes. */
 
 	STAILQ_HEAD(, bnxt_filter_info)	filter;
 	STAILQ_HEAD(, rte_flow)	flow_list;
 	uint8_t		ring_select_mode;
+	enum rte_eth_hash_function hash_f;
 	enum rte_eth_hash_function hash_f_local;
 	uint64_t	rss_types_local;
 	uint8_t         metadata_format;
@@ -121,6 +124,9 @@ int32_t bnxt_vnic_queue_db_init(struct bnxt *bp);
 int32_t bnxt_vnic_queue_db_deinit(struct bnxt *bp);
 
 void bnxt_vnic_queue_db_update_dlft_vnic(struct bnxt *bp);
+void bnxt_vnic_rss_query_info_fill(struct bnxt *bp,
+				   struct rte_flow_action_rss *rss_conf,
+				   uint16_t vnic_id);
 int32_t
 bnxt_vnic_rss_queue_status_update(struct bnxt *bp, struct bnxt_vnic_info *vnic);
 
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c
index 85fb03e922..4c99c785c0 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c
@@ -577,6 +577,66 @@ bnxt_ulp_flow_flush(struct rte_eth_dev *eth_dev,
 	return ret;
 }
 
+/*
+ * Fill the rte_flow_query_rss 'rss_conf' argument passed
+ * in the rte_flow_query() with the values obtained and
+ * accumulated locally.
+ *
+ * ctxt [in] The ulp context for the flow counter manager
+ *
+ * flow_id [in] The HW flow ID
+ *
+ * rss_conf [out] The rte_flow_query_count 'data' that is set
+ *
+ */
+static int ulp_flow_query_rss_get(struct bnxt_ulp_context *ctxt,
+			   uint32_t flow_id,
+			   struct rte_flow_action_rss *rss_conf)
+{
+	struct ulp_flow_db_res_params params;
+	uint32_t nxt_resource_index = 0;
+	bool found_cntr_resource = false;
+	struct bnxt *bp;
+	uint16_t vnic_id = 0;
+	int rc = 0;
+
+	bp = bnxt_ulp_cntxt_bp_get(ctxt);
+	if (!bp) {
+		BNXT_DRV_DBG(ERR, "Failed to get bp from ulp cntxt\n");
+		return -EINVAL;
+	}
+
+	if (bnxt_ulp_cntxt_acquire_fdb_lock(ctxt)) {
+		BNXT_DRV_DBG(ERR, "Flow db lock acquire failed\n");
+		return -EINVAL;
+	}
+	do {
+		rc = ulp_flow_db_resource_get(ctxt,
+					      BNXT_ULP_FDB_TYPE_REGULAR,
+					      flow_id,
+					      &nxt_resource_index,
+					      &params);
+		if (params.resource_func ==
+		     BNXT_ULP_RESOURCE_FUNC_VNIC_TABLE &&
+		     (params.resource_sub_type ==
+		       BNXT_ULP_RESOURCE_SUB_TYPE_VNIC_TABLE_RSS ||
+		      params.resource_sub_type ==
+		       BNXT_ULP_RESOURCE_SUB_TYPE_VNIC_TABLE_QUEUE)) {
+			vnic_id = params.resource_hndl;
+			found_cntr_resource = true;
+			break;
+		}
+
+	} while (!rc && nxt_resource_index);
+
+	if (found_cntr_resource)
+		bnxt_vnic_rss_query_info_fill(bp, rss_conf, vnic_id);
+
+	bnxt_ulp_cntxt_release_fdb_lock(ctxt);
+
+	return rc;
+}
+
 /* Function to query the rte flows. */
 static int32_t
 bnxt_ulp_flow_query(struct rte_eth_dev *eth_dev,
@@ -587,6 +647,7 @@ bnxt_ulp_flow_query(struct rte_eth_dev *eth_dev,
 {
 	int rc = 0;
 	struct bnxt_ulp_context *ulp_ctx;
+	struct rte_flow_action_rss *rss_conf;
 	struct rte_flow_query_count *count;
 	uint32_t flow_id;
 
@@ -602,6 +663,16 @@ bnxt_ulp_flow_query(struct rte_eth_dev *eth_dev,
 	flow_id = (uint32_t)(uintptr_t)flow;
 
 	switch (action->type) {
+	case RTE_FLOW_ACTION_TYPE_RSS:
+		rss_conf = (struct rte_flow_action_rss *)data;
+		rc = ulp_flow_query_rss_get(ulp_ctx, flow_id, rss_conf);
+		if (rc) {
+			rte_flow_error_set(error, EINVAL,
+					   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
+					   "Failed to query RSS info.");
+		}
+
+		break;
 	case RTE_FLOW_ACTION_TYPE_COUNT:
 		count = data;
 		rc = ulp_fc_mgr_query_count_get(ulp_ctx, flow_id, count);
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 38/47] net/bnxt: tf_ulp: inline utility functions and use likely/unlikely
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (26 preceding siblings ...)
  2024-10-01  5:58 ` [PATCH v3 36/47] net/bnxt: tf_ulp: add support for rss flow query to ULP Sriharsha Basavapatna
@ 2024-10-01  5:58 ` Sriharsha Basavapatna
  2024-10-01  5:58 ` [PATCH v3 39/47] net/bnxt: tf_ulp: switch ulp to use rte crc32 hash Sriharsha Basavapatna
                   ` (5 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:58 UTC (permalink / raw)
  To: dev
  Cc: Peter Spreadborough, Sriharsha Basavapatna, Kishore Padmanabha,
	Ajit Khaparde

From: Peter Spreadborough <peter.spreadborough@broadcom.com>

This change makes performance improvements by inlining frequently
used utility functions and by helping branch prediction by using
the likely/unlikely compiler hints.

Signed-off-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c           |    1 +
 drivers/net/bnxt/bnxt_hwrm.c             |    1 +
 drivers/net/bnxt/bnxt_reps.c             |    1 +
 drivers/net/bnxt/tf_ulp/bnxt_tf_common.h |    7 -
 drivers/net/bnxt/tf_ulp/bnxt_ulp.c       | 1041 +---------------------
 drivers/net/bnxt/tf_ulp/bnxt_ulp.h       |  364 +-------
 drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c  |  200 ++---
 drivers/net/bnxt/tf_ulp/bnxt_ulp_meter.c |    1 +
 drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c    |    1 +
 drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c   |    1 +
 drivers/net/bnxt/tf_ulp/bnxt_ulp_utils.h | 1038 +++++++++++++++++++++
 drivers/net/bnxt/tf_ulp/meson.build      |    1 -
 drivers/net/bnxt/tf_ulp/ulp_alloc_tbl.c  |    1 +
 drivers/net/bnxt/tf_ulp/ulp_def_rules.c  |    1 +
 drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c     |    1 +
 drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tf.c  |    1 +
 drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c |    1 +
 drivers/net/bnxt/tf_ulp/ulp_flow_db.c    |    1 +
 drivers/net/bnxt/tf_ulp/ulp_gen_tbl.c    |    2 +-
 drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c     |    1 +
 drivers/net/bnxt/tf_ulp/ulp_mapper.c     |  721 +++++++--------
 drivers/net/bnxt/tf_ulp/ulp_mapper_tf.c  |    3 +-
 drivers/net/bnxt/tf_ulp/ulp_mapper_tfc.c |  233 ++---
 drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c   |    1 +
 drivers/net/bnxt/tf_ulp/ulp_matcher.c    |    1 +
 drivers/net/bnxt/tf_ulp/ulp_port_db.c    |    1 +
 drivers/net/bnxt/tf_ulp/ulp_rte_parser.c |   75 +-
 drivers/net/bnxt/tf_ulp/ulp_tun.c        |    1 +
 drivers/net/bnxt/tf_ulp/ulp_utils.h      |  915 ++++++++++++++++---
 29 files changed, 2528 insertions(+), 2089 deletions(-)
 create mode 100644 drivers/net/bnxt/tf_ulp/bnxt_ulp_utils.h

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index aac487bdb2..8650f930d7 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -33,6 +33,7 @@
 #include "bnxt_tf_common.h"
 #include "ulp_flow_db.h"
 #include "rte_pmd_bnxt.h"
+#include "bnxt_ulp_utils.h"
 
 #define DRV_MODULE_NAME		"bnxt"
 static const char bnxt_version[] =
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index d0a6a56845..63253c6195 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -23,6 +23,7 @@
 #include "bnxt_txr.h"
 #include "bnxt_vnic.h"
 #include "hsi_struct_def_dpdk.h"
+#include "bnxt_ulp_utils.h"
 
 struct bnxt_plcmodes_cfg {
 	uint32_t	flags;
diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c
index f058f1aac2..4db17f013e 100644
--- a/drivers/net/bnxt/bnxt_reps.c
+++ b/drivers/net/bnxt/bnxt_reps.c
@@ -13,6 +13,7 @@
 #include "bnxt_hwrm.h"
 #include "hsi_struct_def_dpdk.h"
 #include "bnxt_tf_common.h"
+#include "bnxt_ulp_utils.h"
 #include "ulp_port_db.h"
 #include "ulp_flow_db.h"
 
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_tf_common.h b/drivers/net/bnxt/tf_ulp/bnxt_tf_common.h
index bfbbf76c16..3adc362942 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_tf_common.h
+++ b/drivers/net/bnxt/tf_ulp/bnxt_tf_common.h
@@ -66,11 +66,4 @@ enum bnxt_ulp_intf_type {
 	BNXT_ULP_INTF_TYPE_LAST
 };
 
-struct bnxt_ulp_mark_tbl *
-bnxt_ulp_cntxt_ptr2_mark_db_get(struct bnxt_ulp_context *ulp_ctx);
-
-int32_t
-bnxt_ulp_cntxt_ptr2_mark_db_set(struct bnxt_ulp_context *ulp_ctx,
-				struct bnxt_ulp_mark_tbl *mark_tbl);
-
 #endif /* _BNXT_TF_COMMON_H_ */
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
index 2b5f1dc4fd..e28a481f5e 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
@@ -12,6 +12,7 @@
 
 #include "bnxt.h"
 #include "bnxt_ulp.h"
+#include "bnxt_ulp_utils.h"
 #include "bnxt_tf_common.h"
 #include "bnxt_hwrm.h"
 #include "hsi_struct_def_dpdk.h"
@@ -30,7 +31,6 @@
 #include "ulp_ha_mgr.h"
 #include "bnxt_tf_pmd_shim.h"
 #include "ulp_template_db_tbl.h"
-#include "ulp_utils.h"
 
 /* Linked list of all TF sessions. */
 STAILQ_HEAD(, bnxt_ulp_session_state) bnxt_ulp_session_list =
@@ -49,7 +49,7 @@ static struct cntx_list_entry_list ulp_cntx_list =
 bool
 ulp_is_default_session_active(struct bnxt_ulp_context *ulp_ctx)
 {
-	if (ulp_ctx == NULL || ulp_ctx->g_tfp[0] == NULL)
+	if (unlikely(ulp_ctx == NULL || ulp_ctx->g_tfp[0] == NULL))
 		return false;
 
 	return true;
@@ -62,7 +62,7 @@ ulp_is_default_session_active(struct bnxt_ulp_context *ulp_ctx)
 bool
 ulp_ctx_deinit_allowed(struct bnxt_ulp_context *ulp_ctx)
 {
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
 		return false;
 
 	if (!ulp_ctx->cfg_data->ref_cnt) {
@@ -73,249 +73,6 @@ ulp_ctx_deinit_allowed(struct bnxt_ulp_context *ulp_ctx)
 	return false;
 }
 
-int32_t
-bnxt_ulp_devid_get(struct bnxt *bp,
-		   enum bnxt_ulp_device_id  *ulp_dev_id)
-{
-	if (BNXT_CHIP_P7(bp)) {
-		*ulp_dev_id = BNXT_ULP_DEVICE_ID_THOR2;
-		return 0;
-	}
-
-	if (BNXT_CHIP_P5(bp)) {
-		*ulp_dev_id = BNXT_ULP_DEVICE_ID_THOR;
-		return 0;
-	}
-
-	if (BNXT_STINGRAY(bp))
-		*ulp_dev_id = BNXT_ULP_DEVICE_ID_STINGRAY;
-	else
-		/* Assuming Whitney */
-		*ulp_dev_id = BNXT_ULP_DEVICE_ID_WH_PLUS;
-
-	return 0;
-}
-
-struct bnxt_ulp_app_capabilities_info *
-bnxt_ulp_app_cap_list_get(uint32_t *num_entries)
-{
-	if (!num_entries)
-		return NULL;
-	*num_entries = BNXT_ULP_APP_CAP_TBL_MAX_SZ;
-	return ulp_app_cap_info_list;
-}
-
-struct bnxt_ulp_shared_act_info *
-bnxt_ulp_shared_act_info_get(uint32_t *num_entries)
-{
-	if (!num_entries)
-		return NULL;
-
-	*num_entries = BNXT_ULP_GEN_TBL_MAX_SZ;
-
-	return ulp_shared_act_info;
-}
-
-struct bnxt_ulp_resource_resv_info *
-bnxt_ulp_app_resource_resv_list_get(uint32_t *num_entries)
-{
-	if (num_entries == NULL)
-		return NULL;
-	*num_entries = BNXT_ULP_APP_RESOURCE_RESV_LIST_MAX_SZ;
-	return ulp_app_resource_resv_list;
-}
-
-struct bnxt_ulp_resource_resv_info *
-bnxt_ulp_resource_resv_list_get(uint32_t *num_entries)
-{
-	if (!num_entries)
-		return NULL;
-	*num_entries = BNXT_ULP_RESOURCE_RESV_LIST_MAX_SZ;
-	return ulp_resource_resv_list;
-}
-
-struct bnxt_ulp_glb_resource_info *
-bnxt_ulp_app_glb_resource_info_list_get(uint32_t *num_entries)
-{
-	if (!num_entries)
-		return NULL;
-	*num_entries = BNXT_ULP_APP_GLB_RESOURCE_TBL_MAX_SZ;
-	return ulp_app_glb_resource_tbl;
-}
-
-/* Function to set the number for vxlan_ip (custom vxlan) port into the context */
-int
-bnxt_ulp_cntxt_ecpri_udp_port_set(struct bnxt_ulp_context *ulp_ctx,
-			   uint32_t ecpri_udp_port)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return -EINVAL;
-
-	ulp_ctx->cfg_data->ecpri_udp_port = ecpri_udp_port;
-
-	return 0;
-}
-
-/* Function to retrieve the vxlan_ip (custom vxlan) port from the context. */
-unsigned int
-bnxt_ulp_cntxt_ecpri_udp_port_get(struct bnxt_ulp_context *ulp_ctx)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return 0;
-
-	return (unsigned int)ulp_ctx->cfg_data->ecpri_udp_port;
-}
-
-/* Function to set the number for vxlan_ip (custom vxlan) port into the context */
-int
-bnxt_ulp_cntxt_vxlan_ip_port_set(struct bnxt_ulp_context *ulp_ctx,
-			   uint32_t vxlan_ip_port)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return -EINVAL;
-
-	ulp_ctx->cfg_data->vxlan_ip_port = vxlan_ip_port;
-	if (vxlan_ip_port)
-		ulp_ctx->cfg_data->ulp_flags |= BNXT_ULP_STATIC_VXLAN_SUPPORT;
-	return 0;
-}
-
-/* Function to retrieve the vxlan_ip (custom vxlan) port from the context. */
-unsigned int
-bnxt_ulp_cntxt_vxlan_ip_port_get(struct bnxt_ulp_context *ulp_ctx)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return 0;
-
-	return (unsigned int)ulp_ctx->cfg_data->vxlan_ip_port;
-}
-
-/* Function to set the number for vxlan_gpe next_proto into the context */
-uint32_t
-bnxt_ulp_vxlan_gpe_next_proto_set(struct bnxt_ulp_context *ulp_ctx,
-				  uint8_t tunnel_next_proto)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return -EINVAL;
-
-	ulp_ctx->cfg_data->tunnel_next_proto = tunnel_next_proto;
-
-	return 0;
-}
-
-/* Function to retrieve the vxlan_gpe next_proto from the context. */
-uint8_t
-bnxt_ulp_vxlan_gpe_next_proto_get(struct bnxt_ulp_context *ulp_ctx)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return 0;
-
-	return ulp_ctx->cfg_data->tunnel_next_proto;
-}
-
-/* Function to set the number for vxlan port into the context */
-int
-bnxt_ulp_cntxt_vxlan_port_set(struct bnxt_ulp_context *ulp_ctx,
-			uint32_t vxlan_port)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return -EINVAL;
-
-	ulp_ctx->cfg_data->vxlan_port = vxlan_port;
-	if (vxlan_port)
-		ulp_ctx->cfg_data->ulp_flags |= BNXT_ULP_STATIC_VXLAN_SUPPORT;
-
-	return 0;
-}
-
-/* Function to retrieve the vxlan port from the context. */
-unsigned int
-bnxt_ulp_cntxt_vxlan_port_get(struct bnxt_ulp_context *ulp_ctx)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return 0;
-
-	return (unsigned int)ulp_ctx->cfg_data->vxlan_port;
-}
-
-int
-bnxt_ulp_default_app_priority_set(struct bnxt_ulp_context *ulp_ctx,
-				  uint32_t prio)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return -EINVAL;
-
-	ulp_ctx->cfg_data->default_priority = prio;
-	return 0;
-}
-
-unsigned int
-bnxt_ulp_default_app_priority_get(struct bnxt_ulp_context *ulp_ctx)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return 0;
-
-	return (unsigned int)ulp_ctx->cfg_data->default_priority;
-}
-
-int
-bnxt_ulp_max_def_priority_set(struct bnxt_ulp_context *ulp_ctx,
-			      uint32_t prio)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return -EINVAL;
-
-	ulp_ctx->cfg_data->max_def_priority = prio;
-	return 0;
-}
-
-unsigned int
-bnxt_ulp_max_def_priority_get(struct bnxt_ulp_context *ulp_ctx)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return 0;
-
-	return (unsigned int)ulp_ctx->cfg_data->max_def_priority;
-}
-
-int
-bnxt_ulp_min_flow_priority_set(struct bnxt_ulp_context *ulp_ctx, uint32_t prio)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return -EINVAL;
-
-	ulp_ctx->cfg_data->min_flow_priority = prio;
-	return 0;
-}
-
-unsigned int
-bnxt_ulp_min_flow_priority_get(struct bnxt_ulp_context *ulp_ctx)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return 0;
-
-	return ulp_ctx->cfg_data->min_flow_priority;
-}
-
-int
-bnxt_ulp_max_flow_priority_set(struct bnxt_ulp_context *ulp_ctx, uint32_t prio)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return -EINVAL;
-
-	ulp_ctx->cfg_data->max_flow_priority = prio;
-	return 0;
-}
-
-unsigned int
-bnxt_ulp_max_flow_priority_get(struct bnxt_ulp_context *ulp_ctx)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return 0;
-
-	return ulp_ctx->cfg_data->max_flow_priority;
-}
-
 /* The function to initialize bp flags with truflow features */
 static int32_t
 ulp_dparms_dev_port_intf_update(struct bnxt *bp,
@@ -323,7 +80,7 @@ ulp_dparms_dev_port_intf_update(struct bnxt *bp,
 {
 	enum bnxt_ulp_flow_mem_type mtype;
 
-	if (bnxt_ulp_cntxt_mem_type_get(ulp_ctx, &mtype))
+	if (unlikely(bnxt_ulp_cntxt_mem_type_get(ulp_ctx, &mtype)))
 		return -EINVAL;
 	/* Update the bp flag with gfid flag */
 	if (mtype == BNXT_ULP_FLOW_MEM_TYPE_EXT)
@@ -355,7 +112,7 @@ ulp_ctx_mh_get_session_name(struct bnxt *bp,
 			    &bus,
 			    &slot,
 			    &device);
-		if (rc != 3) {
+		if (unlikely(rc != 3)) {
 			BNXT_DRV_DBG(DEBUG,
 				    "Failed to scan device ctrl_chan_name\n");
 			return -EINVAL;
@@ -500,9 +257,9 @@ bnxt_ulp_flush_port_flows(struct bnxt *bp)
 	uint16_t func_id;
 
 	/* it is assumed that port is either TVF or PF */
-	if (ulp_port_db_port_func_id_get(bp->ulp_ctx,
-					 bp->eth_dev->data->port_id,
-					 &func_id)) {
+	if (unlikely(ulp_port_db_port_func_id_get(bp->ulp_ctx,
+						  bp->eth_dev->data->port_id,
+						  &func_id))) {
 		BNXT_DRV_DBG(ERR, "Invalid argument\n");
 		return;
 	}
@@ -518,10 +275,11 @@ bnxt_ulp_destroy_vfr_default_rules(struct bnxt *bp, bool global)
 	struct rte_eth_dev *vfr_eth_dev;
 	struct bnxt_representor *vfr_bp;
 
-	if (!BNXT_TRUFLOW_EN(bp) || BNXT_ETH_DEV_IS_REPRESENTOR(bp->eth_dev))
+	if (unlikely(!BNXT_TRUFLOW_EN(bp) ||
+		     BNXT_ETH_DEV_IS_REPRESENTOR(bp->eth_dev)))
 		return;
 
-	if (!bp->ulp_ctx || !bp->ulp_ctx->cfg_data)
+	if (unlikely(!bp->ulp_ctx || !bp->ulp_ctx->cfg_data))
 		return;
 
 	/* Delete default rules for all ports */
@@ -556,12 +314,12 @@ ulp_l2_etype_tunnel_alloc(struct bnxt *bp)
 
 	if (bp->l2_etype_tunnel_cnt) {
 		BNXT_DRV_DBG(DEBUG, "L2 ETYPE Custom Tunnel already allocated\n");
-		return 0;
+		return rc;
 	}
 	rc = bnxt_tunnel_dst_port_alloc(bp,
 					BNXT_L2_ETYPE_TUNNEL_ID,
 					HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_L2_ETYPE);
-	if (rc)
+	if (unlikely(rc))
 		BNXT_DRV_DBG(ERR, "Failed to set global L2 ETYPE Custom Tunnel\n");
 	else
 		bp->l2_etype_tunnel_cnt++;
@@ -577,7 +335,7 @@ bnxt_ulp_port_func_ops_get(struct bnxt *bp)
 	const struct bnxt_ulp_core_ops *func_ops;
 
 	rc = bnxt_ulp_devid_get(bp, &dev_id);
-	if (rc)
+	if (unlikely(rc))
 		return NULL;
 
 	switch (dev_id) {
@@ -624,25 +382,25 @@ bnxt_ulp_port_init(struct bnxt *bp)
 	}
 
 	rc = bnxt_ulp_devid_get(bp, &dev_id);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(DEBUG, "Unsupported device %x\n", rc);
 		return rc;
 	}
 
-	if (bp->ulp_ctx) {
+	if (unlikely(bp->ulp_ctx)) {
 		BNXT_DRV_DBG(DEBUG, "ulp ctx already allocated\n");
 		return rc;
 	}
 
 	bp->ulp_ctx = rte_zmalloc("bnxt_ulp_ctx",
 				  sizeof(struct bnxt_ulp_context), 0);
-	if (!bp->ulp_ctx) {
+	if (unlikely(!bp->ulp_ctx)) {
 		BNXT_DRV_DBG(ERR, "Failed to allocate ulp ctx\n");
 		return -ENOMEM;
 	}
 
 	rc = bnxt_ulp_cntxt_bp_set(bp->ulp_ctx, bp);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to set bp in ulp_ctx\n");
 		rte_free(bp->ulp_ctx);
 		return -EIO;
@@ -650,7 +408,7 @@ bnxt_ulp_port_init(struct bnxt *bp)
 
 	/* This shouldn't fail, unless we have a unknown device */
 	bp->ulp_ctx->ops = bnxt_ulp_port_func_ops_get(bp);
-	if (!bp->ulp_ctx->ops) {
+	if (unlikely(!bp->ulp_ctx->ops)) {
 		BNXT_DRV_DBG(ERR, "Failed to get ulp ops\n");
 		rte_free(bp->ulp_ctx);
 		return -EIO;
@@ -662,7 +420,7 @@ bnxt_ulp_port_init(struct bnxt *bp)
 	 * the TF session.
 	 */
 	session = ulp_session_init(bp, &initialized);
-	if (!session) {
+	if (unlikely(!session)) {
 		BNXT_DRV_DBG(ERR, "Failed to initialize the tf session\n");
 		rc = -EIO;
 		goto jump_to_error;
@@ -674,13 +432,13 @@ bnxt_ulp_port_init(struct bnxt *bp)
 		 * simply assign the ulp context to this rte_eth_dev.
 		 */
 		rc = bp->ulp_ctx->ops->ulp_ctx_attach(bp, session);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "Failed to attach the ulp context\n");
 			goto jump_to_error;
 		}
 	} else {
 		rc = bp->ulp_ctx->ops->ulp_init(bp, session);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "Failed to initialize the ulp init\n");
 			goto jump_to_error;
 		}
@@ -688,38 +446,38 @@ bnxt_ulp_port_init(struct bnxt *bp)
 
 	/* setup the l2 etype tunnel for custom l2 encap/decap */
 	rc = ulp_l2_etype_tunnel_alloc(bp);
-	if (rc)
+	if (unlikely(rc))
 		goto jump_to_error;
 
 
 	/* Update bnxt driver flags */
 	rc = ulp_dparms_dev_port_intf_update(bp, bp->ulp_ctx);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to update driver flags\n");
 		goto jump_to_error;
 	}
 
 	/* update the port database for the given interface */
 	rc = ulp_port_db_port_update(bp->ulp_ctx, bp->eth_dev);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to update port database\n");
 		goto jump_to_error;
 	}
 
 	/* create the default rules */
 	rc = bnxt_ulp_create_df_rules(bp);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to create default flow\n");
 		goto jump_to_error;
 	}
 
 	/* set the unicast mode */
-	if (bnxt_ulp_cntxt_ptr2_ulp_flags_get(bp->ulp_ctx, &ulp_flags)) {
+	if (unlikely(bnxt_ulp_cntxt_ptr2_ulp_flags_get(bp->ulp_ctx, &ulp_flags))) {
 		BNXT_DRV_DBG(ERR, "Error in getting ULP context flags\n");
 		goto jump_to_error;
 	}
 	if (ulp_flags & BNXT_ULP_APP_UNICAST_ONLY) {
-		if (bnxt_pmd_set_unicast_rxmask(bp->eth_dev)) {
+		if (unlikely(bnxt_pmd_set_unicast_rxmask(bp->eth_dev))) {
 			BNXT_DRV_DBG(ERR, "Error in setting unicast rxmode\n");
 			goto jump_to_error;
 		}
@@ -732,14 +490,14 @@ bnxt_ulp_port_init(struct bnxt *bp)
 		rc = bnxt_hwrm_vnic_update(bp,
 					vnic,
 					HWRM_VNIC_UPDATE_INPUT_ENABLES_METADATA_FORMAT_TYPE_VALID);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "Failed to set metadata format\n");
 			goto jump_to_error;
 		}
 	}
 
 	rc = ulp_l2_etype_tunnel_alloc(bp);
-	if (rc)
+	if (unlikely(rc))
 		goto jump_to_error;
 
 	return rc;
@@ -757,14 +515,14 @@ ulp_l2_etype_tunnel_free(struct bnxt *bp)
 	if (!ULP_APP_L2_ETYPE_SUPPORT(bp->ulp_ctx))
 		return;
 
-	if (bp->l2_etype_tunnel_cnt == 0) {
+	if (unlikely(bp->l2_etype_tunnel_cnt == 0)) {
 		BNXT_DRV_DBG(DEBUG, "L2 ETYPE Custom Tunnel already freed\n");
 		return;
 	}
 	rc = bnxt_tunnel_dst_port_free(bp,
 				       BNXT_L2_ETYPE_TUNNEL_ID,
 				       HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_L2_ETYPE);
-	if (rc)
+	if (unlikely(rc))
 		BNXT_DRV_DBG(ERR, "Failed to clear L2 ETYPE Custom Tunnel\n");
 
 	bp->l2_etype_tunnel_cnt--;
@@ -781,21 +539,21 @@ bnxt_ulp_port_deinit(struct bnxt *bp)
 	struct rte_pci_device *pci_dev;
 	struct rte_pci_addr *pci_addr;
 
-	if (!BNXT_TRUFLOW_EN(bp)) {
+	if (unlikely(!BNXT_TRUFLOW_EN(bp))) {
 		BNXT_DRV_DBG(DEBUG,
 			     "Skip ULP deinit for port:%d, TF is not enabled\n",
 			     bp->eth_dev->data->port_id);
 		return;
 	}
 
-	if (!BNXT_PF(bp) && !BNXT_VF_IS_TRUSTED(bp)) {
+	if (unlikely(!BNXT_PF(bp) && !BNXT_VF_IS_TRUSTED(bp))) {
 		BNXT_DRV_DBG(DEBUG,
 			     "Skip ULP deinit port:%d, not a TVF or PF\n",
 			     bp->eth_dev->data->port_id);
 		return;
 	}
 
-	if (!bp->ulp_ctx) {
+	if (unlikely(!bp->ulp_ctx)) {
 		BNXT_DRV_DBG(DEBUG, "ulp ctx already de-allocated\n");
 		return;
 	}
@@ -811,7 +569,7 @@ bnxt_ulp_port_deinit(struct bnxt *bp)
 	pthread_mutex_unlock(&bnxt_ulp_global_mutex);
 
 	/* session not found then just exit */
-	if (!session) {
+	if (unlikely(!session)) {
 		/* Free the ulp context */
 		rte_free(bp->ulp_ctx);
 		bp->ulp_ctx = NULL;
@@ -860,584 +618,6 @@ bnxt_ulp_port_deinit(struct bnxt *bp)
 	bp->ulp_ctx = NULL;
 }
 
-/* Below are the access functions to access internal data of ulp context. */
-/* Function to set the Mark DB into the context */
-int32_t
-bnxt_ulp_cntxt_ptr2_mark_db_set(struct bnxt_ulp_context *ulp_ctx,
-				struct bnxt_ulp_mark_tbl *mark_tbl)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data) {
-		BNXT_DRV_DBG(ERR, "Invalid ulp context data\n");
-		return -EINVAL;
-	}
-
-	ulp_ctx->cfg_data->mark_tbl = mark_tbl;
-
-	return 0;
-}
-
-/* Function to retrieve the Mark DB from the context. */
-struct bnxt_ulp_mark_tbl *
-bnxt_ulp_cntxt_ptr2_mark_db_get(struct bnxt_ulp_context *ulp_ctx)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return NULL;
-
-	return ulp_ctx->cfg_data->mark_tbl;
-}
-
-bool
-bnxt_ulp_cntxt_shared_session_enabled(struct bnxt_ulp_context *ulp_ctx)
-{
-	return ULP_SHARED_SESSION_IS_ENABLED(ulp_ctx->cfg_data->ulp_flags);
-}
-
-bool
-bnxt_ulp_cntxt_multi_shared_session_enabled(struct bnxt_ulp_context *ulp_ctx)
-{
-	return ULP_MULTI_SHARED_IS_SUPPORTED(ulp_ctx);
-}
-
-int32_t
-bnxt_ulp_cntxt_app_id_set(struct bnxt_ulp_context *ulp_ctx, uint8_t app_id)
-{
-	if (!ulp_ctx)
-		return -EINVAL;
-	ulp_ctx->cfg_data->app_id = app_id;
-	return 0;
-}
-
-int32_t
-bnxt_ulp_cntxt_app_id_get(struct bnxt_ulp_context *ulp_ctx, uint8_t *app_id)
-{
-	/* Default APP id is zero */
-	if (!ulp_ctx || !app_id)
-		return -EINVAL;
-	*app_id = ulp_ctx->cfg_data->app_id;
-	return 0;
-}
-
-/* Function to set the device id of the hardware. */
-int32_t
-bnxt_ulp_cntxt_dev_id_set(struct bnxt_ulp_context *ulp_ctx,
-			  uint32_t dev_id)
-{
-	if (ulp_ctx && ulp_ctx->cfg_data) {
-		ulp_ctx->cfg_data->dev_id = dev_id;
-		return 0;
-	}
-
-	return -EINVAL;
-}
-
-/* Function to get the device id of the hardware. */
-int32_t
-bnxt_ulp_cntxt_dev_id_get(struct bnxt_ulp_context *ulp_ctx,
-			  uint32_t *dev_id)
-{
-	if (ulp_ctx && ulp_ctx->cfg_data) {
-		*dev_id = ulp_ctx->cfg_data->dev_id;
-		return 0;
-	}
-	*dev_id = BNXT_ULP_DEVICE_ID_LAST;
-	BNXT_DRV_DBG(ERR, "Failed to read dev_id from ulp ctxt\n");
-	return -EINVAL;
-}
-
-int32_t
-bnxt_ulp_cntxt_mem_type_set(struct bnxt_ulp_context *ulp_ctx,
-			    enum bnxt_ulp_flow_mem_type mem_type)
-{
-	if (ulp_ctx && ulp_ctx->cfg_data) {
-		ulp_ctx->cfg_data->mem_type = mem_type;
-		return 0;
-	}
-	BNXT_DRV_DBG(ERR, "Failed to write mem_type in ulp ctxt\n");
-	return -EINVAL;
-}
-
-int32_t
-bnxt_ulp_cntxt_mem_type_get(struct bnxt_ulp_context *ulp_ctx,
-			    enum bnxt_ulp_flow_mem_type *mem_type)
-{
-	if (ulp_ctx && ulp_ctx->cfg_data) {
-		*mem_type = ulp_ctx->cfg_data->mem_type;
-		return 0;
-	}
-	*mem_type = BNXT_ULP_FLOW_MEM_TYPE_LAST;
-	BNXT_DRV_DBG(ERR, "Failed to read mem_type in ulp ctxt\n");
-	return -EINVAL;
-}
-
-/* Function to get the table scope id of the EEM table. */
-int32_t
-bnxt_ulp_cntxt_tbl_scope_id_get(struct bnxt_ulp_context *ulp_ctx,
-				uint32_t *tbl_scope_id)
-{
-	if (ulp_ctx && ulp_ctx->cfg_data) {
-		*tbl_scope_id = ulp_ctx->cfg_data->tbl_scope_id;
-		return 0;
-	}
-
-	return -EINVAL;
-}
-
-/* Function to set the table scope id of the EEM table. */
-int32_t
-bnxt_ulp_cntxt_tbl_scope_id_set(struct bnxt_ulp_context *ulp_ctx,
-				uint32_t tbl_scope_id)
-{
-	if (ulp_ctx && ulp_ctx->cfg_data) {
-		ulp_ctx->cfg_data->tbl_scope_id = tbl_scope_id;
-		return 0;
-	}
-
-	return -EINVAL;
-}
-
-/* Function to set the v3 table scope id, only works for tfc objects */
-int32_t
-bnxt_ulp_cntxt_tsid_set(struct bnxt_ulp_context *ulp_ctx, uint8_t tsid)
-{
-	if (ulp_ctx && ulp_ctx->tfo_type == BNXT_ULP_TFO_TYPE_TFC) {
-		ulp_ctx->tsid = tsid;
-		ULP_BITMAP_SET(ulp_ctx->tfo_flags, BNXT_ULP_TFO_TSID_FLAG);
-		return 0;
-	}
-	return -EINVAL;
-}
-
-/* Function to reset the v3 table scope id, only works for tfc objects */
-void
-bnxt_ulp_cntxt_tsid_reset(struct bnxt_ulp_context *ulp_ctx)
-{
-	if (ulp_ctx && ulp_ctx->tfo_type == BNXT_ULP_TFO_TYPE_TFC)
-		ULP_BITMAP_RESET(ulp_ctx->tfo_flags, BNXT_ULP_TFO_TSID_FLAG);
-}
-
-/* Function to set the v3 table scope id, only works for tfc objects */
-int32_t
-bnxt_ulp_cntxt_tsid_get(struct bnxt_ulp_context *ulp_ctx, uint8_t *tsid)
-{
-	if (ulp_ctx && tsid &&
-	    ulp_ctx->tfo_type == BNXT_ULP_TFO_TYPE_TFC &&
-	    ULP_BITMAP_ISSET(ulp_ctx->tfo_flags, BNXT_ULP_TFO_TSID_FLAG)) {
-		*tsid = ulp_ctx->tsid;
-		return 0;
-	}
-	return -EINVAL;
-}
-
-/* Function to set the v3 session id, only works for tfc objects */
-int32_t
-bnxt_ulp_cntxt_sid_set(struct bnxt_ulp_context *ulp_ctx,
-		       uint16_t sid)
-{
-	if (ulp_ctx && ulp_ctx->tfo_type == BNXT_ULP_TFO_TYPE_TFC) {
-		ulp_ctx->sid = sid;
-		ULP_BITMAP_SET(ulp_ctx->tfo_flags, BNXT_ULP_TFO_SID_FLAG);
-		return 0;
-	}
-	return -EINVAL;
-}
-
-/*
- * Function to reset the v3 session id, only works for tfc objects
- * There isn't a known invalid value for sid, so this is necessary
- */
-void
-bnxt_ulp_cntxt_sid_reset(struct bnxt_ulp_context *ulp_ctx)
-{
-	if (ulp_ctx && ulp_ctx->tfo_type == BNXT_ULP_TFO_TYPE_TFC)
-		ULP_BITMAP_RESET(ulp_ctx->tfo_flags, BNXT_ULP_TFO_SID_FLAG);
-}
-
-/* Function to get the v3 session id, only works for tfc objects */
-int32_t
-bnxt_ulp_cntxt_sid_get(struct bnxt_ulp_context *ulp_ctx,
-		       uint16_t *sid)
-{
-	if (ulp_ctx && sid &&
-	    ulp_ctx->tfo_type == BNXT_ULP_TFO_TYPE_TFC &&
-	    ULP_BITMAP_ISSET(ulp_ctx->tfo_flags, BNXT_ULP_TFO_SID_FLAG)) {
-		*sid = ulp_ctx->sid;
-		return 0;
-	}
-	return -EINVAL;
-}
-
-/* Function to get the number of shared clients attached */
-uint8_t
-bnxt_ulp_cntxt_num_shared_clients_get(struct bnxt_ulp_context *ulp)
-{
-	if (ulp == NULL || ulp->cfg_data == NULL) {
-		BNXT_DRV_DBG(ERR, "Invalid arguments\n");
-		return 0;
-	}
-	return ulp->cfg_data->num_shared_clients;
-}
-
-/* Function to set the number of shared clients */
-int
-bnxt_ulp_cntxt_num_shared_clients_set(struct bnxt_ulp_context *ulp, bool incr)
-{
-	if (ulp == NULL || ulp->cfg_data == NULL) {
-		BNXT_DRV_DBG(ERR, "Invalid arguments\n");
-		return 0;
-	}
-	if (incr)
-		ulp->cfg_data->num_shared_clients++;
-	else if (ulp->cfg_data->num_shared_clients)
-		ulp->cfg_data->num_shared_clients--;
-
-	BNXT_DRV_DBG(DEBUG, "%d:clients(%d)\n", incr,
-		     ulp->cfg_data->num_shared_clients);
-
-	return 0;
-}
-
-int32_t
-bnxt_ulp_cntxt_bp_set(struct bnxt_ulp_context *ulp, struct bnxt *bp)
-{
-	if (ulp == NULL) {
-		BNXT_DRV_DBG(ERR, "Invalid arguments\n");
-		return -EINVAL;
-	}
-	ulp->bp = bp;
-	return 0;
-}
-
-struct bnxt*
-bnxt_ulp_cntxt_bp_get(struct bnxt_ulp_context *ulp)
-{
-	if (ulp == NULL) {
-		BNXT_DRV_DBG(ERR, "Invalid arguments\n");
-		return NULL;
-	}
-	return ulp->bp;
-}
-
-int32_t
-bnxt_ulp_cntxt_fid_get(struct bnxt_ulp_context *ulp, uint16_t *fid)
-{
-	if (ulp == NULL || fid == NULL)
-		return -EINVAL;
-
-	*fid = ulp->bp->fw_fid;
-	return 0;
-}
-
-void
-bnxt_ulp_cntxt_ptr2_default_class_bits_set(struct bnxt_ulp_context *ulp_ctx,
-					   uint64_t bits)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return;
-	ulp_ctx->cfg_data->default_class_bits = bits;
-}
-
-uint64_t
-bnxt_ulp_cntxt_ptr2_default_class_bits_get(struct bnxt_ulp_context *ulp_ctx)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return 0;
-	return ulp_ctx->cfg_data->default_class_bits;
-}
-
-void
-bnxt_ulp_cntxt_ptr2_default_act_bits_set(struct bnxt_ulp_context *ulp_ctx,
-					 uint64_t bits)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return;
-	ulp_ctx->cfg_data->default_act_bits = bits;
-}
-
-uint64_t
-bnxt_ulp_cntxt_ptr2_default_act_bits_get(struct bnxt_ulp_context *ulp_ctx)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return 0;
-	return ulp_ctx->cfg_data->default_act_bits;
-}
-
-/*
- * Get the device table entry based on the device id.
- *
- * dev_id [in] The device id of the hardware
- *
- * Returns the pointer to the device parameters.
- */
-struct bnxt_ulp_device_params *
-bnxt_ulp_device_params_get(uint32_t dev_id)
-{
-	if (dev_id < BNXT_ULP_MAX_NUM_DEVICES)
-		return &ulp_device_params[dev_id];
-	return NULL;
-}
-
-/* Function to set the flow database to the ulp context. */
-int32_t
-bnxt_ulp_cntxt_ptr2_flow_db_set(struct bnxt_ulp_context	*ulp_ctx,
-				struct bnxt_ulp_flow_db	*flow_db)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return -EINVAL;
-
-	ulp_ctx->cfg_data->flow_db = flow_db;
-	return 0;
-}
-
-/* Function to get the flow database from the ulp context. */
-struct bnxt_ulp_flow_db	*
-bnxt_ulp_cntxt_ptr2_flow_db_get(struct bnxt_ulp_context	*ulp_ctx)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return NULL;
-
-	return ulp_ctx->cfg_data->flow_db;
-}
-
-/* Function to get the tunnel cache table info from the ulp context. */
-struct bnxt_tun_cache_entry *
-bnxt_ulp_cntxt_ptr2_tun_tbl_get(struct bnxt_ulp_context *ulp_ctx)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return NULL;
-
-	return ulp_ctx->cfg_data->tun_tbl;
-}
-
-/* Function to get the ulp context from eth device. */
-struct bnxt_ulp_context	*
-bnxt_ulp_eth_dev_ptr2_cntxt_get(struct rte_eth_dev	*dev)
-{
-	struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
-
-	if (BNXT_ETH_DEV_IS_REPRESENTOR(dev)) {
-		struct bnxt_representor *vfr = dev->data->dev_private;
-
-		bp = vfr->parent_dev->data->dev_private;
-	}
-
-	if (!bp) {
-		BNXT_DRV_DBG(ERR, "Bnxt private data is not initialized\n");
-		return NULL;
-	}
-	return bp->ulp_ctx;
-}
-
-int32_t
-bnxt_ulp_cntxt_ptr2_mapper_data_set(struct bnxt_ulp_context *ulp_ctx,
-				    void *mapper_data)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data) {
-		BNXT_DRV_DBG(ERR, "Invalid ulp context data\n");
-		return -EINVAL;
-	}
-
-	ulp_ctx->cfg_data->mapper_data = mapper_data;
-	return 0;
-}
-
-void *
-bnxt_ulp_cntxt_ptr2_mapper_data_get(struct bnxt_ulp_context *ulp_ctx)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data) {
-		BNXT_DRV_DBG(ERR, "Invalid ulp context data\n");
-		return NULL;
-	}
-
-	return ulp_ctx->cfg_data->mapper_data;
-}
-
-int32_t
-bnxt_ulp_cntxt_ptr2_matcher_data_set(struct bnxt_ulp_context *ulp_ctx,
-				     void *matcher_data)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data) {
-		BNXT_DRV_DBG(ERR, "Invalid ulp context data\n");
-		return -EINVAL;
-	}
-
-	ulp_ctx->cfg_data->matcher_data = matcher_data;
-	return 0;
-}
-
-void *
-bnxt_ulp_cntxt_ptr2_matcher_data_get(struct bnxt_ulp_context *ulp_ctx)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data) {
-		BNXT_DRV_DBG(ERR, "Invalid ulp context data\n");
-		return NULL;
-	}
-
-	return ulp_ctx->cfg_data->matcher_data;
-}
-
-/* Function to set the port database to the ulp context. */
-int32_t
-bnxt_ulp_cntxt_ptr2_port_db_set(struct bnxt_ulp_context	*ulp_ctx,
-				struct bnxt_ulp_port_db	*port_db)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return -EINVAL;
-
-	ulp_ctx->cfg_data->port_db = port_db;
-	return 0;
-}
-
-/* Function to get the port database from the ulp context. */
-struct bnxt_ulp_port_db *
-bnxt_ulp_cntxt_ptr2_port_db_get(struct bnxt_ulp_context	*ulp_ctx)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return NULL;
-
-	return ulp_ctx->cfg_data->port_db;
-}
-
-/* Function to set the flow counter info into the context */
-int32_t
-bnxt_ulp_cntxt_ptr2_fc_info_set(struct bnxt_ulp_context *ulp_ctx,
-				struct bnxt_ulp_fc_info *ulp_fc_info)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data) {
-		BNXT_DRV_DBG(ERR, "Invalid ulp context data\n");
-		return -EINVAL;
-	}
-
-	ulp_ctx->cfg_data->fc_info = ulp_fc_info;
-
-	return 0;
-}
-
-/* Function to retrieve the flow counter info from the context. */
-struct bnxt_ulp_fc_info *
-bnxt_ulp_cntxt_ptr2_fc_info_get(struct bnxt_ulp_context *ulp_ctx)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return NULL;
-
-	return ulp_ctx->cfg_data->fc_info;
-}
-
-/* Function to get the ulp flags from the ulp context. */
-int32_t
-bnxt_ulp_cntxt_ptr2_ulp_flags_get(struct bnxt_ulp_context *ulp_ctx,
-				  uint32_t *flags)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return -1;
-
-	*flags =  ulp_ctx->cfg_data->ulp_flags;
-	return 0;
-}
-
-/* Function to get the ulp vfr info from the ulp context. */
-struct bnxt_ulp_vfr_rule_info*
-bnxt_ulp_cntxt_ptr2_ulp_vfr_info_get(struct bnxt_ulp_context *ulp_ctx,
-				     uint32_t port_id)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data || port_id >= RTE_MAX_ETHPORTS)
-		return NULL;
-
-	return &ulp_ctx->cfg_data->vfr_rule_info[port_id];
-}
-
-/* Function to acquire the flow database lock from the ulp context. */
-int32_t
-bnxt_ulp_cntxt_acquire_fdb_lock(struct bnxt_ulp_context	*ulp_ctx)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return -1;
-
-	if (pthread_mutex_lock(&ulp_ctx->cfg_data->flow_db_lock)) {
-		BNXT_DRV_DBG(ERR, "unable to acquire fdb lock\n");
-		return -1;
-	}
-	return 0;
-}
-
-/* Function to release the flow database lock from the ulp context. */
-void
-bnxt_ulp_cntxt_release_fdb_lock(struct bnxt_ulp_context	*ulp_ctx)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return;
-
-	pthread_mutex_unlock(&ulp_ctx->cfg_data->flow_db_lock);
-}
-
-/* Function to extract the action type from the shared action handle. */
-int32_t
-bnxt_get_action_handle_type(const struct rte_flow_action_handle *handle,
-			    uint32_t *action_handle_type)
-{
-	if (!action_handle_type)
-		return -EINVAL;
-
-	*action_handle_type = (uint32_t)(((uint64_t)handle >> 32) & 0xffffffff);
-	if (*action_handle_type >= BNXT_ULP_GEN_TBL_MAX_SZ)
-		return -EINVAL;
-
-	return 0;
-}
-
-/* Function to extract the direction from the shared action handle. */
-int32_t
-bnxt_get_action_handle_direction(const struct rte_flow_action_handle *handle,
-				 uint32_t *dir)
-{
-	uint32_t shared_type;
-	int32_t ret = 0;
-
-	ret = bnxt_get_action_handle_type(handle, &shared_type);
-	if (ret)
-		return ret;
-
-	*dir = shared_type & 0x1 ? BNXT_ULP_DIR_EGRESS : BNXT_ULP_DIR_INGRESS;
-
-	return ret;
-}
-
-/* Function to extract the action index from the shared action handle. */
-uint32_t
-bnxt_get_action_handle_index(const struct rte_flow_action_handle *handle)
-{
-	return (uint32_t)((uint64_t)handle & 0xffffffff);
-}
-
-/* Function to set the ha info into the context */
-int32_t
-bnxt_ulp_cntxt_ptr2_ha_info_set(struct bnxt_ulp_context *ulp_ctx,
-				struct bnxt_ulp_ha_mgr_info *ulp_ha_info)
-{
-	if (ulp_ctx == NULL || ulp_ctx->cfg_data == NULL) {
-		BNXT_DRV_DBG(ERR, "Invalid ulp context data\n");
-		return -EINVAL;
-	}
-	ulp_ctx->cfg_data->ha_info = ulp_ha_info;
-	return 0;
-}
-
-/* Function to retrieve the ha info from the context. */
-struct bnxt_ulp_ha_mgr_info *
-bnxt_ulp_cntxt_ptr2_ha_info_get(struct bnxt_ulp_context *ulp_ctx)
-{
-	if (ulp_ctx == NULL || ulp_ctx->cfg_data == NULL)
-		return NULL;
-	return ulp_ctx->cfg_data->ha_info;
-}
-
-bool
-bnxt_ulp_cntxt_ha_enabled(struct bnxt_ulp_context *ulp_ctx)
-{
-	if (ulp_ctx == NULL || ulp_ctx->cfg_data == NULL)
-		return false;
-	return !!ULP_HIGH_AVAIL_IS_ENABLED(ulp_ctx->cfg_data->ulp_flags);
-}
-
 int32_t
 bnxt_ulp_cntxt_list_init(void)
 {
@@ -1454,7 +634,7 @@ bnxt_ulp_cntxt_list_add(struct bnxt_ulp_context *ulp_ctx)
 	struct ulp_context_list_entry	*entry;
 
 	entry = rte_zmalloc(NULL, sizeof(struct ulp_context_list_entry), 0);
-	if (entry == NULL) {
+	if (unlikely(entry == NULL)) {
 		BNXT_DRV_DBG(ERR, "unable to allocate memory\n");
 		return -ENOMEM;
 	}
@@ -1503,150 +683,3 @@ bnxt_ulp_cntxt_entry_release(void)
 {
 	rte_spinlock_unlock(&bnxt_ulp_ctxt_lock);
 }
-
-/* Function to get the app tunnel details from the ulp context. */
-struct bnxt_flow_app_tun_ent *
-bnxt_ulp_cntxt_ptr2_app_tun_list_get(struct bnxt_ulp_context *ulp)
-{
-	if (!ulp || !ulp->cfg_data)
-		return NULL;
-
-	return ulp->cfg_data->app_tun;
-}
-
-/* Function to get the truflow app id. This defined in the build file */
-uint32_t
-bnxt_ulp_default_app_id_get(void)
-{
-	return BNXT_TF_APP_ID;
-}
-
-/* Function to convert ulp dev id to regular dev id. */
-uint32_t
-bnxt_ulp_cntxt_convert_dev_id(uint32_t ulp_dev_id)
-{
-	enum tf_device_type type = 0;
-
-	switch (ulp_dev_id) {
-	case BNXT_ULP_DEVICE_ID_WH_PLUS:
-		type = TF_DEVICE_TYPE_P4;
-		break;
-	case BNXT_ULP_DEVICE_ID_STINGRAY:
-		type = TF_DEVICE_TYPE_SR;
-		break;
-	case BNXT_ULP_DEVICE_ID_THOR:
-		type = TF_DEVICE_TYPE_P5;
-		break;
-	default:
-		BNXT_DRV_DBG(ERR, "Invalid device id\n");
-		break;
-	}
-	return type;
-}
-
-/* This function sets the IF table index for the
- * Application to poll to get the hot upgrade state and count details from
- * the firmware.
- */
-int32_t
-bnxt_ulp_cntxt_ha_reg_set(struct bnxt_ulp_context *ulp_ctx,
-		    uint8_t state, uint8_t cnt)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return -EINVAL;
-
-	if (ULP_MULTI_SHARED_IS_SUPPORTED(ulp_ctx)) {
-		ulp_ctx->cfg_data->hu_reg_state = state;
-		ulp_ctx->cfg_data->hu_reg_cnt = cnt;
-	} else {
-		ulp_ctx->cfg_data->hu_reg_state = ULP_HA_IF_TBL_IDX;
-		ulp_ctx->cfg_data->hu_reg_cnt = ULP_HA_CLIENT_CNT_IF_TBL_IDX;
-	}
-	return 0;
-}
-
-/* This function gets the IF table index for the
- * application to poll to get the application hot upgrade state from
- * the firmware.
- */
-uint32_t
-bnxt_ulp_cntxt_ha_reg_state_get(struct bnxt_ulp_context *ulp_ctx)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return 0;
-
-	return (uint32_t)ulp_ctx->cfg_data->hu_reg_state;
-}
-
-/* This function gets the IF table index for the
- * Application to poll to get the application count from
- * the firmware.
- */
-uint32_t
-bnxt_ulp_cntxt_ha_reg_cnt_get(struct bnxt_ulp_context *ulp_ctx)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return 0;
-
-	return (uint32_t)ulp_ctx->cfg_data->hu_reg_cnt;
-}
-
-/* This function sets the number of key recipes supported
- * Generally, this should be set to the number of flexible keys
- * supported
- */
-void
-bnxt_ulp_num_key_recipes_set(struct bnxt_ulp_context *ulp_ctx,
-			     uint16_t num_recipes)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return;
-	ulp_ctx->cfg_data->num_key_recipes_per_dir = num_recipes;
-}
-
-/* This function gets the number of key recipes supported */
-int32_t
-bnxt_ulp_num_key_recipes_get(struct bnxt_ulp_context *ulp_ctx)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return 0;
-	return ulp_ctx->cfg_data->num_key_recipes_per_dir;
-}
-
-/* This function gets the feature bits */
-uint64_t
-bnxt_ulp_feature_bits_get(struct bnxt_ulp_context *ulp_ctx)
-{
-	if (!ulp_ctx || !ulp_ctx->cfg_data)
-		return 0;
-	return ulp_ctx->cfg_data->feature_bits;
-}
-
-/* Add the VF Rep endpoint to the session */
-int32_t
-bnxt_ulp_vfr_session_fid_add(struct bnxt_ulp_context *ulp_ctx,
-			     uint16_t vfr_fid)
-{
-	int32_t rc = 0;
-
-	if (ulp_ctx == NULL || ulp_ctx->ops == NULL)
-		return -EINVAL;
-	if (ulp_ctx->ops->ulp_vfr_session_fid_add)
-		rc = ulp_ctx->ops->ulp_vfr_session_fid_add(ulp_ctx, vfr_fid);
-
-	return rc;
-}
-
-/* Remove the VF Rep endpoint from the session */
-int32_t
-bnxt_ulp_vfr_session_fid_rem(struct bnxt_ulp_context *ulp_ctx,
-			     uint16_t vfr_fid)
-{
-	int32_t rc = 0;
-
-	if (ulp_ctx == NULL || ulp_ctx->ops == NULL)
-		return -EINVAL;
-	if (ulp_ctx->ops->ulp_vfr_session_fid_rem)
-		rc = ulp_ctx->ops->ulp_vfr_session_fid_rem(ulp_ctx, vfr_fid);
-	return rc;
-}
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.h b/drivers/net/bnxt/tf_ulp/bnxt_ulp.h
index da5c9bc61a..758b9deb63 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.h
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.h
@@ -243,10 +243,6 @@ struct bnxt_ulp_core_ops {
 extern const struct bnxt_ulp_core_ops bnxt_ulp_tf_core_ops;
 extern const struct bnxt_ulp_core_ops bnxt_ulp_tfc_core_ops;
 
-int32_t
-bnxt_ulp_devid_get(struct bnxt *bp,
-		   enum bnxt_ulp_device_id  *ulp_dev_id);
-
 bool
 ulp_is_default_session_active(struct bnxt_ulp_context *ulp_ctx);
 
@@ -257,141 +253,11 @@ ulp_is_default_session_active(struct bnxt_ulp_context *ulp_ctx);
 bool
 ulp_ctx_deinit_allowed(struct bnxt_ulp_context *ulp_ctx);
 
-/* Function to set the device id of the hardware. */
-int32_t
-bnxt_ulp_cntxt_dev_id_set(struct bnxt_ulp_context *ulp_ctx, uint32_t dev_id);
-
-/* Function to get the device id of the hardware. */
-int32_t
-bnxt_ulp_cntxt_dev_id_get(struct bnxt_ulp_context *ulp_ctx, uint32_t *dev_id);
-
-/* Function to get whether or not ext mem is used for EM */
-int32_t
-bnxt_ulp_cntxt_mem_type_get(struct bnxt_ulp_context *ulp_ctx,
-			    enum bnxt_ulp_flow_mem_type *mem_type);
-
-/* Function to set whether or not ext mem is used for EM */
-int32_t
-bnxt_ulp_cntxt_mem_type_set(struct bnxt_ulp_context *ulp_ctx,
-			    enum bnxt_ulp_flow_mem_type mem_type);
-
-/* Function to set the table scope id of the EEM table. */
-int32_t
-bnxt_ulp_cntxt_tbl_scope_id_set(struct bnxt_ulp_context *ulp_ctx,
-				uint32_t tbl_scope_id);
-
-/* Function to get the table scope id of the EEM table. */
-int32_t
-bnxt_ulp_cntxt_tbl_scope_id_get(struct bnxt_ulp_context *ulp_ctx,
-				uint32_t *tbl_scope_id);
-
-/* Function to set the bp associated with the ulp_ctx */
-int32_t
-bnxt_ulp_cntxt_tfp_set(struct bnxt_ulp_context *ulp,
-		       enum bnxt_ulp_session_type s_type,
-		       struct tf *tfp);
-
-/* Function to get the tfp session details from ulp context. */
-struct tf *
-bnxt_ulp_cntxt_tfp_get(struct bnxt_ulp_context *ulp,
-		       enum bnxt_ulp_session_type s_type);
-
-int32_t
-bnxt_ulp_cntxt_bp_set(struct bnxt_ulp_context *ulp, struct bnxt *bp);
-
-/* Function to get the bp associated with the ulp_ctx */
-struct bnxt *
-bnxt_ulp_cntxt_bp_get(struct bnxt_ulp_context *ulp);
-
-/* Function to set the v3 table scope id, only works for tfc objects */
-int32_t
-bnxt_ulp_cntxt_tsid_set(struct bnxt_ulp_context *ulp_ctx, uint8_t tsid);
-
-/*
- * Function to set the v3 table scope id, only works for tfc objects
- * There isn't a known invalid value for tsid, so this is necessary in order to
- * know that the tsid is not set.
- */
 void
-bnxt_ulp_cntxt_tsid_reset(struct bnxt_ulp_context *ulp_ctx);
-
-/* Function to set the v3 table scope id, only works for tfc objects */
-int32_t
-bnxt_ulp_cntxt_tsid_get(struct bnxt_ulp_context *ulp_ctx, uint8_t *tsid);
-
-/* Function to set the v3 session id, only works for tfc objects */
-int32_t
-bnxt_ulp_cntxt_sid_set(struct bnxt_ulp_context *ulp_ctx, uint16_t session_id);
-
-/*
- * Function to reset the v3 session id, only works for tfc objects
- * There isn't a known invalid value for sid, so this is necessary in order to
- * know that the sid is not set.
- */
-void
-bnxt_ulp_cntxt_sid_reset(struct bnxt_ulp_context *ulp_ctx);
-
-/* Function to get the v3 session id, only works for tfc objects */
-int32_t
-bnxt_ulp_cntxt_sid_get(struct bnxt_ulp_context *ulp_ctx, uint16_t *sid);
-
-int32_t
-bnxt_ulp_cntxt_fid_get(struct bnxt_ulp_context *ulp, uint16_t *fw_fid);
-
-/* Get the device table entry based on the device id. */
-struct bnxt_ulp_device_params *
-bnxt_ulp_device_params_get(uint32_t dev_id);
-
-int32_t
-bnxt_ulp_ctxt_ptr2_mark_db_set(struct bnxt_ulp_context *ulp_ctx,
-			       struct bnxt_ulp_mark_tbl *mark_tbl);
-
-struct bnxt_ulp_mark_tbl *
-bnxt_ulp_ctxt_ptr2_mark_db_get(struct bnxt_ulp_context *ulp_ctx);
-
-/* Function to set the flow database to the ulp context. */
-int32_t
-bnxt_ulp_cntxt_ptr2_flow_db_set(struct bnxt_ulp_context	*ulp_ctx,
-				struct bnxt_ulp_flow_db	*flow_db);
-
-/* Function to get the flow database from the ulp context. */
-struct bnxt_ulp_flow_db	*
-bnxt_ulp_cntxt_ptr2_flow_db_get(struct bnxt_ulp_context	*ulp_ctx);
-
-/* Function to get the tunnel cache table info from the ulp context. */
-struct bnxt_tun_cache_entry *
-bnxt_ulp_cntxt_ptr2_tun_tbl_get(struct bnxt_ulp_context	*ulp_ctx);
-
-/* Function to get the ulp context from eth device. */
-struct bnxt_ulp_context	*
-bnxt_ulp_eth_dev_ptr2_cntxt_get(struct rte_eth_dev *dev);
-
-/* Function to add the ulp mapper data to the ulp context */
-int32_t
-bnxt_ulp_cntxt_ptr2_mapper_data_set(struct bnxt_ulp_context *ulp_ctx,
-				    void *mapper_data);
-
-/* Function to get the ulp mapper data from the ulp context */
-void *
-bnxt_ulp_cntxt_ptr2_mapper_data_get(struct bnxt_ulp_context *ulp_ctx);
-
-/* Function to add the ulp matcher data to the ulp context */
-int32_t
-bnxt_ulp_cntxt_ptr2_matcher_data_set(struct bnxt_ulp_context *ulp_ctx,
-				     void *matcher_data);
-
-/* Function to get the ulp matcher data from the ulp context */
-void *
-bnxt_ulp_cntxt_ptr2_matcher_data_get(struct bnxt_ulp_context *ulp_ctx);
+bnxt_ulp_destroy_vfr_default_rules(struct bnxt *bp, bool global);
 
-/* Function to set the port database to the ulp context. */
 int32_t
-bnxt_ulp_cntxt_ptr2_port_db_set(struct bnxt_ulp_context	*ulp_ctx,
-				struct bnxt_ulp_port_db	*port_db);
-
-/* Function to get the port database from the ulp context. */
-struct bnxt_ulp_port_db *
-bnxt_ulp_cntxt_ptr2_port_db_get(struct bnxt_ulp_context	*ulp_ctx);
+bnxt_flow_mtr_init(struct bnxt *bp __rte_unused);
 
 /* Function to create default flows. */
 int32_t
@@ -401,87 +267,23 @@ ulp_default_flow_create(struct rte_eth_dev *eth_dev,
 			uint16_t port_id,
 			uint32_t *flow_id);
 
-/* Function to destroy default flows. */
-int32_t
-ulp_default_flow_destroy(struct rte_eth_dev *eth_dev,
-			 uint32_t flow_id);
-
 int
 bnxt_ulp_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow,
 		      struct rte_flow_error *error);
 
+/* Function to destroy default flows. */
 int32_t
-bnxt_ulp_cntxt_ptr2_fc_info_set(struct bnxt_ulp_context *ulp_ctx,
-				struct bnxt_ulp_fc_info *ulp_fc_info);
-
-struct bnxt_ulp_fc_info *
-bnxt_ulp_cntxt_ptr2_fc_info_get(struct bnxt_ulp_context *ulp_ctx);
-
-int32_t
-bnxt_ulp_cntxt_ptr2_ulp_flags_get(struct bnxt_ulp_context *ulp_ctx,
-				  uint32_t *flags);
+ulp_default_flow_destroy(struct rte_eth_dev *eth_dev,
+			 uint32_t flow_id);
 
 int32_t
-bnxt_ulp_get_df_rule_info(uint16_t port_id, struct bnxt_ulp_context *ulp_ctx,
-			  struct bnxt_ulp_df_rule_info *info);
-
-struct bnxt_ulp_vfr_rule_info*
-bnxt_ulp_cntxt_ptr2_ulp_vfr_info_get(struct bnxt_ulp_context *ulp_ctx,
-				     uint32_t port_id);
+bnxt_ulp_cntxt_list_init(void);
 
 int32_t
-bnxt_ulp_cntxt_acquire_fdb_lock(struct bnxt_ulp_context	*ulp_ctx);
+bnxt_ulp_cntxt_list_add(struct bnxt_ulp_context *ulp_ctx);
 
 void
-bnxt_ulp_cntxt_release_fdb_lock(struct bnxt_ulp_context	*ulp_ctx);
-
-int32_t
-bnxt_get_action_handle_type(const struct rte_flow_action_handle *handle,
-			    uint32_t *action_handle_type);
-
-struct bnxt_ulp_shared_act_info *
-bnxt_ulp_shared_act_info_get(uint32_t *num_entries);
-
-int32_t
-bnxt_get_action_handle_direction(const struct rte_flow_action_handle *handle,
-				 uint32_t *dir);
-
-uint32_t
-bnxt_get_action_handle_index(const struct rte_flow_action_handle *handle);
-
-struct bnxt_ulp_glb_resource_info *
-bnxt_ulp_app_glb_resource_info_list_get(uint32_t *num_entries);
-
-int32_t
-bnxt_ulp_cntxt_app_id_set(struct bnxt_ulp_context *ulp_ctx, uint8_t app_id);
-
-int32_t
-bnxt_ulp_cntxt_app_id_get(struct bnxt_ulp_context *ulp_ctx, uint8_t *app_id);
-
-bool
-bnxt_ulp_cntxt_shared_session_enabled(struct bnxt_ulp_context *ulp_ctx);
-
-bool
-bnxt_ulp_cntxt_multi_shared_session_enabled(struct bnxt_ulp_context *ulp_ctx);
-
-struct bnxt_ulp_app_capabilities_info *
-bnxt_ulp_app_cap_list_get(uint32_t *num_entries);
-
-struct bnxt_ulp_resource_resv_info *
-bnxt_ulp_app_resource_resv_list_get(uint32_t *num_entries);
-
-struct bnxt_ulp_resource_resv_info *
-bnxt_ulp_resource_resv_list_get(uint32_t *num_entries);
-
-int32_t
-bnxt_ulp_cntxt_ptr2_ha_info_set(struct bnxt_ulp_context *ulp_ctx,
-				struct bnxt_ulp_ha_mgr_info *ulp_ha_info);
-
-struct bnxt_ulp_ha_mgr_info *
-bnxt_ulp_cntxt_ptr2_ha_info_get(struct bnxt_ulp_context *ulp_ctx);
-
-bool
-bnxt_ulp_cntxt_ha_enabled(struct bnxt_ulp_context *ulp_ctx);
+bnxt_ulp_cntxt_list_del(struct bnxt_ulp_context *ulp_ctx);
 
 struct bnxt_ulp_context *
 bnxt_ulp_cntxt_entry_acquire(void *arg);
@@ -489,154 +291,4 @@ bnxt_ulp_cntxt_entry_acquire(void *arg);
 void
 bnxt_ulp_cntxt_entry_release(void);
 
-uint8_t
-bnxt_ulp_cntxt_num_shared_clients_get(struct bnxt_ulp_context *ulp_ctx);
-
-int
-bnxt_ulp_cntxt_num_shared_clients_set(struct bnxt_ulp_context *ulp_ctx,
-				      bool incr);
-
-struct bnxt_flow_app_tun_ent *
-bnxt_ulp_cntxt_ptr2_app_tun_list_get(struct bnxt_ulp_context *ulp);
-
-/* Function to get the truflow app id. This defined in the build file */
-uint32_t
-bnxt_ulp_default_app_id_get(void);
-
-int
-bnxt_ulp_vxlan_port_set(struct bnxt_ulp_context *ulp_ctx,
-			uint32_t vxlan_port);
-unsigned int
-bnxt_ulp_vxlan_port_get(struct bnxt_ulp_context *ulp_ctx);
-
-int
-bnxt_ulp_vxlan_ip_port_set(struct bnxt_ulp_context *ulp_ctx,
-			   uint32_t vxlan_ip_port);
-
-unsigned int
-bnxt_ulp_vxlan_ip_port_get(struct bnxt_ulp_context *ulp_ctx);
-
-int
-bnxt_ulp_ecpri_udp_port_set(struct bnxt_ulp_context *ulp_ctx,
-			    uint32_t ecpri_udp_port);
-
-unsigned int
-bnxt_ulp_ecpri_udp_port_get(struct bnxt_ulp_context *ulp_ctx);
-
-uint32_t
-bnxt_ulp_vxlan_gpe_next_proto_set(struct bnxt_ulp_context *ulp_ctx,
-				  uint8_t tunnel_next_proto);
-
-uint8_t
-bnxt_ulp_vxlan_gpe_next_proto_get(struct bnxt_ulp_context *ulp_ctx);
-
-int
-bnxt_ulp_cntxt_vxlan_port_set(struct bnxt_ulp_context *ulp_ctx,
-			uint32_t vxlan_port);
-unsigned int
-bnxt_ulp_cntxt_vxlan_port_get(struct bnxt_ulp_context *ulp_ctx);
-
-int
-bnxt_ulp_default_app_priority_set(struct bnxt_ulp_context *ulp_ctx,
-				  uint32_t prio);
-
-unsigned int
-bnxt_ulp_default_app_priority_get(struct bnxt_ulp_context *ulp_ctx);
-
-int
-bnxt_ulp_max_def_priority_set(struct bnxt_ulp_context *ulp_ctx,
-			      uint32_t prio);
-
-unsigned int
-bnxt_ulp_max_def_priority_get(struct bnxt_ulp_context *ulp_ctx);
-
-int
-bnxt_ulp_min_flow_priority_set(struct bnxt_ulp_context *ulp_ctx, uint32_t prio);
-
-unsigned int
-bnxt_ulp_min_flow_priority_get(struct bnxt_ulp_context *ulp_ctx);
-
-int
-bnxt_ulp_max_flow_priority_set(struct bnxt_ulp_context *ulp_ctx, uint32_t prio);
-
-unsigned int
-bnxt_ulp_max_flow_priority_get(struct bnxt_ulp_context *ulp_ctx);
-
-int
-bnxt_ulp_cntxt_vxlan_ip_port_set(struct bnxt_ulp_context *ulp_ctx,
-			uint32_t vxlan_ip_port);
-unsigned int
-bnxt_ulp_cntxt_vxlan_ip_port_get(struct bnxt_ulp_context *ulp_ctx);
-int
-bnxt_ulp_cntxt_ecpri_udp_port_set(struct bnxt_ulp_context *ulp_ctx,
-			uint32_t ecpri_udp_port);
-unsigned int
-bnxt_ulp_cntxt_ecpri_udp_port_get(struct bnxt_ulp_context *ulp_ctx);
-
-uint32_t
-bnxt_ulp_cntxt_convert_dev_id(uint32_t ulp_dev_id);
-
-int32_t
-bnxt_ulp_ha_reg_set(struct bnxt_ulp_context *ulp_ctx,
-		    uint8_t state, uint8_t cnt);
-
-uint32_t
-bnxt_ulp_ha_reg_state_get(struct bnxt_ulp_context *ulp_ctx);
-
-uint32_t
-bnxt_ulp_ha_reg_cnt_get(struct bnxt_ulp_context *ulp_ctx);
-
-struct tf*
-bnxt_ulp_bp_tfp_get(struct bnxt *bp, enum bnxt_ulp_session_type type);
-
-int32_t
-bnxt_ulp_cntxt_ha_reg_set(struct bnxt_ulp_context *ulp_ctx,
-			  uint8_t state, uint8_t cnt);
-
-uint32_t
-bnxt_ulp_cntxt_ha_reg_state_get(struct bnxt_ulp_context *ulp_ctx);
-
-uint32_t
-bnxt_ulp_cntxt_ha_reg_cnt_get(struct bnxt_ulp_context *ulp_ctx);
-
-int32_t bnxt_ulp_cntxt_list_init(void);
-
-int32_t bnxt_ulp_cntxt_list_add(struct bnxt_ulp_context *ulp_ctx);
-
-void bnxt_ulp_cntxt_list_del(struct bnxt_ulp_context *ulp_ctx);
-
-void
-bnxt_ulp_destroy_vfr_default_rules(struct bnxt *bp, bool global);
-
-void bnxt_ulp_num_key_recipes_set(struct bnxt_ulp_context *ulp_ctx,
-				  uint16_t recipes);
-
-int32_t bnxt_ulp_num_key_recipes_get(struct bnxt_ulp_context *ulp_ctx);
-
-uint64_t
-bnxt_ulp_feature_bits_get(struct bnxt_ulp_context *ulp_ctx);
-
-int32_t
-bnxt_ulp_vfr_session_fid_add(struct bnxt_ulp_context *ulp_ctx,
-			     uint16_t vfr_fid);
-int32_t
-bnxt_ulp_vfr_session_fid_rem(struct bnxt_ulp_context *ulp_ctx,
-			     uint16_t vfr_fid);
-
-int32_t
-bnxt_flow_mtr_init(struct bnxt *bp __rte_unused);
-
-void
-bnxt_ulp_cntxt_ptr2_default_class_bits_set(struct bnxt_ulp_context *ulp_ctx,
-					   uint64_t bits);
-
-uint64_t
-bnxt_ulp_cntxt_ptr2_default_class_bits_get(struct bnxt_ulp_context *ulp_ctx);
-
-void
-bnxt_ulp_cntxt_ptr2_default_act_bits_set(struct bnxt_ulp_context *ulp_ctx,
-					 uint64_t bits);
-uint64_t
-bnxt_ulp_cntxt_ptr2_default_act_bits_get(struct bnxt_ulp_context *ulp_ctx);
-
 #endif /* _BNXT_ULP_H_ */
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c
index 4c99c785c0..eea05e129a 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c
@@ -5,6 +5,7 @@
 
 #include "bnxt.h"
 #include "bnxt_tf_common.h"
+#include "bnxt_ulp_utils.h"
 #include "ulp_rte_parser.h"
 #include "ulp_matcher.h"
 #include "ulp_flow_db.h"
@@ -24,10 +25,10 @@ bnxt_ulp_flow_validate_args(const struct rte_flow_attr *attr,
 			    struct rte_flow_error *error)
 {
 	/* Perform the validation of the arguments for null */
-	if (!error)
+	if (unlikely(!error))
 		return BNXT_TF_RC_ERROR;
 
-	if (!pattern) {
+	if (unlikely(!pattern)) {
 		rte_flow_error_set(error,
 				   EINVAL,
 				   RTE_FLOW_ERROR_TYPE_ITEM_NUM,
@@ -36,7 +37,7 @@ bnxt_ulp_flow_validate_args(const struct rte_flow_attr *attr,
 		return BNXT_TF_RC_ERROR;
 	}
 
-	if (!actions) {
+	if (unlikely(!actions)) {
 		rte_flow_error_set(error,
 				   EINVAL,
 				   RTE_FLOW_ERROR_TYPE_ACTION_NUM,
@@ -45,7 +46,7 @@ bnxt_ulp_flow_validate_args(const struct rte_flow_attr *attr,
 		return BNXT_TF_RC_ERROR;
 	}
 
-	if (!attr) {
+	if (unlikely(!attr)) {
 		rte_flow_error_set(error,
 				   EINVAL,
 				   RTE_FLOW_ERROR_TYPE_ATTR,
@@ -54,7 +55,7 @@ bnxt_ulp_flow_validate_args(const struct rte_flow_attr *attr,
 		return BNXT_TF_RC_ERROR;
 	}
 
-	if (attr->egress && attr->ingress) {
+	if (unlikely(attr->egress && attr->ingress)) {
 		rte_flow_error_set(error,
 				   EINVAL,
 				   RTE_FLOW_ERROR_TYPE_ATTR,
@@ -93,14 +94,14 @@ bnxt_ulp_set_prio_attribute(struct ulp_rte_parser_params *params,
 	uint32_t min_p = bnxt_ulp_min_flow_priority_get(params->ulp_ctx);
 
 	if (max_p < min_p) {
-		if (attr->priority > min_p || attr->priority < max_p) {
+		if (unlikely(attr->priority > min_p || attr->priority < max_p)) {
 			BNXT_DRV_DBG(ERR, "invalid prio, not in range %u:%u\n",
 				     max_p, min_p);
 			return -EINVAL;
 		}
 		params->priority = attr->priority;
 	} else {
-		if (attr->priority > max_p || attr->priority < min_p) {
+		if (unlikely(attr->priority > max_p || attr->priority < min_p)) {
 			BNXT_DRV_DBG(ERR, "invalid prio, not in range %u:%u\n",
 				     min_p, max_p);
 			return -EINVAL;
@@ -251,15 +252,15 @@ bnxt_ulp_init_mapper_params(struct bnxt_ulp_mapper_parms *mparms,
 		uint16_t vport;
 
 		/* Get the port db ifindex */
-		if (ulp_port_db_dev_port_to_ulp_index(params->ulp_ctx,
-						      params->port_id,
-						      &ifindex)) {
+		if (unlikely(ulp_port_db_dev_port_to_ulp_index(params->ulp_ctx,
+							       params->port_id,
+							       &ifindex))) {
 			BNXT_DRV_DBG(ERR, "Invalid port id %u\n",
 				     params->port_id);
 			return;
 		}
 		/* Update the phy port of the other interface */
-		if (ulp_port_db_vport_get(params->ulp_ctx, ifindex, &vport)) {
+		if (unlikely(ulp_port_db_vport_get(params->ulp_ctx, ifindex, &vport))) {
 			BNXT_DRV_DBG(ERR, "Invalid port if index %u\n",
 				     ifindex);
 			return;
@@ -288,15 +289,15 @@ bnxt_ulp_flow_create(struct rte_eth_dev *dev,
 	if (error != NULL)
 		error->type = RTE_FLOW_ERROR_TYPE_NONE;
 
-	if (bnxt_ulp_flow_validate_args(attr,
-					pattern, actions,
-					error) == BNXT_TF_RC_ERROR) {
+	if (unlikely(bnxt_ulp_flow_validate_args(attr,
+						 pattern, actions,
+						 error) == BNXT_TF_RC_ERROR)) {
 		BNXT_DRV_DBG(ERR, "Invalid arguments being passed\n");
 		goto flow_error;
 	}
 
 	ulp_ctx = bnxt_ulp_eth_dev_ptr2_cntxt_get(dev);
-	if (!ulp_ctx) {
+	if (unlikely(!ulp_ctx)) {
 		BNXT_DRV_DBG(ERR, "ULP context is not initialized\n");
 		goto flow_error;
 	}
@@ -305,7 +306,7 @@ bnxt_ulp_flow_create(struct rte_eth_dev *dev,
 	memset(&params, 0, sizeof(struct ulp_rte_parser_params));
 	params.ulp_ctx = ulp_ctx;
 
-	if (bnxt_ulp_cntxt_app_id_get(params.ulp_ctx, &params.app_id)) {
+	if (unlikely(bnxt_ulp_cntxt_app_id_get(params.ulp_ctx, &params.app_id))) {
 		BNXT_DRV_DBG(ERR, "failed to get the app id\n");
 		goto flow_error;
 	}
@@ -313,21 +314,21 @@ bnxt_ulp_flow_create(struct rte_eth_dev *dev,
 	/* Set the flow attributes */
 	bnxt_ulp_set_dir_attributes(&params, attr);
 
-	if (bnxt_ulp_set_prio_attribute(&params, attr))
+	if (unlikely(bnxt_ulp_set_prio_attribute(&params, attr)))
 		goto flow_error;
 
 	bnxt_ulp_init_parser_cf_defaults(&params, dev->data->port_id);
 
 	/* Get the function id */
-	if (ulp_port_db_port_func_id_get(ulp_ctx,
-					 dev->data->port_id,
-					 &func_id)) {
+	if (unlikely(ulp_port_db_port_func_id_get(ulp_ctx,
+						  dev->data->port_id,
+						  &func_id))) {
 		BNXT_DRV_DBG(ERR, "conversion of port to func id failed\n");
 		goto flow_error;
 	}
 
 	/* Protect flow creation */
-	if (bnxt_ulp_cntxt_acquire_fdb_lock(ulp_ctx)) {
+	if (unlikely(bnxt_ulp_cntxt_acquire_fdb_lock(ulp_ctx))) {
 		BNXT_DRV_DBG(ERR, "Flow db lock acquire failed\n");
 		goto flow_error;
 	}
@@ -338,19 +339,19 @@ bnxt_ulp_flow_create(struct rte_eth_dev *dev,
 	 */
 	rc = ulp_flow_db_fid_alloc(ulp_ctx, BNXT_ULP_FDB_TYPE_REGULAR,
 				   func_id, &fid);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Unable to allocate flow table entry\n");
 		goto release_lock;
 	}
 
 	/* Parse the rte flow pattern */
 	ret = bnxt_ulp_rte_parser_hdr_parse(pattern, &params);
-	if (ret != BNXT_TF_RC_SUCCESS)
+	if (unlikely(ret != BNXT_TF_RC_SUCCESS))
 		goto free_fid;
 
 	/* Parse the rte flow action */
 	ret = bnxt_ulp_rte_parser_act_parse(actions, &params);
-	if (ret != BNXT_TF_RC_SUCCESS)
+	if (unlikely(ret != BNXT_TF_RC_SUCCESS))
 		goto free_fid;
 
 	mparms.flow_id = fid;
@@ -362,15 +363,15 @@ bnxt_ulp_flow_create(struct rte_eth_dev *dev,
 
 	/* do the tunnel offload process if any */
 	ret = ulp_tunnel_offload_process(&params);
-	if (ret == BNXT_TF_RC_ERROR)
+	if (unlikely(ret == BNXT_TF_RC_ERROR))
 		goto free_fid;
 
 	ret = ulp_matcher_pattern_match(&params, &params.class_id);
-	if (ret != BNXT_TF_RC_SUCCESS)
+	if (unlikely(ret != BNXT_TF_RC_SUCCESS))
 		goto free_fid;
 
 	ret = ulp_matcher_action_match(&params, &params.act_tmpl);
-	if (ret != BNXT_TF_RC_SUCCESS)
+	if (unlikely(ret != BNXT_TF_RC_SUCCESS))
 		goto free_fid;
 
 	bnxt_ulp_init_mapper_params(&mparms, &params,
@@ -378,7 +379,7 @@ bnxt_ulp_flow_create(struct rte_eth_dev *dev,
 	/* Call the ulp mapper to create the flow in the hardware. */
 	ret = ulp_mapper_flow_create(ulp_ctx, &mparms,
 				     (void *)error);
-	if (ret)
+	if (unlikely(ret))
 		goto free_fid;
 
 	bnxt_ulp_cntxt_release_fdb_lock(ulp_ctx);
@@ -391,8 +392,8 @@ bnxt_ulp_flow_create(struct rte_eth_dev *dev,
 release_lock:
 	bnxt_ulp_cntxt_release_fdb_lock(ulp_ctx);
 flow_error:
-	if (error != NULL &&
-	    error->type == RTE_FLOW_ERROR_TYPE_NONE)
+	if (unlikely(error != NULL &&
+		     error->type == RTE_FLOW_ERROR_TYPE_NONE))
 		rte_flow_error_set(error, ret,
 				   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
 			   "Failed to create flow.");
@@ -412,15 +413,15 @@ bnxt_ulp_flow_validate(struct rte_eth_dev *dev,
 	uint32_t class_id, act_tmpl;
 	int ret = BNXT_TF_RC_ERROR;
 
-	if (bnxt_ulp_flow_validate_args(attr,
-					pattern, actions,
-					error) == BNXT_TF_RC_ERROR) {
+	if (unlikely(bnxt_ulp_flow_validate_args(attr,
+						 pattern, actions,
+						 error) == BNXT_TF_RC_ERROR)) {
 		BNXT_DRV_DBG(ERR, "Invalid arguments being passed\n");
 		goto parse_error;
 	}
 
 	ulp_ctx = bnxt_ulp_eth_dev_ptr2_cntxt_get(dev);
-	if (!ulp_ctx) {
+	if (unlikely(!ulp_ctx)) {
 		BNXT_DRV_DBG(ERR, "ULP context is not initialized\n");
 		goto parse_error;
 	}
@@ -429,7 +430,7 @@ bnxt_ulp_flow_validate(struct rte_eth_dev *dev,
 	memset(&params, 0, sizeof(struct ulp_rte_parser_params));
 	params.ulp_ctx = ulp_ctx;
 
-	if (bnxt_ulp_cntxt_app_id_get(params.ulp_ctx, &params.app_id)) {
+	if (unlikely(bnxt_ulp_cntxt_app_id_get(params.ulp_ctx, &params.app_id))) {
 		BNXT_DRV_DBG(ERR, "failed to get the app id\n");
 		goto parse_error;
 	}
@@ -437,19 +438,19 @@ bnxt_ulp_flow_validate(struct rte_eth_dev *dev,
 	/* Set the flow attributes */
 	bnxt_ulp_set_dir_attributes(&params, attr);
 
-	if (bnxt_ulp_set_prio_attribute(&params, attr))
+	if (unlikely(bnxt_ulp_set_prio_attribute(&params, attr)))
 		goto parse_error;
 
 	bnxt_ulp_init_parser_cf_defaults(&params, dev->data->port_id);
 
 	/* Parse the rte flow pattern */
 	ret = bnxt_ulp_rte_parser_hdr_parse(pattern, &params);
-	if (ret != BNXT_TF_RC_SUCCESS)
+	if (unlikely(ret != BNXT_TF_RC_SUCCESS))
 		goto parse_error;
 
 	/* Parse the rte flow action */
 	ret = bnxt_ulp_rte_parser_act_parse(actions, &params);
-	if (ret != BNXT_TF_RC_SUCCESS)
+	if (unlikely(ret != BNXT_TF_RC_SUCCESS))
 		goto parse_error;
 
 	/* Perform the rte flow post process */
@@ -457,16 +458,16 @@ bnxt_ulp_flow_validate(struct rte_eth_dev *dev,
 
 	/* do the tunnel offload process if any */
 	ret = ulp_tunnel_offload_process(&params);
-	if (ret == BNXT_TF_RC_ERROR)
+	if (unlikely(ret == BNXT_TF_RC_ERROR))
 		goto parse_error;
 
 	ret = ulp_matcher_pattern_match(&params, &class_id);
 
-	if (ret != BNXT_TF_RC_SUCCESS)
+	if (unlikely(ret != BNXT_TF_RC_SUCCESS))
 		goto parse_error;
 
 	ret = ulp_matcher_action_match(&params, &act_tmpl);
-	if (ret != BNXT_TF_RC_SUCCESS)
+	if (unlikely(ret != BNXT_TF_RC_SUCCESS))
 		goto parse_error;
 
 	/* all good return success */
@@ -493,7 +494,7 @@ bnxt_ulp_flow_destroy(struct rte_eth_dev *dev,
 		error->type = RTE_FLOW_ERROR_TYPE_NONE;
 
 	ulp_ctx = bnxt_ulp_eth_dev_ptr2_cntxt_get(dev);
-	if (!ulp_ctx) {
+	if (unlikely(!ulp_ctx)) {
 		BNXT_DRV_DBG(ERR, "ULP context is not initialized\n");
 		if (error)
 			rte_flow_error_set(error, EINVAL,
@@ -504,9 +505,9 @@ bnxt_ulp_flow_destroy(struct rte_eth_dev *dev,
 
 	flow_id = (uint32_t)(uintptr_t)flow;
 
-	if (ulp_port_db_port_func_id_get(ulp_ctx,
-					 dev->data->port_id,
-					 &func_id)) {
+	if (unlikely(ulp_port_db_port_func_id_get(ulp_ctx,
+						  dev->data->port_id,
+						  &func_id))) {
 		BNXT_DRV_DBG(ERR, "conversion of port to func id failed\n");
 		if (error)
 			rte_flow_error_set(error, EINVAL,
@@ -515,8 +516,8 @@ bnxt_ulp_flow_destroy(struct rte_eth_dev *dev,
 		return -EINVAL;
 	}
 
-	if (ulp_flow_db_validate_flow_func(ulp_ctx, flow_id, func_id) ==
-	    false) {
+	if (unlikely(ulp_flow_db_validate_flow_func(ulp_ctx, flow_id, func_id) ==
+		     false)) {
 		BNXT_DRV_DBG(ERR, "Incorrect device params\n");
 		if (error)
 			rte_flow_error_set(error, EINVAL,
@@ -525,13 +526,13 @@ bnxt_ulp_flow_destroy(struct rte_eth_dev *dev,
 		return -EINVAL;
 	}
 
-	if (bnxt_ulp_cntxt_acquire_fdb_lock(ulp_ctx)) {
+	if (unlikely(bnxt_ulp_cntxt_acquire_fdb_lock(ulp_ctx))) {
 		BNXT_DRV_DBG(ERR, "Flow db lock acquire failed\n");
 		return -EINVAL;
 	}
 	ret = ulp_mapper_flow_destroy(ulp_ctx, BNXT_ULP_FDB_TYPE_REGULAR,
 				      flow_id, (void *)error);
-	if (ret) {
+	if (unlikely(ret)) {
 		BNXT_DRV_DBG(ERR, "Failed to destroy flow.\n");
 		if (error != NULL &&
 		    error->type == RTE_FLOW_ERROR_TYPE_NONE)
@@ -554,9 +555,8 @@ bnxt_ulp_flow_flush(struct rte_eth_dev *eth_dev,
 	uint16_t func_id;
 
 	ulp_ctx = bnxt_ulp_eth_dev_ptr2_cntxt_get(eth_dev);
-	if (!ulp_ctx) {
+	if (unlikely(!ulp_ctx))
 		return ret;
-	}
 
 	/* Free the resources for the last device */
 	if (ulp_ctx_deinit_allowed(ulp_ctx)) {
@@ -570,7 +570,7 @@ bnxt_ulp_flow_flush(struct rte_eth_dev *eth_dev,
 		else
 			BNXT_DRV_DBG(ERR, "convert port to func id failed\n");
 	}
-	if (ret)
+	if (unlikely(ret))
 		rte_flow_error_set(error, ret,
 				   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
 				   "Failed to flush flow.");
@@ -601,12 +601,12 @@ static int ulp_flow_query_rss_get(struct bnxt_ulp_context *ctxt,
 	int rc = 0;
 
 	bp = bnxt_ulp_cntxt_bp_get(ctxt);
-	if (!bp) {
+	if (unlikely(!bp)) {
 		BNXT_DRV_DBG(ERR, "Failed to get bp from ulp cntxt\n");
 		return -EINVAL;
 	}
 
-	if (bnxt_ulp_cntxt_acquire_fdb_lock(ctxt)) {
+	if (unlikely(bnxt_ulp_cntxt_acquire_fdb_lock(ctxt))) {
 		BNXT_DRV_DBG(ERR, "Flow db lock acquire failed\n");
 		return -EINVAL;
 	}
@@ -652,7 +652,7 @@ bnxt_ulp_flow_query(struct rte_eth_dev *eth_dev,
 	uint32_t flow_id;
 
 	ulp_ctx = bnxt_ulp_eth_dev_ptr2_cntxt_get(eth_dev);
-	if (!ulp_ctx) {
+	if (unlikely(!ulp_ctx)) {
 		BNXT_DRV_DBG(ERR, "ULP context is not initialized\n");
 		rte_flow_error_set(error, EINVAL,
 				   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
@@ -666,7 +666,7 @@ bnxt_ulp_flow_query(struct rte_eth_dev *eth_dev,
 	case RTE_FLOW_ACTION_TYPE_RSS:
 		rss_conf = (struct rte_flow_action_rss *)data;
 		rc = ulp_flow_query_rss_get(ulp_ctx, flow_id, rss_conf);
-		if (rc) {
+		if (unlikely(rc)) {
 			rte_flow_error_set(error, EINVAL,
 					   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
 					   "Failed to query RSS info.");
@@ -676,7 +676,7 @@ bnxt_ulp_flow_query(struct rte_eth_dev *eth_dev,
 	case RTE_FLOW_ACTION_TYPE_COUNT:
 		count = data;
 		rc = ulp_fc_mgr_query_count_get(ulp_ctx, flow_id, count);
-		if (rc) {
+		if (unlikely(rc)) {
 			rte_flow_error_set(error, EINVAL,
 					   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
 					   "Failed to query flow.");
@@ -742,11 +742,11 @@ bnxt_ulp_action_handle_create(struct rte_eth_dev *dev,
 	if (error != NULL)
 		error->type = RTE_FLOW_ERROR_TYPE_NONE;
 
-	if (bnxt_ulp_action_handle_chk_args(action, conf) != BNXT_TF_RC_SUCCESS)
+	if (unlikely(bnxt_ulp_action_handle_chk_args(action, conf) != BNXT_TF_RC_SUCCESS))
 		goto parse_error;
 
 	ulp_ctx = bnxt_ulp_eth_dev_ptr2_cntxt_get(dev);
-	if (!ulp_ctx) {
+	if (unlikely(!ulp_ctx)) {
 		BNXT_DRV_DBG(ERR, "ULP context is not initialized\n");
 		goto parse_error;
 	}
@@ -761,14 +761,14 @@ bnxt_ulp_action_handle_create(struct rte_eth_dev *dev,
 	bnxt_ulp_set_action_handle_dir_attr(&params, conf);
 
 	/* perform the conversion from dpdk port to bnxt ifindex */
-	if (ulp_port_db_dev_port_to_ulp_index(ulp_ctx,
-					      dev->data->port_id,
-					      &ifindex)) {
+	if (unlikely(ulp_port_db_dev_port_to_ulp_index(ulp_ctx,
+						       dev->data->port_id,
+						       &ifindex))) {
 		BNXT_DRV_DBG(ERR, "Port id is not valid\n");
 		goto parse_error;
 	}
 	port_type = ulp_port_db_port_type_get(ulp_ctx, ifindex);
-	if (port_type == BNXT_ULP_INTF_TYPE_INVALID) {
+	if (unlikely(port_type == BNXT_ULP_INTF_TYPE_INVALID)) {
 		BNXT_DRV_DBG(ERR, "Port type is not valid\n");
 		goto parse_error;
 	}
@@ -794,14 +794,14 @@ bnxt_ulp_action_handle_create(struct rte_eth_dev *dev,
 	}
 
 	/* perform the conversion from dpdk port to bnxt ifindex */
-	if (ulp_port_db_dev_port_to_ulp_index(ulp_ctx,
-					      dev->data->port_id,
-					      &ifindex)) {
+	if (unlikely(ulp_port_db_dev_port_to_ulp_index(ulp_ctx,
+						       dev->data->port_id,
+						       &ifindex))) {
 		BNXT_DRV_DBG(ERR, "Port id is not valid\n");
 		goto parse_error;
 	}
 	port_type = ulp_port_db_port_type_get(ulp_ctx, ifindex);
-	if (port_type == BNXT_ULP_INTF_TYPE_INVALID) {
+	if (unlikely(port_type == BNXT_ULP_INTF_TYPE_INVALID)) {
 		BNXT_DRV_DBG(ERR, "Port type is not valid\n");
 		goto parse_error;
 	}
@@ -828,7 +828,7 @@ bnxt_ulp_action_handle_create(struct rte_eth_dev *dev,
 
 	/* Parse the shared action */
 	ret = bnxt_ulp_rte_parser_act_parse(actions, &params);
-	if (ret != BNXT_TF_RC_SUCCESS)
+	if (unlikely(ret != BNXT_TF_RC_SUCCESS))
 		goto parse_error;
 
 	/* Perform the rte flow post process */
@@ -836,11 +836,11 @@ bnxt_ulp_action_handle_create(struct rte_eth_dev *dev,
 
 	/* do the tunnel offload process if any */
 	ret = ulp_tunnel_offload_process(&params);
-	if (ret == BNXT_TF_RC_ERROR)
+	if (unlikely(ret == BNXT_TF_RC_ERROR))
 		goto parse_error;
 
 	ret = ulp_matcher_action_match(&params, &act_tid);
-	if (ret != BNXT_TF_RC_SUCCESS)
+	if (unlikely(ret != BNXT_TF_RC_SUCCESS))
 		goto parse_error;
 
 	bnxt_ulp_init_mapper_params(&mparms, &params,
@@ -848,15 +848,15 @@ bnxt_ulp_action_handle_create(struct rte_eth_dev *dev,
 	mparms.act_tid = act_tid;
 
 	/* Get the function id */
-	if (ulp_port_db_port_func_id_get(ulp_ctx,
-					 dev->data->port_id,
-					 &func_id)) {
+	if (unlikely(ulp_port_db_port_func_id_get(ulp_ctx,
+						  dev->data->port_id,
+						  &func_id))) {
 		BNXT_DRV_DBG(ERR, "conversion of port to func id failed\n");
 		goto parse_error;
 	}
 
 	/* Protect flow creation */
-	if (bnxt_ulp_cntxt_acquire_fdb_lock(ulp_ctx)) {
+	if (unlikely(bnxt_ulp_cntxt_acquire_fdb_lock(ulp_ctx))) {
 		BNXT_DRV_DBG(ERR, "Flow db lock acquire failed\n");
 		goto parse_error;
 	}
@@ -865,7 +865,7 @@ bnxt_ulp_action_handle_create(struct rte_eth_dev *dev,
 				     (void *)error);
 	bnxt_ulp_cntxt_release_fdb_lock(ulp_ctx);
 
-	if (ret)
+	if (unlikely(ret))
 		goto parse_error;
 
 	return (struct rte_flow_action_handle *)((uintptr_t)mparms.shared_hndl);
@@ -898,12 +898,12 @@ bnxt_ulp_action_handle_destroy(struct rte_eth_dev *dev,
 		error->type = RTE_FLOW_ERROR_TYPE_NONE;
 
 	ulp_ctx = bnxt_ulp_eth_dev_ptr2_cntxt_get(dev);
-	if (!ulp_ctx) {
+	if (unlikely(!ulp_ctx)) {
 		BNXT_DRV_DBG(ERR, "ULP context is not initialized\n");
 		goto parse_error;
 	}
 
-	if (!shared_hndl) {
+	if (unlikely(!shared_hndl)) {
 		BNXT_DRV_DBG(ERR, "Invalid argument of shared handle\n");
 		goto parse_error;
 	}
@@ -912,19 +912,19 @@ bnxt_ulp_action_handle_destroy(struct rte_eth_dev *dev,
 	memset(&params, 0, sizeof(struct ulp_rte_parser_params));
 	params.ulp_ctx = ulp_ctx;
 
-	if (bnxt_ulp_cntxt_app_id_get(ulp_ctx, &params.app_id)) {
+	if (unlikely(bnxt_ulp_cntxt_app_id_get(ulp_ctx, &params.app_id))) {
 		BNXT_DRV_DBG(ERR, "failed to get the app id\n");
 		goto parse_error;
 	}
 	/* The template will delete the entry if there are no references */
-	if (bnxt_get_action_handle_type(shared_hndl, &shared_action_type)) {
+	if (unlikely(bnxt_get_action_handle_type(shared_hndl, &shared_action_type))) {
 		BNXT_DRV_DBG(ERR, "Invalid shared handle\n");
 		goto parse_error;
 	}
 
 	act_info_entries = 0;
 	act_info = bnxt_ulp_shared_act_info_get(&act_info_entries);
-	if (shared_action_type >= act_info_entries || !act_info) {
+	if (unlikely(shared_action_type >= act_info_entries || !act_info)) {
 		BNXT_DRV_DBG(ERR, "Invalid shared handle\n");
 		goto parse_error;
 	}
@@ -934,7 +934,7 @@ bnxt_ulp_action_handle_destroy(struct rte_eth_dev *dev,
 	ULP_BITMAP_SET(params.act_bitmap.bits, BNXT_ULP_ACT_BIT_DELETE);
 
 	ret = bnxt_get_action_handle_direction(shared_hndl, &dir);
-	if (ret) {
+	if (unlikely(ret)) {
 		BNXT_DRV_DBG(ERR, "Invalid shared handle dir\n");
 		goto parse_error;
 	}
@@ -956,14 +956,14 @@ bnxt_ulp_action_handle_destroy(struct rte_eth_dev *dev,
 	       &tmp64, BNXT_ULP_ACT_PROP_SZ_SHARED_HANDLE);
 
 	ret = ulp_matcher_action_match(&params, &act_tid);
-	if (ret != BNXT_TF_RC_SUCCESS)
+	if (unlikely(ret != BNXT_TF_RC_SUCCESS))
 		goto parse_error;
 
 	bnxt_ulp_init_mapper_params(&mparms, &params,
 				    BNXT_ULP_FDB_TYPE_REGULAR);
 	mparms.act_tid = act_tid;
 
-	if (bnxt_ulp_cntxt_acquire_fdb_lock(ulp_ctx)) {
+	if (unlikely(bnxt_ulp_cntxt_acquire_fdb_lock(ulp_ctx))) {
 		BNXT_DRV_DBG(ERR, "Flow db lock acquire failed\n");
 		goto parse_error;
 	}
@@ -971,7 +971,7 @@ bnxt_ulp_action_handle_destroy(struct rte_eth_dev *dev,
 	ret = ulp_mapper_flow_create(ulp_ctx, &mparms,
 				     (void *)error);
 	bnxt_ulp_cntxt_release_fdb_lock(ulp_ctx);
-	if (ret)
+	if (unlikely(ret))
 		goto parse_error;
 
 	return 0;
@@ -1000,7 +1000,7 @@ bnxt_ulp_tunnel_decap_set(struct rte_eth_dev *eth_dev,
 	int32_t rc = 0;
 
 	ulp_ctx = bnxt_ulp_eth_dev_ptr2_cntxt_get(eth_dev);
-	if (ulp_ctx == NULL) {
+	if (unlikely(ulp_ctx == NULL)) {
 		BNXT_DRV_DBG(ERR, "ULP context is not initialized\n");
 		rte_flow_error_set(error, EINVAL,
 				   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
@@ -1008,7 +1008,7 @@ bnxt_ulp_tunnel_decap_set(struct rte_eth_dev *eth_dev,
 		return -EINVAL;
 	}
 
-	if (tunnel == NULL) {
+	if (unlikely(tunnel == NULL)) {
 		BNXT_DRV_DBG(ERR, "No tunnel specified\n");
 		rte_flow_error_set(error, EINVAL,
 				   RTE_FLOW_ERROR_TYPE_ATTR, NULL,
@@ -1016,7 +1016,7 @@ bnxt_ulp_tunnel_decap_set(struct rte_eth_dev *eth_dev,
 		return -EINVAL;
 	}
 
-	if (tunnel->type != RTE_FLOW_ITEM_TYPE_VXLAN) {
+	if (unlikely(tunnel->type != RTE_FLOW_ITEM_TYPE_VXLAN)) {
 		BNXT_DRV_DBG(ERR, "Tunnel type unsupported\n");
 		rte_flow_error_set(error, EINVAL,
 				   RTE_FLOW_ERROR_TYPE_ATTR, NULL,
@@ -1025,7 +1025,7 @@ bnxt_ulp_tunnel_decap_set(struct rte_eth_dev *eth_dev,
 	}
 
 	rc = ulp_app_tun_search_entry(ulp_ctx, tunnel, &tun_entry);
-	if (rc < 0) {
+	if (unlikely(rc < 0)) {
 		rte_flow_error_set(error, EINVAL,
 				   RTE_FLOW_ERROR_TYPE_ATTR, NULL,
 				   "tunnel decap set failed");
@@ -1033,7 +1033,7 @@ bnxt_ulp_tunnel_decap_set(struct rte_eth_dev *eth_dev,
 	}
 
 	rc = ulp_app_tun_entry_set_decap_action(tun_entry);
-	if (rc < 0) {
+	if (unlikely(rc < 0)) {
 		rte_flow_error_set(error, EINVAL,
 				   RTE_FLOW_ERROR_TYPE_ATTR, NULL,
 				   "tunnel decap set failed");
@@ -1057,7 +1057,7 @@ bnxt_ulp_tunnel_match(struct rte_eth_dev *eth_dev,
 	int32_t rc = 0;
 
 	ulp_ctx = bnxt_ulp_eth_dev_ptr2_cntxt_get(eth_dev);
-	if (ulp_ctx == NULL) {
+	if (unlikely(ulp_ctx == NULL)) {
 		BNXT_DRV_DBG(ERR, "ULP context is not initialized\n");
 		rte_flow_error_set(error, EINVAL,
 				   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
@@ -1065,7 +1065,7 @@ bnxt_ulp_tunnel_match(struct rte_eth_dev *eth_dev,
 		return -EINVAL;
 	}
 
-	if (tunnel == NULL) {
+	if (unlikely(tunnel == NULL)) {
 		BNXT_DRV_DBG(ERR, "No tunnel specified\n");
 		rte_flow_error_set(error, EINVAL,
 				   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
@@ -1073,7 +1073,7 @@ bnxt_ulp_tunnel_match(struct rte_eth_dev *eth_dev,
 		return -EINVAL;
 	}
 
-	if (tunnel->type != RTE_FLOW_ITEM_TYPE_VXLAN) {
+	if (unlikely(tunnel->type != RTE_FLOW_ITEM_TYPE_VXLAN)) {
 		BNXT_DRV_DBG(ERR, "Tunnel type unsupported\n");
 		rte_flow_error_set(error, EINVAL,
 				   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
@@ -1082,7 +1082,7 @@ bnxt_ulp_tunnel_match(struct rte_eth_dev *eth_dev,
 	}
 
 	rc = ulp_app_tun_search_entry(ulp_ctx, tunnel, &tun_entry);
-	if (rc < 0) {
+	if (unlikely(rc < 0)) {
 		rte_flow_error_set(error, EINVAL,
 				   RTE_FLOW_ERROR_TYPE_ATTR, NULL,
 				   "tunnel match set failed");
@@ -1090,7 +1090,7 @@ bnxt_ulp_tunnel_match(struct rte_eth_dev *eth_dev,
 	}
 
 	rc = ulp_app_tun_entry_set_decap_item(tun_entry);
-	if (rc < 0) {
+	if (unlikely(rc < 0)) {
 		rte_flow_error_set(error, EINVAL,
 				   RTE_FLOW_ERROR_TYPE_ATTR, NULL,
 				   "tunnel match set failed");
@@ -1113,14 +1113,14 @@ bnxt_ulp_tunnel_decap_release(struct rte_eth_dev *eth_dev,
 	const struct rte_flow_action *action_item = pmd_actions;
 
 	ulp_ctx = bnxt_ulp_eth_dev_ptr2_cntxt_get(eth_dev);
-	if (ulp_ctx == NULL) {
+	if (unlikely(ulp_ctx == NULL)) {
 		BNXT_DRV_DBG(ERR, "ULP context is not initialized\n");
 		rte_flow_error_set(error, EINVAL,
 				   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
 				   "ULP context uninitialized");
 		return -EINVAL;
 	}
-	if (num_actions != BNXT_ULP_TUNNEL_OFFLOAD_NUM_ITEMS) {
+	if (unlikely(num_actions != BNXT_ULP_TUNNEL_OFFLOAD_NUM_ITEMS)) {
 		BNXT_DRV_DBG(ERR, "num actions is invalid\n");
 		rte_flow_error_set(error, EINVAL,
 				   RTE_FLOW_ERROR_TYPE_ATTR, NULL,
@@ -1128,8 +1128,8 @@ bnxt_ulp_tunnel_decap_release(struct rte_eth_dev *eth_dev,
 		return -EINVAL;
 	}
 	while (action_item && action_item->type != RTE_FLOW_ACTION_TYPE_END) {
-		if (action_item->type == (typeof(tun_entry->action.type))
-		    BNXT_RTE_FLOW_ACTION_TYPE_VXLAN_DECAP) {
+		if (unlikely(action_item->type == (typeof(tun_entry->action.type))
+			     BNXT_RTE_FLOW_ACTION_TYPE_VXLAN_DECAP)) {
 			tun_entry = ulp_app_tun_match_entry(ulp_ctx,
 							    action_item->conf);
 			ulp_app_tun_entry_delete(tun_entry);
@@ -1149,14 +1149,14 @@ bnxt_ulp_tunnel_item_release(struct rte_eth_dev *eth_dev,
 	struct bnxt_flow_app_tun_ent *tun_entry;
 
 	ulp_ctx = bnxt_ulp_eth_dev_ptr2_cntxt_get(eth_dev);
-	if (ulp_ctx == NULL) {
+	if (unlikely(ulp_ctx == NULL)) {
 		BNXT_DRV_DBG(ERR, "ULP context is not initialized\n");
 		rte_flow_error_set(error, EINVAL,
 				   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
 				   "ULP context uninitialized");
 		return -EINVAL;
 	}
-	if (num_items != BNXT_ULP_TUNNEL_OFFLOAD_NUM_ITEMS) {
+	if (unlikely(num_items != BNXT_ULP_TUNNEL_OFFLOAD_NUM_ITEMS)) {
 		BNXT_DRV_DBG(ERR, "num items is invalid\n");
 		rte_flow_error_set(error, EINVAL,
 				   RTE_FLOW_ERROR_TYPE_ATTR, NULL,
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_meter.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_meter.c
index 37b5cc4dfb..591bde96e8 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_meter.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_meter.c
@@ -28,6 +28,7 @@
 #include "tfp.h"
 #include "bnxt_tf_common.h"
 #include "bnxt_ulp_tf.h"
+#include "bnxt_ulp_utils.h"
 #include "ulp_rte_parser.h"
 #include "ulp_matcher.h"
 #include "ulp_flow_db.h"
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
index 5589e36db4..99a6bac0ce 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
@@ -14,6 +14,7 @@
 
 #include "bnxt.h"
 #include "bnxt_ulp.h"
+#include "bnxt_ulp_utils.h"
 #include "bnxt_ulp_tf.h"
 #include "bnxt_tf_common.h"
 #include "hsi_struct_def_dpdk.h"
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
index 0f98340564..765ae9f6aa 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
@@ -14,6 +14,7 @@
 
 #include "bnxt.h"
 #include "bnxt_ulp.h"
+#include "bnxt_ulp_utils.h"
 #include "bnxt_ulp_tfc.h"
 #include "bnxt_tf_common.h"
 #include "hsi_struct_def_dpdk.h"
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_utils.h b/drivers/net/bnxt/tf_ulp/bnxt_ulp_utils.h
new file mode 100644
index 0000000000..26087526e8
--- /dev/null
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_utils.h
@@ -0,0 +1,1038 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2019-2023 Broadcom
+ * All rights reserved.
+ */
+
+#ifndef _BNXT_ULP_UTILS_H_
+#define _BNXT_ULP_UTILS_H_
+
+#include <rte_log.h>
+#include <rte_malloc.h>
+#include <rte_flow.h>
+#include <rte_flow_driver.h>
+#include <rte_tailq.h>
+#include <rte_spinlock.h>
+
+#include "bnxt.h"
+#include "bnxt_ulp.h"
+#include "bnxt_tf_common.h"
+#include "bnxt_hwrm.h"
+#include "hsi_struct_def_dpdk.h"
+#include "tf_core.h"
+#include "tf_ext_flow_handle.h"
+
+#include "ulp_template_db_enum.h"
+#include "ulp_template_struct.h"
+#include "ulp_mark_mgr.h"
+#include "ulp_fc_mgr.h"
+#include "ulp_flow_db.h"
+#include "ulp_mapper.h"
+#include "ulp_matcher.h"
+#include "ulp_port_db.h"
+#include "ulp_tun.h"
+#include "ulp_ha_mgr.h"
+#include "bnxt_tf_pmd_shim.h"
+#include "ulp_template_db_tbl.h"
+
+static inline int32_t
+bnxt_ulp_devid_get(struct bnxt *bp,
+		   enum bnxt_ulp_device_id  *ulp_dev_id)
+{
+	if (BNXT_CHIP_P7(bp)) {
+		*ulp_dev_id = BNXT_ULP_DEVICE_ID_THOR2;
+		return 0;
+	}
+
+	if (BNXT_CHIP_P5(bp)) {
+		*ulp_dev_id = BNXT_ULP_DEVICE_ID_THOR;
+		return 0;
+	}
+
+	if (BNXT_STINGRAY(bp))
+		*ulp_dev_id = BNXT_ULP_DEVICE_ID_STINGRAY;
+	else
+		/* Assuming Whitney */
+		*ulp_dev_id = BNXT_ULP_DEVICE_ID_WH_PLUS;
+
+	return 0;
+}
+
+static inline struct bnxt_ulp_app_capabilities_info *
+bnxt_ulp_app_cap_list_get(uint32_t *num_entries)
+{
+	if (unlikely(!num_entries))
+		return NULL;
+	*num_entries = BNXT_ULP_APP_CAP_TBL_MAX_SZ;
+	return ulp_app_cap_info_list;
+}
+
+static inline struct bnxt_ulp_shared_act_info *
+bnxt_ulp_shared_act_info_get(uint32_t *num_entries)
+{
+	if (unlikely(!num_entries))
+		return NULL;
+
+	*num_entries = BNXT_ULP_GEN_TBL_MAX_SZ;
+
+	return ulp_shared_act_info;
+}
+
+static inline struct bnxt_ulp_resource_resv_info *
+bnxt_ulp_app_resource_resv_list_get(uint32_t *num_entries)
+{
+	if (unlikely(num_entries == NULL))
+		return NULL;
+	*num_entries = BNXT_ULP_APP_RESOURCE_RESV_LIST_MAX_SZ;
+	return ulp_app_resource_resv_list;
+}
+
+static inline struct bnxt_ulp_resource_resv_info *
+bnxt_ulp_resource_resv_list_get(uint32_t *num_entries)
+{
+	if (unlikely(!num_entries))
+		return NULL;
+	*num_entries = BNXT_ULP_RESOURCE_RESV_LIST_MAX_SZ;
+	return ulp_resource_resv_list;
+}
+
+static inline struct bnxt_ulp_glb_resource_info *
+bnxt_ulp_app_glb_resource_info_list_get(uint32_t *num_entries)
+{
+	if (unlikely(!num_entries))
+		return NULL;
+	*num_entries = BNXT_ULP_APP_GLB_RESOURCE_TBL_MAX_SZ;
+	return ulp_app_glb_resource_tbl;
+}
+
+/* Function to set the number for vxlan_ip (custom vxlan) port into the context */
+static inline int
+bnxt_ulp_cntxt_ecpri_udp_port_set(struct bnxt_ulp_context *ulp_ctx,
+			   uint32_t ecpri_udp_port)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return -EINVAL;
+
+	ulp_ctx->cfg_data->ecpri_udp_port = ecpri_udp_port;
+
+	return 0;
+}
+
+/* Function to retrieve the vxlan_ip (custom vxlan) port from the context. */
+static inline unsigned int
+bnxt_ulp_cntxt_ecpri_udp_port_get(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return 0;
+
+	return (unsigned int)ulp_ctx->cfg_data->ecpri_udp_port;
+}
+
+/* Function to set the number for vxlan_ip (custom vxlan) port into the context */
+static inline int
+bnxt_ulp_cntxt_vxlan_ip_port_set(struct bnxt_ulp_context *ulp_ctx,
+			   uint32_t vxlan_ip_port)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return -EINVAL;
+
+	ulp_ctx->cfg_data->vxlan_ip_port = vxlan_ip_port;
+	if (vxlan_ip_port)
+		ulp_ctx->cfg_data->ulp_flags |= BNXT_ULP_STATIC_VXLAN_SUPPORT;
+	return 0;
+}
+
+/* Function to retrieve the vxlan_ip (custom vxlan) port from the context. */
+static inline unsigned int
+bnxt_ulp_cntxt_vxlan_ip_port_get(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return 0;
+
+	return (unsigned int)ulp_ctx->cfg_data->vxlan_ip_port;
+}
+
+/* Function to set the number for vxlan_gpe next_proto into the context */
+static inline uint32_t
+bnxt_ulp_vxlan_gpe_next_proto_set(struct bnxt_ulp_context *ulp_ctx,
+				  uint8_t tunnel_next_proto)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return -EINVAL;
+
+	ulp_ctx->cfg_data->tunnel_next_proto = tunnel_next_proto;
+
+	return 0;
+}
+
+/* Function to retrieve the vxlan_gpe next_proto from the context. */
+static inline uint8_t
+bnxt_ulp_vxlan_gpe_next_proto_get(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return 0;
+
+	return ulp_ctx->cfg_data->tunnel_next_proto;
+}
+
+/* Function to set the number for vxlan port into the context */
+static inline int
+bnxt_ulp_cntxt_vxlan_port_set(struct bnxt_ulp_context *ulp_ctx,
+			uint32_t vxlan_port)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return -EINVAL;
+
+	ulp_ctx->cfg_data->vxlan_port = vxlan_port;
+	if (vxlan_port)
+		ulp_ctx->cfg_data->ulp_flags |= BNXT_ULP_STATIC_VXLAN_SUPPORT;
+
+	return 0;
+}
+
+/* Function to retrieve the vxlan port from the context. */
+static inline unsigned int
+bnxt_ulp_cntxt_vxlan_port_get(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return 0;
+
+	return (unsigned int)ulp_ctx->cfg_data->vxlan_port;
+}
+
+static inline int
+bnxt_ulp_default_app_priority_set(struct bnxt_ulp_context *ulp_ctx,
+				  uint32_t prio)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return -EINVAL;
+
+	ulp_ctx->cfg_data->default_priority = prio;
+	return 0;
+}
+
+static inline unsigned int
+bnxt_ulp_default_app_priority_get(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return 0;
+
+	return (unsigned int)ulp_ctx->cfg_data->default_priority;
+}
+
+static inline int
+bnxt_ulp_max_def_priority_set(struct bnxt_ulp_context *ulp_ctx,
+			      uint32_t prio)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return -EINVAL;
+
+	ulp_ctx->cfg_data->max_def_priority = prio;
+	return 0;
+}
+
+static inline unsigned int
+bnxt_ulp_max_def_priority_get(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return 0;
+
+	return (unsigned int)ulp_ctx->cfg_data->max_def_priority;
+}
+
+static inline int
+bnxt_ulp_min_flow_priority_set(struct bnxt_ulp_context *ulp_ctx, uint32_t prio)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return -EINVAL;
+
+	ulp_ctx->cfg_data->min_flow_priority = prio;
+	return 0;
+}
+
+static inline unsigned int
+bnxt_ulp_min_flow_priority_get(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return 0;
+
+	return ulp_ctx->cfg_data->min_flow_priority;
+}
+
+static inline int
+bnxt_ulp_max_flow_priority_set(struct bnxt_ulp_context *ulp_ctx, uint32_t prio)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return -EINVAL;
+
+	ulp_ctx->cfg_data->max_flow_priority = prio;
+	return 0;
+}
+
+static inline unsigned int
+bnxt_ulp_max_flow_priority_get(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return 0;
+
+	return ulp_ctx->cfg_data->max_flow_priority;
+}
+
+/* Below are the access functions to access internal data of ulp context. */
+/* Function to set the Mark DB into the context */
+static inline int32_t
+bnxt_ulp_cntxt_ptr2_mark_db_set(struct bnxt_ulp_context *ulp_ctx,
+				struct bnxt_ulp_mark_tbl *mark_tbl)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data)) {
+		BNXT_DRV_DBG(ERR, "Invalid ulp context data\n");
+		return -EINVAL;
+	}
+
+	ulp_ctx->cfg_data->mark_tbl = mark_tbl;
+
+	return 0;
+}
+
+/* Function to retrieve the Mark DB from the context. */
+static inline struct bnxt_ulp_mark_tbl *
+bnxt_ulp_cntxt_ptr2_mark_db_get(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return NULL;
+
+	return ulp_ctx->cfg_data->mark_tbl;
+}
+
+static inline bool
+bnxt_ulp_cntxt_shared_session_enabled(struct bnxt_ulp_context *ulp_ctx)
+{
+	return ULP_SHARED_SESSION_IS_ENABLED(ulp_ctx->cfg_data->ulp_flags);
+}
+
+static inline bool
+bnxt_ulp_cntxt_multi_shared_session_enabled(struct bnxt_ulp_context *ulp_ctx)
+{
+	return ULP_MULTI_SHARED_IS_SUPPORTED(ulp_ctx);
+}
+
+static inline int32_t
+bnxt_ulp_cntxt_app_id_set(struct bnxt_ulp_context *ulp_ctx, uint8_t app_id)
+{
+	if (unlikely(!ulp_ctx))
+		return -EINVAL;
+	ulp_ctx->cfg_data->app_id = app_id;
+	return 0;
+}
+
+static inline int32_t
+bnxt_ulp_cntxt_app_id_get(struct bnxt_ulp_context *ulp_ctx, uint8_t *app_id)
+{
+	/* Default APP id is zero */
+	if (unlikely(!ulp_ctx || !app_id))
+		return -EINVAL;
+	*app_id = ulp_ctx->cfg_data->app_id;
+	return 0;
+}
+
+/* Function to set the device id of the hardware. */
+static inline int32_t
+bnxt_ulp_cntxt_dev_id_set(struct bnxt_ulp_context *ulp_ctx,
+			  uint32_t dev_id)
+{
+	if (likely(ulp_ctx && ulp_ctx->cfg_data)) {
+		ulp_ctx->cfg_data->dev_id = dev_id;
+		return 0;
+	}
+
+	return -EINVAL;
+}
+
+/* Function to get the device id of the hardware. */
+static inline int32_t
+bnxt_ulp_cntxt_dev_id_get(struct bnxt_ulp_context *ulp_ctx,
+			  uint32_t *dev_id)
+{
+	if (likely(ulp_ctx && ulp_ctx->cfg_data)) {
+		*dev_id = ulp_ctx->cfg_data->dev_id;
+		return 0;
+	}
+	*dev_id = BNXT_ULP_DEVICE_ID_LAST;
+	BNXT_DRV_DBG(ERR, "Failed to read dev_id from ulp ctxt\n");
+	return -EINVAL;
+}
+
+static inline int32_t
+bnxt_ulp_cntxt_mem_type_set(struct bnxt_ulp_context *ulp_ctx,
+			    enum bnxt_ulp_flow_mem_type mem_type)
+{
+	if (likely(ulp_ctx && ulp_ctx->cfg_data)) {
+		ulp_ctx->cfg_data->mem_type = mem_type;
+		return 0;
+	}
+	BNXT_DRV_DBG(ERR, "Failed to write mem_type in ulp ctxt\n");
+	return -EINVAL;
+}
+
+static inline int32_t
+bnxt_ulp_cntxt_mem_type_get(struct bnxt_ulp_context *ulp_ctx,
+			    enum bnxt_ulp_flow_mem_type *mem_type)
+{
+	if (likely(ulp_ctx && ulp_ctx->cfg_data)) {
+		*mem_type = ulp_ctx->cfg_data->mem_type;
+		return 0;
+	}
+	*mem_type = BNXT_ULP_FLOW_MEM_TYPE_LAST;
+	BNXT_DRV_DBG(ERR, "Failed to read mem_type in ulp ctxt\n");
+	return -EINVAL;
+}
+
+/* Function to get the table scope id of the EEM table. */
+static inline int32_t
+bnxt_ulp_cntxt_tbl_scope_id_get(struct bnxt_ulp_context *ulp_ctx,
+				uint32_t *tbl_scope_id)
+{
+	if (likely(ulp_ctx && ulp_ctx->cfg_data)) {
+		*tbl_scope_id = ulp_ctx->cfg_data->tbl_scope_id;
+		return 0;
+	}
+
+	return -EINVAL;
+}
+
+/* Function to set the table scope id of the EEM table. */
+static inline int32_t
+bnxt_ulp_cntxt_tbl_scope_id_set(struct bnxt_ulp_context *ulp_ctx,
+				uint32_t tbl_scope_id)
+{
+	if (likely(ulp_ctx && ulp_ctx->cfg_data)) {
+		ulp_ctx->cfg_data->tbl_scope_id = tbl_scope_id;
+		return 0;
+	}
+
+	return -EINVAL;
+}
+
+/* Function to set the v3 table scope id, only works for tfc objects */
+static inline int32_t
+bnxt_ulp_cntxt_tsid_set(struct bnxt_ulp_context *ulp_ctx, uint8_t tsid)
+{
+	if (likely(ulp_ctx && ulp_ctx->tfo_type == BNXT_ULP_TFO_TYPE_TFC)) {
+		ulp_ctx->tsid = tsid;
+		ULP_BITMAP_SET(ulp_ctx->tfo_flags, BNXT_ULP_TFO_TSID_FLAG);
+		return 0;
+	}
+	return -EINVAL;
+}
+
+/* Function to reset the v3 table scope id, only works for tfc objects */
+static inline void
+bnxt_ulp_cntxt_tsid_reset(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (ulp_ctx && ulp_ctx->tfo_type == BNXT_ULP_TFO_TYPE_TFC)
+		ULP_BITMAP_RESET(ulp_ctx->tfo_flags, BNXT_ULP_TFO_TSID_FLAG);
+}
+
+/* Function to set the v3 table scope id, only works for tfc objects */
+static inline int32_t
+bnxt_ulp_cntxt_tsid_get(struct bnxt_ulp_context *ulp_ctx, uint8_t *tsid)
+{
+	if (likely(ulp_ctx && tsid &&
+		   ulp_ctx->tfo_type == BNXT_ULP_TFO_TYPE_TFC &&
+		   ULP_BITMAP_ISSET(ulp_ctx->tfo_flags, BNXT_ULP_TFO_TSID_FLAG))) {
+		*tsid = ulp_ctx->tsid;
+		return 0;
+	}
+	return -EINVAL;
+}
+
+/* Function to set the v3 session id, only works for tfc objects */
+static inline int32_t
+bnxt_ulp_cntxt_sid_set(struct bnxt_ulp_context *ulp_ctx,
+		       uint16_t sid)
+{
+	if (likely(ulp_ctx && ulp_ctx->tfo_type == BNXT_ULP_TFO_TYPE_TFC)) {
+		ulp_ctx->sid = sid;
+		ULP_BITMAP_SET(ulp_ctx->tfo_flags, BNXT_ULP_TFO_SID_FLAG);
+		return 0;
+	}
+	return -EINVAL;
+}
+
+/*
+ * Function to reset the v3 session id, only works for tfc objects
+ * There isn't a known invalid value for sid, so this is necessary
+ */
+static inline void
+bnxt_ulp_cntxt_sid_reset(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (ulp_ctx && ulp_ctx->tfo_type == BNXT_ULP_TFO_TYPE_TFC)
+		ULP_BITMAP_RESET(ulp_ctx->tfo_flags, BNXT_ULP_TFO_SID_FLAG);
+}
+
+/* Function to get the v3 session id, only works for tfc objects */
+static inline int32_t
+bnxt_ulp_cntxt_sid_get(struct bnxt_ulp_context *ulp_ctx,
+		       uint16_t *sid)
+{
+	if (likely(ulp_ctx && sid &&
+		   ulp_ctx->tfo_type == BNXT_ULP_TFO_TYPE_TFC &&
+		   ULP_BITMAP_ISSET(ulp_ctx->tfo_flags, BNXT_ULP_TFO_SID_FLAG))) {
+		*sid = ulp_ctx->sid;
+		return 0;
+	}
+	return -EINVAL;
+}
+
+/* Function to get the number of shared clients attached */
+static inline uint8_t
+bnxt_ulp_cntxt_num_shared_clients_get(struct bnxt_ulp_context *ulp)
+{
+	if (likely(ulp == NULL || ulp->cfg_data == NULL)) {
+		BNXT_DRV_DBG(ERR, "Invalid arguments\n");
+		return 0;
+	}
+	return ulp->cfg_data->num_shared_clients;
+}
+
+/* Function to set the number of shared clients */
+static inline int
+bnxt_ulp_cntxt_num_shared_clients_set(struct bnxt_ulp_context *ulp, bool incr)
+{
+	if (unlikely(ulp == NULL || ulp->cfg_data == NULL)) {
+		BNXT_DRV_DBG(ERR, "Invalid arguments\n");
+		return 0;
+	}
+	if (incr)
+		ulp->cfg_data->num_shared_clients++;
+	else if (ulp->cfg_data->num_shared_clients)
+		ulp->cfg_data->num_shared_clients--;
+
+	BNXT_DRV_DBG(DEBUG, "%d:clients(%d)\n", incr,
+		     ulp->cfg_data->num_shared_clients);
+
+	return 0;
+}
+
+static inline int32_t
+bnxt_ulp_cntxt_bp_set(struct bnxt_ulp_context *ulp, struct bnxt *bp)
+{
+	if (unlikely(ulp == NULL)) {
+		BNXT_DRV_DBG(ERR, "Invalid arguments\n");
+		return -EINVAL;
+	}
+	ulp->bp = bp;
+	return 0;
+}
+
+static inline struct bnxt*
+bnxt_ulp_cntxt_bp_get(struct bnxt_ulp_context *ulp)
+{
+	if (unlikely(ulp == NULL)) {
+		BNXT_DRV_DBG(ERR, "Invalid arguments\n");
+		return NULL;
+	}
+	return ulp->bp;
+}
+
+static inline int32_t
+bnxt_ulp_cntxt_fid_get(struct bnxt_ulp_context *ulp, uint16_t *fid)
+{
+	if (unlikely(ulp == NULL || fid == NULL))
+		return -EINVAL;
+
+	*fid = ulp->bp->fw_fid;
+	return 0;
+}
+
+static inline void
+bnxt_ulp_cntxt_ptr2_default_class_bits_set(struct bnxt_ulp_context *ulp_ctx,
+					   uint64_t bits)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return;
+	ulp_ctx->cfg_data->default_class_bits = bits;
+}
+
+static inline uint64_t
+bnxt_ulp_cntxt_ptr2_default_class_bits_get(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return 0;
+	return ulp_ctx->cfg_data->default_class_bits;
+}
+
+static inline void
+bnxt_ulp_cntxt_ptr2_default_act_bits_set(struct bnxt_ulp_context *ulp_ctx,
+					 uint64_t bits)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return;
+	ulp_ctx->cfg_data->default_act_bits = bits;
+}
+
+static inline uint64_t
+bnxt_ulp_cntxt_ptr2_default_act_bits_get(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return 0;
+	return ulp_ctx->cfg_data->default_act_bits;
+}
+
+/*
+ * Get the device table entry based on the device id.
+ *
+ * dev_id [in] The device id of the hardware
+ *
+ * Returns the pointer to the device parameters.
+ */
+static inline struct bnxt_ulp_device_params *
+bnxt_ulp_device_params_get(uint32_t dev_id)
+{
+	if (dev_id < BNXT_ULP_MAX_NUM_DEVICES)
+		return &ulp_device_params[dev_id];
+	return NULL;
+}
+
+/* Function to set the flow database to the ulp context. */
+static inline int32_t
+bnxt_ulp_cntxt_ptr2_flow_db_set(struct bnxt_ulp_context	*ulp_ctx,
+				struct bnxt_ulp_flow_db	*flow_db)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return -EINVAL;
+
+	ulp_ctx->cfg_data->flow_db = flow_db;
+	return 0;
+}
+
+/* Function to get the flow database from the ulp context. */
+static inline struct bnxt_ulp_flow_db	*
+bnxt_ulp_cntxt_ptr2_flow_db_get(struct bnxt_ulp_context	*ulp_ctx)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return NULL;
+
+	return ulp_ctx->cfg_data->flow_db;
+}
+
+/* Function to get the tunnel cache table info from the ulp context. */
+static inline struct bnxt_tun_cache_entry *
+bnxt_ulp_cntxt_ptr2_tun_tbl_get(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return NULL;
+
+	return ulp_ctx->cfg_data->tun_tbl;
+}
+
+/* Function to get the ulp context from eth device. */
+static inline struct bnxt_ulp_context	*
+bnxt_ulp_eth_dev_ptr2_cntxt_get(struct rte_eth_dev	*dev)
+{
+	struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
+
+	if (BNXT_ETH_DEV_IS_REPRESENTOR(dev)) {
+		struct bnxt_representor *vfr = dev->data->dev_private;
+
+		bp = vfr->parent_dev->data->dev_private;
+	}
+
+	if (unlikely(!bp)) {
+		BNXT_DRV_DBG(ERR, "Bnxt private data is not initialized\n");
+		return NULL;
+	}
+	return bp->ulp_ctx;
+}
+
+static inline int32_t
+bnxt_ulp_cntxt_ptr2_mapper_data_set(struct bnxt_ulp_context *ulp_ctx,
+				    void *mapper_data)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data)) {
+		BNXT_DRV_DBG(ERR, "Invalid ulp context data\n");
+		return -EINVAL;
+	}
+
+	ulp_ctx->cfg_data->mapper_data = mapper_data;
+	return 0;
+}
+
+static inline void *
+bnxt_ulp_cntxt_ptr2_mapper_data_get(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data)) {
+		BNXT_DRV_DBG(ERR, "Invalid ulp context data\n");
+		return NULL;
+	}
+
+	return ulp_ctx->cfg_data->mapper_data;
+}
+
+static inline int32_t
+bnxt_ulp_cntxt_ptr2_matcher_data_set(struct bnxt_ulp_context *ulp_ctx,
+				     void *matcher_data)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data)) {
+		BNXT_DRV_DBG(ERR, "Invalid ulp context data\n");
+		return -EINVAL;
+	}
+
+	ulp_ctx->cfg_data->matcher_data = matcher_data;
+	return 0;
+}
+
+static inline void *
+bnxt_ulp_cntxt_ptr2_matcher_data_get(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data)) {
+		BNXT_DRV_DBG(ERR, "Invalid ulp context data\n");
+		return NULL;
+	}
+
+	return ulp_ctx->cfg_data->matcher_data;
+}
+
+/* Function to set the port database to the ulp context. */
+static inline int32_t
+bnxt_ulp_cntxt_ptr2_port_db_set(struct bnxt_ulp_context	*ulp_ctx,
+				struct bnxt_ulp_port_db	*port_db)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return -EINVAL;
+
+	ulp_ctx->cfg_data->port_db = port_db;
+	return 0;
+}
+
+/* Function to get the port database from the ulp context. */
+static inline struct bnxt_ulp_port_db *
+bnxt_ulp_cntxt_ptr2_port_db_get(struct bnxt_ulp_context	*ulp_ctx)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return NULL;
+
+	return ulp_ctx->cfg_data->port_db;
+}
+
+/* Function to set the flow counter info into the context */
+static inline int32_t
+bnxt_ulp_cntxt_ptr2_fc_info_set(struct bnxt_ulp_context *ulp_ctx,
+				struct bnxt_ulp_fc_info *ulp_fc_info)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data)) {
+		BNXT_DRV_DBG(ERR, "Invalid ulp context data\n");
+		return -EINVAL;
+	}
+
+	ulp_ctx->cfg_data->fc_info = ulp_fc_info;
+
+	return 0;
+}
+
+/* Function to retrieve the flow counter info from the context. */
+static inline struct bnxt_ulp_fc_info *
+bnxt_ulp_cntxt_ptr2_fc_info_get(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return NULL;
+
+	return ulp_ctx->cfg_data->fc_info;
+}
+
+/* Function to get the ulp flags from the ulp context. */
+static inline int32_t
+bnxt_ulp_cntxt_ptr2_ulp_flags_get(struct bnxt_ulp_context *ulp_ctx,
+				  uint32_t *flags)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return -1;
+
+	*flags =  ulp_ctx->cfg_data->ulp_flags;
+	return 0;
+}
+
+/* Function to get the ulp vfr info from the ulp context. */
+static inline struct bnxt_ulp_vfr_rule_info*
+bnxt_ulp_cntxt_ptr2_ulp_vfr_info_get(struct bnxt_ulp_context *ulp_ctx,
+				     uint32_t port_id)
+{
+	if (unlikely(!ulp_ctx ||
+		     !ulp_ctx->cfg_data ||
+		     port_id >= RTE_MAX_ETHPORTS))
+		return NULL;
+
+	return &ulp_ctx->cfg_data->vfr_rule_info[port_id];
+}
+
+/* Function to acquire the flow database lock from the ulp context. */
+static inline int32_t
+bnxt_ulp_cntxt_acquire_fdb_lock(struct bnxt_ulp_context	*ulp_ctx)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return -1;
+
+	if (pthread_mutex_lock(&ulp_ctx->cfg_data->flow_db_lock)) {
+		BNXT_DRV_DBG(ERR, "unable to acquire fdb lock\n");
+		return -1;
+	}
+	return 0;
+}
+
+/* Function to release the flow database lock from the ulp context. */
+static inline void
+bnxt_ulp_cntxt_release_fdb_lock(struct bnxt_ulp_context	*ulp_ctx)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return;
+
+	pthread_mutex_unlock(&ulp_ctx->cfg_data->flow_db_lock);
+}
+
+#if (RTE_VERSION_NUM(21, 05, 0, 0) > RTE_VERSION)
+
+/* Function to extract the action type from the shared action handle. */
+static inline uint32_t
+bnxt_get_shared_action_type(const struct rte_flow_shared_action *handle)
+{
+	return (uint32_t)(((uint64_t)handle >> 32) & 0xffffffff);
+}
+
+/* Function to extract the direction from the shared action handle. */
+static inline uint32_t
+bnxt_get_shared_action_direction(const struct rte_flow_shared_action *handle)
+{
+	uint32_t shared_type;
+
+	shared_type = bnxt_get_shared_action_type(handle);
+	return shared_type & 0x1 ? BNXT_ULP_FLOW_ATTR_EGRESS :
+		BNXT_ULP_FLOW_ATTR_INGRESS;
+}
+
+/* Function to extract the action index from the shared action handle. */
+static inline uint32_t
+bnxt_get_shared_action_index(const struct rte_flow_shared_action *handle)
+{
+	return (uint32_t)((uint64_t)handle & 0xffffffff);
+}
+
+#else /* (RTE_VERSION >= RTE_VERSION_NUM(21,05,0,0)) */
+
+/* Function to extract the action type from the shared action handle. */
+static inline int32_t
+bnxt_get_action_handle_type(const struct rte_flow_action_handle *handle,
+			    uint32_t *action_handle_type)
+{
+	if (unlikely(!action_handle_type))
+		return -EINVAL;
+
+	*action_handle_type = (uint32_t)(((uint64_t)handle >> 32) & 0xffffffff);
+	if (*action_handle_type >= BNXT_ULP_GEN_TBL_MAX_SZ)
+		return -EINVAL;
+
+	return 0;
+}
+
+/* Function to extract the direction from the shared action handle. */
+static inline int32_t
+bnxt_get_action_handle_direction(const struct rte_flow_action_handle *handle,
+				 uint32_t *dir)
+{
+	uint32_t shared_type;
+	int32_t ret = 0;
+
+	ret = bnxt_get_action_handle_type(handle, &shared_type);
+	if (unlikely(ret))
+		return ret;
+
+	*dir = shared_type & 0x1 ? BNXT_ULP_DIR_EGRESS : BNXT_ULP_DIR_INGRESS;
+
+	return ret;
+}
+
+/* Function to extract the action index from the shared action handle. */
+static inline uint32_t
+bnxt_get_action_handle_index(const struct rte_flow_action_handle *handle)
+{
+	return (uint32_t)((uint64_t)handle & 0xffffffff);
+}
+
+#endif	/* RTE_VERSION < RTE_VERSION_NUM(21,05,0,0) */
+
+/* Function to set the ha info into the context */
+static inline int32_t
+bnxt_ulp_cntxt_ptr2_ha_info_set(struct bnxt_ulp_context *ulp_ctx,
+				struct bnxt_ulp_ha_mgr_info *ulp_ha_info)
+{
+	if (unlikely(ulp_ctx == NULL || ulp_ctx->cfg_data == NULL)) {
+		BNXT_DRV_DBG(ERR, "Invalid ulp context data\n");
+		return -EINVAL;
+	}
+	ulp_ctx->cfg_data->ha_info = ulp_ha_info;
+	return 0;
+}
+
+/* Function to retrieve the ha info from the context. */
+static inline struct bnxt_ulp_ha_mgr_info *
+bnxt_ulp_cntxt_ptr2_ha_info_get(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (unlikely(ulp_ctx == NULL || ulp_ctx->cfg_data == NULL))
+		return NULL;
+	return ulp_ctx->cfg_data->ha_info;
+}
+
+static inline bool
+bnxt_ulp_cntxt_ha_enabled(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (unlikely(ulp_ctx == NULL || ulp_ctx->cfg_data == NULL))
+		return false;
+	return !!ULP_HIGH_AVAIL_IS_ENABLED(ulp_ctx->cfg_data->ulp_flags);
+}
+
+/* Function to get the app tunnel details from the ulp context. */
+static inline struct bnxt_flow_app_tun_ent *
+bnxt_ulp_cntxt_ptr2_app_tun_list_get(struct bnxt_ulp_context *ulp)
+{
+	if (unlikely(!ulp || !ulp->cfg_data))
+		return NULL;
+
+	return ulp->cfg_data->app_tun;
+}
+
+/* Function to get the truflow app id. This defined in the build file */
+static inline uint32_t
+bnxt_ulp_default_app_id_get(void)
+{
+	return BNXT_TF_APP_ID;
+}
+
+/* Function to convert ulp dev id to regular dev id. */
+static inline uint32_t
+bnxt_ulp_cntxt_convert_dev_id(uint32_t ulp_dev_id)
+{
+	enum tf_device_type type = 0;
+
+	switch (ulp_dev_id) {
+	case BNXT_ULP_DEVICE_ID_WH_PLUS:
+		type = TF_DEVICE_TYPE_P4;
+		break;
+	case BNXT_ULP_DEVICE_ID_STINGRAY:
+		type = TF_DEVICE_TYPE_SR;
+		break;
+	case BNXT_ULP_DEVICE_ID_THOR:
+		type = TF_DEVICE_TYPE_P5;
+		break;
+	default:
+		BNXT_DRV_DBG(ERR, "Invalid device id\n");
+		break;
+	}
+	return type;
+}
+
+/* This function sets the IF table index for the
+ * Application to poll to get the hot upgrade state and count details from
+ * the firmwware.
+ */
+static inline int32_t
+bnxt_ulp_cntxt_ha_reg_set(struct bnxt_ulp_context *ulp_ctx,
+		    uint8_t state, uint8_t cnt)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return -EINVAL;
+
+	if (ULP_MULTI_SHARED_IS_SUPPORTED(ulp_ctx)) {
+		ulp_ctx->cfg_data->hu_reg_state = state;
+		ulp_ctx->cfg_data->hu_reg_cnt = cnt;
+	} else {
+		ulp_ctx->cfg_data->hu_reg_state = ULP_HA_IF_TBL_IDX;
+		ulp_ctx->cfg_data->hu_reg_cnt = ULP_HA_CLIENT_CNT_IF_TBL_IDX;
+	}
+	return 0;
+}
+
+/* This function gets the IF table index for the
+ * Application to poll to get the appplication hot upgrade state from
+ * the firmwware.
+ */
+static inline uint32_t
+bnxt_ulp_cntxt_ha_reg_state_get(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return 0;
+
+	return (uint32_t)ulp_ctx->cfg_data->hu_reg_state;
+}
+
+/* This function gets the IF table index for the
+ * Application to poll to get the appplication count from
+ * the firmwware.
+ */
+static inline uint32_t
+bnxt_ulp_cntxt_ha_reg_cnt_get(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return 0;
+
+	return (uint32_t)ulp_ctx->cfg_data->hu_reg_cnt;
+}
+
+/* This function sets the number of key recipes supported
+ * Generally, this should be set to the number of flexible keys
+ * supported
+ */
+static inline void
+bnxt_ulp_num_key_recipes_set(struct bnxt_ulp_context *ulp_ctx,
+			     uint16_t num_recipes)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return;
+	ulp_ctx->cfg_data->num_key_recipes_per_dir = num_recipes;
+}
+
+/* This function gets the number of key recipes supported */
+static inline int32_t
+bnxt_ulp_num_key_recipes_get(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return 0;
+	return ulp_ctx->cfg_data->num_key_recipes_per_dir;
+}
+
+/* This function gets the feature bits */
+static inline uint64_t
+bnxt_ulp_feature_bits_get(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return 0;
+	return ulp_ctx->cfg_data->feature_bits;
+}
+
+/* Add the VF Rep endpoint to the session */
+static inline int32_t
+bnxt_ulp_vfr_session_fid_add(struct bnxt_ulp_context *ulp_ctx,
+			     uint16_t vfr_fid)
+{
+	int32_t rc = 0;
+
+	if (unlikely(ulp_ctx == NULL || ulp_ctx->ops == NULL))
+		return -EINVAL;
+	if (ulp_ctx->ops->ulp_vfr_session_fid_add)
+		rc = ulp_ctx->ops->ulp_vfr_session_fid_add(ulp_ctx, vfr_fid);
+
+	return rc;
+}
+
+/* Remove the VF Rep endpoint from the session */
+static inline int32_t
+bnxt_ulp_vfr_session_fid_rem(struct bnxt_ulp_context *ulp_ctx,
+			     uint16_t vfr_fid)
+{
+	int32_t rc = 0;
+
+	if (unlikely(ulp_ctx == NULL || ulp_ctx->ops == NULL))
+		return -EINVAL;
+	if (ulp_ctx->ops->ulp_vfr_session_fid_rem)
+		rc = ulp_ctx->ops->ulp_vfr_session_fid_rem(ulp_ctx, vfr_fid);
+	return rc;
+}
+
+#endif /* _BNXT_ULP_UTILS_H_ */
diff --git a/drivers/net/bnxt/tf_ulp/meson.build b/drivers/net/bnxt/tf_ulp/meson.build
index 855380ffac..e19d51ee01 100644
--- a/drivers/net/bnxt/tf_ulp/meson.build
+++ b/drivers/net/bnxt/tf_ulp/meson.build
@@ -25,7 +25,6 @@ sources += files(
         'ulp_rte_handler_tbl.c',
         'ulp_rte_parser.c',
         'ulp_tun.c',
-        'ulp_utils.c',
 	'ulp_mapper_tf.c',
 	'ulp_mapper_tfc.c',
 	'bnxt_ulp_tf.c',
diff --git a/drivers/net/bnxt/tf_ulp/ulp_alloc_tbl.c b/drivers/net/bnxt/tf_ulp/ulp_alloc_tbl.c
index 5245aa26c5..6401a7a80f 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_alloc_tbl.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_alloc_tbl.c
@@ -8,6 +8,7 @@
 #include "tf_core.h"
 #include "ulp_mapper.h"
 #include "ulp_alloc_tbl.h"
+#include "bnxt_ulp_utils.h"
 
 #ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
 #include "ulp_template_debug_proto.h"
diff --git a/drivers/net/bnxt/tf_ulp/ulp_def_rules.c b/drivers/net/bnxt/tf_ulp/ulp_def_rules.c
index 7a5f90fb09..17d2daeea3 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_def_rules.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_def_rules.c
@@ -4,6 +4,7 @@
  */
 
 #include "bnxt_tf_common.h"
+#include "bnxt_ulp_utils.h"
 #include "ulp_template_struct.h"
 #include "ulp_template_db_enum.h"
 #include "ulp_template_db_field.h"
diff --git a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
index eb2d14f3be..67489b76f3 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
@@ -10,6 +10,7 @@
 #include <rte_alarm.h>
 #include "bnxt.h"
 #include "bnxt_ulp.h"
+#include "bnxt_ulp_utils.h"
 #include "bnxt_ulp_tf.h"
 #include "bnxt_tf_common.h"
 #include "ulp_fc_mgr.h"
diff --git a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tf.c b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tf.c
index cd6d067bc9..f15fa4c3a4 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tf.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tf.c
@@ -10,6 +10,7 @@
 #include <rte_alarm.h>
 #include "bnxt.h"
 #include "bnxt_ulp.h"
+#include "bnxt_ulp_utils.h"
 #include "bnxt_ulp_tf.h"
 #include "bnxt_tf_common.h"
 #include "ulp_fc_mgr.h"
diff --git a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c
index 7c404685df..4a93dd1a33 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c
@@ -10,6 +10,7 @@
 #include <rte_alarm.h>
 #include "bnxt.h"
 #include "bnxt_ulp.h"
+#include "bnxt_ulp_utils.h"
 #include "bnxt_ulp_tfc.h"
 #include "bnxt_tf_common.h"
 #include "ulp_fc_mgr.h"
diff --git a/drivers/net/bnxt/tf_ulp/ulp_flow_db.c b/drivers/net/bnxt/tf_ulp/ulp_flow_db.c
index e7ac617d7a..341c8c2dfe 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_flow_db.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_flow_db.c
@@ -6,6 +6,7 @@
 #include <rte_malloc.h>
 #include "bnxt.h"
 #include "bnxt_tf_common.h"
+#include "bnxt_ulp_utils.h"
 #include "ulp_utils.h"
 #include "ulp_template_struct.h"
 #include "ulp_mapper.h"
diff --git a/drivers/net/bnxt/tf_ulp/ulp_gen_tbl.c b/drivers/net/bnxt/tf_ulp/ulp_gen_tbl.c
index bf92626c50..c2ae3dc3a2 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_gen_tbl.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_gen_tbl.c
@@ -5,6 +5,7 @@
 
 #include <rte_log.h>
 #include <rte_malloc.h>
+#include "bnxt_ulp_utils.h"
 #include "tf_core.h"
 #include "tfp.h"
 #include "ulp_mapper.h"
@@ -625,4 +626,3 @@ ulp_gen_tbl_simple_list_search(struct ulp_mapper_gen_tbl_list *tbl_list,
 	}
 	return rc;
 }
-
diff --git a/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
index 94fcc5fc5b..0bbb5da085 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
@@ -10,6 +10,7 @@
 #include <rte_alarm.h>
 #include "bnxt.h"
 #include "bnxt_ulp.h"
+#include "bnxt_ulp_utils.h"
 #include "bnxt_ulp_tf.h"
 #include "bnxt_tf_common.h"
 #include "ulp_ha_mgr.h"
diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.c b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
index dc43d1c810..f0d715d369 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
@@ -11,6 +11,7 @@
 #include "bnxt_tf_common.h"
 #include "ulp_utils.h"
 #include "bnxt_ulp.h"
+#include "bnxt_ulp_utils.h"
 #include "tfp.h"
 #include "tf_ext_flow_handle.h"
 #include "ulp_mark_mgr.h"
@@ -50,7 +51,7 @@ bnxt_ulp_mapper_ops_get(struct bnxt *bp)
 	const struct ulp_mapper_core_ops *func_ops;
 
 	rc = bnxt_ulp_devid_get(bp, &dev_id);
-	if (rc)
+	if (unlikely(rc))
 		return NULL;
 
 	switch (dev_id) {
@@ -94,7 +95,7 @@ ulp_mapper_tmpl_name_str(enum bnxt_ulp_template_type tmpl_type)
 static struct bnxt_ulp_glb_resource_info *
 ulp_mapper_glb_resource_info_list_get(uint32_t *num_entries)
 {
-	if (!num_entries)
+	if (unlikely(!num_entries))
 		return NULL;
 	*num_entries = BNXT_ULP_GLB_RESOURCE_TBL_MAX_SZ;
 	return ulp_glb_resource_tbl;
@@ -114,8 +115,8 @@ ulp_mapper_glb_resource_read(struct bnxt_ulp_mapper_data *mapper_data,
 			     uint64_t *regval,
 			     bool *shared)
 {
-	if (!mapper_data || !regval || !shared ||
-	    dir >= TF_DIR_MAX || idx >= BNXT_ULP_GLB_RF_IDX_LAST)
+	if (unlikely(!mapper_data || !regval || !shared ||
+		     dir >= TF_DIR_MAX || idx >= BNXT_ULP_GLB_RF_IDX_LAST))
 		return -EINVAL;
 
 	*regval = mapper_data->glb_res_tbl[dir][idx].resource_hndl;
@@ -138,8 +139,8 @@ ulp_mapper_glb_resource_write(struct bnxt_ulp_mapper_data *data,
 	struct bnxt_ulp_mapper_glb_resource_entry *ent;
 
 	/* validate the arguments */
-	if (!data || res->direction >= TF_DIR_MAX ||
-	    res->glb_regfile_index >= BNXT_ULP_GLB_RF_IDX_LAST)
+	if (unlikely(!data || res->direction >= TF_DIR_MAX ||
+		     res->glb_regfile_index >= BNXT_ULP_GLB_RF_IDX_LAST))
 		return -EINVAL;
 
 	/* write to the mapper data */
@@ -178,7 +179,7 @@ ulp_mapper_resource_ident_allocate(struct bnxt_ulp_context *ulp_ctx,
 						     glb_res->direction,
 						     CFA_TRACK_TYPE_SID,
 						     &id);
-	if (rc)
+	if (unlikely(rc))
 		return rc;
 
 	/* entries are stored as big-endian format */
@@ -189,7 +190,7 @@ ulp_mapper_resource_ident_allocate(struct bnxt_ulp_context *ulp_ctx,
 	 * shared flag is always false.
 	 */
 	rc = ulp_mapper_glb_resource_write(mapper_data, glb_res, regval, shared);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to write to global resource id\n");
 		/* Free the identifier when update failed */
 		res.direction = glb_res->direction;
@@ -233,7 +234,7 @@ ulp_mapper_resource_index_tbl_alloc(struct bnxt_ulp_context *ulp_ctx,
 	 * shared flag is always false.
 	 */
 	rc = ulp_mapper_glb_resource_write(mapper_data, glb_res, regval, shared);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to write to global resource id\n");
 		/* Free the index when update failed */
 		res.direction = glb_res->direction;
@@ -252,7 +253,7 @@ ulp_mapper_glb_field_tbl_get(struct bnxt_ulp_mapper_parms *parms,
 {
 	uint32_t t_idx;
 
-	if (operand >= BNXT_ULP_GLB_FIELD_TBL_SIZE) {
+	if (unlikely(operand >= BNXT_ULP_GLB_FIELD_TBL_SIZE)) {
 		BNXT_DRV_DBG(ERR, "Invalid hdr field index %x:%x\n",
 			     parms->class_tid, operand);
 		*val = 0;
@@ -274,7 +275,7 @@ ulp_mapper_glb_field_tbl_get(struct bnxt_ulp_mapper_parms *parms,
 static uint32_t
 ulp_mapper_act_prop_size_get(uint32_t idx)
 {
-	if (idx >= BNXT_ULP_ACT_PROP_IDX_LAST)
+	if (unlikely(idx >= BNXT_ULP_ACT_PROP_IDX_LAST))
 		return 0;
 	return ulp_act_prop_map_table[idx];
 }
@@ -296,7 +297,7 @@ ulp_mapper_cond_oper_list_get(struct bnxt_ulp_mapper_parms *mparms,
 	const struct bnxt_ulp_template_device_tbls *dev_tbls;
 
 	dev_tbls = &mparms->device_params->dev_tbls[mparms->tmpl_type];
-	if (idx >= dev_tbls->cond_oper_list_size)
+	if (unlikely(idx >= dev_tbls->cond_oper_list_size))
 		return NULL;
 	return &dev_tbls->cond_oper_list[idx];
 }
@@ -308,7 +309,7 @@ ulp_mapper_tmpl_cond_list_get(struct bnxt_ulp_mapper_parms *mparms,
 	const struct bnxt_ulp_template_device_tbls *dev_tbls;
 
 	dev_tbls = &mparms->device_params->dev_tbls[mparms->tmpl_type];
-	if (idx >= dev_tbls->cond_list_size)
+	if (unlikely(idx >= dev_tbls->cond_list_size))
 		return NULL;
 	return &dev_tbls->cond_list[idx];
 }
@@ -362,7 +363,7 @@ ulp_mapper_key_fields_get(struct bnxt_ulp_mapper_parms *mparms,
 	const struct bnxt_ulp_template_device_tbls *dev_tbls;
 
 	dev_tbls = &mparms->device_params->dev_tbls[mparms->tmpl_type];
-	if (!dev_tbls->key_info_list) {
+	if (unlikely(!dev_tbls->key_info_list)) {
 		*num_flds = 0;
 		return NULL;
 	}
@@ -417,7 +418,7 @@ ulp_mapper_result_fields_get(struct bnxt_ulp_mapper_parms *mparms,
 	const struct bnxt_ulp_template_device_tbls *dev_tbls;
 
 	dev_tbls = &mparms->device_params->dev_tbls[mparms->tmpl_type];
-	if (!dev_tbls->result_field_list) {
+	if (unlikely(!dev_tbls->result_field_list)) {
 		*num_flds = 0;
 		*num_encap_flds = 0;
 		return NULL;
@@ -448,7 +449,7 @@ ulp_mapper_ident_fields_get(struct bnxt_ulp_mapper_parms *mparms,
 	const struct bnxt_ulp_template_device_tbls *dev_tbls;
 
 	dev_tbls = &mparms->device_params->dev_tbls[mparms->tmpl_type];
-	if (!dev_tbls->ident_list) {
+	if (unlikely(!dev_tbls->ident_list)) {
 		*num_flds = 0;
 		return NULL;
 	}
@@ -466,7 +467,7 @@ ulp_mapper_tmpl_key_ext_list_get(struct bnxt_ulp_mapper_parms *mparms,
 	const struct bnxt_ulp_template_device_tbls *dev_tbls;
 
 	dev_tbls = &mparms->device_params->dev_tbls[mparms->tmpl_type];
-	if (idx >= dev_tbls->key_ext_list_size)
+	if (unlikely(idx >= dev_tbls->key_ext_list_size))
 		return NULL;
 	return &dev_tbls->key_ext_list[idx];
 }
@@ -490,7 +491,7 @@ ulp_mapper_parent_flow_free(struct bnxt_ulp_context *ulp,
 	pc_idx = (uint32_t)res->resource_hndl;
 
 	/* reset the child flow bitset*/
-	if (ulp_flow_db_pc_db_parent_flow_set(ulp, pc_idx, parent_fid, 0)) {
+	if (unlikely(ulp_flow_db_pc_db_parent_flow_set(ulp, pc_idx, parent_fid, 0))) {
 		BNXT_DRV_DBG(ERR, "error in reset parent flow bitset %x:%x\n",
 			     pc_idx, parent_fid);
 		return -EINVAL;
@@ -508,7 +509,7 @@ ulp_mapper_child_flow_free(struct bnxt_ulp_context *ulp,
 	pc_idx = (uint32_t)res->resource_hndl;
 
 	/* reset the child flow bitset*/
-	if (ulp_flow_db_pc_db_child_flow_set(ulp, pc_idx, child_fid, 0)) {
+	if (unlikely(ulp_flow_db_pc_db_child_flow_set(ulp, pc_idx, child_fid, 0))) {
 		BNXT_DRV_DBG(ERR,
 			     "error in resetting child flow bitset %x:%x\n",
 			     pc_idx, child_fid);
@@ -533,7 +534,7 @@ ulp_mapper_fdb_opc_alloc_rid(struct bnxt_ulp_mapper_parms *parms,
 	rc = ulp_flow_db_fid_alloc(parms->ulp_ctx,
 				   BNXT_ULP_FDB_TYPE_RID,
 				   0, &rid);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR,
 			     "Unable to allocate flow table entry\n");
 		return -EINVAL;
@@ -542,7 +543,7 @@ ulp_mapper_fdb_opc_alloc_rid(struct bnxt_ulp_mapper_parms *parms,
 	val64 = rid;
 	rc = ulp_regfile_write(parms->regfile, tbl->fdb_operand,
 			       tfp_cpu_to_be_64(val64));
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Write regfile[%d] failed\n",
 			     tbl->fdb_operand);
 		ulp_flow_db_fid_free(parms->ulp_ctx,
@@ -566,7 +567,7 @@ ulp_mapper_fdb_opc_process(struct bnxt_ulp_mapper_parms *parms,
 			   struct ulp_flow_db_res_params *fid_parms)
 {
 	uint32_t push_fid;
-	uint64_t val64;
+	uint64_t val64 = 0;
 	enum bnxt_ulp_fdb_type flow_type;
 	int32_t rc = 0;
 
@@ -579,7 +580,7 @@ ulp_mapper_fdb_opc_process(struct bnxt_ulp_mapper_parms *parms,
 		/* get the fid from the regfile */
 		rc = ulp_regfile_read(parms->regfile, tbl->fdb_operand,
 				      &val64);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "regfile[%d] read oob\n",
 				     tbl->fdb_operand);
 			return -EINVAL;
@@ -600,7 +601,7 @@ ulp_mapper_fdb_opc_process(struct bnxt_ulp_mapper_parms *parms,
 	/* Add the resource to the flow database */
 	rc = ulp_flow_db_resource_add(parms->ulp_ctx, flow_type,
 				      push_fid, fid_parms);
-	if (rc)
+	if (unlikely(rc))
 		BNXT_DRV_DBG(ERR, "Failed to add res to flow %x rc = %d\n",
 			     push_fid, rc);
 
@@ -636,8 +637,8 @@ ulp_mapper_priority_opc_process(struct bnxt_ulp_mapper_parms *parms,
 			*priority = tbl->pri_operand;
 		break;
 	case BNXT_ULP_PRI_OPC_REGFILE:
-		if (ulp_regfile_read(parms->regfile, tbl->pri_operand,
-				     &regval)) {
+		if (unlikely(ulp_regfile_read(parms->regfile, tbl->pri_operand,
+					      &regval))) {
 			BNXT_DRV_DBG(ERR, "regfile[%u] read oob\n",
 				     tbl->pri_operand);
 			rc = -EINVAL;
@@ -645,7 +646,7 @@ ulp_mapper_priority_opc_process(struct bnxt_ulp_mapper_parms *parms,
 		*priority = (uint32_t)tfp_be_to_cpu_64(regval);
 		break;
 	case BNXT_ULP_PRI_OPC_COMP_FIELD:
-		if (tbl->pri_operand < BNXT_ULP_CF_IDX_LAST) {
+		if (likely(tbl->pri_operand < BNXT_ULP_CF_IDX_LAST)) {
 			regval = ULP_COMP_FLD_IDX_RD(parms, tbl->pri_operand);
 			*priority = regval;
 		} else {
@@ -687,7 +688,7 @@ ulp_mapper_tbl_ident_scan_ext(struct bnxt_ulp_mapper_parms *parms,
 	uint64_t val64;
 
 	/* validate the null arguments */
-	if (!byte_data) {
+	if (unlikely(!byte_data)) {
 		BNXT_DRV_DBG(ERR, "invalid argument\n");
 		return -EINVAL;
 	}
@@ -697,9 +698,9 @@ ulp_mapper_tbl_ident_scan_ext(struct bnxt_ulp_mapper_parms *parms,
 
 	for (i = 0; i < num_idents; i++) {
 		/* check the size of the buffer for validation */
-		if ((idents[i].ident_bit_pos + idents[i].ident_bit_size) >
+		if (unlikely((idents[i].ident_bit_pos + idents[i].ident_bit_size) >
 		    ULP_BYTE_2_BITS(byte_data_size) ||
-		    idents[i].ident_bit_size > ULP_BYTE_2_BITS(sizeof(val64))) {
+			     idents[i].ident_bit_size > ULP_BYTE_2_BITS(sizeof(val64)))) {
 			BNXT_DRV_DBG(ERR, "invalid offset or length %x:%x:%x\n",
 				     idents[i].ident_bit_pos,
 				     idents[i].ident_bit_size,
@@ -718,8 +719,8 @@ ulp_mapper_tbl_ident_scan_ext(struct bnxt_ulp_mapper_parms *parms,
 					idents[i].ident_bit_size);
 
 		/* Write it to the regfile, val64 is already in big-endian*/
-		if (ulp_regfile_write(parms->regfile,
-				      idents[i].regfile_idx, val64)) {
+		if (unlikely(ulp_regfile_write(parms->regfile,
+					       idents[i].regfile_idx, val64))) {
 			BNXT_DRV_DBG(ERR, "Regfile[%d] write failed.\n",
 				     idents[i].regfile_idx);
 			return -EINVAL;
@@ -757,14 +758,14 @@ ulp_mapper_ident_process(struct bnxt_ulp_mapper_parms *parms,
 						     tbl->direction,
 						     tbl->track_type,
 						     &id);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "identifier process failed\n");
 		return rc;
 	}
 
 	fid_parms.resource_hndl = id;
 	idx = ident->regfile_idx;
-	if (ulp_regfile_write(parms->regfile, idx, tfp_cpu_to_be_64(id))) {
+	if (unlikely(ulp_regfile_write(parms->regfile, idx, tfp_cpu_to_be_64(id)))) {
 		BNXT_DRV_DBG(ERR, "Regfile[%d] write failed.\n", idx);
 		rc = -EINVAL;
 		/* Need to free the identifier, so goto error */
@@ -774,7 +775,7 @@ ulp_mapper_ident_process(struct bnxt_ulp_mapper_parms *parms,
 	/* Link the resource to the flow in the flow db */
 	if (!val) {
 		rc = ulp_mapper_fdb_opc_process(parms, tbl, &fid_parms);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR,
 				     "Failed to link res to flow rc = %d\n",
 				     rc);
@@ -802,49 +803,49 @@ ulp_mapper_field_port_db_process(struct bnxt_ulp_mapper_parms *parms,
 
 	switch (port_data) {
 	case BNXT_ULP_PORT_TABLE_DRV_FUNC_PARENT_MAC:
-		if (ulp_port_db_parent_mac_addr_get(parms->ulp_ctx, port_id,
-						    val)) {
+		if (unlikely(ulp_port_db_parent_mac_addr_get(parms->ulp_ctx, port_id,
+							     val))) {
 			BNXT_DRV_DBG(ERR, "Invalid port id %u\n", port_id);
 			return -EINVAL;
 		}
 		break;
 	case BNXT_ULP_PORT_TABLE_DRV_FUNC_MAC:
-		if (ulp_port_db_drv_mac_addr_get(parms->ulp_ctx, port_id,
-						 val)) {
+		if (unlikely(ulp_port_db_drv_mac_addr_get(parms->ulp_ctx, port_id,
+							  val))) {
 			BNXT_DRV_DBG(ERR, "Invalid port id %u\n", port_id);
 			return -EINVAL;
 		}
 		break;
 	case BNXT_ULP_PORT_TABLE_DRV_FUNC_PARENT_VNIC:
-		if (ulp_port_db_parent_vnic_get(parms->ulp_ctx, port_id,
-						val)) {
+		if (unlikely(ulp_port_db_parent_vnic_get(parms->ulp_ctx, port_id,
+							 val))) {
 			BNXT_DRV_DBG(ERR, "Invalid port id %u\n", port_id);
 			return -EINVAL;
 		}
 		break;
 	case BNXT_ULP_PORT_TABLE_PORT_IS_PF:
-		if (ulp_port_db_port_is_pf_get(parms->ulp_ctx, port_id,
-					       val)) {
+		if (unlikely(ulp_port_db_port_is_pf_get(parms->ulp_ctx, port_id,
+							val))) {
 			BNXT_DRV_DBG(ERR, "Invalid port id %u\n", port_id);
 			return -EINVAL;
 		}
 		break;
 	case BNXT_ULP_PORT_TABLE_VF_FUNC_METADATA:
-		if (ulp_port_db_port_meta_data_get(parms->ulp_ctx, port_id,
-						   val)) {
+		if (unlikely(ulp_port_db_port_meta_data_get(parms->ulp_ctx, port_id,
+							    val))) {
 			BNXT_DRV_DBG(ERR, "Invalid port id %u\n", port_id);
 			return -EINVAL;
 		}
 		break;
 	case BNXT_ULP_PORT_TABLE_TABLE_SCOPE:
-		if (ulp_port_db_port_table_scope_get(parms->ulp_ctx,
-						     port_id, val)) {
+		if (unlikely(ulp_port_db_port_table_scope_get(parms->ulp_ctx,
+							      port_id, val))) {
 			BNXT_DRV_DBG(ERR, "Invalid port id %u\n", port_id);
 			return -EINVAL;
 		}
 		break;
 	case BNXT_ULP_PORT_TABLE_VF_FUNC_FID:
-		if (ulp_port_db_port_vf_fid_get(parms->ulp_ctx, port_id, val)) {
+		if (unlikely(ulp_port_db_port_vf_fid_get(parms->ulp_ctx, port_id, val))) {
 			BNXT_DRV_DBG(ERR, "Invalid port id %u\n", port_id);
 			return -EINVAL;
 		}
@@ -894,13 +895,13 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 		*value = 1;
 		break;
 	case BNXT_ULP_FIELD_SRC_CF:
-		if (ulp_operand_read(field_opr,
-				     (uint8_t *)&idx, sizeof(uint16_t))) {
+		if (unlikely(ulp_operand_read(field_opr,
+					      (uint8_t *)&idx, sizeof(uint16_t)))) {
 			BNXT_DRV_DBG(ERR, "CF operand read failed\n");
 			return -EINVAL;
 		}
 		idx = tfp_be_to_cpu_16(idx);
-		if (idx >= BNXT_ULP_CF_IDX_LAST || bytelen > sizeof(uint64_t)) {
+		if (unlikely(idx >= BNXT_ULP_CF_IDX_LAST || bytelen > sizeof(uint64_t))) {
 			BNXT_DRV_DBG(ERR, "comp field [%d] read oob %d\n", idx,
 				     bytelen);
 			return -EINVAL;
@@ -910,15 +911,15 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 		*value = ULP_COMP_FLD_IDX_RD(parms, idx);
 		break;
 	case BNXT_ULP_FIELD_SRC_RF:
-		if (ulp_operand_read(field_opr,
-				     (uint8_t *)&idx, sizeof(uint16_t))) {
+		if (unlikely(ulp_operand_read(field_opr,
+					      (uint8_t *)&idx, sizeof(uint16_t)))) {
 			BNXT_DRV_DBG(ERR, "RF operand read failed\n");
 			return -EINVAL;
 		}
 
 		idx = tfp_be_to_cpu_16(idx);
 		/* Uninitialized regfile entries return 0 */
-		if (ulp_regfile_read(parms->regfile, idx, &lregval) ||
+		if (unlikely(ulp_regfile_read(parms->regfile, idx, &lregval)) ||
 		    sizeof(uint64_t) < bytelen) {
 			BNXT_DRV_DBG(ERR, "regfile[%d] read oob %u\n", idx,
 				     bytelen);
@@ -929,19 +930,19 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 		*value = tfp_be_to_cpu_64(lregval);
 		break;
 	case BNXT_ULP_FIELD_SRC_ACT_PROP:
-		if (ulp_operand_read(field_opr,
-				     (uint8_t *)&idx, sizeof(uint16_t))) {
+		if (unlikely(ulp_operand_read(field_opr,
+					      (uint8_t *)&idx, sizeof(uint16_t)))) {
 			BNXT_DRV_DBG(ERR, "Action operand read failed\n");
 			return -EINVAL;
 		}
 		idx = tfp_be_to_cpu_16(idx);
-		if (idx >= BNXT_ULP_ACT_PROP_IDX_LAST) {
+		if (unlikely(idx >= BNXT_ULP_ACT_PROP_IDX_LAST)) {
 			BNXT_DRV_DBG(ERR, "act_prop[%d] oob\n", idx);
 			return -EINVAL;
 		}
 		buffer = &parms->act_prop->act_details[idx];
 		field_size = ulp_mapper_act_prop_size_get(idx);
-		if (bytelen > field_size) {
+		if (unlikely(bytelen > field_size)) {
 			BNXT_DRV_DBG(ERR, "act_prop[%d] field size small %u\n",
 				     idx, field_size);
 			return -EINVAL;
@@ -954,27 +955,27 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 		}
 		break;
 	case BNXT_ULP_FIELD_SRC_ACT_PROP_SZ:
-		if (ulp_operand_read(field_opr,
-				     (uint8_t *)&idx, sizeof(uint16_t))) {
+		if (unlikely(ulp_operand_read(field_opr,
+					      (uint8_t *)&idx, sizeof(uint16_t)))) {
 			BNXT_DRV_DBG(ERR, "Action sz operand read failed\n");
 			return -EINVAL;
 		}
 		idx = tfp_be_to_cpu_16(idx);
 
-		if (idx >= BNXT_ULP_ACT_PROP_IDX_LAST) {
+		if (unlikely(idx >= BNXT_ULP_ACT_PROP_IDX_LAST)) {
 			BNXT_DRV_DBG(ERR, "act_prop_sz[%d] oob\n", idx);
 			return -EINVAL;
 		}
 		*val = &parms->act_prop->act_details[idx];
 
 		/* get the size index next */
-		if (ulp_operand_read(&field_opr[sizeof(uint16_t)],
-				     (uint8_t *)&size_idx, sizeof(uint16_t))) {
+		if (unlikely(ulp_operand_read(&field_opr[sizeof(uint16_t)],
+					      (uint8_t *)&size_idx, sizeof(uint16_t)))) {
 			BNXT_DRV_DBG(ERR, "Action sz operand read failed\n");
 			return -EINVAL;
 		}
 		size_idx = tfp_be_to_cpu_16(size_idx);
-		if (size_idx >= BNXT_ULP_ACT_PROP_IDX_LAST) {
+		if (unlikely(size_idx >= BNXT_ULP_ACT_PROP_IDX_LAST)) {
 			BNXT_DRV_DBG(ERR, "act_prop[%d] oob\n", size_idx);
 			return -EINVAL;
 		}
@@ -984,15 +985,15 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 		*val_len = ULP_BYTE_2_BITS(val_size);
 		break;
 	case BNXT_ULP_FIELD_SRC_GLB_RF:
-		if (ulp_operand_read(field_opr,
-				     (uint8_t *)&idx, sizeof(uint16_t))) {
+		if (unlikely(ulp_operand_read(field_opr,
+					      (uint8_t *)&idx, sizeof(uint16_t)))) {
 			BNXT_DRV_DBG(ERR, "Global regfile read failed\n");
 			return -EINVAL;
 		}
 		idx = tfp_be_to_cpu_16(idx);
-		if (ulp_mapper_glb_resource_read(parms->mapper_data,
-						 dir, idx, &lregval, &shared) ||
-		    sizeof(uint64_t) < bytelen) {
+		if (unlikely(ulp_mapper_glb_resource_read(parms->mapper_data,
+							  dir, idx, &lregval, &shared) ||
+			     sizeof(uint64_t) < bytelen)) {
 			BNXT_DRV_DBG(ERR, "Global regfile[%d] read failed %u\n",
 				     idx, bytelen);
 			return -EINVAL;
@@ -1004,14 +1005,14 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 		break;
 	case BNXT_ULP_FIELD_SRC_HF:
 	case BNXT_ULP_FIELD_SRC_SUB_HF:
-		if (ulp_operand_read(field_opr,
-				     (uint8_t *)&idx, sizeof(uint16_t))) {
+		if (unlikely(ulp_operand_read(field_opr,
+					      (uint8_t *)&idx, sizeof(uint16_t)))) {
 			BNXT_DRV_DBG(ERR, "Header field read failed\n");
 			return -EINVAL;
 		}
 		idx = tfp_be_to_cpu_16(idx);
 		/* get the index from the global field list */
-		if (ulp_mapper_glb_field_tbl_get(parms, idx, &bit)) {
+		if (unlikely(ulp_mapper_glb_field_tbl_get(parms, idx, &bit))) {
 			BNXT_DRV_DBG(ERR, "invalid ulp_glb_field_tbl idx %d\n",
 				     idx);
 			return -EINVAL;
@@ -1026,7 +1027,7 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 			/* To support field processing of undefined fields */
 			*val = mapper_fld_zeros;
 			break;
-		} else if (bytelen > field_size) {
+		} else if (unlikely(bytelen > field_size)) {
 			BNXT_DRV_DBG(ERR, "Hdr field[%d] size small %u\n",
 				     bit, field_size);
 			return -EINVAL;
@@ -1035,15 +1036,15 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 			*val = &buffer[field_size - bytelen];
 		} else {
 			/* get the offset next */
-			if (ulp_operand_read(&field_opr[sizeof(uint16_t)],
+			if (unlikely(ulp_operand_read(&field_opr[sizeof(uint16_t)],
 					     (uint8_t *)&offset,
-					     sizeof(uint16_t))) {
+						      sizeof(uint16_t)))) {
 				BNXT_DRV_DBG(ERR, "Hdr fld size read failed\n");
 				return -EINVAL;
 			}
 			offset = tfp_be_to_cpu_16(offset);
 			offset = ULP_BITS_2_BYTE_NR(offset);
-			if ((offset + bytelen) > field_size) {
+			if (unlikely((offset + bytelen) > field_size)) {
 				BNXT_DRV_DBG(ERR, "Hdr field[%d] oob\n", bit);
 				return -EINVAL;
 			}
@@ -1051,13 +1052,13 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 		}
 		break;
 	case BNXT_ULP_FIELD_SRC_HDR_BIT:
-		if (ulp_operand_read(field_opr,
-				     (uint8_t *)&lregval, sizeof(uint64_t))) {
+		if (unlikely(ulp_operand_read(field_opr,
+					      (uint8_t *)&lregval, sizeof(uint64_t)))) {
 			BNXT_DRV_DBG(ERR, "Header bit read failed\n");
 			return -EINVAL;
 		}
 		lregval = tfp_be_to_cpu_64(lregval);
-		if (ULP_BITMAP_ISSET(parms->hdr_bitmap->bits, lregval)) {
+		if (unlikely(ULP_BITMAP_ISSET(parms->hdr_bitmap->bits, lregval))) {
 			*val = mapper_fld_one;
 			*value = 1;
 		} else {
@@ -1065,13 +1066,13 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 		}
 		break;
 	case BNXT_ULP_FIELD_SRC_ACT_BIT:
-		if (ulp_operand_read(field_opr,
-				     (uint8_t *)&lregval, sizeof(uint64_t))) {
+		if (unlikely(ulp_operand_read(field_opr,
+					      (uint8_t *)&lregval, sizeof(uint64_t)))) {
 			BNXT_DRV_DBG(ERR, "Action bit read failed\n");
 			return -EINVAL;
 		}
 		lregval = tfp_be_to_cpu_64(lregval);
-		if (ULP_BITMAP_ISSET(parms->act_bitmap->bits, lregval)) {
+		if (unlikely(ULP_BITMAP_ISSET(parms->act_bitmap->bits, lregval))) {
 			*val = mapper_fld_one;
 			*value = 1;
 		} else {
@@ -1079,19 +1080,19 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 		}
 		break;
 	case BNXT_ULP_FIELD_SRC_FIELD_BIT:
-		if (ulp_operand_read(field_opr,
-				     (uint8_t *)&idx, sizeof(uint16_t))) {
+		if (unlikely(ulp_operand_read(field_opr,
+					      (uint8_t *)&idx, sizeof(uint16_t)))) {
 			BNXT_DRV_DBG(ERR, "Field bit read failed\n");
 			return -EINVAL;
 		}
 		idx = tfp_be_to_cpu_16(idx);
 		/* get the index from the global field list */
-		if (ulp_mapper_glb_field_tbl_get(parms, idx, &bit)) {
+		if (unlikely(ulp_mapper_glb_field_tbl_get(parms, idx, &bit))) {
 			BNXT_DRV_DBG(ERR, "invalid ulp_glb_field_tbl idx %d\n",
 				     idx);
 			return -EINVAL;
 		}
-		if (ULP_INDEX_BITMAP_GET(parms->fld_bitmap->bits, bit)) {
+		if (unlikely(ULP_INDEX_BITMAP_GET(parms->fld_bitmap->bits, bit))) {
 			*val = mapper_fld_one;
 			*value = 1;
 		} else {
@@ -1099,13 +1100,13 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 		}
 		break;
 	case BNXT_ULP_FIELD_SRC_PORT_TABLE:
-		if (ulp_operand_read(field_opr,
-				     (uint8_t *)&idx, sizeof(uint16_t))) {
+		if (unlikely(ulp_operand_read(field_opr,
+					      (uint8_t *)&idx, sizeof(uint16_t)))) {
 			BNXT_DRV_DBG(ERR, "CF operand read failed\n");
 			return -EINVAL;
 		}
 		idx = tfp_be_to_cpu_16(idx);
-		if (idx >= BNXT_ULP_CF_IDX_LAST || bytelen > sizeof(uint64_t)) {
+		if (unlikely(idx >= BNXT_ULP_CF_IDX_LAST || bytelen > sizeof(uint64_t))) {
 			BNXT_DRV_DBG(ERR, "comp field [%d] read oob %d\n", idx,
 				     bytelen);
 			return -EINVAL;
@@ -1114,21 +1115,21 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 		/* The port id is present in the comp field list */
 		port_id = ULP_COMP_FLD_IDX_RD(parms, idx);
 		/* get the port table enum  */
-		if (ulp_operand_read(field_opr + sizeof(uint16_t),
-				     (uint8_t *)&idx, sizeof(uint16_t))) {
+		if (unlikely(ulp_operand_read(field_opr + sizeof(uint16_t),
+					      (uint8_t *)&idx, sizeof(uint16_t)))) {
 			BNXT_DRV_DBG(ERR, "Port table enum read failed\n");
 			return -EINVAL;
 		}
 		idx = tfp_be_to_cpu_16(idx);
-		if (ulp_mapper_field_port_db_process(parms, port_id, idx,
-						     val)) {
+		if (unlikely(ulp_mapper_field_port_db_process(parms, port_id, idx,
+							      val))) {
 			BNXT_DRV_DBG(ERR, "field port table failed\n");
 			return -EINVAL;
 		}
 		break;
 	case BNXT_ULP_FIELD_SRC_ENC_HDR_BIT:
-		if (ulp_operand_read(field_opr,
-				     (uint8_t *)&lregval, sizeof(uint64_t))) {
+		if (unlikely(ulp_operand_read(field_opr,
+					      (uint8_t *)&lregval, sizeof(uint64_t)))) {
 			BNXT_DRV_DBG(ERR, "Header bit read failed\n");
 			return -EINVAL;
 		}
@@ -1141,21 +1142,21 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 		}
 		break;
 	case BNXT_ULP_FIELD_SRC_ENC_FIELD:
-		if (ulp_operand_read(field_opr,
-				     (uint8_t *)&idx, sizeof(uint16_t))) {
+		if (unlikely(ulp_operand_read(field_opr,
+					      (uint8_t *)&idx, sizeof(uint16_t)))) {
 			BNXT_DRV_DBG(ERR, "Header field read failed\n");
 			return -EINVAL;
 		}
 		idx = tfp_be_to_cpu_16(idx);
 		/* get the index from the global field list */
-		if (idx >= BNXT_ULP_ENC_FIELD_LAST) {
+		if (unlikely(idx >= BNXT_ULP_ENC_FIELD_LAST)) {
 			BNXT_DRV_DBG(ERR, "invalid encap field tbl idx %d\n",
 				     idx);
 			return -EINVAL;
 		}
 		buffer = parms->enc_field[idx].spec;
 		field_size = parms->enc_field[idx].size;
-		if (bytelen > field_size) {
+		if (unlikely(bytelen > field_size)) {
 			BNXT_DRV_DBG(ERR, "Encap field[%d] size small %u\n",
 				     idx, field_size);
 			return -EINVAL;
@@ -1172,15 +1173,15 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 	case BNXT_ULP_FIELD_SRC_LIST_AND:
 	case BNXT_ULP_FIELD_SRC_LIST_OR:
 		/* read the cond table index and count */
-		if (ulp_operand_read(field_opr,
-				     (uint8_t *)&idx, sizeof(uint16_t))) {
+		if (unlikely(ulp_operand_read(field_opr,
+					      (uint8_t *)&idx, sizeof(uint16_t)))) {
 			BNXT_DRV_DBG(ERR, "Cond idx operand read failed\n");
 			return -EINVAL;
 		}
 		idx = tfp_be_to_cpu_16(idx);
 
-		if (ulp_operand_read(field_opr + sizeof(uint16_t),
-				     (uint8_t *)&size_idx, sizeof(uint16_t))) {
+		if (unlikely(ulp_operand_read(field_opr + sizeof(uint16_t),
+					      (uint8_t *)&size_idx, sizeof(uint16_t)))) {
 			BNXT_DRV_DBG(ERR, "Cond count operand read failed\n");
 			return -EINVAL;
 		}
@@ -1193,7 +1194,7 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 			info.cond_list_opcode = BNXT_ULP_COND_LIST_OPC_OR;
 		info.cond_start_idx = idx;
 		info.cond_nums = size_idx;
-		if (ulp_mapper_cond_opc_list_process(parms, &info, &cond_res)) {
+		if (unlikely(ulp_mapper_cond_opc_list_process(parms, &info, &cond_res))) {
 			BNXT_DRV_DBG(ERR, "Cond evaluation failed\n");
 			return -EINVAL;
 		}
@@ -1206,13 +1207,13 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 		}
 		break;
 	case BNXT_ULP_FIELD_SRC_CF_BIT:
-		if (ulp_operand_read(field_opr,
-				     (uint8_t *)&lregval, sizeof(uint64_t))) {
+		if (unlikely(ulp_operand_read(field_opr,
+					      (uint8_t *)&lregval, sizeof(uint64_t)))) {
 			BNXT_DRV_DBG(ERR, "CF operand read failed\n");
 			return -EINVAL;
 		}
 		lregval = tfp_be_to_cpu_64(lregval);
-		if (ULP_BITMAP_ISSET(parms->cf_bitmap, lregval)) {
+		if (unlikely(ULP_BITMAP_ISSET(parms->cf_bitmap, lregval))) {
 			*val = mapper_fld_one;
 			*value = 1;
 		} else {
@@ -1260,19 +1261,19 @@ static int32_t ulp_mapper_field_blob_write(enum bnxt_ulp_field_src fld_src,
 					   uint8_t **out_val)
 {
 	if (fld_src == BNXT_ULP_FIELD_SRC_ZERO) {
-		if (ulp_blob_pad_push(blob, val_len) < 0) {
+		if (unlikely(ulp_blob_pad_push(blob, val_len) < 0)) {
 			BNXT_DRV_DBG(ERR, "too large for blob\n");
 			return -EINVAL;
 		}
 	} else if (fld_src == BNXT_ULP_FIELD_SRC_ACT_PROP_SZ) {
-		if (ulp_blob_push_encap(blob, val, val_len) < 0) {
+		if (unlikely(ulp_blob_push_encap(blob, val, val_len) < 0)) {
 			BNXT_DRV_DBG(ERR, "encap blob push failed\n");
 			return -EINVAL;
 		}
 	} else if (fld_src == BNXT_ULP_FIELD_SRC_SKIP) {
 		/* do nothing */
 	} else {
-		if (ulp_blob_push(blob, val, val_len)) {
+		if (unlikely(ulp_blob_push(blob, val, val_len))) {
 			BNXT_DRV_DBG(ERR, "push of val1 failed\n");
 			return -EINVAL;
 		}
@@ -1293,15 +1294,15 @@ ulp_mapper_field_opc_next(struct bnxt_ulp_mapper_parms *parms,
 	uint16_t idx;
 
 	/* read the cond table index and count */
-	if (ulp_operand_read(field_opr,
-			     (uint8_t *)&idx, sizeof(uint16_t))) {
+	if (unlikely(ulp_operand_read(field_opr,
+				      (uint8_t *)&idx, sizeof(uint16_t)))) {
 		BNXT_DRV_DBG(ERR, "field idx operand read failed\n");
 		return -EINVAL;
 	}
 	idx = tfp_be_to_cpu_16(idx);
 
 	field_info = ulp_mapper_tmpl_key_ext_list_get(parms, idx);
-	if (field_info == NULL) {
+	if (unlikely(field_info == NULL)) {
 		BNXT_DRV_DBG(ERR, "Invalid field idx %d\n", idx);
 		return -EINVAL;
 	}
@@ -1350,7 +1351,7 @@ ulp_mapper_key_recipe_tbl_init(struct bnxt_ulp_context *ulp_ctx,
 	struct bitalloc *recipe_ba;
 
 	rc = bnxt_ulp_cntxt_dev_id_get(ulp_ctx, &dev_id);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Unable to get device id from ulp.\n");
 		return -EINVAL;
 	}
@@ -1374,21 +1375,21 @@ ulp_mapper_key_recipe_tbl_init(struct bnxt_ulp_context *ulp_ctx,
 		for (ftype = 0; ftype < ULP_RECIPE_TYPE_MAX; ftype++) {
 			recipes = rte_zmalloc("key_recipe_list",
 					      size_val * num_recipes, 0);
-			if (!recipes) {
+			if (unlikely(!recipes)) {
 				BNXT_DRV_DBG(ERR, "Unable to alloc memory\n");
 				return -ENOMEM;
 			}
 			mdata->key_recipe_info.recipes[dir][ftype] = recipes;
 
 			recipe_ba = rte_malloc("key_recipe_ba", pool_size, 0);
-			if (!recipe_ba) {
+			if (unlikely(!recipe_ba)) {
 				BNXT_DRV_DBG(ERR, "Unable to alloc memory\n");
 				return -ENOMEM;
 			}
 			mdata->key_recipe_info.recipe_ba[dir][ftype] =
 				recipe_ba;
 			rc = ba_init(recipe_ba, num_recipes, true);
-			if (rc) {
+			if (unlikely(rc)) {
 				BNXT_DRV_DBG(ERR,
 					     "Unable to alloc recipe ba\n");
 				return -ENOMEM;
@@ -1408,25 +1409,25 @@ ulp_mapper_key_recipe_args_validate(struct bnxt_ulp_context *ulp_ctx,
 
 	mdata = (struct bnxt_ulp_mapper_data *)
 		bnxt_ulp_cntxt_ptr2_mapper_data_get(ulp_ctx);
-	if (!mdata) {
+	if (unlikely(!mdata)) {
 		BNXT_DRV_DBG(ERR, "Unable to get mapper data.\n");
 		return NULL;
 	}
-	if (dir >= BNXT_ULP_DIRECTION_LAST) {
+	if (unlikely(dir >= BNXT_ULP_DIRECTION_LAST)) {
 		BNXT_DRV_DBG(ERR, "Invalid dir (%d) in key recipe\n", dir);
 		return NULL;
 	}
-	if (mdata->key_recipe_info.num_recipes == 0) {
+	if (unlikely(mdata->key_recipe_info.num_recipes == 0)) {
 		BNXT_DRV_DBG(ERR, "Recipes are not supported\n");
 		return NULL;
 	}
-	if (stype != BNXT_ULP_RESOURCE_SUB_TYPE_KEY_RECIPE_TABLE_WM &&
-	    stype != BNXT_ULP_RESOURCE_SUB_TYPE_KEY_RECIPE_TABLE_EM) {
+	if (unlikely(stype != BNXT_ULP_RESOURCE_SUB_TYPE_KEY_RECIPE_TABLE_WM &&
+		     stype != BNXT_ULP_RESOURCE_SUB_TYPE_KEY_RECIPE_TABLE_EM)) {
 		BNXT_DRV_DBG(ERR, "Invalid type (%d) in key recipe\n", stype);
 		return NULL;
 	}
-	if (recipe_id >= mdata->key_recipe_info.num_recipes ||
-	    !mdata->key_recipe_info.num_recipes) {
+	if (unlikely(recipe_id >= mdata->key_recipe_info.num_recipes ||
+		     !mdata->key_recipe_info.num_recipes)) {
 		BNXT_DRV_DBG(ERR, "Key recipe id out of range(%u >= %u)\n",
 			     recipe_id, mdata->key_recipe_info.num_recipes);
 		return NULL;
@@ -1447,7 +1448,7 @@ ulp_mapper_key_recipe_alloc(struct bnxt_ulp_context *ulp_ctx,
 
 	mdata = ulp_mapper_key_recipe_args_validate(ulp_ctx, dir,
 						    stype, recipe_id);
-	if (mdata == NULL)
+	if (unlikely(mdata == NULL))
 		return NULL;
 
 	recipes = mdata->key_recipe_info.recipes[dir][stype];
@@ -1488,18 +1489,18 @@ ulp_mapper_key_recipe_free(struct bnxt_ulp_context *ulp_ctx,
 
 	mdata = ulp_mapper_key_recipe_args_validate(ulp_ctx, dir,
 						    stype, index);
-	if (mdata == NULL)
+	if (unlikely(mdata == NULL))
 		return -EINVAL;
 
 	recipe_ba = mdata->key_recipe_info.recipe_ba[dir][stype];
 	rc = ba_free(recipe_ba, index);
-	if (rc < 0)
+	if (unlikely(rc < 0))
 		BNXT_DRV_DBG(DEBUG, "Unable to free recipe id[%s][%u] = (%d)\n",
 			     (dir == BNXT_ULP_DIRECTION_INGRESS) ? "rx" : "tx",
 			     stype, index);
 
 	recipes = mdata->key_recipe_info.recipes[dir][stype];
-	if (recipes[index] == NULL) {
+	if (unlikely(recipes[index] == NULL)) {
 		BNXT_DRV_DBG(DEBUG, "recipe id[%s][%u] = (%d) already freed\n",
 			     (dir == BNXT_ULP_DIRECTION_INGRESS) ? "rx" : "tx",
 			     stype, index);
@@ -1596,15 +1597,15 @@ ulp_mapper_key_recipe_field_opc_next(struct bnxt_ulp_mapper_parms *parms,
 	uint16_t idx;
 
 	/* read the cond table index and count */
-	if (ulp_operand_read(field_opr,
-			     (uint8_t *)&idx, sizeof(uint16_t))) {
+	if (unlikely(ulp_operand_read(field_opr,
+				      (uint8_t *)&idx, sizeof(uint16_t)))) {
 		BNXT_DRV_DBG(ERR, "field idx operand read failed\n");
 		return -EINVAL;
 	}
 	idx = tfp_be_to_cpu_16(idx);
 
 	field_info = ulp_mapper_tmpl_key_ext_list_get(parms, idx);
-	if (field_info == NULL) {
+	if (unlikely(field_info == NULL)) {
 		BNXT_DRV_DBG(ERR, "Invalid field idx %d\n", idx);
 		return -EINVAL;
 	}
@@ -1652,10 +1653,10 @@ ulp_mapper_key_recipe_field_opc_process(struct bnxt_ulp_mapper_parms *parms,
 
 	/* process the src1 opcode  */
 	if (process_src1) {
-		if (ulp_mapper_field_src_process(parms, fld->field_src1,
+		if (unlikely(ulp_mapper_field_src_process(parms, fld->field_src1,
 						 fld->field_opr1, dir, is_key,
 						 fld->field_bit_size, &val1,
-						 &val1_len, &value1)) {
+							  &val1_len, &value1))) {
 			BNXT_DRV_DBG(ERR, "fld src1 process failed\n");
 			return -EINVAL;
 		}
@@ -1677,13 +1678,13 @@ ulp_mapper_key_recipe_field_opc_process(struct bnxt_ulp_mapper_parms *parms,
 			/* check if src2 is next */
 			if (fld->field_src2 == BNXT_ULP_FIELD_SRC_NEXT) {
 				/* get the next field info */
-				if (ulp_mapper_key_recipe_field_opc_next(parms,
+				if (unlikely(ulp_mapper_key_recipe_field_opc_next(parms,
 									 dir,
 									fld->field_opr2,
 									is_key,
 									name,
 									written,
-									ofld)) {
+										  ofld))) {
 					BNXT_DRV_DBG(ERR,
 						     "recipe fld next process fail\n");
 					return -EINVAL;
@@ -1700,13 +1701,13 @@ ulp_mapper_key_recipe_field_opc_process(struct bnxt_ulp_mapper_parms *parms,
 			/* check if src3 is next */
 			if (fld->field_src3 == BNXT_ULP_FIELD_SRC_NEXT) {
 				/* get the next field info */
-				if (ulp_mapper_key_recipe_field_opc_next(parms,
+				if (unlikely(ulp_mapper_key_recipe_field_opc_next(parms,
 									 dir,
 									fld->field_opr3,
 									is_key,
 									name,
 									written,
-									ofld)) {
+										  ofld))) {
 					BNXT_DRV_DBG(ERR,
 						     "recipt fld next process fail\n");
 					return -EINVAL;
@@ -1777,9 +1778,9 @@ ulp_mapper_key_recipe_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 
 	/* Get the recipe_id from the regfile */
 	if (!alloc && regfile) {
-		if (ulp_regfile_read(parms->regfile,
-				     tbl->tbl_operand,
-				     &regval)) {
+		if (unlikely(ulp_regfile_read(parms->regfile,
+					      tbl->tbl_operand,
+					      &regval))) {
 			BNXT_DRV_DBG(ERR,
 				     "Fail to get tbl idx from regfile[%d].\n",
 				     tbl->tbl_operand);
@@ -1794,16 +1795,16 @@ ulp_mapper_key_recipe_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		 */
 		mdata = ulp_mapper_key_recipe_args_validate(parms->ulp_ctx, dir,
 							    stype, 0);
-		if (mdata == NULL)
+		if (unlikely(mdata == NULL))
 			return -EINVAL;
 
 		recipe_ba = mdata->key_recipe_info.recipe_ba[dir][stype];
 		tmp_recipe_id = ba_alloc(recipe_ba);
-		if (tmp_recipe_id < 0) {
+		if (unlikely(tmp_recipe_id < 0)) {
 			BNXT_DRV_DBG(ERR, "Failed to allocate a recipe id\n");
 			return -EINVAL;
-		} else if ((uint32_t)tmp_recipe_id >=
-			   mdata->key_recipe_info.num_recipes) {
+		} else if (unlikely((uint32_t)tmp_recipe_id >=
+				    mdata->key_recipe_info.num_recipes)) {
 			/* Shouldn't get here, but could be an issue with the
 			 * allocator, so free the recipe_id
 			 */
@@ -1824,7 +1825,7 @@ ulp_mapper_key_recipe_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		regval = rte_cpu_to_be_64(recipe_id);
 		rc = ulp_regfile_write(parms->regfile, tbl->tbl_operand,
 				       regval);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "Failed to write regfile[%d] rc=%d\n",
 				     tbl->tbl_operand, rc);
 			if (recipe_ba)
@@ -1836,7 +1837,7 @@ ulp_mapper_key_recipe_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	/* allocate or Get the recipe entry based on alloc */
 	recipe = ulp_mapper_key_recipe_alloc(parms->ulp_ctx, dir, stype,
 					     recipe_id, alloc, &max_rflds);
-	if (!recipe || !max_rflds) {
+	if (unlikely(!recipe || !max_rflds)) {
 		BNXT_DRV_DBG(ERR, "Failed to get the recipe slot\n");
 		if (recipe_ba)
 			(void)ba_free(recipe_ba, recipe_id);
@@ -1847,7 +1848,7 @@ ulp_mapper_key_recipe_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	if (write) {
 		/* Get the key fields to process */
 		kflds = ulp_mapper_key_fields_get(parms, tbl, &num_kflds);
-		if (!kflds || !num_kflds) {
+		if (unlikely(!kflds || !num_kflds)) {
 			BNXT_DRV_DBG(ERR, "Failed to get the key fields\n");
 			rc = -EINVAL;
 			goto error;
@@ -1856,7 +1857,7 @@ ulp_mapper_key_recipe_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		rflds = &recipe->flds[0];
 		/* iterate over the key fields and write the recipe */
 		for (i = 0; i < num_kflds; i++) {
-			if (rnum_flds >= max_rflds) {
+			if (unlikely(rnum_flds >= max_rflds)) {
 				BNXT_DRV_DBG(ERR,
 					     "Max recipe fields exceeded (%d)\n",
 					     rnum_flds);
@@ -1872,7 +1873,7 @@ ulp_mapper_key_recipe_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 								     "KEY",
 								     &written,
 								     rfld);
-			if (rc)
+			if (unlikely(rc))
 				goto error;
 
 			if (stype ==
@@ -1886,7 +1887,7 @@ ulp_mapper_key_recipe_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 									     "MASK",
 									     &written,
 									     rfld);
-				if (rc)
+				if (unlikely(rc))
 					goto error;
 			}
 			if (written)
@@ -1904,7 +1905,7 @@ ulp_mapper_key_recipe_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	fid_parms.critical_resource = tbl->critical_resource;
 
 	rc = ulp_mapper_fdb_opc_process(parms, tbl, &fid_parms);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to link resource to flow rc = %d\n",
 			     rc);
 		goto error;
@@ -1973,16 +1974,16 @@ ulp_mapper_field_opc_process(struct bnxt_ulp_mapper_parms *parms,
 
 	/* process the src1 opcode  */
 	if (process_src1) {
-		if (ulp_mapper_field_src_process(parms, fld->field_src1,
-						 fld->field_opr1, dir, is_key,
-						 fld->field_bit_size, &val1,
-						 &val1_len, &value1)) {
+		if (unlikely(ulp_mapper_field_src_process(parms, fld->field_src1,
+							  fld->field_opr1, dir, is_key,
+							  fld->field_bit_size, &val1,
+							  &val1_len, &value1))) {
 			BNXT_DRV_DBG(ERR, "fld src1 process failed\n");
 			goto error;
 		}
 		if (eval_src1) {
-			if (ulp_mapper_field_buffer_eval(val1, val1_len,
-							 &val1_int)) {
+			if (unlikely(ulp_mapper_field_buffer_eval(val1, val1_len,
+								  &val1_int))) {
 				BNXT_DRV_DBG(ERR, "fld src1 eval failed\n");
 				goto error;
 			}
@@ -2000,10 +2001,10 @@ ulp_mapper_field_opc_process(struct bnxt_ulp_mapper_parms *parms,
 			/* check if src2 is next */
 			if (fld->field_src2 == BNXT_ULP_FIELD_SRC_NEXT) {
 				/* get the next field info */
-				if (ulp_mapper_field_opc_next(parms, dir,
-							      fld->field_opr2,
-							      blob, is_key,
-							      name)) {
+				if (unlikely(ulp_mapper_field_opc_next(parms, dir,
+								       fld->field_opr2,
+								       blob, is_key,
+								       name))) {
 					BNXT_DRV_DBG(ERR,
 						     "fld next process fail\n");
 					goto error;
@@ -2017,10 +2018,10 @@ ulp_mapper_field_opc_process(struct bnxt_ulp_mapper_parms *parms,
 			/* check if src2 is next */
 			if (fld->field_src3 == BNXT_ULP_FIELD_SRC_NEXT) {
 				/* get the next field info */
-				if (ulp_mapper_field_opc_next(parms, dir,
-							      fld->field_opr3,
-							      blob, is_key,
-							      name)) {
+				if (unlikely(ulp_mapper_field_opc_next(parms, dir,
+								       fld->field_opr3,
+								       blob, is_key,
+								       name))) {
 					BNXT_DRV_DBG(ERR,
 						     "fld next process fail\n");
 					goto error;
@@ -2035,16 +2036,16 @@ ulp_mapper_field_opc_process(struct bnxt_ulp_mapper_parms *parms,
 
 	/* process src2 opcode */
 	if (process_src2) {
-		if (ulp_mapper_field_src_process(parms, fld->field_src2,
-						 fld->field_opr2, dir, is_key,
-						 fld->field_bit_size, &val2,
-						 &val2_len, &value2)) {
+		if (unlikely(ulp_mapper_field_src_process(parms, fld->field_src2,
+							  fld->field_opr2, dir, is_key,
+							  fld->field_bit_size, &val2,
+							  &val2_len, &value2))) {
 			BNXT_DRV_DBG(ERR, "fld src2 process failed\n");
 			goto error;
 		}
 		if (eval_src2) {
-			if (ulp_mapper_field_buffer_eval(val2, val2_len,
-							 &val2_int)) {
+			if (unlikely(ulp_mapper_field_buffer_eval(val2, val2_len,
+								  &val2_int))) {
 				BNXT_DRV_DBG(ERR, "fld src2 eval failed\n");
 				goto error;
 			}
@@ -2053,16 +2054,16 @@ ulp_mapper_field_opc_process(struct bnxt_ulp_mapper_parms *parms,
 
 	/* process src3 opcode */
 	if (process_src3) {
-		if (ulp_mapper_field_src_process(parms, fld->field_src3,
-						 fld->field_opr3, dir, is_key,
-						 fld->field_bit_size, &val3,
-						 &val3_len, &value3)) {
+		if (unlikely(ulp_mapper_field_src_process(parms, fld->field_src3,
+							  fld->field_opr3, dir, is_key,
+							  fld->field_bit_size, &val3,
+							  &val3_len, &value3))) {
 			BNXT_DRV_DBG(ERR, "fld src3 process failed\n");
 			goto error;
 		}
 		if (eval_src3) {
-			if (ulp_mapper_field_buffer_eval(val3, val3_len,
-							 &val3_int)) {
+			if (unlikely(ulp_mapper_field_buffer_eval(val3, val3_len,
+								  &val3_int))) {
 				BNXT_DRV_DBG(ERR, "fld src3 eval failed\n");
 				goto error;
 			}
@@ -2094,7 +2095,7 @@ ulp_mapper_field_opc_process(struct bnxt_ulp_mapper_parms *parms,
 		val_int = val1_int + val2_int;
 		val_int = tfp_cpu_to_be_64(val_int);
 		val = ulp_blob_push_64(blob, &val_int, fld->field_bit_size);
-		if (!val)
+		if (unlikely(!val))
 			rc = -EINVAL;
 		break;
 	case BNXT_ULP_FIELD_OPC_SRC1_MINUS_SRC2:
@@ -2102,35 +2103,35 @@ ulp_mapper_field_opc_process(struct bnxt_ulp_mapper_parms *parms,
 		val_int = val1_int - val2_int;
 		val_int = tfp_cpu_to_be_64(val_int);
 		val = ulp_blob_push_64(blob, &val_int, fld->field_bit_size);
-		if (!val)
+		if (unlikely(!val))
 			rc = -EINVAL;
 		break;
 	case BNXT_ULP_FIELD_OPC_SRC1_OR_SRC2:
 		val_int = val1_int | val2_int;
 		val_int = tfp_cpu_to_be_64(val_int);
 		val = ulp_blob_push_64(blob, &val_int, fld->field_bit_size);
-		if (!val)
+		if (unlikely(!val))
 			rc = -EINVAL;
 		break;
 	case BNXT_ULP_FIELD_OPC_SRC1_OR_SRC2_OR_SRC3:
 		val_int = val1_int | val2_int | val3_int;
 		val_int = tfp_cpu_to_be_64(val_int);
 		val = ulp_blob_push_64(blob, &val_int, fld->field_bit_size);
-		if (!val)
+		if (unlikely(!val))
 			rc = -EINVAL;
 		break;
 	case BNXT_ULP_FIELD_OPC_SRC1_AND_SRC2:
 		val_int = val1_int & val2_int;
 		val_int = tfp_cpu_to_be_64(val_int);
 		val = ulp_blob_push_64(blob, &val_int, fld->field_bit_size);
-		if (!val)
+		if (unlikely(!val))
 			rc = -EINVAL;
 		break;
 	case BNXT_ULP_FIELD_OPC_SRC1_AND_SRC2_OR_SRC3:
 		val_int = val1_int & (val2_int | val3_int);
 		val_int = tfp_cpu_to_be_64(val_int);
 		val = ulp_blob_push_64(blob, &val_int, fld->field_bit_size);
-		if (!val)
+		if (unlikely(!val))
 			rc = -EINVAL;
 		break;
 	case BNXT_ULP_FIELD_OPC_SKIP:
@@ -2170,7 +2171,7 @@ ulp_mapper_tbl_result_build(struct bnxt_ulp_mapper_parms *parms,
 					     &encap_flds);
 
 	/* validate the result field list counts */
-	if (!dflds || (!num_flds && !encap_flds)) {
+	if (unlikely(!dflds || (!num_flds && !encap_flds))) {
 		BNXT_DRV_DBG(ERR, "Failed to get data fields %x:%x\n",
 			     num_flds, encap_flds);
 		return -EINVAL;
@@ -2180,7 +2181,7 @@ ulp_mapper_tbl_result_build(struct bnxt_ulp_mapper_parms *parms,
 	for (i = 0; i < num_flds; i++) {
 		rc = ulp_mapper_field_opc_process(parms, tbl->direction,
 						  &dflds[i], data, 0, name);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "result field processing failed\n");
 			return rc;
 		}
@@ -2190,9 +2191,9 @@ ulp_mapper_tbl_result_build(struct bnxt_ulp_mapper_parms *parms,
 	if (encap_flds) {
 		uint32_t pad = 0;
 		/* Initialize the encap blob */
-		if (ulp_blob_init(&encap_blob,
+		if (unlikely(ulp_blob_init(&encap_blob,
 				  ULP_BYTE_2_BITS(tbl->record_size),
-				  parms->device_params->encap_byte_order)) {
+					   parms->device_params->encap_byte_order))) {
 			BNXT_DRV_DBG(ERR, "blob inits failed.\n");
 			return -EINVAL;
 		}
@@ -2200,7 +2201,7 @@ ulp_mapper_tbl_result_build(struct bnxt_ulp_mapper_parms *parms,
 			rc = ulp_mapper_field_opc_process(parms, tbl->direction,
 							  &dflds[i],
 							  &encap_blob, 0, name);
-			if (rc) {
+			if (unlikely(rc)) {
 				BNXT_DRV_DBG(ERR,
 					     "encap field processing failed\n");
 				return rc;
@@ -2223,7 +2224,7 @@ ulp_mapper_tbl_result_build(struct bnxt_ulp_mapper_parms *parms,
 			pad = ULP_BYTE_2_BITS(tbl->record_size) -
 				ulp_blob_data_len_get(&encap_blob);
 		}
-		if (ulp_blob_pad_push(&encap_blob, pad) < 0) {
+		if (unlikely(ulp_blob_pad_push(&encap_blob, pad) < 0)) {
 			BNXT_DRV_DBG(ERR, "encap buffer padding failed\n");
 			return -EINVAL;
 		}
@@ -2232,7 +2233,7 @@ ulp_mapper_tbl_result_build(struct bnxt_ulp_mapper_parms *parms,
 		ulp_blob_perform_64B_byte_swap(&encap_blob);
 		/* Append encap blob to the result blob */
 		rc = ulp_blob_buffer_copy(data, &encap_blob);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "encap buffer copy failed\n");
 			return rc;
 		}
@@ -2266,7 +2267,7 @@ ulp_mapper_mark_gfid_process(struct bnxt_ulp_mapper_parms *parms,
 
 	rc = ulp_mark_db_mark_add(parms->ulp_ctx, mark_flag,
 				  gfid, mark);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to add mark to flow\n");
 		return rc;
 	}
@@ -2278,7 +2279,7 @@ ulp_mapper_mark_gfid_process(struct bnxt_ulp_mapper_parms *parms,
 	ulp_flow_db_shared_session_set(&fid_parms, tbl->session_type);
 
 	rc = ulp_mapper_fdb_opc_process(parms, tbl, &fid_parms);
-	if (rc)
+	if (unlikely(rc))
 		BNXT_DRV_DBG(ERR, "Fail to link res to flow rc = %d\n", rc);
 	return rc;
 }
@@ -2289,7 +2290,7 @@ ulp_mapper_mark_act_ptr_process(struct bnxt_ulp_mapper_parms *parms,
 {
 	struct ulp_flow_db_res_params fid_parms;
 	uint32_t act_idx, mark, mark_flag;
-	uint64_t val64;
+	uint64_t val64 = 0;
 	enum bnxt_ulp_mark_db_opc mark_op = tbl->mark_db_opcode;
 	int32_t rc = 0;
 
@@ -2304,9 +2305,9 @@ ulp_mapper_mark_act_ptr_process(struct bnxt_ulp_mapper_parms *parms,
 	       sizeof(mark));
 	mark = tfp_be_to_cpu_32(mark);
 
-	if (ulp_regfile_read(parms->regfile,
-			     BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
-			     &val64)) {
+	if (unlikely(ulp_regfile_read(parms->regfile,
+				      BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
+				      &val64))) {
 		BNXT_DRV_DBG(ERR, "read action ptr main failed\n");
 		return -EINVAL;
 	}
@@ -2314,7 +2315,7 @@ ulp_mapper_mark_act_ptr_process(struct bnxt_ulp_mapper_parms *parms,
 	mark_flag  = BNXT_ULP_MARK_LOCAL_HW_FID;
 	rc = ulp_mark_db_mark_add(parms->ulp_ctx, mark_flag,
 				  act_idx, mark);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to add mark to flow\n");
 		return rc;
 	}
@@ -2326,7 +2327,7 @@ ulp_mapper_mark_act_ptr_process(struct bnxt_ulp_mapper_parms *parms,
 	ulp_flow_db_shared_session_set(&fid_parms, tbl->session_type);
 
 	rc = ulp_mapper_fdb_opc_process(parms, tbl, &fid_parms);
-	if (rc)
+	if (unlikely(rc))
 		BNXT_DRV_DBG(ERR, "Fail to link res to flow rc = %d\n", rc);
 	return rc;
 }
@@ -2337,7 +2338,7 @@ ulp_mapper_mark_vfr_idx_process(struct bnxt_ulp_mapper_parms *parms,
 {
 	struct ulp_flow_db_res_params fid_parms;
 	uint32_t act_idx, mark, mark_flag;
-	uint64_t val64;
+	uint64_t val64 = 0;
 	enum bnxt_ulp_mark_db_opc mark_op = tbl->mark_db_opcode;
 	int32_t rc = 0;
 
@@ -2349,9 +2350,9 @@ ulp_mapper_mark_vfr_idx_process(struct bnxt_ulp_mapper_parms *parms,
 	mark = ULP_COMP_FLD_IDX_RD(parms, BNXT_ULP_CF_IDX_DEV_PORT_ID);
 
 	 /* Get the main action pointer */
-	if (ulp_regfile_read(parms->regfile,
-			     BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
-			     &val64)) {
+	if (unlikely(ulp_regfile_read(parms->regfile,
+				      BNXT_ULP_RF_IDX_MAIN_ACTION_PTR,
+				      &val64))) {
 		BNXT_DRV_DBG(ERR, "read action ptr main failed\n");
 		return -EINVAL;
 	}
@@ -2362,7 +2363,7 @@ ulp_mapper_mark_vfr_idx_process(struct bnxt_ulp_mapper_parms *parms,
 
 	rc = ulp_mark_db_mark_add(parms->ulp_ctx, mark_flag,
 				  act_idx, mark);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to add mark to flow\n");
 		return rc;
 	}
@@ -2374,7 +2375,7 @@ ulp_mapper_mark_vfr_idx_process(struct bnxt_ulp_mapper_parms *parms,
 	ulp_flow_db_shared_session_set(&fid_parms, tbl->session_type);
 
 	rc = ulp_mapper_fdb_opc_process(parms, tbl, &fid_parms);
-	if (rc)
+	if (unlikely(rc))
 		BNXT_DRV_DBG(ERR, "Fail to link res to flow rc = %d\n", rc);
 	return rc;
 }
@@ -2390,8 +2391,8 @@ ulp_mapper_tcam_tbl_ident_alloc(struct bnxt_ulp_mapper_parms *parms,
 
 	idents = ulp_mapper_ident_fields_get(parms, tbl, &num_idents);
 	for (i = 0; i < num_idents; i++) {
-		if (ulp_mapper_ident_process(parms, tbl,
-					     &idents[i], NULL))
+		if (unlikely(ulp_mapper_ident_process(parms, tbl,
+						      &idents[i], NULL)))
 			return -EINVAL;
 	}
 	return 0;
@@ -2438,23 +2439,23 @@ ulp_mapper_wc_tcam_tbl_dyn_post_process(struct bnxt_ulp_device_params *dparms,
 		tlen = tlen << 1;
 	}
 
-	if (num_slices > max_slices) {
+	if (unlikely(num_slices > max_slices)) {
 		BNXT_DRV_DBG(ERR, "Key size (%d) too large for WC\n", blen);
 		return -EINVAL;
 	}
 
 	/* The key/mask may not be on a natural slice boundary, pad it */
 	pad = tlen - blen;
-	if (ulp_blob_pad_push(key, pad) < 0 ||
-	    ulp_blob_pad_push(mask, pad) < 0) {
+	if (unlikely(ulp_blob_pad_push(key, pad) < 0 ||
+		     ulp_blob_pad_push(mask, pad) < 0)) {
 		BNXT_DRV_DBG(ERR, "Unable to pad key/mask\n");
 		return -EINVAL;
 	}
 
 	/* The new length accounts for the ctrl word length and num slices */
 	tlen = tlen + clen * num_slices;
-	if (ulp_blob_init(tkey, tlen, key->byte_order) ||
-	    ulp_blob_init(tmask, tlen, mask->byte_order)) {
+	if (unlikely(ulp_blob_init(tkey, tlen, key->byte_order) ||
+		     ulp_blob_init(tmask, tlen, mask->byte_order))) {
 		BNXT_DRV_DBG(ERR, "Unable to post process wc tcam entry\n");
 		return -EINVAL;
 	}
@@ -2465,22 +2466,22 @@ ulp_mapper_wc_tcam_tbl_dyn_post_process(struct bnxt_ulp_device_params *dparms,
 	offset = 0;
 	for (i = 0; i < num_slices; i++) {
 		val = ulp_blob_push_32(tkey, &cword, clen);
-		if (!val) {
+		if (unlikely(!val)) {
 			BNXT_DRV_DBG(ERR, "Key ctrl word push failed\n");
 			return -EINVAL;
 		}
 		val = ulp_blob_push_32(tmask, &cword, clen);
-		if (!val) {
+		if (unlikely(!val)) {
 			BNXT_DRV_DBG(ERR, "Mask ctrl word push failed\n");
 			return -EINVAL;
 		}
 		rc = ulp_blob_append(tkey, key, offset, slice_width);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "Key blob append failed\n");
 			return rc;
 		}
 		rc = ulp_blob_append(tmask, mask, offset, slice_width);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "Mask blob append failed\n");
 			return rc;
 		}
@@ -2546,7 +2547,7 @@ ulp_mapper_gen_tbl_ref_cnt_process(struct bnxt_ulp_mapper_parms *parms,
 		rc = ulp_regfile_write(parms->regfile,
 				       BNXT_ULP_RF_IDX_REF_CNT,
 				       val64);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "Failed to write regfile[ref_cnt]\n");
 			return rc;
 		}
@@ -2576,7 +2577,7 @@ ulp_mapper_gen_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 
 	/* Get the key fields list and build the key. */
 	kflds = ulp_mapper_key_fields_get(parms, tbl, &num_kflds);
-	if (!kflds || !num_kflds) {
+	if (unlikely(!kflds || !num_kflds)) {
 		BNXT_DRV_DBG(ERR, "Failed to get key fields\n");
 		return -EINVAL;
 	}
@@ -2588,9 +2589,9 @@ ulp_mapper_gen_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		pad = ULP_BYTE_2_BITS(sizeof(uint8_t)) -
 		ULP_BITS_IS_BYTE_NOT_ALIGNED(tbl->key_bit_size);
 
-	if (ulp_blob_init(&key, tbl->key_bit_size + pad +
+	if (unlikely(ulp_blob_init(&key, tbl->key_bit_size + pad +
 			  tbl->partial_key_bit_size,
-			  parms->device_params->key_byte_order)) {
+				   parms->device_params->key_byte_order))) {
 		BNXT_DRV_DBG(ERR, "Failed to alloc blob\n");
 		return -EINVAL;
 	}
@@ -2599,7 +2600,7 @@ ulp_mapper_gen_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		rc = ulp_mapper_field_opc_process(parms, tbl->direction,
 						  &kflds[i].field_info_spec,
 						  &key, 1, "Gen Tbl Key");
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR,
 				     "Failed to create key for Gen tbl rc=%d\n",
 				     rc);
@@ -2607,7 +2608,7 @@ ulp_mapper_gen_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		}
 		/* pad for the alignment between exact key and partial key */
 		if (num_par_kflds && i == num_kflds - 1) {
-			if (ulp_blob_pad_push(&key, pad) < 0) {
+			if (unlikely(ulp_blob_pad_push(&key, pad) < 0)) {
 				BNXT_DRV_DBG(ERR, "key padding failed\n");
 				return -EINVAL;
 			}
@@ -2617,7 +2618,7 @@ ulp_mapper_gen_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	/* Calculate the table index for the generic table*/
 	tbl_idx = ulp_mapper_gen_tbl_idx_calculate(tbl->resource_sub_type,
 						   tbl->direction);
-	if (tbl_idx < 0) {
+	if (unlikely(tbl_idx < 0)) {
 		BNXT_DRV_DBG(ERR, "Invalid table index %x:%x\n",
 			     tbl->resource_sub_type, tbl->direction);
 		return -EINVAL;
@@ -2630,9 +2631,9 @@ ulp_mapper_gen_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	gen_tbl_list = &parms->mapper_data->gen_tbl_list[tbl_idx];
 
 	/* perform basic validation of generic table */
-	if ((gen_tbl_list->tbl_type == BNXT_ULP_GEN_TBL_TYPE_HASH_LIST &&
-	     gen_tbl_list->hash_tbl == NULL) ||
-	    gen_tbl_list->mem_data == NULL) {
+	if (unlikely((gen_tbl_list->tbl_type == BNXT_ULP_GEN_TBL_TYPE_HASH_LIST &&
+		      gen_tbl_list->hash_tbl == NULL) ||
+		     gen_tbl_list->mem_data == NULL)) {
 		BNXT_DRV_DBG(ERR, "Uninitialized gen table index %x:%x\n",
 			     tbl->resource_sub_type, tbl->direction);
 		return -EINVAL;
@@ -2640,8 +2641,8 @@ ulp_mapper_gen_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 
 	/* Check if generic hash table */
 	if (gen_tbl_list->tbl_type == BNXT_ULP_GEN_TBL_TYPE_HASH_LIST) {
-		if (tbl->gen_tbl_lkup_type !=
-		    BNXT_ULP_GENERIC_TBL_LKUP_TYPE_HASH) {
+		if (unlikely(tbl->gen_tbl_lkup_type !=
+			     BNXT_ULP_GENERIC_TBL_LKUP_TYPE_HASH)) {
 			BNXT_DRV_DBG(ERR, "%s: Invalid template lkup type\n",
 				     gen_tbl_list->gen_tbl_name);
 			return -EINVAL;
@@ -2650,7 +2651,7 @@ ulp_mapper_gen_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		hash_entry.key_length = ULP_BITS_2_BYTE(keylen);
 		rc = ulp_gen_hash_tbl_list_key_search(gen_tbl_list->hash_tbl,
 						      &hash_entry);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "%s: hash tbl search failed\n",
 				     gen_tbl_list->gen_tbl_name);
 			return rc;
@@ -2658,24 +2659,24 @@ ulp_mapper_gen_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		if (hash_entry.search_flag == ULP_GEN_HASH_SEARCH_FOUND) {
 			key_index = hash_entry.key_idx;
 			/* Get the generic table entry */
-			if (ulp_mapper_gen_tbl_entry_get(gen_tbl_list,
-							 key_index,
-							 &gen_tbl_ent))
+			if (unlikely(ulp_mapper_gen_tbl_entry_get(gen_tbl_list,
+								  key_index,
+								  &gen_tbl_ent)))
 				return -EINVAL;
 			/* store the hash index in the fdb */
 			key_index = hash_entry.hash_index;
 		}
 	} else if (gen_tbl_list->tbl_type == BNXT_ULP_GEN_TBL_TYPE_KEY_LIST) {
 		/* convert key to index directly */
-		if (ULP_BITS_2_BYTE(keylen) > (int32_t)sizeof(key_index)) {
+		if (unlikely(ULP_BITS_2_BYTE(keylen) > (int32_t)sizeof(key_index))) {
 			BNXT_DRV_DBG(ERR, "%s: keysize is bigger then 4 bytes\n",
 				     gen_tbl_list->gen_tbl_name);
 			return -EINVAL;
 		}
 		memcpy(&key_index, cache_key, ULP_BITS_2_BYTE(keylen));
 		/* Get the generic table entry */
-		if (ulp_mapper_gen_tbl_entry_get(gen_tbl_list, key_index,
-						 &gen_tbl_ent))
+		if (unlikely(ulp_mapper_gen_tbl_entry_get(gen_tbl_list, key_index,
+							  &gen_tbl_ent)))
 			return -EINVAL;
 	} else if (gen_tbl_list->tbl_type ==
 		   BNXT_ULP_GEN_TBL_TYPE_SIMPLE_LIST) {
@@ -2683,9 +2684,9 @@ ulp_mapper_gen_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 							   cache_key,
 							   &key_index);
 		/* Get the generic table entry */
-		if (ulp_mapper_gen_tbl_entry_get(gen_tbl_list,
-						 key_index,
-						 &gen_tbl_ent))
+		if (unlikely(ulp_mapper_gen_tbl_entry_get(gen_tbl_list,
+							  key_index,
+							  &gen_tbl_ent)))
 			return -EINVAL;
 	}
 
@@ -2710,7 +2711,7 @@ ulp_mapper_gen_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 							   g->byte_data,
 							   g->byte_data_size,
 							   g->byte_order);
-			if (rc) {
+			if (unlikely(rc)) {
 				BNXT_DRV_DBG(ERR,
 					     "Failed to scan ident list\n");
 				return -EINVAL;
@@ -2727,13 +2728,13 @@ ulp_mapper_gen_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 			rc = ulp_mapper_gen_tbl_hash_entry_add(gen_tbl_list,
 							       &hash_entry,
 							       &gen_tbl_ent);
-			if (rc)
+			if (unlikely(rc))
 				return rc;
 			/* store the hash index in the fdb */
 			key_index = hash_entry.hash_index;
 		} else if (gen_tbl_list->tbl_type ==
 			   BNXT_ULP_GEN_TBL_TYPE_SIMPLE_LIST) {
-			if (list_srch == ULP_GEN_LIST_SEARCH_FULL) {
+			if (unlikely(list_srch == ULP_GEN_LIST_SEARCH_FULL)) {
 				BNXT_DRV_DBG(ERR, "failed to add gen entry\n");
 				return -ENOMEM;
 			}
@@ -2742,16 +2743,16 @@ ulp_mapper_gen_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		/* check the reference count and ignore ref_cnt if NOP.
 		 * NOP allows a write as an update.
 		 */
-		if (tbl->ref_cnt_opcode != BNXT_ULP_REF_CNT_OPC_NOP &&
-		    ULP_GEN_TBL_REF_CNT(&gen_tbl_ent)) {
+		if (unlikely(tbl->ref_cnt_opcode != BNXT_ULP_REF_CNT_OPC_NOP &&
+			     ULP_GEN_TBL_REF_CNT(&gen_tbl_ent))) {
 			/* a hit then error */
 			BNXT_DRV_DBG(ERR, "generic entry already present\n");
 			return -EINVAL; /* success */
 		}
 
 		/* Initialize the blob data */
-		if (ulp_blob_init(&data, tbl->result_bit_size,
-				  gen_tbl_ent.byte_order)) {
+		if (unlikely(ulp_blob_init(&data, tbl->result_bit_size,
+					   gen_tbl_ent.byte_order))) {
 			BNXT_DRV_DBG(ERR, "Failed initial index table blob\n");
 			return -EINVAL;
 		}
@@ -2759,7 +2760,7 @@ ulp_mapper_gen_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		/* Get the result fields list */
 		rc = ulp_mapper_tbl_result_build(parms, tbl, &data,
 						 "Gen tbl Result");
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "Failed to build the result blob\n");
 			return rc;
 		}
@@ -2771,7 +2772,7 @@ ulp_mapper_gen_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 						       byte_data,
 						       ULP_BITS_2_BYTE(datalen)
 						       );
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "Failed to write generic table\n");
 			return -EINVAL;
 		}
@@ -2788,7 +2789,7 @@ ulp_mapper_gen_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	rc = ulp_regfile_write(parms->regfile,
 			       BNXT_ULP_RF_IDX_GENERIC_TBL_MISS,
 			       tfp_cpu_to_be_64(gen_tbl_miss));
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Write regfile[%d] failed\n",
 			     BNXT_ULP_RF_IDX_GENERIC_TBL_MISS);
 		return -EIO;
@@ -2805,7 +2806,7 @@ ulp_mapper_gen_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		ulp_flow_db_shared_session_set(&fid_parms, tbl->session_type);
 
 		rc = ulp_mapper_fdb_opc_process(parms, tbl, &fid_parms);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "Fail to add gen ent flowdb %d\n",
 				     rc);
 			return rc;
@@ -2838,13 +2839,13 @@ ulp_mapper_ctrl_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	/* process the fdb opcode for alloc push */
 	if (tbl->fdb_opcode == BNXT_ULP_FDB_OPC_ALLOC_RID_REGFILE) {
 		rc = ulp_mapper_fdb_opc_alloc_rid(parms, tbl);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "Failed to do fdb alloc\n");
 			return rc;
 		}
 	} else if (tbl->fdb_opcode == BNXT_ULP_FDB_OPC_DELETE_RID_REGFILE) {
 		rc = ulp_regfile_read(parms->regfile, tbl->fdb_operand, &val64);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "Failed to get RID from regfile\n");
 			return rc;
 		}
@@ -2868,23 +2869,23 @@ ulp_mapper_vnic_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 
 	switch (tbl->resource_sub_type) {
 	case BNXT_ULP_RESOURCE_SUB_TYPE_VNIC_TABLE_RSS:
-		if (tbl->tbl_opcode != BNXT_ULP_VNIC_TBL_OPC_ALLOC_WR_REGFILE) {
+		if (unlikely(tbl->tbl_opcode != BNXT_ULP_VNIC_TBL_OPC_ALLOC_WR_REGFILE)) {
 			BNXT_DRV_DBG(ERR, "Invalid vnic table opcode\n");
 			return -EINVAL;
 		}
 		rc = bnxt_pmd_rss_action_create(parms, &vnic_idx, &vnic_id);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "Failed create rss action\n");
 			return rc;
 		}
 		break;
 	case BNXT_ULP_RESOURCE_SUB_TYPE_VNIC_TABLE_QUEUE:
-		if (tbl->tbl_opcode != BNXT_ULP_VNIC_TBL_OPC_ALLOC_WR_REGFILE) {
+		if (unlikely(tbl->tbl_opcode != BNXT_ULP_VNIC_TBL_OPC_ALLOC_WR_REGFILE)) {
 			BNXT_DRV_DBG(ERR, "Invalid vnic table opcode\n");
 			return -EINVAL;
 		}
 		rc = bnxt_pmd_queue_action_create(parms, &vnic_idx, &vnic_id);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "Failed create queue action\n");
 			return rc;
 		}
@@ -2903,14 +2904,14 @@ ulp_mapper_vnic_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	fid_parms.resource_hndl	= vnic_idx;
 	fid_parms.critical_resource = tbl->critical_resource;
 	rc = ulp_mapper_fdb_opc_process(parms, tbl, &fid_parms);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to link resource to flow rc = %d\n",
 			     rc);
 		return rc;
 	}
 	rc = ulp_regfile_write(parms->regfile, tbl->tbl_operand,
 			       (uint64_t)tfp_cpu_to_be_64(vnic_id));
-	if (rc)
+	if (unlikely(rc))
 		BNXT_DRV_DBG(ERR, "Failed to write regfile[%d] rc=%d\n",
 			     tbl->tbl_operand, rc);
 
@@ -2956,8 +2957,8 @@ ulp_mapper_global_register_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	int32_t rc = 0, write_reg = 0;
 
 	/* Initialize the blob data */
-	if (ulp_blob_init(&data, tbl->result_bit_size,
-			  BNXT_ULP_BYTE_ORDER_BE)) {
+	if (unlikely(ulp_blob_init(&data, tbl->result_bit_size,
+				   BNXT_ULP_BYTE_ORDER_BE))) {
 		BNXT_DRV_DBG(ERR, "Failed initial ulp_global table blob\n");
 		return -EINVAL;
 	}
@@ -2965,7 +2966,7 @@ ulp_mapper_global_register_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	/* read the arguments from the result table */
 	rc = ulp_mapper_tbl_result_build(parms, tbl, &data,
 					 "ULP Global Result");
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to build the result blob\n");
 		return rc;
 	}
@@ -2989,7 +2990,7 @@ ulp_mapper_global_register_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	rc = bnxt_pmd_global_tunnel_set(parms->ulp_ctx,
 					parms->port_id, tbl->resource_sub_type,
 					udp_port, &handle);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Unable to set Type %d port\n",
 			     tbl->resource_sub_type);
 		return rc;
@@ -3004,7 +3005,7 @@ ulp_mapper_global_register_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 
 	rc = ulp_mapper_fdb_opc_process(parms, tbl, &fid_parms);
 
-	if (rc)
+	if (unlikely(rc))
 		return rc;
 
 	/* write to the regfile if opcode is set */
@@ -3035,14 +3036,14 @@ ulp_mapper_glb_resource_info_init(struct bnxt_ulp_context *ulp_ctx,
 		return 0;
 
 	rc = bnxt_ulp_cntxt_dev_id_get(ulp_ctx, &dev_id);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to get device id for glb init (%d)\n",
 			     rc);
 		return rc;
 	}
 
 	rc = bnxt_ulp_cntxt_app_id_get(ulp_ctx, &app_id);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to get app id for glb init (%d)\n",
 			     rc);
 		return rc;
@@ -3105,7 +3106,7 @@ ulp_mapper_cond_opc_process(struct bnxt_ulp_mapper_parms *parms,
 	uint32_t field_size = 0;
 	int32_t rc = 0;
 	uint8_t bit, tmp;
-	uint64_t regval, result = 0;
+	uint64_t regval = 0, result = 0;
 
 	switch (opc) {
 	case BNXT_ULP_COND_OPC_CF_IS_SET:
@@ -3119,7 +3120,7 @@ ulp_mapper_cond_opc_process(struct bnxt_ulp_mapper_parms *parms,
 		}
 		break;
 	case BNXT_ULP_COND_OPC_CF_NOT_SET:
-		if (operand < BNXT_ULP_CF_IDX_LAST) {
+		if (likely(operand < BNXT_ULP_CF_IDX_LAST)) {
 			result = !ULP_COMP_FLD_IDX_RD(parms, operand);
 		} else {
 			BNXT_DRV_DBG(ERR,
@@ -3129,7 +3130,7 @@ ulp_mapper_cond_opc_process(struct bnxt_ulp_mapper_parms *parms,
 		}
 		break;
 	case BNXT_ULP_COND_OPC_ACT_BIT_IS_SET:
-		if (operand < BNXT_ULP_ACT_BIT_LAST) {
+		if (likely(operand < BNXT_ULP_ACT_BIT_LAST)) {
 			result = ULP_BITMAP_ISSET(parms->act_bitmap->bits,
 						operand);
 		} else {
@@ -3140,7 +3141,7 @@ ulp_mapper_cond_opc_process(struct bnxt_ulp_mapper_parms *parms,
 		}
 		break;
 	case BNXT_ULP_COND_OPC_ACT_BIT_NOT_SET:
-		if (operand < BNXT_ULP_ACT_BIT_LAST) {
+		if (likely(operand < BNXT_ULP_ACT_BIT_LAST)) {
 			result = !ULP_BITMAP_ISSET(parms->act_bitmap->bits,
 					       operand);
 		} else {
@@ -3151,7 +3152,7 @@ ulp_mapper_cond_opc_process(struct bnxt_ulp_mapper_parms *parms,
 		}
 		break;
 	case BNXT_ULP_COND_OPC_HDR_BIT_IS_SET:
-		if (operand < BNXT_ULP_HDR_BIT_LAST) {
+		if (likely(operand < BNXT_ULP_HDR_BIT_LAST)) {
 			result = ULP_BITMAP_ISSET(parms->hdr_bitmap->bits,
 						operand);
 		} else {
@@ -3162,7 +3163,7 @@ ulp_mapper_cond_opc_process(struct bnxt_ulp_mapper_parms *parms,
 		}
 		break;
 	case BNXT_ULP_COND_OPC_HDR_BIT_NOT_SET:
-		if (operand < BNXT_ULP_HDR_BIT_LAST) {
+		if (likely(operand < BNXT_ULP_HDR_BIT_LAST)) {
 			result = !ULP_BITMAP_ISSET(parms->hdr_bitmap->bits,
 					       operand);
 		} else {
@@ -3174,7 +3175,7 @@ ulp_mapper_cond_opc_process(struct bnxt_ulp_mapper_parms *parms,
 		break;
 	case BNXT_ULP_COND_OPC_FIELD_BIT_IS_SET:
 		rc = ulp_mapper_glb_field_tbl_get(parms, operand, &bit);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR,
 				     "invalid ulp_glb_field_tbl idx %" PRIu64 "\n",
 				     operand);
@@ -3184,7 +3185,7 @@ ulp_mapper_cond_opc_process(struct bnxt_ulp_mapper_parms *parms,
 		break;
 	case BNXT_ULP_COND_OPC_FIELD_BIT_NOT_SET:
 		rc = ulp_mapper_glb_field_tbl_get(parms, operand, &bit);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR,
 				     "invalid ulp_glb_field_tbl idx %" PRIu64 "\n",
 				     operand);
@@ -3202,7 +3203,7 @@ ulp_mapper_cond_opc_process(struct bnxt_ulp_mapper_parms *parms,
 		result = regval != 0;
 		break;
 	case BNXT_ULP_COND_OPC_RF_NOT_SET:
-		if (ulp_regfile_read(parms->regfile, operand, &regval)) {
+		if (unlikely(ulp_regfile_read(parms->regfile, operand, &regval))) {
 			BNXT_DRV_DBG(ERR,
 				    "regfile[%" PRIu64 "] read oob\n", operand);
 			return -EINVAL;
@@ -3216,21 +3217,21 @@ ulp_mapper_cond_opc_process(struct bnxt_ulp_mapper_parms *parms,
 		result = parms->act_pattern_id == operand;
 		break;
 	case BNXT_ULP_COND_OPC_EXT_MEM_IS_SET:
-		if (bnxt_ulp_cntxt_mem_type_get(parms->ulp_ctx, &mtype)) {
+		if (unlikely(bnxt_ulp_cntxt_mem_type_get(parms->ulp_ctx, &mtype))) {
 			BNXT_DRV_DBG(ERR, "Failed to get the mem type\n");
 			return -EINVAL;
 		}
 		result = (mtype == BNXT_ULP_FLOW_MEM_TYPE_INT) ? 0 : 1;
 		break;
 	case BNXT_ULP_COND_OPC_EXT_MEM_NOT_SET:
-		if (bnxt_ulp_cntxt_mem_type_get(parms->ulp_ctx, &mtype)) {
+		if (unlikely(bnxt_ulp_cntxt_mem_type_get(parms->ulp_ctx, &mtype))) {
 			BNXT_DRV_DBG(ERR, "Failed to get the mem type\n");
 			return -EINVAL;
 		}
 		result = (mtype == BNXT_ULP_FLOW_MEM_TYPE_INT) ? 1 : 0;
 		break;
 	case BNXT_ULP_COND_OPC_ENC_HDR_BIT_IS_SET:
-		if (operand < BNXT_ULP_HDR_BIT_LAST) {
+		if (likely(operand < BNXT_ULP_HDR_BIT_LAST)) {
 			result = ULP_BITMAP_ISSET(parms->enc_hdr_bitmap->bits,
 						operand);
 		} else {
@@ -3241,7 +3242,7 @@ ulp_mapper_cond_opc_process(struct bnxt_ulp_mapper_parms *parms,
 		}
 		break;
 	case BNXT_ULP_COND_OPC_ENC_HDR_BIT_NOT_SET:
-		if (operand < BNXT_ULP_HDR_BIT_LAST) {
+		if (likely(operand < BNXT_ULP_HDR_BIT_LAST)) {
 			result = !ULP_BITMAP_ISSET(parms->enc_hdr_bitmap->bits,
 						 operand);
 		} else {
@@ -3254,13 +3255,13 @@ ulp_mapper_cond_opc_process(struct bnxt_ulp_mapper_parms *parms,
 	case BNXT_ULP_COND_OPC_ACT_PROP_IS_SET:
 	case BNXT_ULP_COND_OPC_ACT_PROP_NOT_SET:
 		/* only supporting 1-byte action properties for now */
-		if (operand >= BNXT_ULP_ACT_PROP_IDX_LAST) {
+		if (unlikely(operand >= BNXT_ULP_ACT_PROP_IDX_LAST)) {
 			BNXT_DRV_DBG(ERR,
 				     "act_prop[%" PRIu64 "] oob\n", operand);
 			return -EINVAL;
 		}
 		field_size = ulp_mapper_act_prop_size_get(operand);
-		if (sizeof(tmp) != field_size) {
+		if (unlikely(sizeof(tmp) != field_size)) {
 			BNXT_DRV_DBG(ERR,
 				     "act_prop[%" PRIu64 "] field mismatch %u\n",
 				     operand, field_size);
@@ -3274,7 +3275,7 @@ ulp_mapper_cond_opc_process(struct bnxt_ulp_mapper_parms *parms,
 		break;
 	case BNXT_ULP_COND_OPC_CF_BIT_IS_SET:
 	case BNXT_ULP_COND_OPC_CF_BIT_NOT_SET:
-		if (operand < BNXT_ULP_CF_BIT_LAST) {
+		if (likely(operand < BNXT_ULP_CF_BIT_LAST)) {
 			result = ULP_BITMAP_ISSET(parms->cf_bitmap, operand);
 		} else {
 			BNXT_DRV_DBG(ERR,
@@ -3288,7 +3289,7 @@ ulp_mapper_cond_opc_process(struct bnxt_ulp_mapper_parms *parms,
 	case BNXT_ULP_COND_OPC_WC_FIELD_BIT_IS_SET:
 	case BNXT_ULP_COND_OPC_WC_FIELD_BIT_NOT_SET:
 		rc = ulp_mapper_glb_field_tbl_get(parms, operand, &bit);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR,
 				     "invalid ulp_glb_field idx %" PRIu64 "\n",
 				     operand);
@@ -3301,7 +3302,7 @@ ulp_mapper_cond_opc_process(struct bnxt_ulp_mapper_parms *parms,
 	case BNXT_ULP_COND_OPC_EXCLUDE_FIELD_BIT_IS_SET:
 	case BNXT_ULP_COND_OPC_EXCLUDE_FIELD_BIT_NOT_SET:
 		rc = ulp_mapper_glb_field_tbl_get(parms, operand, &bit);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR,
 				     "invalid ulp_glb_field idx %" PRIu64 "\n",
 				     operand);
@@ -3341,7 +3342,7 @@ ulp_mapper_func_opr_compute(struct bnxt_ulp_mapper_parms *parms,
 	*result =  false;
 	switch (func_src) {
 	case BNXT_ULP_FUNC_SRC_COMP_FIELD:
-		if (func_opr >= BNXT_ULP_CF_IDX_LAST) {
+		if (unlikely(func_opr >= BNXT_ULP_CF_IDX_LAST)) {
 			BNXT_DRV_DBG(ERR, "invalid index %u\n",
 						(uint32_t)func_opr);
 			return -EINVAL;
@@ -3349,7 +3350,7 @@ ulp_mapper_func_opr_compute(struct bnxt_ulp_mapper_parms *parms,
 		*result = ULP_COMP_FLD_IDX_RD(parms, func_opr);
 		break;
 	case BNXT_ULP_FUNC_SRC_REGFILE:
-		if (ulp_regfile_read(parms->regfile, func_opr, &regval)) {
+		if (unlikely(ulp_regfile_read(parms->regfile, func_opr, &regval))) {
 			BNXT_DRV_DBG(ERR, "regfile[%d] read oob\n",
 						(uint32_t)func_opr);
 			return -EINVAL;
@@ -3357,8 +3358,8 @@ ulp_mapper_func_opr_compute(struct bnxt_ulp_mapper_parms *parms,
 		*result = tfp_be_to_cpu_64(regval);
 		break;
 	case BNXT_ULP_FUNC_SRC_GLB_REGFILE:
-		if (ulp_mapper_glb_resource_read(parms->mapper_data, dir,
-						 func_opr, &regval, &shared)) {
+		if (unlikely(ulp_mapper_glb_resource_read(parms->mapper_data, dir,
+							  func_opr, &regval, &shared))) {
 			BNXT_DRV_DBG(ERR, "global regfile[%d] read failed.\n",
 						(uint32_t)func_opr);
 			return -EINVAL;
@@ -3395,7 +3396,7 @@ ulp_mapper_vfr_mark_set(struct bnxt_ulp_mapper_parms *parms,
 
 	rc = ulp_mark_db_mark_add(parms->ulp_ctx, mark_flag,
 				  key, port_id);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to add mark to flow\n");
 		return rc;
 	}
@@ -3442,17 +3443,17 @@ ulp_mapper_func_cond_list_process(struct bnxt_ulp_mapper_parms *parms,
 
 	/* Get the field info from the key ext list */
 	fld = ulp_mapper_tmpl_key_ext_list_get(parms, idx);
-	if (fld == NULL || fld->field_opc !=
-	    BNXT_ULP_FIELD_OPC_TERNARY_LIST) {
+	if (unlikely(fld == NULL || fld->field_opc !=
+		     BNXT_ULP_FIELD_OPC_TERNARY_LIST)) {
 		BNXT_DRV_DBG(ERR, "Invalid field idx %d\n", idx);
 		return -EINVAL;
 	}
 
 	/* process the condition  list */
-	if (ulp_mapper_field_src_process(parms, fld->field_src1,
-					 fld->field_opr1, dir,
-					 1, oper_size, &val,
-					 &val_len, &value)) {
+	if (unlikely(ulp_mapper_field_src_process(parms, fld->field_src1,
+						  fld->field_opr1, dir,
+						  1, oper_size, &val,
+						  &val_len, &value))) {
 		BNXT_DRV_DBG(ERR, "error processing func opcode %u\n",
 			     idx);
 		return -EINVAL;
@@ -3460,9 +3461,9 @@ ulp_mapper_func_cond_list_process(struct bnxt_ulp_mapper_parms *parms,
 	if (value) {
 		if (fld->field_src2 == BNXT_ULP_FIELD_SRC_NEXT) {
 			/* read the next key ext table index */
-			if (ulp_operand_read(fld->field_opr2,
-					     (uint8_t *)&ext_idx,
-					     sizeof(uint16_t))) {
+			if (unlikely(ulp_operand_read(fld->field_opr2,
+						      (uint8_t *)&ext_idx,
+						      sizeof(uint16_t)))) {
 				BNXT_DRV_DBG(ERR,
 					     "field idx operand read failed\n");
 				return -EINVAL;
@@ -3473,11 +3474,11 @@ ulp_mapper_func_cond_list_process(struct bnxt_ulp_mapper_parms *parms,
 								 res, res_size);
 		} else {
 			/* get the value from then part */
-			if (ulp_mapper_field_src_process(parms, fld->field_src2,
-							 fld->field_opr2, dir,
-							 1, oper_size,
-							 &val, &val_len,
-							 &value)) {
+			if (unlikely(ulp_mapper_field_src_process(parms, fld->field_src2,
+								  fld->field_opr2, dir,
+								  1, oper_size,
+								  &val, &val_len,
+								  &value))) {
 				BNXT_DRV_DBG(ERR,
 					     "error processing func oper %u\n",
 					     ext_idx);
@@ -3487,9 +3488,9 @@ ulp_mapper_func_cond_list_process(struct bnxt_ulp_mapper_parms *parms,
 	} else {
 		if (fld->field_src3 == BNXT_ULP_FIELD_SRC_NEXT) {
 			/* read the next key ext table index */
-			if (ulp_operand_read(fld->field_opr3,
-					     (uint8_t *)&ext_idx,
-					     sizeof(uint16_t))) {
+			if (unlikely(ulp_operand_read(fld->field_opr3,
+						      (uint8_t *)&ext_idx,
+						      sizeof(uint16_t)))) {
 				BNXT_DRV_DBG(ERR,
 					     "field idx operand read failed\n");
 				return -EINVAL;
@@ -3500,11 +3501,11 @@ ulp_mapper_func_cond_list_process(struct bnxt_ulp_mapper_parms *parms,
 								 res, res_size);
 		} else {
 			/* get the value from else part */
-			if (ulp_mapper_field_src_process(parms, fld->field_src3,
-							 fld->field_opr3, dir,
-							 1, oper_size,
-							 &val, &val_len,
-							 &value)) {
+			if (unlikely(ulp_mapper_field_src_process(parms, fld->field_src3,
+								  fld->field_opr3, dir,
+								  1, oper_size,
+								  &val, &val_len,
+								  &value))) {
 				BNXT_DRV_DBG(ERR,
 					     "error processing func oper %u\n",
 					     ext_idx);
@@ -3651,7 +3652,7 @@ ulp_mapper_func_info_process(struct bnxt_ulp_mapper_parms *parms,
 		return bnxt_rss_config_action_apply(parms);
 	case BNXT_ULP_FUNC_OPC_GET_PARENT_MAC_ADDR:
 		rc = bnxt_pmd_get_parent_mac_addr(parms, (uint8_t *)&res);
-		if (rc)
+		if (unlikely(rc))
 			return -EINVAL;
 		res = tfp_be_to_cpu_64(res);
 		break;
@@ -3666,7 +3667,7 @@ ulp_mapper_func_info_process(struct bnxt_ulp_mapper_parms *parms,
 		/* res1 is port_id, res2 is action */
 		return ulp_mapper_bd_act_set(parms, res1, res2);
 	case BNXT_ULP_FUNC_OPC_COND_LIST:
-		if (func_info->func_src1 != BNXT_ULP_FUNC_SRC_KEY_EXT_LIST) {
+		if (unlikely(func_info->func_src1 != BNXT_ULP_FUNC_SRC_KEY_EXT_LIST)) {
 			BNXT_DRV_DBG(ERR, "invalid func source %u\n",
 				     func_info->func_opc);
 			return -EINVAL;
@@ -3683,8 +3684,8 @@ ulp_mapper_func_info_process(struct bnxt_ulp_mapper_parms *parms,
 			     func_info->func_opc);
 		return -EINVAL;
 	}
-	if (ulp_regfile_write(parms->regfile, func_info->func_dst_opr,
-			      tfp_cpu_to_be_64(res))) {
+	if (unlikely(ulp_regfile_write(parms->regfile, func_info->func_dst_opr,
+				       tfp_cpu_to_be_64(res)))) {
 		BNXT_DRV_DBG(ERR, "Failed write the func_opc %u\n",
 			     func_info->func_dst_opr);
 		return -EINVAL;
@@ -3743,7 +3744,7 @@ ulp_mapper_cond_opc_list_process(struct bnxt_ulp_mapper_parms *parms,
 						 cond_list[i].cond_opcode,
 						 cond_list[i].cond_operand,
 						 &trc);
-		if (rc)
+		if (unlikely(rc))
 			return rc;
 
 		if (info->cond_list_opcode == BNXT_ULP_COND_LIST_OPC_AND) {
@@ -3805,7 +3806,7 @@ ulp_mapper_cond_reject_list_process(struct bnxt_ulp_mapper_parms *parms,
 		      idx < reject_info->cond_start_idx +
 		      reject_info->cond_nums; idx++) {
 			oper = ulp_mapper_cond_oper_list_get(parms, idx);
-			if (!oper) {
+			if (unlikely(!oper)) {
 				BNXT_DRV_DBG(ERR,
 					     "Invalid cond oper idx %d\n",
 					     idx);
@@ -3868,7 +3869,7 @@ ulp_mapper_cond_execute_list_process(struct bnxt_ulp_mapper_parms *parms,
 		      idx < execute_info->cond_start_idx +
 		      execute_info->cond_nums; idx++) {
 			oper = ulp_mapper_cond_oper_list_get(parms, idx);
-			if (!oper) {
+			if (unlikely(!oper)) {
 				BNXT_DRV_DBG(ERR,
 					     "Invalid cond oper idx %d\n",
 					     idx);
@@ -3910,7 +3911,7 @@ ulp_mapper_conflict_resolution_process(struct bnxt_ulp_mapper_parms *parms,
 				       int32_t *res)
 {
 	int32_t rc = 0;
-	uint64_t regval;
+	uint64_t regval = 0;
 	uint64_t comp_sig;
 
 	*res = 0;
@@ -3923,9 +3924,9 @@ ulp_mapper_conflict_resolution_process(struct bnxt_ulp_mapper_parms *parms,
 		if (tbl->resource_func ==
 		    BNXT_ULP_RESOURCE_FUNC_GENERIC_TABLE) {
 			/* Perform the check that generic table is hit or not */
-			if (ulp_regfile_read(parms->regfile,
-					     BNXT_ULP_RF_IDX_GENERIC_TBL_MISS,
-					     &regval)) {
+			if (unlikely(ulp_regfile_read(parms->regfile,
+						      BNXT_ULP_RF_IDX_GENERIC_TBL_MISS,
+						      &regval))) {
 				BNXT_DRV_DBG(ERR, "regfile[%d] read oob\n",
 					     BNXT_ULP_RF_IDX_GENERIC_TBL_MISS);
 				return -EINVAL;
@@ -3937,9 +3938,9 @@ ulp_mapper_conflict_resolution_process(struct bnxt_ulp_mapper_parms *parms,
 			}
 		}
 		/* compare the new flow signature against stored one */
-		if (ulp_regfile_read(parms->regfile,
-				     BNXT_ULP_RF_IDX_FLOW_SIG_ID,
-				     &regval)) {
+		if (unlikely(ulp_regfile_read(parms->regfile,
+					      BNXT_ULP_RF_IDX_FLOW_SIG_ID,
+					      &regval))) {
 			BNXT_DRV_DBG(ERR, "regfile[%d] read oob\n",
 				     BNXT_ULP_RF_IDX_FLOW_SIG_ID);
 			return -EINVAL;
@@ -3947,7 +3948,7 @@ ulp_mapper_conflict_resolution_process(struct bnxt_ulp_mapper_parms *parms,
 		comp_sig = ULP_COMP_FLD_IDX_RD(parms,
 					       BNXT_ULP_CF_IDX_FLOW_SIG_ID);
 		regval = tfp_be_to_cpu_64(regval);
-		if (comp_sig == regval)
+		if (likely(comp_sig == regval))
 			*res = 1;
 		else
 			BNXT_DRV_DBG(ERR, "failed signature match 0x%016"
@@ -3977,7 +3978,7 @@ ulp_mapper_allocator_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	rc = ulp_allocator_tbl_list_alloc(parms->mapper_data,
 					  tbl->resource_sub_type,
 					  tbl->direction, &alloc_index);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "unable to alloc index %x:%x\n",
 			     tbl->resource_sub_type, tbl->direction);
 		return -EINVAL;
@@ -3986,7 +3987,7 @@ ulp_mapper_allocator_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	/* Write to the regfile */
 	regval = rte_cpu_to_be_64(alloc_index);
 	rc = ulp_regfile_write(parms->regfile, tbl->tbl_operand, regval);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to write regfile[%d] rc=%d\n",
 			     tbl->tbl_operand, rc);
 		return -EINVAL;
@@ -4002,7 +4003,7 @@ ulp_mapper_allocator_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	fid_parms.critical_resource = tbl->critical_resource;
 
 	rc = ulp_mapper_fdb_opc_process(parms, tbl, &fid_parms);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to link resource to flow rc = %d\n",
 			     rc);
 		goto error;
@@ -4035,11 +4036,11 @@ ulp_mapper_tbls_process(struct bnxt_ulp_mapper_parms *parms, void *error)
 
 	rc = ulp_mapper_cond_reject_list_process(parms, tid, &cond_rc);
 	/* if rc is failure or cond_rc is a reject then exit tbl processing */
-	if (rc || cond_rc)
+	if (unlikely(rc || cond_rc))
 		return -EINVAL;
 
 	tbls = ulp_mapper_tbl_list_get(parms, tid, &num_tbls);
-	if (!tbls || !num_tbls) {
+	if (unlikely(!tbls || !num_tbls)) {
 		BNXT_DRV_DBG(ERR, "No %s tables for %d:%d\n",
 			     ulp_mapper_tmpl_name_str(parms->tmpl_type),
 			     parms->dev_id, tid);
@@ -4050,7 +4051,7 @@ ulp_mapper_tbls_process(struct bnxt_ulp_mapper_parms *parms, void *error)
 		tbl = &tbls[tbl_idx];
 		cond_goto = tbl->execute_info.cond_true_goto;
 		/* Process the conditional func code opcodes */
-		if (ulp_mapper_func_info_process(parms, tbl)) {
+		if (unlikely(ulp_mapper_func_info_process(parms, tbl))) {
 			BNXT_DRV_DBG(ERR, "Failed to process cond update\n");
 			rc = -EINVAL;
 			goto error;
@@ -4058,7 +4059,7 @@ ulp_mapper_tbls_process(struct bnxt_ulp_mapper_parms *parms, void *error)
 
 		/* process the execute info of the table */
 		rc = ulp_mapper_cond_execute_list_process(parms, tbl, &cond_rc);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "Failed to proc cond opc list (%d)\n",
 				     rc);
 			goto error;
@@ -4126,14 +4127,14 @@ ulp_mapper_tbls_process(struct bnxt_ulp_mapper_parms *parms, void *error)
 		/* perform the post table process */
 		rc  = ulp_mapper_conflict_resolution_process(parms, tbl,
 							     &cond_rc);
-		if (rc || !cond_rc) {
+		if (unlikely(rc || !cond_rc)) {
 			BNXT_DRV_DBG(ERR, "Failed due to conflict resolution\n");
 			rc = -EINVAL;
 			goto error;
 		}
 next_iteration:
 		if (cond_goto < 0) {
-			if (((int32_t)tbl_idx + cond_goto) < 0) {
+			if (unlikely(((int32_t)tbl_idx + cond_goto) < 0)) {
 				BNXT_DRV_DBG(ERR,
 					     "invalid conditional goto %d\n",
 					     cond_goto);
@@ -4146,7 +4147,7 @@ ulp_mapper_tbls_process(struct bnxt_ulp_mapper_parms *parms, void *error)
 					tbl->true_message;
 
 				BNXT_DRV_DBG(DEBUG, "%s\n", msg);
-				if (error)
+				if (unlikely(error))
 					rte_flow_error_set(error, EINVAL,
 							   RTE_FLOW_ERROR_TYPE_ITEM,
 							   NULL, msg);
@@ -4157,12 +4158,12 @@ ulp_mapper_tbls_process(struct bnxt_ulp_mapper_parms *parms, void *error)
 			goto error;
 		} else if (cond_goto & BNXT_ULP_COND_GOTO_RF) {
 			int32_t rf_idx;
-			uint64_t regval;
+			uint64_t regval = 0;
 
 			/* least significant 16 bits from reg_file index */
 			rf_idx = (int32_t)(cond_goto & 0xFFFF);
-			if (ulp_regfile_read(parms->regfile, rf_idx,
-					     &regval)) {
+			if (unlikely(ulp_regfile_read(parms->regfile, rf_idx,
+						      &regval))) {
 				BNXT_DRV_DBG(ERR, "regfile[%d] read oob\n",
 					     rf_idx);
 				rc = -EINVAL;
@@ -4191,7 +4192,7 @@ ulp_mapper_resource_free(struct bnxt_ulp_context *ulp,
 	struct bnxt_ulp_mapper_data *mdata;
 	int32_t	rc = 0;
 
-	if (!res || !ulp) {
+	if (unlikely(!res || !ulp)) {
 		BNXT_DRV_DBG(ERR, "Unable to free resource\n ");
 		return -EINVAL;
 	}
@@ -4239,7 +4240,7 @@ ulp_mapper_resource_free(struct bnxt_ulp_context *ulp,
 		break;
 	case BNXT_ULP_RESOURCE_FUNC_ALLOCATOR_TABLE:
 		mdata = bnxt_ulp_cntxt_ptr2_mapper_data_get(ulp);
-		if (!mdata) {
+		if (unlikely(!mdata)) {
 			BNXT_DRV_DBG(ERR, "Unable to get mapper data\n");
 			return -EINVAL;
 		}
@@ -4264,7 +4265,7 @@ ulp_mapper_resources_free(struct bnxt_ulp_context *ulp_ctx,
 	struct ulp_flow_db_res_params res_parms = { 0 };
 	int32_t rc, trc, frc = 0;
 
-	if (!ulp_ctx) {
+	if (unlikely(!ulp_ctx)) {
 		BNXT_DRV_DBG(ERR, "Invalid parms, unable to free flow\n");
 		return -EINVAL;
 	}
@@ -4368,7 +4369,7 @@ ulp_mapper_flow_destroy(struct bnxt_ulp_context *ulp_ctx,
 {
 	int32_t rc;
 
-	if (!ulp_ctx) {
+	if (unlikely(!ulp_ctx)) {
 		BNXT_DRV_DBG(ERR, "Invalid parms, unable to free flow\n");
 		return -EINVAL;
 	}
@@ -4388,7 +4389,7 @@ ulp_mapper_flow_create(struct bnxt_ulp_context *ulp_ctx,
 	struct ulp_regfile regfile;
 	int32_t	 rc = 0, trc;
 
-	if (!ulp_ctx || !parms)
+	if (unlikely(!ulp_ctx || !parms))
 		return -EINVAL;
 
 	parms->regfile = &regfile;
@@ -4397,18 +4398,18 @@ ulp_mapper_flow_create(struct bnxt_ulp_context *ulp_ctx,
 	oper = ulp_mapper_data_oper_get(ulp_ctx);
 
 	/* Get the device id from the ulp context */
-	if (bnxt_ulp_cntxt_dev_id_get(ulp_ctx, &parms->dev_id)) {
+	if (unlikely(bnxt_ulp_cntxt_dev_id_get(ulp_ctx, &parms->dev_id))) {
 		BNXT_DRV_DBG(ERR, "Invalid ulp context\n");
 		return -EINVAL;
 	}
-	if (bnxt_ulp_cntxt_fid_get(ulp_ctx, &parms->fw_fid)) {
+	if (unlikely(bnxt_ulp_cntxt_fid_get(ulp_ctx, &parms->fw_fid))) {
 		BNXT_DRV_DBG(ERR, "Unable to get the func_id\n");
 		return -EINVAL;
 	}
 
 	/* Get the device params, it will be used in later processing */
 	parms->device_params = bnxt_ulp_device_params_get(parms->dev_id);
-	if (!parms->device_params) {
+	if (unlikely(!parms->device_params)) {
 		BNXT_DRV_DBG(ERR, "No device parms for device id %d\n",
 			     parms->dev_id);
 		return -EINVAL;
@@ -4420,13 +4421,13 @@ ulp_mapper_flow_create(struct bnxt_ulp_context *ulp_ctx,
 	 */
 	parms->mapper_data = (struct bnxt_ulp_mapper_data *)
 		bnxt_ulp_cntxt_ptr2_mapper_data_get(ulp_ctx);
-	if (!parms->mapper_data) {
+	if (unlikely(!parms->mapper_data)) {
 		BNXT_DRV_DBG(ERR, "Failed to get the ulp mapper data\n");
 		return -EINVAL;
 	}
 
 	/* initialize the registry file for further processing */
-	if (ulp_regfile_init(parms->regfile)) {
+	if (unlikely(ulp_regfile_init(parms->regfile))) {
 		BNXT_DRV_DBG(ERR, "regfile initialization failed.\n");
 		return -EINVAL;
 	}
@@ -4443,7 +4444,7 @@ ulp_mapper_flow_create(struct bnxt_ulp_context *ulp_ctx,
 		parms->tmpl_type = BNXT_ULP_TEMPLATE_TYPE_ACTION;
 		/* Process the action template tables */
 		rc = ulp_mapper_tbls_process(parms, error);
-		if (rc)
+		if (unlikely(rc))
 			goto batch_error;
 	}
 
@@ -4451,7 +4452,7 @@ ulp_mapper_flow_create(struct bnxt_ulp_context *ulp_ctx,
 		parms->tmpl_type = BNXT_ULP_TEMPLATE_TYPE_CLASS;
 		/* Process the class template tables.*/
 		rc = ulp_mapper_tbls_process(parms, error);
-		if (rc)
+		if (unlikely(rc))
 			goto batch_error;
 	}
 
@@ -4469,12 +4470,12 @@ ulp_mapper_flow_create(struct bnxt_ulp_context *ulp_ctx,
 	if (parms->parent_flow) {
 		/* create a parent flow details */
 		rc = ulp_flow_db_parent_flow_create(parms);
-		if (rc)
+		if (unlikely(rc))
 			goto flow_error;
 	} else if (parms->child_flow) {
 		/* create a child flow details */
 		rc = ulp_flow_db_child_flow_create(parms);
-		if (rc)
+		if (unlikely(rc))
 			goto flow_error;
 	}
 
@@ -4529,20 +4530,20 @@ ulp_mapper_init(struct bnxt_ulp_context *ulp_ctx)
 
 	data = rte_zmalloc("ulp_mapper_data",
 			   sizeof(struct bnxt_ulp_mapper_data), 0);
-	if (!data) {
+	if (unlikely(!data)) {
 		BNXT_DRV_DBG(ERR, "Failed to allocate the mapper data\n");
 		return -ENOMEM;
 	}
 
 	/* set the mapper operations for the current platform */
 	data->mapper_oper = bnxt_ulp_mapper_ops_get(ulp_ctx->bp);
-	if (data->mapper_oper == NULL) {
+	if (unlikely(data->mapper_oper == NULL)) {
 		rte_free(data);
 		BNXT_DRV_DBG(ERR, "Failed to get mapper ops\n");
 		return -ENOMEM;
 	}
 
-	if (bnxt_ulp_cntxt_ptr2_mapper_data_set(ulp_ctx, data)) {
+	if (unlikely(bnxt_ulp_cntxt_ptr2_mapper_data_set(ulp_ctx, data))) {
 		BNXT_DRV_DBG(ERR, "Failed to set mapper data in context\n");
 		/* Don't call deinit since the prof_func wasn't allocated. */
 		rte_free(data);
@@ -4551,7 +4552,7 @@ ulp_mapper_init(struct bnxt_ulp_context *ulp_ctx)
 
 	/* Allocate the global resource ids */
 	rc = ulp_mapper_glb_resource_info_init(ulp_ctx, data);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to initialize global resource ids\n");
 		goto error;
 	}
@@ -4562,7 +4563,7 @@ ulp_mapper_init(struct bnxt_ulp_context *ulp_ctx)
 	 */
 	if (bnxt_ulp_cntxt_shared_session_enabled(ulp_ctx)) {
 		rc = ulp_mapper_app_glb_resource_info_init(ulp_ctx, data);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "Failed to init app glb resources\n");
 			goto error;
 		}
@@ -4570,19 +4571,19 @@ ulp_mapper_init(struct bnxt_ulp_context *ulp_ctx)
 
 	/* Allocate the generic table list */
 	rc = ulp_mapper_generic_tbl_list_init(ulp_ctx, data);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to initialize generic tbl list\n");
 		goto error;
 	}
 
 	rc = ulp_mapper_key_recipe_tbl_init(ulp_ctx, data);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to initialize key_recipe tbl\n");
 		goto error;
 	}
 
 	rc = ulp_allocator_tbl_list_init(ulp_ctx, data);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to initialize allocator tbl\n");
 		goto error;
 	}
@@ -4599,7 +4600,7 @@ ulp_mapper_deinit(struct bnxt_ulp_context *ulp_ctx)
 {
 	struct bnxt_ulp_mapper_data *data;
 
-	if (!ulp_ctx) {
+	if (unlikely(!ulp_ctx)) {
 		BNXT_DRV_DBG(ERR,
 			     "Failed to acquire ulp context, so data may not be released.\n");
 		return;
@@ -4607,7 +4608,7 @@ ulp_mapper_deinit(struct bnxt_ulp_context *ulp_ctx)
 
 	data = (struct bnxt_ulp_mapper_data *)
 		bnxt_ulp_cntxt_ptr2_mapper_data_get(ulp_ctx);
-	if (!data) {
+	if (unlikely(!data)) {
 		/* Go ahead and return since there is no allocated data. */
 		BNXT_DRV_DBG(ERR, "No data appears to have been allocated.\n");
 		return;
diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper_tf.c b/drivers/net/bnxt/tf_ulp/ulp_mapper_tf.c
index de04deed92..53497c164a 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper_tf.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper_tf.c
@@ -8,6 +8,7 @@
 #include "ulp_ha_mgr.h"
 #include "tfp.h"
 #include "tf_util.h"
+#include "bnxt_ulp_utils.h"
 #include "bnxt_ulp_tf.h"
 
 #ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
@@ -936,7 +937,7 @@ ulp_mapper_tf_if_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 			     struct bnxt_ulp_mapper_tbl_info *tbl)
 {
 	struct ulp_blob	data, res_blob;
-	uint64_t idx;
+	uint64_t idx = 0;
 	uint16_t tmplen;
 	int32_t rc = 0;
 	struct tf_set_if_tbl_entry_parms iftbl_params = { 0 };
diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper_tfc.c b/drivers/net/bnxt/tf_ulp/ulp_mapper_tfc.c
index b05cf6a16c..eadc882e3b 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper_tfc.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper_tfc.c
@@ -9,6 +9,7 @@
 #include "cfa_bld.h"
 #include "tfc_util.h"
 #include "bnxt_ulp_tfc.h"
+#include "bnxt_ulp_utils.h"
 #include "tfc_action_handle.h"
 
 #ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
@@ -34,13 +35,13 @@ ulp_mapper_tfc_tcam_tbl_entry_write(struct bnxt_ulp_mapper_parms *parms,
 	uint16_t fw_fid;
 
 	tfcp = bnxt_ulp_cntxt_tfcp_get(parms->ulp_ctx);
-	if (tfcp == NULL) {
+	if (unlikely(tfcp == NULL)) {
 		BNXT_DRV_DBG(ERR, "Failed to get tfcp pointer\n");
 		return -EINVAL;
 	}
 
 	rc = bnxt_ulp_cntxt_fid_get(parms->ulp_ctx, &fw_fid);
-	if (rc)
+	if (unlikely(rc))
 		return rc;
 
 	tfc_info.dir = tbl->direction;
@@ -53,7 +54,7 @@ ulp_mapper_tfc_tcam_tbl_entry_write(struct bnxt_ulp_mapper_parms *parms,
 	remap_size = ULP_BITS_2_BYTE(remap_size);
 	tfc_data.remap_sz_in_bytes = remap_size;
 
-	if (tfc_tcam_set(tfcp, fw_fid, &tfc_info, &tfc_data)) {
+	if (unlikely(tfc_tcam_set(tfcp, fw_fid, &tfc_info, &tfc_data))) {
 		BNXT_DRV_DBG(ERR, "tcam[%s][%s][%x] write failed.\n",
 			     tfc_tcam_2_str(tfc_info.rsubtype),
 			     tfc_dir_2_str(tfc_info.dir), tfc_info.id);
@@ -65,7 +66,7 @@ ulp_mapper_tfc_tcam_tbl_entry_write(struct bnxt_ulp_mapper_parms *parms,
 
 	/* Mark action */
 	rc = ulp_mapper_mark_act_ptr_process(parms, tbl);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "failed mark action processing\n");
 		return rc;
 	}
@@ -102,21 +103,21 @@ ulp_mapper_tfc_wc_tcam_post_process(struct bnxt_ulp_device_params *dparms,
 		tlen = tlen << 1;
 	}
 
-	if (num_slices > max_slices) {
+	if (unlikely(num_slices > max_slices)) {
 		BNXT_DRV_DBG(ERR, "Key size (%d) too large for WC\n", blen);
 		return -EINVAL;
 	}
 
 	/* The key/mask may not be on a natural slice boundary, pad it */
 	pad = tlen - blen;
-	if (ulp_blob_pad_push(key, pad) < 0) {
+	if (unlikely(ulp_blob_pad_push(key, pad) < 0)) {
 		BNXT_DRV_DBG(ERR, "Unable to pad key/mask\n");
 		return -EINVAL;
 	}
 
 	/* The new length accounts for the ctrl word length and num slices */
 	tlen = tlen + (clen + 1) * num_slices;
-	if (ulp_blob_init(tkey, tlen, key->byte_order)) {
+	if (unlikely(ulp_blob_init(tkey, tlen, key->byte_order))) {
 		BNXT_DRV_DBG(ERR, "Unable to post process wc tcam entry\n");
 		return -EINVAL;
 	}
@@ -124,7 +125,7 @@ ulp_mapper_tfc_wc_tcam_post_process(struct bnxt_ulp_device_params *dparms,
 	/* pad any remaining bits to do byte alignment */
 	pad = (slice_width + clen) * num_slices;
 	pad = ULP_BYTE_ROUND_OFF_8(pad) - pad;
-	if (ulp_blob_pad_push(tkey, pad) < 0) {
+	if (unlikely(ulp_blob_pad_push(tkey, pad) < 0)) {
 		BNXT_DRV_DBG(ERR, "Unable to pad key/mask\n");
 		return -EINVAL;
 	}
@@ -135,12 +136,12 @@ ulp_mapper_tfc_wc_tcam_post_process(struct bnxt_ulp_device_params *dparms,
 	offset = 0;
 	for (i = 0; i < num_slices; i++) {
 		val = ulp_blob_push_32(tkey, &cword, clen);
-		if (!val) {
+		if (unlikely(!val)) {
 			BNXT_DRV_DBG(ERR, "Key ctrl word push failed\n");
 			return -EINVAL;
 		}
 		rc = ulp_blob_append(tkey, key, offset, slice_width);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "Key blob append failed\n");
 			return rc;
 		}
@@ -195,12 +196,12 @@ ulp_mapper_tfc_tcam_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	}
 
 	tfcp = bnxt_ulp_cntxt_tfcp_get(parms->ulp_ctx);
-	if (tfcp == NULL) {
+	if (unlikely(tfcp == NULL)) {
 		PMD_DRV_LOG(ERR, "Failed to get tfcp pointer\n");
 		return -EINVAL;
 	}
 
-	if (bnxt_ulp_cntxt_fid_get(parms->ulp_ctx, &fw_fid)) {
+	if (unlikely(bnxt_ulp_cntxt_fid_get(parms->ulp_ctx, &fw_fid))) {
 		BNXT_DRV_DBG(ERR, "Failed to get func_id\n");
 		return -EINVAL;
 	}
@@ -208,14 +209,14 @@ ulp_mapper_tfc_tcam_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	/* Allocate the identifiers */
 	if (alloc_ident) {
 		rc = ulp_mapper_tcam_tbl_ident_alloc(parms, tbl);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "Failed to alloc identifier\n");
 			return rc;
 		}
 	}
 
 	/* If no allocation or write is needed, then just exit */
-	if (!alloc_tcam && !write_tcam)
+	if (unlikely(!alloc_tcam && !write_tcam))
 		return rc;
 
 	/* Initialize the blobs for write */
@@ -225,9 +226,9 @@ ulp_mapper_tfc_tcam_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		key_byte_order = dparms->key_byte_order;
 
 	res_byte_order = dparms->result_byte_order;
-	if (ulp_blob_init(key, tbl->blob_key_bit_size, key_byte_order) ||
-	    ulp_blob_init(mask, tbl->blob_key_bit_size, key_byte_order) ||
-	    ulp_blob_init(&data, tbl->result_bit_size, res_byte_order)) {
+	if (unlikely(ulp_blob_init(key, tbl->blob_key_bit_size, key_byte_order) ||
+		     ulp_blob_init(mask, tbl->blob_key_bit_size, key_byte_order) ||
+		     ulp_blob_init(&data, tbl->result_bit_size, res_byte_order))) {
 		BNXT_DRV_DBG(ERR, "blob inits failed.\n");
 		return -EINVAL;
 	}
@@ -237,7 +238,7 @@ ulp_mapper_tfc_tcam_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		kflds = ulp_mapper_key_recipe_fields_get(parms, tbl, &num_kflds);
 	else
 		kflds = ulp_mapper_key_fields_get(parms, tbl, &num_kflds);
-	if (!kflds || !num_kflds) {
+	if (unlikely(!kflds || !num_kflds)) {
 		BNXT_DRV_DBG(ERR, "Failed to get key fields\n");
 		return -EINVAL;
 	}
@@ -247,7 +248,7 @@ ulp_mapper_tfc_tcam_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		rc = ulp_mapper_field_opc_process(parms, tbl->direction,
 						  &kflds[i].field_info_spec,
 						  key, 1, "TCAM Key");
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "Key field set failed %s\n",
 				     kflds[i].field_info_spec.description);
 			return rc;
@@ -257,7 +258,7 @@ ulp_mapper_tfc_tcam_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		rc = ulp_mapper_field_opc_process(parms, tbl->direction,
 						  &kflds[i].field_info_mask,
 						  mask, 0, "TCAM Mask");
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "Mask field set failed %s\n",
 				     kflds[i].field_info_mask.description);
 			return rc;
@@ -268,14 +269,14 @@ ulp_mapper_tfc_tcam_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	if (tbl->resource_type == CFA_RSUBTYPE_TCAM_WC) {
 		/* Sets up the slices for writing to the WC TCAM */
 		rc = ulp_mapper_tfc_wc_tcam_post_process(dparms, key, &tkey);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR,
 				     "Failed to post proc WC key.\n");
 			return rc;
 		}
 		/* Sets up the slices for writing to the WC TCAM */
 		rc = ulp_mapper_tfc_wc_tcam_post_process(dparms, mask, &tmask);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR,
 				     "Failed to post proc WC mask.\n");
 			return rc;
@@ -291,14 +292,14 @@ ulp_mapper_tfc_tcam_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 
 	if (alloc_tcam) {
 		tfcp = bnxt_ulp_cntxt_tfcp_get(parms->ulp_ctx);
-		if (tfcp == NULL) {
+		if (unlikely(tfcp == NULL)) {
 			PMD_DRV_LOG(ERR, "Failed to get tfcp pointer\n");
 			return -EINVAL;
 		}
 		/* calculate the entry priority*/
 		rc = ulp_mapper_priority_opc_process(parms, tbl,
 						     &priority);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "entry priority process failed\n");
 			return rc;
 		}
@@ -311,14 +312,14 @@ ulp_mapper_tfc_tcam_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 
 		rc = tfc_tcam_alloc(tfcp, fw_fid, tt, priority,
 				    key_sz_in_words, &tfc_inf);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "TCAM Alloc failed, status:%d\n", rc);
 			return rc;
 		}
 
 		/* Write the tcam index into the regfile*/
-		if (ulp_regfile_write(parms->regfile, tbl->tbl_operand,
-				      (uint64_t)rte_cpu_to_be_64(tfc_inf.id))) {
+		if (unlikely(ulp_regfile_write(parms->regfile, tbl->tbl_operand,
+					       (uint64_t)rte_cpu_to_be_64(tfc_inf.id)))) {
 			BNXT_DRV_DBG(ERR, "Regfile[%d] write failed.\n",
 				     tbl->tbl_operand);
 			/* Need to free the tcam idx, so goto error */
@@ -349,7 +350,7 @@ ulp_mapper_tfc_tcam_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	ulp_flow_db_shared_session_set(&fid_parms, tbl->session_type);
 
 	rc = ulp_mapper_fdb_opc_process(parms, tbl, &fid_parms);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to link resource to flow rc = %d\n",
 			     rc);
 		/* Need to free the identifier, so goto error */
@@ -395,14 +396,14 @@ ulp_mapper_blob_block_swap(struct ulp_blob *blob, uint32_t block_sz)
 	int i;
 
 	/* Shouldn't happen since it is internal function, but check anyway */
-	if (blob == NULL || !block_sz) {
+	if (unlikely(blob == NULL || !block_sz)) {
 		BNXT_DRV_DBG(ERR, "Invalid arguments\n");
 		return -EINVAL;
 	}
 
 	pdata = ulp_blob_data_get(blob, &data_sz);
 	data_sz = ULP_BITS_2_BYTE(data_sz);
-	if (!data_sz || (data_sz % block_sz) != 0) {
+	if (unlikely(!data_sz || (data_sz % block_sz) != 0)) {
 		BNXT_DRV_DBG(ERR, "length(%d) not a multiple of %d\n",
 			     data_sz, block_sz);
 		return -EINVAL;
@@ -475,7 +476,7 @@ ulp_mapper_tfc_em_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	int32_t rc = 0;
 
 	tfcp = bnxt_ulp_cntxt_tfcp_get(parms->ulp_ctx);
-	if (tfcp == NULL) {
+	if (unlikely(tfcp == NULL)) {
 		BNXT_DRV_DBG(ERR, "Failed to get tfcp pointer\n");
 		return -EINVAL;
 	}
@@ -484,15 +485,15 @@ ulp_mapper_tfc_em_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		kflds = ulp_mapper_key_recipe_fields_get(parms, tbl, &num_kflds);
 	else
 		kflds = ulp_mapper_key_fields_get(parms, tbl, &num_kflds);
-	if (!kflds || !num_kflds) {
+	if (unlikely(!kflds || !num_kflds)) {
 		BNXT_DRV_DBG(ERR, "Failed to get key fields\n");
 		return -EINVAL;
 	}
 
 	byte_order = dparms->em_byte_order;
 	/* Initialize the key/result blobs */
-	if (ulp_blob_init(&key, tbl->blob_key_bit_size, byte_order) ||
-	    ulp_blob_init(&data, tbl->result_bit_size, byte_order)) {
+	if (unlikely(ulp_blob_init(&key, tbl->blob_key_bit_size, byte_order) ||
+		     ulp_blob_init(&data, tbl->result_bit_size, byte_order))) {
 		BNXT_DRV_DBG(ERR, "blob inits failed.\n");
 		return -EINVAL;
 	}
@@ -503,7 +504,7 @@ ulp_mapper_tfc_em_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		rc = ulp_mapper_field_opc_process(parms, tbl->direction,
 						  &kflds[i].field_info_spec,
 						  &key, 1, "EM Key");
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "Key field set failed.\n");
 			return rc;
 		}
@@ -528,7 +529,7 @@ ulp_mapper_tfc_em_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 #endif
 	/* Create the result data blob */
 	rc = ulp_mapper_tbl_result_build(parms, tbl, &data, "EM Result");
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to build the result blob\n");
 		return rc;
 	}
@@ -542,7 +543,7 @@ ulp_mapper_tfc_em_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 #endif
 #endif
 	rc = ulp_blob_append(&key, &data, 0, dparms->em_blk_align_bits);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "EM Failed to append the result to key(%d)",
 			     rc);
 		return rc;
@@ -553,7 +554,7 @@ ulp_mapper_tfc_em_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	rc = ulp_mapper_blob_block_swap(&key,
 					ULP_BITS_2_BYTE(dparms->em_blk_size_bits));
 	/* Error printed within function, just return on error */
-	if (rc)
+	if (unlikely(rc))
 		return rc;
 
 #ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
@@ -570,7 +571,7 @@ ulp_mapper_tfc_em_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	iparms.batch_info	 = &parms->batch_info;
 
 	rc = bnxt_ulp_cntxt_tsid_get(parms->ulp_ctx, &tsid);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to get the table scope\n");
 		return rc;
 	}
@@ -609,7 +610,7 @@ ulp_mapper_tfc_em_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 			uint64_t val = 0;
 
 			/* hash collision */
-			if (rc == -E2BIG)
+			if (unlikely(rc == -E2BIG))
 				BNXT_DRV_DBG(DEBUG, "Dulicate EM entry\n");
 
 			/* over max flows */
@@ -641,7 +642,7 @@ ulp_mapper_tfc_em_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 #endif
 	/* Mark action process */
 	rc = ulp_mapper_mark_gfid_process(parms, tbl, *iparms.flow_handle);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to add mark to flow\n");
 		goto error;
 	}
@@ -655,7 +656,7 @@ ulp_mapper_tfc_em_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	fid_parms.resource_hndl = *iparms.flow_handle;
 
 	rc = ulp_mapper_fdb_opc_process(parms, tbl, &fid_parms);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Fail to link res to flow rc = %d\n", rc);
 		/* Need to free the identifier, so goto error */
 		goto error;
@@ -687,13 +688,13 @@ ulp_mapper_tfc_em_entry_free(struct bnxt_ulp_context *ulp,
 
 	memset(&batch_info, 0, sizeof(batch_info));
 
-	if (bnxt_ulp_cntxt_fid_get(ulp, &fw_fid)) {
+	if (unlikely(bnxt_ulp_cntxt_fid_get(ulp, &fw_fid))) {
 		BNXT_DRV_DBG(ERR, "Failed to get func_id\n");
 		return -EINVAL;
 	}
 
 	tfcp = bnxt_ulp_cntxt_tfcp_get(ulp);
-	if (tfcp == NULL) {
+	if (unlikely(tfcp == NULL)) {
 		BNXT_DRV_DBG(ERR, "Failed to get tfcp pointer\n");
 		return -EINVAL;
 	}
@@ -766,12 +767,12 @@ ulp_mapper_tfc_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	uint16_t fw_fid = 0;
 
 	tfcp = bnxt_ulp_cntxt_tfcp_get(parms->ulp_ctx);
-	if (tfcp == NULL) {
+	if (unlikely(tfcp == NULL)) {
 		PMD_DRV_LOG(ERR, "Failed to get tfcp pointer\n");
 		return -EINVAL;
 	}
 
-	if (bnxt_ulp_cntxt_fid_get(parms->ulp_ctx, &fw_fid)) {
+	if (unlikely(bnxt_ulp_cntxt_fid_get(parms->ulp_ctx, &fw_fid))) {
 		BNXT_DRV_DBG(ERR, "Failed to get func id\n");
 		return -EINVAL;
 	}
@@ -780,8 +781,8 @@ ulp_mapper_tfc_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	bit_size = ulp_mapper_tfc_dyn_blob_size_get(parms, tbl);
 
 	/* Initialize the blob data */
-	if (ulp_blob_init(&data, bit_size,
-			  parms->device_params->result_byte_order)) {
+	if (unlikely(ulp_blob_init(&data, bit_size,
+				   parms->device_params->result_byte_order))) {
 		BNXT_DRV_DBG(ERR, "Failed to initialize index table blob\n");
 		return -EINVAL;
 	}
@@ -818,7 +819,7 @@ ulp_mapper_tfc_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		write = true;
 		break;
 	case BNXT_ULP_INDEX_TBL_OPC_WR_GLB_REGFILE:
-		if (tbl->fdb_opcode != BNXT_ULP_FDB_OPC_NOP) {
+		if (unlikely(tbl->fdb_opcode != BNXT_ULP_FDB_OPC_NOP)) {
 			BNXT_DRV_DBG(ERR, "Template error, wrong fdb opcode\n");
 			return -EINVAL;
 		}
@@ -826,10 +827,10 @@ ulp_mapper_tfc_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		 * get the index to write to from the global regfile and then
 		 * write the table.
 		 */
-		if (ulp_mapper_glb_resource_read(parms->mapper_data,
-						 tbl->direction,
-						 tbl->tbl_operand,
-						 &regval, &shared)) {
+		if (unlikely(ulp_mapper_glb_resource_read(parms->mapper_data,
+							  tbl->direction,
+							  tbl->tbl_operand,
+							  &regval, &shared))) {
 			BNXT_DRV_DBG(ERR,
 				     "Failed to get tbl idx from Glb RF[%d].\n",
 				     tbl->tbl_operand);
@@ -846,8 +847,8 @@ ulp_mapper_tfc_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		 * with the index from the regfile, scan and store the
 		 * identifiers, and return.
 		 */
-		if (ulp_regfile_read(parms->regfile,
-				     tbl->tbl_operand, &regval)) {
+		if (unlikely(ulp_regfile_read(parms->regfile,
+					      tbl->tbl_operand, &regval))) {
 			BNXT_DRV_DBG(ERR,
 				     "Failed to get tbl idx from regfile[%d]\n",
 				     tbl->tbl_operand);
@@ -864,7 +865,7 @@ ulp_mapper_tfc_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 
 		rc = tfc_idx_tbl_get(tfcp, fw_fid, &tbl_info, (uint32_t *)data_p,
 				     (uint8_t *)&wordlen);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR,
 				     "Failed to read the tbl entry %d:%d\n",
 				     tbl->resource_type, index);
@@ -874,7 +875,7 @@ ulp_mapper_tfc_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		/* Scan the fields in the entry and push them into the regfile*/
 		rc = ulp_mapper_tbl_ident_scan_ext(parms, tbl, data_p,
 						   wordlen, data.byte_order);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR,
 				     "Failed to get flds on tbl read rc=%d\n",
 				     rc);
@@ -894,9 +895,9 @@ ulp_mapper_tfc_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 
 	/* read the CMM identifier from the regfile, it is not allocated */
 	if (!alloc && regfile) {
-		if (ulp_regfile_read(parms->regfile,
-				     tbl->tbl_operand,
-				     &regval)) {
+		if (unlikely(ulp_regfile_read(parms->regfile,
+					      tbl->tbl_operand,
+					      &regval))) {
 			BNXT_DRV_DBG(ERR,
 				    "Failed to get tbl idx from regfile[%d].\n",
 				     tbl->tbl_operand);
@@ -910,7 +911,7 @@ ulp_mapper_tfc_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		tbl_info.dir = tbl->direction;
 		tbl_info.rsubtype = tbl->resource_type;
 		rc =  tfc_idx_tbl_alloc(tfcp, fw_fid, tt, &tbl_info);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "Alloc table[%s][%s] failed rc=%d\n",
 				     tfc_idx_tbl_2_str(tbl_info.rsubtype),
 				     tfc_dir_2_str(tbl->direction), rc);
@@ -934,7 +935,7 @@ ulp_mapper_tfc_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		rc = ulp_mapper_glb_resource_write(parms->mapper_data,
 						   &glb_res, regval,
 						   false);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR,
 				     "Failed to write %s regfile[%d] rc=%d\n",
 				     (global) ? "global" : "reg",
@@ -948,7 +949,7 @@ ulp_mapper_tfc_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		regval = rte_cpu_to_be_64(index);
 		rc = ulp_regfile_write(parms->regfile,
 				       tbl->tbl_operand, regval);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR,
 				     "Failed to write %s regfile[%d] rc=%d\n",
 				     (global) ? "global" : "reg",
@@ -963,7 +964,7 @@ ulp_mapper_tfc_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 						 tbl,
 						 &data,
 						 "Indexed Result");
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "Failed to build the result blob\n");
 			return rc;
 		}
@@ -974,7 +975,7 @@ ulp_mapper_tfc_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		wordlen = ULP_BITS_2_BYTE(tmplen);
 		rc = tfc_idx_tbl_set(tfcp, fw_fid, &tbl_info,
 				     (uint32_t *)data_p, wordlen);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR,
 				     "Index table[%s][%s][%x] write fail %d\n",
 				     tfc_idx_tbl_2_str(tbl_info.rsubtype),
@@ -998,7 +999,7 @@ ulp_mapper_tfc_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	ulp_flow_db_shared_session_set(&fid_parms, tbl->session_type);
 
 	rc = ulp_mapper_fdb_opc_process(parms, tbl, &fid_parms);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to link resource to flow rc = %d\n",
 			     rc);
 		goto error;
@@ -1006,7 +1007,7 @@ ulp_mapper_tfc_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 
 	/* Perform the VF rep action */
 	rc = ulp_mapper_mark_vfr_idx_process(parms, tbl);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to add vfr mark rc = %d\n", rc);
 		goto error;
 	}
@@ -1034,14 +1035,14 @@ ulp_mapper_tfc_index_entry_free(struct bnxt_ulp_context *ulp_ctx,
 	uint16_t fw_fid = 0;
 	int32_t rc;
 
-	if (bnxt_ulp_cntxt_fid_get(ulp_ctx, &fw_fid)) {
+	if (unlikely(bnxt_ulp_cntxt_fid_get(ulp_ctx, &fw_fid))) {
 		BNXT_DRV_DBG(ERR, "Failed to get func_id\n");
 		return -EINVAL;
 	}
 
 #ifndef ULP_MAPPER_TFC_TEST
 	tfcp = bnxt_ulp_cntxt_tfcp_get(ulp_ctx);
-	if (tfcp == NULL) {
+	if (unlikely(tfcp == NULL)) {
 		BNXT_DRV_DBG(ERR, "Failed to get tfcp pointer\n");
 		return -EINVAL;
 	}
@@ -1084,7 +1085,7 @@ ulp_mapper_tfc_cmm_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	int32_t rc = 0;
 
 	tfcp = bnxt_ulp_cntxt_tfcp_get(parms->ulp_ctx);
-	if (tfcp == NULL) {
+	if (unlikely(tfcp == NULL)) {
 		PMD_DRV_LOG(ERR, "Failed to get tfcp pointer\n");
 		return -EINVAL;
 	}
@@ -1093,8 +1094,8 @@ ulp_mapper_tfc_cmm_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	bit_size = ulp_mapper_tfc_dyn_blob_size_get(parms, tbl);
 
 	/* Initialize the blob data */
-	if (ulp_blob_init(&data, bit_size,
-			  parms->device_params->result_byte_order)) {
+	if (unlikely(ulp_blob_init(&data, bit_size,
+				   parms->device_params->result_byte_order))) {
 		BNXT_DRV_DBG(ERR, "Failed to initialize cmm table blob\n");
 		return -EINVAL;
 	}
@@ -1131,7 +1132,7 @@ ulp_mapper_tfc_cmm_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		write = true;
 		break;
 	case BNXT_ULP_INDEX_TBL_OPC_WR_GLB_REGFILE:
-		if (tbl->fdb_opcode != BNXT_ULP_FDB_OPC_NOP) {
+		if (unlikely(tbl->fdb_opcode != BNXT_ULP_FDB_OPC_NOP)) {
 			BNXT_DRV_DBG(ERR, "Template error, wrong fdb opcode\n");
 			return -EINVAL;
 		}
@@ -1139,10 +1140,10 @@ ulp_mapper_tfc_cmm_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		 * get the index to write to from the global regfile and then
 		 * write the table.
 		 */
-		if (ulp_mapper_glb_resource_read(parms->mapper_data,
-						 tbl->direction,
-						 tbl->tbl_operand,
-						 &regval, &shared)) {
+		if (unlikely(ulp_mapper_glb_resource_read(parms->mapper_data,
+							  tbl->direction,
+							  tbl->tbl_operand,
+							  &regval, &shared))) {
 			BNXT_DRV_DBG(ERR,
 				     "Failed to get tbl idx from Glb RF[%d].\n",
 				     tbl->tbl_operand);
@@ -1159,8 +1160,8 @@ ulp_mapper_tfc_cmm_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		 * with the index from the regfile, scan and store the
 		 * identifiers, and return.
 		 */
-		if (ulp_regfile_read(parms->regfile,
-				     tbl->tbl_operand, &regval)) {
+		if (unlikely(ulp_regfile_read(parms->regfile,
+					      tbl->tbl_operand, &regval))) {
 			BNXT_DRV_DBG(ERR,
 				     "Failed to get tbl idx from regfile[%d]\n",
 				     tbl->tbl_operand);
@@ -1180,9 +1181,9 @@ ulp_mapper_tfc_cmm_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 
 	/* read the CMM handle from the regfile, it is not allocated */
 	if (!alloc && regfile) {
-		if (ulp_regfile_read(parms->regfile,
+		if (unlikely(ulp_regfile_read(parms->regfile,
 				     tbl->tbl_operand,
-				     &regval)) {
+					      &regval))) {
 			BNXT_DRV_DBG(ERR,
 				    "Failed to get tbl idx from regfile[%d].\n",
 				     tbl->tbl_operand);
@@ -1196,7 +1197,7 @@ ulp_mapper_tfc_cmm_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 					 tbl,
 					 &data,
 					 "Indexed Result");
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to build the result blob\n");
 		return rc;
 	}
@@ -1210,13 +1211,13 @@ ulp_mapper_tfc_cmm_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		act_wordlen = ULP_BITS_TO_32_BYTE_WORD(tmplen);
 
 		rc = bnxt_ulp_cntxt_tsid_get(parms->ulp_ctx, &tsid);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "Failed to get the table scope\n");
 			return rc;
 		}
 		/* All failures after the alloc succeeds require a free */
 		rc =  tfc_act_alloc(tfcp, tsid, &cmm_info, act_wordlen);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR, "Alloc CMM [%d][%s] failed rc=%d\n",
 				     cmm_info.rsubtype,
 				     tfc_dir_2_str(cmm_info.dir), rc);
@@ -1232,7 +1233,7 @@ ulp_mapper_tfc_cmm_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 					 &parms->batch_info,
 					 &cmm_info, act_data,
 					 act_wordlen);
-			if (rc) {
+			if (unlikely(rc)) {
 				BNXT_DRV_DBG(ERR, "Stat alloc/clear[%d][%s]"
 					     "[0x%" PRIx64 "] failed rc=%d\n",
 					     cmm_info.rsubtype,
@@ -1267,7 +1268,7 @@ ulp_mapper_tfc_cmm_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		rc = ulp_mapper_glb_resource_write(parms->mapper_data,
 						   &glb_res, regval,
 						   false);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR,
 				     "Failed to write %s regfile[%d] rc=%d\n",
 				     (global) ? "global" : "reg",
@@ -1281,7 +1282,7 @@ ulp_mapper_tfc_cmm_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		regval = rte_cpu_to_be_64(handle);
 		rc = ulp_regfile_write(parms->regfile,
 				       tbl->tbl_operand, regval);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR,
 				     "Failed to write %s regfile[%d] rc=%d\n",
 				     (global) ? "global" : "reg",
@@ -1297,7 +1298,7 @@ ulp_mapper_tfc_cmm_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		cmm_info.act_handle = handle;
 		act_wordlen = ULP_BITS_TO_32_BYTE_WORD(tmplen);
 		rc = tfc_act_set(tfcp, &parms->batch_info, &cmm_info, act_data, act_wordlen);
-		if (rc) {
+		if (unlikely(rc)) {
 			BNXT_DRV_DBG(ERR,
 				     "CMM table[%d][%s][0x%" PRIx64
 				      "] write fail %d\n",
@@ -1343,7 +1344,7 @@ ulp_mapper_tfc_cmm_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	ulp_flow_db_shared_session_set(&fid_parms, tbl->session_type);
 
 	rc = ulp_mapper_fdb_opc_process(parms, tbl, &fid_parms);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to link resource to flow rc = %d\n",
 			     rc);
 		goto error;
@@ -1351,7 +1352,7 @@ ulp_mapper_tfc_cmm_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 
 	/* Perform the VF rep action */
 	rc = ulp_mapper_mark_vfr_idx_process(parms, tbl);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to add vfr mark rc = %d\n", rc);
 		goto error;
 	}
@@ -1385,13 +1386,13 @@ ulp_mapper_tfc_cmm_entry_free(struct bnxt_ulp_context *ulp_ctx,
 	if (res->fdb_flags & ULP_FDB_FLAG_SW_ONLY)
 		return 0;
 
-	if (bnxt_ulp_cntxt_fid_get(ulp_ctx, &fw_fid)) {
+	if (unlikely(bnxt_ulp_cntxt_fid_get(ulp_ctx, &fw_fid))) {
 		BNXT_DRV_DBG(ERR, "Failed to get func_id\n");
 		return -EINVAL;
 	}
 
 	tfcp = bnxt_ulp_cntxt_tfcp_get(ulp_ctx);
-	if (tfcp == NULL) {
+	if (unlikely(tfcp == NULL)) {
 		BNXT_DRV_DBG(ERR, "Failed to get tfcp pointer\n");
 		return -EINVAL;
 	}
@@ -1402,7 +1403,7 @@ ulp_mapper_tfc_cmm_entry_free(struct bnxt_ulp_context *ulp_ctx,
 
 	/* TBD: check to see if the memory needs to be cleaned as well*/
 	rc = tfc_act_free(tfcp, &cmm_info);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR,
 			     "Failed to delete CMM entry,res = 0x%" PRIx64 "\n",
 			     res->resource_hndl);
@@ -1426,7 +1427,7 @@ ulp_mapper_tfc_if_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 			      struct bnxt_ulp_mapper_tbl_info *tbl)
 {
 	struct ulp_blob	data, res_blob;
-	uint64_t idx;
+	uint64_t idx = 0;
 	int32_t rc = 0;
 	struct tfc *tfcp;
 	enum bnxt_ulp_if_tbl_opc if_opc = tbl->tbl_opcode;
@@ -1437,27 +1438,27 @@ ulp_mapper_tfc_if_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	uint8_t data_size;
 	uint16_t tmplen;
 
-	if (bnxt_ulp_cntxt_fid_get(parms->ulp_ctx, &fw_fid)) {
+	if (unlikely(bnxt_ulp_cntxt_fid_get(parms->ulp_ctx, &fw_fid))) {
 		BNXT_DRV_DBG(ERR, "Failed to get func_id\n");
 		return -EINVAL;
 	}
 
 	tfcp = bnxt_ulp_cntxt_tfcp_get(parms->ulp_ctx);
-	if (tfcp == NULL) {
+	if (unlikely(tfcp == NULL)) {
 		PMD_DRV_LOG(ERR, "Failed to get tfcp pointer\n");
 		return -EINVAL;
 	}
 
 	/* Initialize the blob data */
-	if (ulp_blob_init(&data, tbl->result_bit_size,
-			  parms->device_params->result_byte_order)) {
+	if (unlikely(ulp_blob_init(&data, tbl->result_bit_size,
+				   parms->device_params->result_byte_order))) {
 		BNXT_DRV_DBG(ERR, "Failed initial index table blob\n");
 		return -EINVAL;
 	}
 
 	/* create the result blob */
 	rc = ulp_mapper_tbl_result_build(parms, tbl, &data, "IFtable Result");
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Failed to build the result blob\n");
 		return rc;
 	}
@@ -1468,7 +1469,7 @@ ulp_mapper_tfc_if_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		idx = ULP_COMP_FLD_IDX_RD(parms, tbl->tbl_operand);
 		break;
 	case BNXT_ULP_IF_TBL_OPC_WR_REGFILE:
-		if (ulp_regfile_read(parms->regfile, tbl->tbl_operand, &idx)) {
+		if (unlikely(ulp_regfile_read(parms->regfile, tbl->tbl_operand, &idx))) {
 			BNXT_DRV_DBG(ERR, "regfile[%d] read oob\n",
 				     tbl->tbl_operand);
 			return -EINVAL;
@@ -1480,8 +1481,8 @@ ulp_mapper_tfc_if_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		break;
 	case BNXT_ULP_IF_TBL_OPC_RD_COMP_FIELD:
 		/* Initialize the result blob */
-		if (ulp_blob_init(&res_blob, tbl->result_bit_size,
-				  parms->device_params->result_byte_order)) {
+		if (unlikely(ulp_blob_init(&res_blob, tbl->result_bit_size,
+					   parms->device_params->result_byte_order))) {
 			BNXT_DRV_DBG(ERR, "Failed initial result blob\n");
 			return -EINVAL;
 		}
@@ -1493,7 +1494,7 @@ ulp_mapper_tfc_if_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 						   res_blob.data,
 						   res_size,
 						   res_blob.byte_order);
-		if (rc)
+		if (unlikely(rc))
 			BNXT_DRV_DBG(ERR, "Scan and extract failed rc=%d\n",
 				     rc);
 		return rc;
@@ -1512,7 +1513,7 @@ ulp_mapper_tfc_if_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 
 	rc = tfc_if_tbl_set(tfcp, fw_fid, &tbl_info, (uint8_t *)data_p,
 			    data_size);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR,
 			     "Failed to write the if tbl entry %d:%d\n",
 			     tbl->resource_type, (uint32_t)idx);
@@ -1535,13 +1536,13 @@ ulp_mapper_tfc_ident_alloc(struct bnxt_ulp_context *ulp_ctx,
 	int32_t rc = 0;
 	uint16_t fw_fid = 0;
 
-	if (bnxt_ulp_cntxt_fid_get(ulp_ctx, &fw_fid)) {
+	if (unlikely(bnxt_ulp_cntxt_fid_get(ulp_ctx, &fw_fid))) {
 		BNXT_DRV_DBG(ERR, "Failed to get func_id\n");
 		return -EINVAL;
 	}
 
 	tfcp = bnxt_ulp_cntxt_tfcp_get(ulp_ctx);
-	if (tfcp == NULL) {
+	if (unlikely(tfcp == NULL)) {
 		BNXT_DRV_DBG(ERR, "Failed to get tfcp pointer\n");
 		return -EINVAL;
 	}
@@ -1550,7 +1551,7 @@ ulp_mapper_tfc_ident_alloc(struct bnxt_ulp_context *ulp_ctx,
 	ident_info.rsubtype = ident_type;
 
 	rc = tfc_identifier_alloc(tfcp, fw_fid, tt, &ident_info);
-	if (rc != 0) {
+	if (unlikely(rc != 0)) {
 		BNXT_DRV_DBG(ERR, "alloc failed %d\n", rc);
 		return rc;
 	}
@@ -1575,13 +1576,13 @@ ulp_mapper_tfc_ident_free(struct bnxt_ulp_context *ulp_ctx,
 	int32_t rc = 0;
 	uint16_t fw_fid = 0;
 
-	if (bnxt_ulp_cntxt_fid_get(ulp_ctx, &fw_fid)) {
+	if (unlikely(bnxt_ulp_cntxt_fid_get(ulp_ctx, &fw_fid))) {
 		BNXT_DRV_DBG(ERR, "Failed to get func_id\n");
 		return -EINVAL;
 	}
 
 	tfcp = bnxt_ulp_cntxt_tfcp_get(ulp_ctx);
-	if (tfcp == NULL) {
+	if (unlikely(tfcp == NULL)) {
 		BNXT_DRV_DBG(ERR, "Failed to get tfcp pointer\n");
 		return -EINVAL;
 	}
@@ -1591,7 +1592,7 @@ ulp_mapper_tfc_ident_free(struct bnxt_ulp_context *ulp_ctx,
 	ident_info.id = res->resource_hndl;
 
 	rc = tfc_identifier_free(tfcp, fw_fid, &ident_info);
-	if (rc != 0) {
+	if (unlikely(rc != 0)) {
 		BNXT_DRV_DBG(ERR, "free failed %d\n", rc);
 		return rc;
 	}
@@ -1614,13 +1615,13 @@ ulp_mapper_tfc_tcam_entry_free(struct bnxt_ulp_context *ulp,
 	struct tfc_tcam_info tcam_info = { 0 };
 	uint16_t fw_fid = 0;
 
-	if (bnxt_ulp_cntxt_fid_get(ulp, &fw_fid)) {
+	if (unlikely(bnxt_ulp_cntxt_fid_get(ulp, &fw_fid))) {
 		BNXT_DRV_DBG(ERR, "Failed to get func_id\n");
 		return -EINVAL;
 	}
 
 	tfcp = bnxt_ulp_cntxt_tfcp_get(ulp);
-	if (tfcp == NULL) {
+	if (unlikely(tfcp == NULL)) {
 		PMD_DRV_LOG(ERR, "Failed to get tfcp pointer\n");
 		return -EINVAL;
 	}
@@ -1628,7 +1629,7 @@ ulp_mapper_tfc_tcam_entry_free(struct bnxt_ulp_context *ulp,
 	tcam_info.rsubtype = res->resource_type;
 	tcam_info.id = (uint16_t)res->resource_hndl;
 
-	if (!tfcp || tfc_tcam_free(tfcp, fw_fid, &tcam_info)) {
+	if (unlikely(!tfcp || tfc_tcam_free(tfcp, fw_fid, &tcam_info))) {
 		BNXT_DRV_DBG(ERR, "Unable to free tcam resource %u\n",
 			    tcam_info.id);
 		return -EINVAL;
@@ -1677,12 +1678,12 @@ ulp_mapper_tfc_index_tbl_alloc_process(struct bnxt_ulp_context *ulp,
 	int32_t rc = 0;
 
 	tfcp = bnxt_ulp_cntxt_tfcp_get(ulp);
-	if (tfcp == NULL) {
+	if (unlikely(tfcp == NULL)) {
 		BNXT_DRV_DBG(ERR, "Failed to get tfcp pointer\n");
 		return -EINVAL;
 	}
 
-	if (bnxt_ulp_cntxt_fid_get(ulp, &fw_fid)) {
+	if (unlikely(bnxt_ulp_cntxt_fid_get(ulp, &fw_fid))) {
 		BNXT_DRV_DBG(ERR, "Failed to get func id\n");
 		return -EINVAL;
 	}
@@ -1690,7 +1691,7 @@ ulp_mapper_tfc_index_tbl_alloc_process(struct bnxt_ulp_context *ulp,
 	tbl_info.rsubtype = table_type;
 	tbl_info.dir = direction;
 	rc = tfc_idx_tbl_alloc(tfcp, fw_fid, tt, &tbl_info);
-	if (rc) {
+	if (unlikely(rc)) {
 		BNXT_DRV_DBG(ERR, "Alloc table[%s][%s] failed rc=%d\n",
 			     tfc_idx_tbl_2_str(tbl_info.rsubtype),
 			     tfc_dir_2_str(direction), rc);
diff --git a/drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c
index 4e892bff46..198a2b95fa 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c
@@ -8,6 +8,7 @@
 #include <rte_log.h>
 #include "bnxt.h"
 #include "bnxt_ulp.h"
+#include "bnxt_ulp_utils.h"
 #include "tf_ext_flow_handle.h"
 #include "ulp_mark_mgr.h"
 #include "bnxt_tf_common.h"
diff --git a/drivers/net/bnxt/tf_ulp/ulp_matcher.c b/drivers/net/bnxt/tf_ulp/ulp_matcher.c
index 4b4a4e21ea..4ccbb4d52f 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_matcher.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_matcher.c
@@ -7,6 +7,7 @@
 #include "ulp_matcher.h"
 #include "ulp_mapper.h"
 #include "ulp_utils.h"
+#include "bnxt_ulp_utils.h"
 
 #ifndef RTE_HASH_BUCKET_ENTRIES
 /* it is defined in lib/hash/rte_cuckoo_hash.h */
diff --git a/drivers/net/bnxt/tf_ulp/ulp_port_db.c b/drivers/net/bnxt/tf_ulp/ulp_port_db.c
index 8471fcc46c..384b89da46 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_port_db.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_port_db.c
@@ -7,6 +7,7 @@
 #include "bnxt.h"
 #include "bnxt_vnic.h"
 #include "bnxt_tf_common.h"
+#include "bnxt_ulp_utils.h"
 #include "bnxt_tf_pmd_shim.h"
 #include "ulp_port_db.h"
 #include "tfp.h"
diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
index 69570c5ef4..72d3514647 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
@@ -7,6 +7,7 @@
 #include "ulp_template_db_enum.h"
 #include "ulp_template_struct.h"
 #include "bnxt_ulp.h"
+#include "bnxt_ulp_utils.h"
 #include "bnxt_tf_common.h"
 #include "bnxt_tf_pmd_shim.h"
 #include "ulp_rte_parser.h"
@@ -57,7 +58,7 @@ ulp_rte_item_skip_void(const struct rte_flow_item **item, uint32_t increment)
 }
 
 /* Utility function to copy field spec items */
-static struct ulp_rte_hdr_field *
+static inline struct ulp_rte_hdr_field *
 ulp_rte_parser_fld_copy(struct ulp_rte_hdr_field *field,
 			const void *buffer,
 			uint32_t size)
@@ -92,7 +93,7 @@ ulp_rte_parser_field_bitmap_update(struct ulp_rte_parser_params *params,
 
 #define ulp_deference_struct(x, y) ((x) ? &((x)->y) : NULL)
 /* Utility function to copy field spec and masks items */
-static void
+static inline void
 ulp_rte_prsr_fld_mask(struct ulp_rte_parser_params *params,
 		      uint32_t *idx,
 		      uint32_t size,
@@ -121,12 +122,12 @@ ulp_rte_prsr_fld_mask(struct ulp_rte_parser_params *params,
 }
 
 /* Utility function to copy field spec and masks items */
-static int32_t
+static inline int32_t
 ulp_rte_prsr_fld_size_validate(struct ulp_rte_parser_params *params,
 			       uint32_t *idx,
 			       uint32_t size)
 {
-	if (params->field_idx + size >= BNXT_ULP_PROTO_HDR_MAX) {
+	if (unlikely(params->field_idx + size >= BNXT_ULP_PROTO_HDR_MAX)) {
 		BNXT_DRV_DBG(ERR, "OOB for field processing %u\n", *idx);
 		return -EINVAL;
 	}
@@ -740,8 +741,8 @@ ulp_rte_eth_hdr_handler(const struct rte_flow_item *item,
 		has_vlan_mask = eth_mask->has_vlan;
 	}
 
-	if (ulp_rte_prsr_fld_size_validate(params, &idx,
-					   BNXT_ULP_PROTO_HDR_ETH_NUM)) {
+	if (unlikely(ulp_rte_prsr_fld_size_validate(params, &idx,
+						    BNXT_ULP_PROTO_HDR_ETH_NUM))) {
 		BNXT_DRV_DBG(ERR, "Error parsing protocol header\n");
 		return BNXT_TF_RC_ERROR;
 	}
@@ -840,8 +841,8 @@ ulp_rte_vlan_hdr_handler(const struct rte_flow_item *item,
 		vlan_tag_mask = htons(vlan_tag_mask);
 	}
 
-	if (ulp_rte_prsr_fld_size_validate(params, &idx,
-					   BNXT_ULP_PROTO_HDR_S_VLAN_NUM)) {
+	if (unlikely(ulp_rte_prsr_fld_size_validate(params, &idx,
+						    BNXT_ULP_PROTO_HDR_S_VLAN_NUM))) {
 		BNXT_DRV_DBG(ERR, "Error parsing protocol header\n");
 		return BNXT_TF_RC_ERROR;
 	}
@@ -1026,8 +1027,8 @@ ulp_rte_ipv4_hdr_handler(const struct rte_flow_item *item,
 		return BNXT_TF_RC_ERROR;
 	}
 
-	if (ulp_rte_prsr_fld_size_validate(params, &idx,
-					   BNXT_ULP_PROTO_HDR_IPV4_NUM)) {
+	if (unlikely(ulp_rte_prsr_fld_size_validate(params, &idx,
+						    BNXT_ULP_PROTO_HDR_IPV4_NUM))) {
 		BNXT_DRV_DBG(ERR, "Error parsing protocol header\n");
 		return BNXT_TF_RC_ERROR;
 	}
@@ -1178,8 +1179,8 @@ ulp_rte_ipv6_hdr_handler(const struct rte_flow_item *item,
 		return BNXT_TF_RC_ERROR;
 	}
 
-	if (ulp_rte_prsr_fld_size_validate(params, &idx,
-					   BNXT_ULP_PROTO_HDR_IPV6_NUM)) {
+	if (unlikely(ulp_rte_prsr_fld_size_validate(params, &idx,
+						    BNXT_ULP_PROTO_HDR_IPV6_NUM))) {
 		BNXT_DRV_DBG(ERR, "Error parsing protocol header\n");
 		return BNXT_TF_RC_ERROR;
 	}
@@ -1421,8 +1422,8 @@ ulp_rte_udp_hdr_handler(const struct rte_flow_item *item,
 		dport_mask = udp_mask->hdr.dst_port;
 	}
 
-	if (ulp_rte_prsr_fld_size_validate(params, &idx,
-					   BNXT_ULP_PROTO_HDR_UDP_NUM)) {
+	if (unlikely(ulp_rte_prsr_fld_size_validate(params, &idx,
+						    BNXT_ULP_PROTO_HDR_UDP_NUM))) {
 		BNXT_DRV_DBG(ERR, "Error parsing protocol header\n");
 		return BNXT_TF_RC_ERROR;
 	}
@@ -1501,8 +1502,8 @@ ulp_rte_tcp_hdr_handler(const struct rte_flow_item *item,
 		dport_mask = tcp_mask->hdr.dst_port;
 	}
 
-	if (ulp_rte_prsr_fld_size_validate(params, &idx,
-					   BNXT_ULP_PROTO_HDR_TCP_NUM)) {
+	if (unlikely(ulp_rte_prsr_fld_size_validate(params, &idx,
+						    BNXT_ULP_PROTO_HDR_TCP_NUM))) {
 		BNXT_DRV_DBG(ERR, "Error parsing protocol header\n");
 		return BNXT_TF_RC_ERROR;
 	}
@@ -1590,8 +1591,8 @@ ulp_rte_vxlan_hdr_handler(const struct rte_flow_item *item,
 	uint16_t dport, stat_port;
 	uint32_t size;
 
-	if (ulp_rte_prsr_fld_size_validate(params, &idx,
-					   BNXT_ULP_PROTO_HDR_VXLAN_NUM)) {
+	if (unlikely(ulp_rte_prsr_fld_size_validate(params, &idx,
+						    BNXT_ULP_PROTO_HDR_VXLAN_NUM))) {
 		BNXT_DRV_DBG(ERR, "Error parsing protocol header\n");
 		return BNXT_TF_RC_ERROR;
 	}
@@ -1700,8 +1701,8 @@ ulp_rte_vxlan_gpe_hdr_handler(const struct rte_flow_item *item,
 	uint16_t dport;
 	uint32_t size;
 
-	if (ulp_rte_prsr_fld_size_validate(params, &idx,
-					   BNXT_ULP_PROTO_HDR_VXLAN_GPE_NUM)) {
+	if (unlikely(ulp_rte_prsr_fld_size_validate(params, &idx,
+						    BNXT_ULP_PROTO_HDR_VXLAN_GPE_NUM))) {
 		BNXT_DRV_DBG(ERR, "Error parsing protocol header\n");
 		return BNXT_TF_RC_ERROR;
 	}
@@ -1780,8 +1781,8 @@ ulp_rte_geneve_hdr_handler(const struct rte_flow_item *item,
 	uint16_t dport;
 	uint32_t size;
 
-	if (ulp_rte_prsr_fld_size_validate(params, &idx,
-					   BNXT_ULP_PROTO_HDR_GENEVE_NUM)) {
+	if (unlikely(ulp_rte_prsr_fld_size_validate(params, &idx,
+						    BNXT_ULP_PROTO_HDR_GENEVE_NUM))) {
 		BNXT_DRV_DBG(ERR, "Error parsing protocol header\n");
 		return BNXT_TF_RC_ERROR;
 	}
@@ -1862,8 +1863,8 @@ ulp_rte_gre_hdr_handler(const struct rte_flow_item *item,
 	uint32_t idx = 0;
 	uint32_t size;
 
-	if (ulp_rte_prsr_fld_size_validate(params, &idx,
-					   BNXT_ULP_PROTO_HDR_GRE_NUM)) {
+	if (unlikely(ulp_rte_prsr_fld_size_validate(params, &idx,
+						    BNXT_ULP_PROTO_HDR_GRE_NUM))) {
 		BNXT_DRV_DBG(ERR, "Error parsing protocol header\n");
 		return BNXT_TF_RC_ERROR;
 	}
@@ -1908,8 +1909,8 @@ ulp_rte_icmp_hdr_handler(const struct rte_flow_item *item,
 	uint32_t idx = 0;
 	uint32_t size;
 
-	if (ulp_rte_prsr_fld_size_validate(params, &idx,
-					   BNXT_ULP_PROTO_HDR_ICMP_NUM)) {
+	if (unlikely(ulp_rte_prsr_fld_size_validate(params, &idx,
+						    BNXT_ULP_PROTO_HDR_ICMP_NUM))) {
 		BNXT_DRV_DBG(ERR, "Error parsing protocol header\n");
 		return BNXT_TF_RC_ERROR;
 	}
@@ -1966,8 +1967,8 @@ ulp_rte_icmp6_hdr_handler(const struct rte_flow_item *item,
 	uint32_t idx = 0;
 	uint32_t size;
 
-	if (ulp_rte_prsr_fld_size_validate(params, &idx,
-					   BNXT_ULP_PROTO_HDR_ICMP_NUM)) {
+	if (unlikely(ulp_rte_prsr_fld_size_validate(params, &idx,
+						    BNXT_ULP_PROTO_HDR_ICMP_NUM))) {
 		BNXT_DRV_DBG(ERR, "Error parsing protocol header\n");
 		return BNXT_TF_RC_ERROR;
 	}
@@ -2020,8 +2021,8 @@ ulp_rte_ecpri_hdr_handler(const struct rte_flow_item *item,
 	uint32_t idx = 0, cnt;
 	uint32_t size;
 
-	if (ulp_rte_prsr_fld_size_validate(params, &idx,
-					   BNXT_ULP_PROTO_HDR_ECPRI_NUM)) {
+	if (unlikely(ulp_rte_prsr_fld_size_validate(params, &idx,
+						    BNXT_ULP_PROTO_HDR_ECPRI_NUM))) {
 		BNXT_DRV_DBG(ERR, "Error parsing protocol header\n");
 		return BNXT_TF_RC_ERROR;
 	}
@@ -3312,18 +3313,18 @@ ulp_rte_action_hdlr_handler(const struct rte_flow_action *action_item,
 
 	/* direction of shared action must match direction of flow */
 	ret = bnxt_get_action_handle_direction(handle, &handle_dir);
-	if (ret || dir != handle_dir) {
+	if (unlikely(ret || dir != handle_dir)) {
 		BNXT_DRV_DBG(ERR, "Invalid shared handle or direction\n");
 		return BNXT_TF_RC_ERROR;
 	}
 
-	if (bnxt_get_action_handle_type(handle, &shared_action_type)) {
+	if (unlikely(bnxt_get_action_handle_type(handle, &shared_action_type))) {
 		BNXT_DRV_DBG(ERR, "Invalid shared handle\n");
 		return BNXT_TF_RC_ERROR;
 	}
 
 	act_info = bnxt_ulp_shared_act_info_get(&act_info_entries);
-	if (shared_action_type >= act_info_entries || !act_info) {
+	if (unlikely(shared_action_type >= act_info_entries || !act_info)) {
 		BNXT_DRV_DBG(ERR, "Invalid shared handle\n");
 		return BNXT_TF_RC_ERROR;
 	}
@@ -3331,7 +3332,7 @@ ulp_rte_action_hdlr_handler(const struct rte_flow_action *action_item,
 	action_bitmask = act_info[shared_action_type].act_bitmask;
 
 	/* shared actions of the same type cannot be repeated */
-	if (params->act_bitmap.bits & action_bitmask) {
+	if (unlikely(params->act_bitmap.bits & action_bitmask)) {
 		BNXT_DRV_DBG(ERR, "indirect actions cannot be repeated\n");
 		return BNXT_TF_RC_ERROR;
 	}
@@ -3400,7 +3401,7 @@ ulp_rte_meter_act_handler(const struct rte_flow_action *action_item,
 	struct ulp_rte_act_prop *act_prop = &params->act_prop;
 	uint32_t tmp_meter_id;
 
-	if (action_item == NULL || action_item->conf == NULL) {
+	if (unlikely(action_item == NULL || action_item->conf == NULL)) {
 		BNXT_DRV_DBG(ERR, "Parse Err: invalid meter configuration\n");
 		return BNXT_TF_RC_ERROR;
 	}
@@ -3427,7 +3428,7 @@ ulp_rte_set_mac_src_act_handler(const struct rte_flow_action *action_item,
 	struct ulp_rte_act_prop *act = &params->act_prop;
 
 	set_mac = action_item->conf;
-	if (set_mac) {
+	if (likely(set_mac)) {
 		memcpy(&act->act_details[BNXT_ULP_ACT_PROP_IDX_SET_MAC_SRC],
 		       set_mac->mac_addr, BNXT_ULP_ACT_PROP_SZ_SET_MAC_SRC);
 		/* Update the hdr_bitmap with set mac src */
@@ -3448,7 +3449,7 @@ ulp_rte_set_mac_dst_act_handler(const struct rte_flow_action *action_item,
 	struct ulp_rte_act_prop *act = &params->act_prop;
 
 	set_mac = action_item->conf;
-	if (set_mac) {
+	if (likely(set_mac)) {
 		memcpy(&act->act_details[BNXT_ULP_ACT_PROP_IDX_SET_MAC_DST],
 		       set_mac->mac_addr, BNXT_ULP_ACT_PROP_SZ_SET_MAC_DST);
 		/* Update the hdr_bitmap with set ipv4 dst */
diff --git a/drivers/net/bnxt/tf_ulp/ulp_tun.c b/drivers/net/bnxt/tf_ulp/ulp_tun.c
index 345e1d6459..7ebe81c4ea 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_tun.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_tun.c
@@ -5,6 +5,7 @@
 
 #include "bnxt.h"
 #include "bnxt_ulp.h"
+#include "bnxt_ulp_utils.h"
 #include "ulp_tun.h"
 #include "ulp_utils.h"
 
diff --git a/drivers/net/bnxt/tf_ulp/ulp_utils.h b/drivers/net/bnxt/tf_ulp/ulp_utils.h
index f0dc6dbfec..7a8145b5df 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_utils.h
+++ b/drivers/net/bnxt/tf_ulp/ulp_utils.h
@@ -110,22 +110,43 @@ struct ulp_regfile {
  *
  * returns zero on success
  */
-int32_t
-ulp_regfile_init(struct ulp_regfile *regfile);
+static inline int32_t
+ulp_regfile_init(struct ulp_regfile *regfile)
+{
+	/* validate the arguments */
+	if (!regfile) {
+		BNXT_DRV_DBG(ERR, "invalid argument\n");
+		return -EINVAL;
+	}
+	memset(regfile, 0, sizeof(struct ulp_regfile));
+	return 0; /* Success */
+}
 
 /*
  * Read a value from the regfile
  *
- * regfile [in] The regfile instance.  Must be initialized prior to being used
+ * regfile [in] The regfile instance. Must be initialized prior to being used
  *
  * field [in] The field to be read within the regfile.
  *
+ * data [in/out]
+ *
  * returns zero on success
  */
-int32_t
+static inline int32_t
 ulp_regfile_read(struct ulp_regfile *regfile,
 		 enum bnxt_ulp_rf_idx field,
-		 uint64_t *data);
+		 uint64_t *data)
+{
+	/* validate the arguments */
+	if (unlikely(!regfile || field >= BNXT_ULP_RF_IDX_LAST)) {
+		BNXT_DRV_DBG(ERR, "invalid argument\n");
+		return -EINVAL;
+	}
+
+	*data = regfile->entry[field].data;
+	return 0;
+}
 
 /*
  * Write a value to the regfile
@@ -137,12 +158,115 @@ ulp_regfile_read(struct ulp_regfile *regfile,
  * data [in] The value is written into this variable.  It is going to be in the
  * same byte order as it was written.
  *
- * returns zero on success
+ * size [in] The size in bytes of the value being written into this
+ * variable.
+ *
+ * returns 0 on success
  */
-int32_t
+static inline int32_t
 ulp_regfile_write(struct ulp_regfile *regfile,
 		  enum bnxt_ulp_rf_idx field,
-		  uint64_t data);
+		  uint64_t data)
+{
+	/* validate the arguments */
+	if (unlikely(!regfile || field >= BNXT_ULP_RF_IDX_LAST)) {
+		BNXT_DRV_DBG(ERR, "invalid argument\n");
+		return -EINVAL; /* failure */
+	}
+
+	regfile->entry[field].data = data;
+	return 0; /* Success */
+}
+
+
+/*
+ * Add data to the byte array in Big endian format.
+ *
+ * bs [in] The byte array where data is pushed
+ *
+ * bitpos [in] The offset where data is pushed
+ *
+ * bitlen [in] The number of bits to be added to the data array.
+ *
+ * val [in] The data to be added to the data array.
+ *
+ */
+static inline void
+ulp_bs_put_msb(uint8_t *bs, uint16_t bitpos, uint8_t bitlen, uint8_t val)
+{
+	uint8_t bitoffs = bitpos % 8;
+	uint16_t index  = bitpos / 8;
+	uint8_t mask;
+	uint8_t tmp;
+	int8_t shift;
+
+	tmp = bs[index];
+	mask = ((uint8_t)-1 >> (8 - bitlen));
+	shift = 8 - bitoffs - bitlen;
+	val &= mask;
+
+	if (shift >= 0) {
+		tmp &= ~(mask << shift);
+		tmp |= val << shift;
+		bs[index] = tmp;
+	} else {
+		tmp &= ~((uint8_t)-1 >> bitoffs);
+		tmp |= val >> -shift;
+		bs[index++] = tmp;
+
+		tmp = bs[index];
+		tmp &= ((uint8_t)-1 >> (bitlen - (8 - bitoffs)));
+		tmp |= val << (8 + shift);
+		bs[index] = tmp;
+	}
+}
+
+/*
+ * Add data to the byte array in Little endian format.
+ *
+ * bs [in] The byte array where data is pushed
+ *
+ * bitpos [in] The offset where data is pushed
+ *
+ * bitlen [in] The number of bits to be added to the data array.
+ *
+ * val [in] The data to be added to the data array.
+ *
+ */
+static inline void
+ulp_bs_put_lsb(uint8_t *bs, uint16_t bitpos, uint8_t bitlen, uint8_t val)
+{
+	uint8_t bitoffs = bitpos % 8;
+	uint16_t index  = bitpos / 8;
+	uint8_t mask;
+	uint8_t tmp;
+	uint8_t shift;
+	uint8_t partial;
+
+	tmp = bs[index];
+	shift = bitoffs;
+
+	if (bitoffs + bitlen <= 8) {
+		mask = ((1 << bitlen) - 1) << shift;
+		tmp &= ~mask;
+		tmp |= ((val << shift) & mask);
+		bs[index] = tmp;
+	} else {
+		partial = 8 - bitoffs;
+		mask = ((1 << partial) - 1) << shift;
+		tmp &= ~mask;
+		tmp |= ((val << shift) & mask);
+		bs[index++] = tmp;
+
+		val >>= partial;
+		partial = bitlen - partial;
+		mask = ((1 << partial) - 1);
+		tmp = bs[index];
+		tmp &= ~mask;
+		tmp |= (val & mask);
+		bs[index] = tmp;
+	}
+}
 
 /*
  * Add data to the byte array in Little endian format.
@@ -157,8 +281,27 @@ ulp_regfile_write(struct ulp_regfile *regfile,
  *
  * returns the number of bits pushed.
  */
-uint32_t
-ulp_bs_push_lsb(uint8_t *bs, uint16_t pos, uint8_t len, uint8_t *val);
+static inline uint32_t
+ulp_bs_push_lsb(uint8_t *bs, uint16_t pos, uint8_t len, uint8_t *val)
+{
+	int i;
+	int cnt = (len) / 8;
+	int tlen = len;
+
+	if (cnt > 0 && !(len % 8))
+		cnt -= 1;
+
+	for (i = 0; i < cnt; i++) {
+		ulp_bs_put_lsb(bs, pos, 8, val[cnt - i]);
+		pos += 8;
+		tlen -= 8;
+	}
+
+	/* Handle the remainder bits */
+	if (tlen)
+		ulp_bs_put_lsb(bs, pos, tlen, val[0]);
+	return len;
+}
 
 /*
  * Add data to the byte array in Big endian format.
@@ -173,8 +316,29 @@ ulp_bs_push_lsb(uint8_t *bs, uint16_t pos, uint8_t len, uint8_t *val);
  *
  * returns the number of bits pushed.
  */
-uint32_t
-ulp_bs_push_msb(uint8_t *bs, uint16_t pos, uint8_t len, uint8_t *val);
+static inline uint32_t
+ulp_bs_push_msb(uint8_t *bs, uint16_t pos, uint8_t len, uint8_t *val)
+{
+	int i;
+	int cnt = (len + 7) / 8;
+
+	/* Handle any remainder bits */
+	int tmp = len % 8;
+
+	if (!tmp)
+		tmp = 8;
+
+	ulp_bs_put_msb(bs, pos, tmp, val[0]);
+
+	pos += tmp;
+
+	for (i = 1; i < cnt; i++) {
+		ulp_bs_put_msb(bs, pos, 8, val[i]);
+		pos += 8;
+	}
+
+	return len;
+}
 
 /*
  * Initializes the blob structure for creating binary blob
@@ -187,11 +351,27 @@ ulp_bs_push_msb(uint8_t *bs, uint16_t pos, uint8_t len, uint8_t *val);
  * big endian.  All fields are packed with this order.
  *
  * returns zero on success
+ * Notes - If bitlen is zero then set it to max.
  */
-int32_t
+static inline int32_t
 ulp_blob_init(struct ulp_blob *blob,
 	      uint16_t bitlen,
-	      enum bnxt_ulp_byte_order order);
+	      enum bnxt_ulp_byte_order order)
+{
+	/* validate the arguments */
+	if (unlikely(!blob || bitlen > (8 * sizeof(blob->data)))) {
+		BNXT_DRV_DBG(ERR, "invalid argument\n");
+		return -EINVAL;
+	}
+	if (bitlen)
+		blob->bitlen = bitlen;
+	else
+		blob->bitlen = BNXT_ULP_FLMP_BLOB_SIZE_IN_BITS;
+	blob->byte_order = order;
+	blob->write_idx = 0;
+	memset(blob->data, 0, sizeof(blob->data));
+	return 0; /* Success */
+}
 
 /*
  * Add data to the binary blob at the current offset.
@@ -207,10 +387,39 @@ ulp_blob_init(struct ulp_blob *blob,
  *
  * returns zero on success
  */
-int32_t
+#define ULP_BLOB_BYTE		8
+#define ULP_BLOB_BYTE_HEX	0xFF
+#define BLOB_MASK_CAL(x)	((0xFF << (x)) & 0xFF)
+static inline int32_t
 ulp_blob_push(struct ulp_blob *blob,
 	      uint8_t *data,
-	      uint32_t datalen);
+	      uint32_t datalen)
+{
+	uint32_t rc;
+
+	/* validate the arguments */
+	if (unlikely(!blob || datalen > (uint32_t)(blob->bitlen - blob->write_idx))) {
+		BNXT_DRV_DBG(ERR, "invalid argument\n");
+		return -EINVAL;
+	}
+
+	if (blob->byte_order == BNXT_ULP_BYTE_ORDER_BE)
+		rc = ulp_bs_push_msb(blob->data,
+				     blob->write_idx,
+				     datalen,
+				     data);
+	else
+		rc = ulp_bs_push_lsb(blob->data,
+				     blob->write_idx,
+				     datalen,
+				     data);
+	if (unlikely(!rc)) {
+		BNXT_DRV_DBG(ERR, "Failed to write blob\n");
+		return -EINVAL;
+	}
+	blob->write_idx += datalen;
+	return 0;
+}
 
 /*
  * Insert data into the binary blob at the given offset.
@@ -228,9 +437,53 @@ ulp_blob_push(struct ulp_blob *blob,
  *
  * returns zero on success
  */
-int32_t
+static inline int32_t
 ulp_blob_insert(struct ulp_blob *blob, uint32_t offset,
-		uint8_t *data, uint32_t datalen);
+		uint8_t *data, uint32_t datalen)
+{
+	uint32_t rc;
+	uint8_t local_data[BNXT_ULP_FLMP_BLOB_SIZE];
+	uint16_t mov_len;
+
+	/* validate the arguments */
+	if (unlikely(!blob || datalen > (uint32_t)(blob->bitlen - blob->write_idx) ||
+		     offset > blob->write_idx)) {
+		BNXT_DRV_DBG(ERR, "invalid argument\n");
+		return -EINVAL;
+	}
+
+	mov_len = blob->write_idx - offset;
+	/* If offset and data len are not 8 bit aligned then return error */
+	if (unlikely(ULP_BITS_IS_BYTE_NOT_ALIGNED(offset) ||
+		     ULP_BITS_IS_BYTE_NOT_ALIGNED(datalen))) {
+		BNXT_DRV_DBG(ERR, "invalid argument, not aligned\n");
+		return -EINVAL;
+	}
+
+	/* copy the data so we can move the data */
+	memcpy(local_data, &blob->data[ULP_BITS_2_BYTE_NR(offset)],
+	       ULP_BITS_2_BYTE(mov_len));
+	blob->write_idx = offset;
+	if (blob->byte_order == BNXT_ULP_BYTE_ORDER_BE)
+		rc = ulp_bs_push_msb(blob->data,
+				     blob->write_idx,
+				     datalen,
+				     data);
+	else
+		rc = ulp_bs_push_lsb(blob->data,
+				     blob->write_idx,
+				     datalen,
+				     data);
+	if (unlikely(!rc)) {
+		BNXT_DRV_DBG(ERR, "Failed to write blob\n");
+		return -EINVAL;
+	}
+	/* copy the previously stored data */
+	memcpy(&blob->data[ULP_BITS_2_BYTE_NR(offset + datalen)], local_data,
+	       ULP_BITS_2_BYTE(mov_len));
+	blob->write_idx += (mov_len + datalen);
+	return 0;
+}
 
 /*
  * Add data to the binary blob at the current offset.
@@ -243,12 +496,30 @@ ulp_blob_insert(struct ulp_blob *blob, uint32_t offset,
  * datalen [in] The number of bits to be added to the blob.
  *
  * The offset of the data is updated after each push of data.
- * NULL returned on error, ptr to pushed data otherwise
+ * NULL returned on error, pointer pushed value otherwise.
  */
-uint8_t *
+static inline uint8_t *
 ulp_blob_push_64(struct ulp_blob *blob,
 		 uint64_t *data,
-		 uint32_t datalen);
+		 uint32_t datalen)
+{
+	uint8_t *val = (uint8_t *)data;
+	int rc;
+
+	int size = (datalen + 7) / 8;
+
+	if (unlikely(!blob || !data ||
+		     datalen > (uint32_t)(blob->bitlen - blob->write_idx))) {
+		BNXT_DRV_DBG(ERR, "invalid argument\n");
+		return NULL;
+	}
+
+	rc = ulp_blob_push(blob, &val[8 - size], datalen);
+	if (unlikely(rc))
+		return NULL;
+
+	return &val[8 - size];
+}
 
 /*
  * Add data to the binary blob at the current offset.
@@ -258,15 +529,31 @@ ulp_blob_push_64(struct ulp_blob *blob,
  *
  * data [in] 32-bit value to be added to the blob.
  *
- * datalen [in] The number of bits to be added ot the blob.
+ * datalen [in] The number of bits to be added to the blob.
  *
  * The offset of the data is updated after each push of data.
  * NULL returned on error, pointer pushed value otherwise.
  */
-uint8_t *
+static inline uint8_t *
 ulp_blob_push_32(struct ulp_blob *blob,
 		 uint32_t *data,
-		 uint32_t datalen);
+		 uint32_t datalen)
+{
+	uint8_t *val = (uint8_t *)data;
+	uint32_t rc;
+	uint32_t size = ULP_BITS_2_BYTE(datalen);
+
+	if (unlikely(!data || size > sizeof(uint32_t))) {
+		BNXT_DRV_DBG(ERR, "invalid argument\n");
+		return NULL;
+	}
+
+	rc = ulp_blob_push(blob, &val[sizeof(uint32_t) - size], datalen);
+	if (unlikely(rc))
+		return NULL;
+
+	return &val[sizeof(uint32_t) - size];
+}
 
 /*
  * Add encap data to the binary blob at the current offset.
@@ -281,34 +568,115 @@ ulp_blob_push_32(struct ulp_blob *blob,
  * The offset of the data is updated after each push of data.
  * NULL returned on error, pointer pushed value otherwise.
  */
-int32_t
+static inline int32_t
 ulp_blob_push_encap(struct ulp_blob *blob,
 		    uint8_t *data,
-		    uint32_t datalen);
+		    uint32_t datalen)
+{
+	uint8_t		*val = (uint8_t *)data;
+	uint32_t	initial_size, write_size = datalen;
+	uint32_t	size = 0;
+
+	if (unlikely(!blob || !data ||
+		     datalen > (uint32_t)(blob->bitlen - blob->write_idx))) {
+		BNXT_DRV_DBG(ERR, "invalid argument\n");
+		return -1;
+	}
+
+	initial_size = ULP_BYTE_2_BITS(sizeof(uint64_t)) -
+	    (blob->write_idx % ULP_BYTE_2_BITS(sizeof(uint64_t)));
+	while (write_size > 0) {
+		if (initial_size && write_size > initial_size) {
+			size = initial_size;
+			initial_size = 0;
+		} else if (initial_size && write_size <= initial_size) {
+			size = write_size;
+			initial_size = 0;
+		} else if (write_size > ULP_BYTE_2_BITS(sizeof(uint64_t))) {
+			size = ULP_BYTE_2_BITS(sizeof(uint64_t));
+		} else {
+			size = write_size;
+		}
+		if (unlikely(ulp_blob_push(blob, val, size))) {
+			BNXT_DRV_DBG(ERR, "push field failed\n");
+			return -1;
+		}
+		val += ULP_BITS_2_BYTE(size);
+		write_size -= size;
+	}
+	return datalen;
+}
 
 /*
- * Get the data portion of the binary blob.
+ * Adds pad to an initialized blob at the current offset
  *
- * blob [in] The blob's data to be retrieved. The blob must be
- * initialized prior to pushing data.
+ * blob [in] The blob that data is added to.  The blob must
+ * be initialized prior to pushing data.
  *
- * datalen [out] The number of bits to that are filled.
+ * datalen [in] The number of bits of pad to add
  *
- * returns a byte array of the blob data.  Returns NULL on error.
+ * returns the number of pad bits added, -1 on failure
  */
-uint8_t *
-ulp_blob_data_get(struct ulp_blob *blob,
-		  uint16_t *datalen);
+static inline int32_t
+ulp_blob_pad_push(struct ulp_blob *blob,
+		  uint32_t datalen)
+{
+	if (unlikely(datalen > (uint32_t)(blob->bitlen - blob->write_idx))) {
+		BNXT_DRV_DBG(ERR, "Pad too large for blob\n");
+		return -1;
+	}
+
+	blob->write_idx += datalen;
+	return datalen;
+}
 
 /*
- * Get the data length of the binary blob.
+ * Adds pad to an initialized blob at the current offset based on
+ * the alignment.
  *
- * blob [in] The blob's data len to be retrieved.
+ * blob [in] The blob that needs to be aligned
  *
- * returns length of the binary blob
+ * align [in] Alignment in bits.
+ *
+ * returns the number of pad bits added, -1 on failure
  */
-uint16_t
-ulp_blob_data_len_get(struct ulp_blob *blob);
+static inline int32_t
+ulp_blob_pad_align(struct ulp_blob *blob,
+		   uint32_t align)
+{
+	int32_t pad = 0;
+
+	pad = RTE_ALIGN(blob->write_idx, align) - blob->write_idx;
+	if (unlikely(pad > (int32_t)(blob->bitlen - blob->write_idx))) {
+		BNXT_DRV_DBG(ERR, "Pad too large for blob\n");
+		return -1;
+	}
+	blob->write_idx += pad;
+	return pad;
+}
+
+/* Get data from src and put into dst using little-endian format */
+static inline void
+ulp_bs_get_lsb(uint8_t *src, uint16_t bitpos, uint8_t bitlen, uint8_t *dst)
+{
+	uint8_t bitoffs = bitpos % ULP_BLOB_BYTE;
+	uint16_t index  = ULP_BITS_2_BYTE_NR(bitpos);
+	uint8_t mask, partial, shift;
+
+	shift = bitoffs;
+	partial = ULP_BLOB_BYTE - bitoffs;
+	if (bitoffs + bitlen <= ULP_BLOB_BYTE) {
+		mask = ((1 << bitlen) - 1) << shift;
+		*dst = (src[index] & mask) >> shift;
+	} else {
+		mask = ((1 << partial) - 1) << shift;
+		*dst = (src[index] & mask) >> shift;
+		index++;
+		partial = bitlen - partial;
+		mask = ((1 << partial) - 1);
+		*dst |= (src[index] & mask) << (ULP_BLOB_BYTE - bitoffs);
+	}
+}
 
 /*
  * Get data from the byte array in Little endian format.
@@ -325,9 +693,57 @@ ulp_blob_data_len_get(struct ulp_blob *blob);
  *
  * returns None.
  */
-void
+static inline void
 ulp_bs_pull_lsb(uint8_t *src, uint8_t *dst, uint32_t size,
-		uint32_t offset, uint32_t len);
+		uint32_t offset, uint32_t len)
+{
+	uint32_t idx;
+	uint32_t cnt = ULP_BITS_2_BYTE_NR(len);
+
+	/* iterate bytewise to get data */
+	for (idx = 0; idx < cnt; idx++) {
+		ulp_bs_get_lsb(src, offset, ULP_BLOB_BYTE,
+			       &dst[size - 1 - idx]);
+		offset += ULP_BLOB_BYTE;
+		len -= ULP_BLOB_BYTE;
+	}
+
+	/* Extract the last reminder data that is not 8 byte boundary */
+	if (len)
+		ulp_bs_get_lsb(src, offset, len, &dst[size - 1 - idx]);
+}
+
+/*
+ * Get data from the byte array in Big endian format.
+ *
+ * src [in] The byte array where data is extracted from
+ *
+ * bitpos [in] The offset where data is pulled
+ *
+ * bitlen [in] The number of bits to be extracted from the data array
+ *
+ * dst [out] The byte array where data is pulled into
+ *
+ * returns None.
+ */
+/* Get data from src and put into dst using big-endian format */
+static inline void
+ulp_bs_get_msb(uint8_t *src, uint16_t bitpos, uint8_t bitlen, uint8_t *dst)
+{
+	uint8_t bitoffs = bitpos % ULP_BLOB_BYTE;
+	uint16_t index  = ULP_BITS_2_BYTE_NR(bitpos);
+	uint8_t mask;
+	int32_t shift;
+
+	shift = ULP_BLOB_BYTE - bitoffs - bitlen;
+	if (shift >= 0) {
+		mask = 0xFF >> -bitlen;
+		*dst = (src[index] >> shift) & mask;
+	} else {
+		*dst = (src[index] & (0xFF >> bitoffs)) << -shift;
+		*dst |= src[index + 1] >> -shift;
+	}
+}
 
 /*
  * Get data from the byte array in Big endian format.
@@ -342,9 +758,24 @@ ulp_bs_pull_lsb(uint8_t *src, uint8_t *dst, uint32_t size,
  *
  * returns None.
  */
-void
+static inline void
 ulp_bs_pull_msb(uint8_t *src, uint8_t *dst,
-		uint32_t offset, uint32_t len);
+		uint32_t offset, uint32_t len)
+{
+	uint32_t idx;
+	uint32_t cnt = ULP_BITS_2_BYTE_NR(len);
+
+	/* iterate bytewise to get data */
+	for (idx = 0; idx < cnt; idx++) {
+		ulp_bs_get_msb(src, offset, ULP_BLOB_BYTE, &dst[idx]);
+		offset += ULP_BLOB_BYTE;
+		len -= ULP_BLOB_BYTE;
+	}
+
+	/* Extract the last reminder data that is not 8 byte boundary */
+	if (len)
+		ulp_bs_get_msb(src, offset, len, &dst[idx]);
+}
 
 /*
  * Extract data from the binary blob using given offset.
@@ -359,48 +790,83 @@ ulp_bs_pull_msb(uint8_t *src, uint8_t *dst,
  *
  * Output: zero on success, -1 on failure
  */
-int32_t
+static inline int32_t
 ulp_blob_pull(struct ulp_blob *blob, uint8_t *data, uint32_t data_size,
-	      uint16_t offset, uint16_t len);
+	      uint16_t offset, uint16_t len)
+{
+	/* validate the arguments */
+	if (unlikely(!blob || (offset + len) > blob->bitlen ||
+		     ULP_BYTE_2_BITS(data_size) < len)) {
+		BNXT_DRV_DBG(ERR, "invalid argument\n");
+		return -1; /* failure */
+	}
+
+	if (blob->byte_order == BNXT_ULP_BYTE_ORDER_BE)
+		ulp_bs_pull_msb(blob->data, data, offset, len);
+	else
+		ulp_bs_pull_lsb(blob->data, data, data_size, offset, len);
+	return 0;
+}
 
 /*
- * Adds pad to an initialized blob at the current offset
+ * Get the data portion of the binary blob.
  *
- * blob [in] The blob that data is added to.  The blob must
- * be initialized prior to pushing data.
+ * blob [in] The blob's data to be retrieved. The blob must be
+ * initialized prior to pushing data.
  *
- * datalen [in] The number of bits of pad to add
+ * datalen [out] The number of bits that are filled.
  *
- * returns the number of pad bits added, -1 on failure
+ * Returns a byte array of the blob data or NULL on error.
  */
-int32_t
-ulp_blob_pad_push(struct ulp_blob *blob,
-		  uint32_t datalen);
+static inline uint8_t *
+ulp_blob_data_get(struct ulp_blob *blob,
+		  uint16_t *datalen)
+{
+	/* validate the arguments */
+	if (unlikely(!blob)) {
+		BNXT_DRV_DBG(ERR, "invalid argument\n");
+		return NULL; /* failure */
+	}
+	*datalen = blob->write_idx;
+	return blob->data;
+}
 
 /*
- * Adds pad to an initialized blob at the current offset based on
- * the alignment.
- *
- * blob [in] The blob that needs to be aligned
+ * Get the data length of the binary blob.
  *
- * align [in] Alignment in bits.
+ * blob [in] The blob's data len to be retrieved.
  *
- * returns the number of pad bits added, -1 on failure
+ * returns length of the binary blob
  */
-int32_t
-ulp_blob_pad_align(struct ulp_blob *blob,
-		   uint32_t align);
+static inline uint16_t
+ulp_blob_data_len_get(struct ulp_blob *blob)
+{
+	/* validate the arguments */
+	if (unlikely(!blob)) {
+		BNXT_DRV_DBG(ERR, "invalid argument\n");
+		return 0; /* failure */
+	}
+	return blob->write_idx;
+}
 
 /*
- * Set the 64 bit swap start index of the binary blob.
+ * Set the encap swap start index of the binary blob.
  *
  * blob [in] The blob's data to be retrieved. The blob must be
  * initialized prior to pushing data.
  *
  * returns void.
  */
-void
-ulp_blob_encap_swap_idx_set(struct ulp_blob *blob);
+static inline void
+ulp_blob_encap_swap_idx_set(struct ulp_blob *blob)
+{
+	/* validate the arguments */
+	if (unlikely(!blob)) {
+		BNXT_DRV_DBG(ERR, "invalid argument\n");
+		return; /* failure */
+	}
+	blob->encap_swap_idx = blob->write_idx;
+}
 
 /*
  * Perform the encap buffer swap to 64 bit reversal.
@@ -409,8 +875,36 @@ ulp_blob_encap_swap_idx_set(struct ulp_blob *blob);
  *
  * returns void.
  */
-void
-ulp_blob_perform_encap_swap(struct ulp_blob *blob);
+static inline void
+ulp_blob_perform_encap_swap(struct ulp_blob *blob)
+{
+	uint32_t i, idx = 0, end_idx = 0, roundoff;
+	uint8_t temp_val_1, temp_val_2;
+
+	/* validate the arguments */
+	if (unlikely(!blob)) {
+		BNXT_DRV_DBG(ERR, "invalid argument\n");
+		return; /* failure */
+	}
+	idx = ULP_BITS_2_BYTE_NR(blob->encap_swap_idx);
+	end_idx = ULP_BITS_2_BYTE(blob->write_idx);
+	roundoff = ULP_BYTE_2_BITS(ULP_BITS_2_BYTE(end_idx));
+	if (roundoff > end_idx) {
+		blob->write_idx += ULP_BYTE_2_BITS(roundoff - end_idx);
+		end_idx = roundoff;
+	}
+	while (idx <= end_idx) {
+		for (i = 0; i < 4; i = i + 2) {
+			temp_val_1 = blob->data[idx + i];
+			temp_val_2 = blob->data[idx + i + 1];
+			blob->data[idx + i] = blob->data[idx + 6 - i];
+			blob->data[idx + i + 1] = blob->data[idx + 7 - i];
+			blob->data[idx + 7 - i] = temp_val_2;
+			blob->data[idx + 6 - i] = temp_val_1;
+		}
+		idx += 8;
+	}
+}
 
 /*
  * Perform the blob buffer reversal byte wise.
@@ -422,9 +916,31 @@ ulp_blob_perform_encap_swap(struct ulp_blob *blob);
  *
  * returns void.
  */
-void
+static inline void
 ulp_blob_perform_byte_reverse(struct ulp_blob *blob,
-			      uint32_t chunk_size);
+			      uint32_t chunk_size)
+{
+	uint32_t idx = 0, jdx = 0, num = 0;
+	uint8_t xchar;
+	uint8_t *buff;
+
+	/* validate the arguments */
+	if (unlikely(!blob)) {
+		BNXT_DRV_DBG(ERR, "invalid argument\n");
+		return; /* failure */
+	}
+
+	buff = blob->data;
+	num = ULP_BITS_2_BYTE(blob->write_idx) / chunk_size;
+	for (idx = 0; idx < num; idx++) {
+		for (jdx = 0; jdx < chunk_size / 2; jdx++) {
+			xchar = buff[jdx];
+			buff[jdx] = buff[(chunk_size - 1) - jdx];
+			buff[(chunk_size - 1) - jdx] = xchar;
+		}
+		buff += chunk_size;
+	}
+}
 
 /*
  * Perform the blob buffer 64 bit word swap.
@@ -435,8 +951,27 @@ ulp_blob_perform_byte_reverse(struct ulp_blob *blob,
  *
  * returns void.
  */
-void
-ulp_blob_perform_64B_word_swap(struct ulp_blob *blob);
+static inline void
+ulp_blob_perform_64B_word_swap(struct ulp_blob *blob)
+{
+	uint32_t i, j, num;
+	uint8_t xchar;
+	uint32_t word_size = ULP_64B_IN_BYTES / 2;
+
+	/* validate the arguments */
+	if (unlikely(!blob)) {
+		BNXT_DRV_DBG(ERR, "invalid argument\n");
+		return; /* failure */
+	}
+	num = ULP_BITS_2_BYTE(blob->write_idx);
+	for (i = 0; i < num; i = i + ULP_64B_IN_BYTES) {
+		for (j = 0; j < word_size; j++) {
+			xchar = blob->data[i + j];
+			blob->data[i + j] = blob->data[i + j + word_size];
+			blob->data[i + j + word_size] = xchar;
+		}
+	}
+}
 
 /*
  * Perform the blob buffer 64 bit byte swap.
@@ -447,8 +982,27 @@ ulp_blob_perform_64B_word_swap(struct ulp_blob *blob);
  *
  * returns void.
  */
-void
-ulp_blob_perform_64B_byte_swap(struct ulp_blob *blob);
+static inline void
+ulp_blob_perform_64B_byte_swap(struct ulp_blob *blob)
+{
+	uint32_t i, j, num;
+	uint8_t xchar;
+	uint32_t offset = ULP_64B_IN_BYTES - 1;
+
+	/* validate the arguments */
+	if (unlikely(!blob)) {
+		BNXT_DRV_DBG(ERR, "invalid argument\n");
+		return; /* failure */
+	}
+	num = ULP_BITS_2_BYTE(blob->write_idx);
+	for (i = 0; i < num; i = i + ULP_64B_IN_BYTES) {
+		for (j = 0; j < (ULP_64B_IN_BYTES / 2); j++) {
+			xchar = blob->data[i + j];
+			blob->data[i + j] = blob->data[i + offset - j];
+			blob->data[i + offset - j] = xchar;
+		}
+	}
+}
 
 /*
  * Perform the blob buffer merge.
@@ -457,32 +1011,144 @@ ulp_blob_perform_64B_byte_swap(struct ulp_blob *blob);
  *
  * dst [in] The destination blob, the blob to be merged.
  * src [in] The src blob.
- * block_size [in] The size of the block after which padding gets applied.
+ * block_size [in] The size of the block in bytes after which padding gets
+ *                 applied.
  * pad [in] The size of the pad to be applied.
  *
  * returns 0 on success.
  */
-int32_t
-ulp_blob_block_merge(struct ulp_blob *dst, struct ulp_blob *src,
-		     uint32_t block_size, uint32_t pad);
+static inline int32_t
+ulp_blob_msb_block_merge(struct ulp_blob *dst, struct ulp_blob *src,
+			 uint32_t block_size, uint32_t pad)
+{
+	uint32_t i, k, write_bytes, remaining;
+	uint16_t num;
+	uint8_t *src_buf = ulp_blob_data_get(src, &num);
+	uint8_t bluff;
+
+	for (i = 0; i < num;) {
+		if (((dst->write_idx % block_size) + (num - i)) > block_size)
+			write_bytes = block_size -
+				(dst->write_idx % block_size);
+		else
+			write_bytes = num - i;
+		for (k = 0; k < ULP_BITS_2_BYTE_NR(write_bytes); k++) {
+			ulp_bs_put_msb(dst->data, dst->write_idx, ULP_BLOB_BYTE,
+				       *src_buf);
+			dst->write_idx += ULP_BLOB_BYTE;
+			src_buf++;
+		}
+		remaining = write_bytes % ULP_BLOB_BYTE;
+		if (remaining) {
+			bluff = (*src_buf) & ((uint8_t)-1 <<
+					      (ULP_BLOB_BYTE - remaining));
+			ulp_bs_put_msb(dst->data, dst->write_idx,
+				       ULP_BLOB_BYTE, bluff);
+			dst->write_idx += remaining;
+		}
+		if (write_bytes != (num - i)) {
+			/* add the padding */
+			ulp_blob_pad_push(dst, pad);
+			if (remaining) {
+				ulp_bs_put_msb(dst->data, dst->write_idx,
+					       ULP_BLOB_BYTE - remaining,
+					       *src_buf);
+				dst->write_idx += ULP_BLOB_BYTE - remaining;
+				src_buf++;
+			}
+		}
+		i += write_bytes;
+	}
+	return 0;
+}
 
 /*
- * Append bits from src blob to dst blob.
- * Only works on BE blobs
- *
- * dst [in/out] The destination blob to append to
+ * Perform the blob buffer merge.
+ * This api makes the src blob merged to the dst blob.
+ * The block size and pad size help in padding the dst blob
  *
- * src [in] The src blob to append from
+ * dst [in] The destination blob, the blob to be merged.
+ * src [in] The src blob.
+ * block_size [in] The size of the block in bytes after which padding gets
+ *                 applied.
+ * pad [in] The size of the pad to be applied.
  *
- * src_offset [in] The bit offset from src to start at
+ * returns 0 on success.
+ */
+static inline int32_t
+ulp_blob_block_merge(struct ulp_blob *dst, struct ulp_blob *src,
+		     uint32_t block_size, uint32_t pad)
+{
+	if (dst->byte_order == BNXT_ULP_BYTE_ORDER_BE &&
+	    src->byte_order == BNXT_ULP_BYTE_ORDER_BE)
+		return ulp_blob_msb_block_merge(dst, src, block_size, pad);
+
+	BNXT_DRV_DBG(ERR, "block merge not implemented yet\n");
+	return -EINVAL;
+}
+
+/*
+ * Perform the blob buffer append.
  *
- * src_len [in] The number of bits to append to dst
+ * dst [in] The destination blob, the blob to be merged.
+ * src [in] The src blob.
+ * src_offset [in] Offset of src data.
+ * src_len [in] The size of the src data.
  *
- * returns 0 on success, non-zero on error
+ * returns 0 on success.
  */
-int32_t
+static inline int32_t
 ulp_blob_append(struct ulp_blob *dst, struct ulp_blob *src,
-		uint16_t src_offset, uint16_t src_len);
+		uint16_t src_offset, uint16_t src_len)
+{
+	uint32_t k, remaining = 0;
+	uint16_t num;
+	uint8_t bluff;
+	uint8_t *src_buf = ulp_blob_data_get(src, &num);
+
+	if (unlikely((src_offset + src_len) > num))
+		return -EINVAL;
+
+	/* Only supporting BE for now */
+	if (unlikely(src->byte_order != BNXT_ULP_BYTE_ORDER_BE ||
+		     dst->byte_order != BNXT_ULP_BYTE_ORDER_BE))
+		return -EINVAL;
+
+	/* Handle if the source offset is not on a byte boundary */
+	remaining = src_offset % ULP_BLOB_BYTE;
+	if (remaining) {
+		bluff = src_buf[src_offset / ULP_BLOB_BYTE] & ((uint8_t)-1 >>
+				      (ULP_BLOB_BYTE - remaining));
+		ulp_bs_put_msb(dst->data, dst->write_idx, remaining, bluff);
+		dst->write_idx += remaining;
+		src_offset += remaining;
+	}
+
+	src_buf += ULP_BITS_2_BYTE_NR(src_offset);
+
+	/* Push the byte aligned pieces */
+	for (k = 0; k < ULP_BITS_2_BYTE_NR(src_len); k++) {
+		ulp_bs_put_msb(dst->data, dst->write_idx, ULP_BLOB_BYTE,
+			       *src_buf);
+		dst->write_idx += ULP_BLOB_BYTE;
+		src_buf++;
+	}
+
+	/* Handle the remaining if length is not a byte boundary */
+	if (src_len > remaining)
+		remaining = (src_len - remaining) % ULP_BLOB_BYTE;
+	else
+		remaining = 0;
+	if (remaining) {
+		bluff = (*src_buf) & ((uint8_t)-1 <<
+				      (ULP_BLOB_BYTE - remaining));
+		ulp_bs_put_msb(dst->data, dst->write_idx,
+			       ULP_BLOB_BYTE, bluff);
+		dst->write_idx += remaining;
+	}
+
+	return 0;
+}
 
 /*
  * Perform the blob buffer copy.
@@ -493,8 +1159,23 @@ ulp_blob_append(struct ulp_blob *dst, struct ulp_blob *src,
  *
  * returns 0 on success.
  */
-int32_t
-ulp_blob_buffer_copy(struct ulp_blob *dst, struct ulp_blob *src);
+static inline int32_t
+ulp_blob_buffer_copy(struct ulp_blob *dst, struct ulp_blob *src)
+{
+	if (unlikely((dst->write_idx + src->write_idx) > dst->bitlen)) {
+		BNXT_DRV_DBG(ERR, "source buffer too large\n");
+		return -EINVAL;
+	}
+	if (unlikely(ULP_BITS_IS_BYTE_NOT_ALIGNED(dst->write_idx) ||
+		     ULP_BITS_IS_BYTE_NOT_ALIGNED(src->write_idx))) {
+		BNXT_DRV_DBG(ERR, "source buffer is not aligned\n");
+		return -EINVAL;
+	}
+	memcpy(&dst->data[ULP_BITS_2_BYTE_NR(dst->write_idx)],
+	       src->data, ULP_BITS_2_BYTE_NR(src->write_idx));
+	dst->write_idx += src->write_idx;
+	return 0;
+}
 
 /*
  * Read data from the operand
@@ -503,32 +1184,54 @@ ulp_blob_buffer_copy(struct ulp_blob *dst, struct ulp_blob *src);
  *
  * val [in/out] The variable to copy the operand to
  *
- * bitlen [in] The number of bits to read into val
+ * bytes [in] The number of bytes to read into val
  *
  * returns zero on success.
  */
-int32_t
+static inline int32_t
 ulp_operand_read(uint8_t *operand,
 		 uint8_t *val,
-		 uint16_t bitlen);
-
-/*
- * Check the buffer is empty
- *
- * buf [in] The buffer
- * size [in] The size of the buffer
- */
-int32_t ulp_buffer_is_empty(const uint8_t *buf, uint32_t size);
-
-/* Function to check if bitmap is zero.Return 1 on success */
-uint32_t ulp_bitmap_is_zero(uint8_t *bitmap, int32_t size);
+		 uint16_t bytes)
+{
+	/* validate the arguments */
+	if (unlikely(!operand || !val)) {
+		BNXT_DRV_DBG(ERR, "invalid argument\n");
+		return -EINVAL;
+	}
+	memcpy(val, operand, bytes);
+	return 0;
+}
 
 /* Function to check if bitmap is ones. Return 1 on success */
-uint32_t ulp_bitmap_is_ones(uint8_t *bitmap, int32_t size);
+static inline uint32_t
+ulp_bitmap_is_ones(uint8_t *bitmap, int32_t size)
+{
+	while (size-- > 0) {
+		if (*bitmap != 0xFF)
+			return 0;
+		bitmap++;
+	}
+	return 1;
+}
 
 /* Function to check if bitmap is not zero. Return 1 on success */
-uint32_t ulp_bitmap_notzero(const uint8_t *bitmap, int32_t size);
+static inline uint32_t
+ulp_bitmap_notzero(const uint8_t *bitmap, int32_t size)
+{
+	while (size-- > 0) {
+		if (*bitmap != 0)
+			return 1;
+		bitmap++;
+	}
+	return 0;
+}
 
 /* returns 0 if input is power of 2 */
-int32_t ulp_util_is_power_of_2(uint64_t x);
+static inline int32_t
+ulp_util_is_power_of_2(uint64_t x)
+{
+	if (((x - 1) & x))
+		return -1;
+	return 0;
+}
 #endif /* _ULP_UTILS_H_ */
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 39/47] net/bnxt: tf_ulp: switch ulp to use rte crc32 hash
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (27 preceding siblings ...)
  2024-10-01  5:58 ` [PATCH v3 38/47] net/bnxt: tf_ulp: inline utility functions and use likely/unlikely Sriharsha Basavapatna
@ 2024-10-01  5:58 ` Sriharsha Basavapatna
  2024-10-01  5:58 ` [PATCH v3 41/47] net/bnxt: tf_ulp: support a few generic template items Sriharsha Basavapatna
                   ` (4 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:58 UTC (permalink / raw)
  To: dev
  Cc: Peter Spreadborough, Sriharsha Basavapatna, Kishore Padmanabha,
	Ajit Khaparde

From: Peter Spreadborough <peter.spreadborough@broadcom.com>

The RTE hash is highly optimized and will use HW acceleration
when available.

Signed-off-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c  |  4 ++++
 drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c |  4 ++++
 drivers/net/bnxt/tf_ulp/ulp_gen_hash.c | 28 ++++++++++++++++++++++----
 3 files changed, 32 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
index 99a6bac0ce..c591f9327c 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
@@ -11,6 +11,7 @@
 #include <rte_spinlock.h>
 #include <rte_mtr.h>
 #include <rte_version.h>
+#include <rte_hash_crc.h>
 
 #include "bnxt.h"
 #include "bnxt_ulp.h"
@@ -1457,6 +1458,9 @@ ulp_tf_init(struct bnxt *bp,
 	int rc;
 	uint32_t ulp_dev_id = BNXT_ULP_DEVICE_ID_LAST;
 
+	/* Select 64bit SSE4.2 intrinsic if available */
+	rte_hash_crc_set_alg(CRC32_SSE42_x64);
+
 	/* Allocate and Initialize the ulp context. */
 	rc = ulp_tf_ctx_init(bp, session);
 	if (rc) {
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
index 765ae9f6aa..e5bb24299e 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
@@ -11,6 +11,7 @@
 #include <rte_spinlock.h>
 #include <rte_mtr.h>
 #include <rte_version.h>
+#include <rte_hash_crc.h>
 
 #include "bnxt.h"
 #include "bnxt_ulp.h"
@@ -924,6 +925,9 @@ ulp_tfc_init(struct bnxt *bp,
 	uint16_t sid;
 	int rc;
 
+	/* Select 64bit SSE4.2 intrinsic if available */
+	rte_hash_crc_set_alg(CRC32_SSE42_x64);
+
 	rc = bnxt_ulp_devid_get(bp, &ulp_dev_id);
 	if (rc) {
 		BNXT_DRV_DBG(ERR, "Unable to get device id from ulp.\n");
diff --git a/drivers/net/bnxt/tf_ulp/ulp_gen_hash.c b/drivers/net/bnxt/tf_ulp/ulp_gen_hash.c
index 17bb9c6b32..7d68bfc778 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_gen_hash.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_gen_hash.c
@@ -5,10 +5,10 @@
 
 #include <rte_log.h>
 #include <rte_malloc.h>
+#include <rte_hash_crc.h>
 #include "bnxt_tf_common.h"
 #include "ulp_gen_hash.h"
 #include "ulp_utils.h"
-#include "tf_hash.h"
 
 static
 int32_t ulp_bit_alloc_list_alloc(struct bit_alloc_list *blist,
@@ -203,8 +203,29 @@ ulp_gen_hash_tbl_list_key_search(struct ulp_gen_hash_tbl *hash_tbl,
 	}
 
 	/* calculate the hash */
-	hash_id = tf_hash_calc_crc32(entry->key_data,
-				     hash_tbl->key_tbl.data_size);
+	switch (hash_tbl->key_tbl.data_size) {
+	case 1:
+		hash_id = rte_hash_crc_1byte(*entry->key_data,
+					     ~0U);
+		break;
+	case 2:
+		hash_id = rte_hash_crc_2byte(*((uint16_t *)entry->key_data),
+					     ~0U);
+		break;
+	case 4:
+		hash_id = rte_hash_crc_4byte(*((uint32_t *)entry->key_data),
+					     ~0U);
+		break;
+	case 8:
+		hash_id = rte_hash_crc_8byte(*((uint64_t *)entry->key_data),
+					     ~0U);
+		break;
+	default:
+		hash_id = rte_hash_crc(entry->key_data,
+				       hash_tbl->key_tbl.data_size,
+				       ~0U);
+		break;
+	}
 	hash_id = (uint16_t)(((hash_id >> 16) & 0xffff) ^ (hash_id & 0xffff));
 	hash_id &= hash_tbl->hash_mask;
 	hash_id = hash_id * hash_tbl->hash_bkt_num;
@@ -375,4 +396,3 @@ ulp_gen_hash_tbl_list_del(struct ulp_gen_hash_tbl *hash_tbl,
 
 	return 0;
 }
-
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 41/47] net/bnxt: tf_ulp: support a few generic template items
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (28 preceding siblings ...)
  2024-10-01  5:58 ` [PATCH v3 39/47] net/bnxt: tf_ulp: switch ulp to use rte crc32 hash Sriharsha Basavapatna
@ 2024-10-01  5:58 ` Sriharsha Basavapatna
  2024-10-01  5:58 ` [PATCH v3 42/47] net/bnxt: tf_ulp: TFC support flow scale query for Thor2 Sriharsha Basavapatna
                   ` (3 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:58 UTC (permalink / raw)
  To: dev
  Cc: Kishore Padmanabha, Sriharsha Basavapatna, Michael Baucom, Ajit Khaparde

From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>

This patch provides the following changes.

support generic template items
	Add support for jump action, dynamic tunnels and
	flow priority to thor2 platform.

fix generic application template
	The queue action is enabled for Thor2 platform.
	Enabled rejection check for every action template.
	Fixed dynamic vxlan ip tunnel configuration.

fix vxlan ip customer tunnel
	The upar id is not populated correctly to set the
	tunnel id in the tcam table.

fix compiler warnings
	This change fixes several compiler warnings.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Michael Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c   |  9 +++++++++
 drivers/net/bnxt/tf_ulp/ulp_mapper.c     | 11 +++--------
 drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 12 ++++++++++++
 3 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
index e5bb24299e..9c9e206285 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
@@ -536,6 +536,15 @@ ulp_tfc_cntxt_app_caps_init(struct bnxt *bp, uint8_t app_id, uint32_t dev_id)
 			}
 		}
 		ulp_ctx->cfg_data->feature_bits = info[i].feature_bits;
+		bnxt_ulp_default_app_priority_set(ulp_ctx,
+						  info[i].default_priority);
+		bnxt_ulp_max_def_priority_set(ulp_ctx,
+					      info[i].max_def_priority);
+		bnxt_ulp_min_flow_priority_set(ulp_ctx,
+					       info[i].min_flow_priority);
+		bnxt_ulp_max_flow_priority_set(ulp_ctx,
+					       info[i].max_flow_priority);
+
 		bnxt_ulp_cntxt_ptr2_default_class_bits_set(ulp_ctx,
 							   info[i].default_class_bits);
 		bnxt_ulp_cntxt_ptr2_default_act_bits_set(ulp_ctx,
diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.c b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
index f0d715d369..5dfe72df17 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
@@ -872,7 +872,7 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 	struct bnxt_ulp_mapper_data *m;
 	uint8_t bit;
 	uint32_t port_id, val_size, field_size;
-	uint16_t idx, size_idx, offset;
+	uint16_t idx = 0, size_idx = 0, offset = 0;
 	uint32_t bytelen = ULP_BITS_2_BYTE(bitlen);
 	uint8_t *buffer;
 	uint64_t lregval;
@@ -1291,7 +1291,7 @@ ulp_mapper_field_opc_next(struct bnxt_ulp_mapper_parms *parms,
 			  const char *name)
 {
 	struct bnxt_ulp_mapper_field_info *field_info;
-	uint16_t idx;
+	uint16_t idx = 0;
 
 	/* read the cond table index and count */
 	if (unlikely(ulp_operand_read(field_opr,
@@ -1594,7 +1594,7 @@ ulp_mapper_key_recipe_field_opc_next(struct bnxt_ulp_mapper_parms *parms,
 				     struct bnxt_ulp_mapper_field_info *ofld)
 {
 	struct bnxt_ulp_mapper_field_info *field_info;
-	uint16_t idx;
+	uint16_t idx = 0;
 
 	/* read the cond table index and count */
 	if (unlikely(ulp_operand_read(field_opr,
@@ -3777,11 +3777,6 @@ ulp_mapper_cond_reject_list_process(struct bnxt_ulp_mapper_parms *parms,
 	/* set the rejection result to accept */
 	*res = 0;
 
-	/* If act rej cond is not enabled then skip reject cond processing */
-	if (parms->tmpl_type == BNXT_ULP_TEMPLATE_TYPE_ACTION &&
-	    !ULP_COMP_FLD_IDX_RD(parms, BNXT_ULP_CF_IDX_ACT_REJ_COND_EN))
-		return rc;
-
 	/* get the reject condition list */
 	reject_info = ulp_mapper_tmpl_reject_list_get(parms, tid);
 
diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
index 72d3514647..dbd8a118df 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
@@ -1298,6 +1298,7 @@ ulp_rte_l4_proto_type_update(struct ulp_rte_parser_params *params,
 			     enum bnxt_ulp_hdr_bit hdr_bit)
 {
 	uint16_t stat_port = 0;
+	struct bnxt *bp;
 
 	switch (hdr_bit) {
 	case BNXT_ULP_HDR_BIT_I_UDP:
@@ -1364,10 +1365,21 @@ ulp_rte_l4_proto_type_update(struct ulp_rte_parser_params *params,
 
 		/* if udp and equal to static vxlan port then set tunnel bits*/
 		if (stat_port && dst_port == tfp_cpu_to_be_16(stat_port)) {
+			bp = bnxt_pmd_get_bp(params->port_id);
+			if (bp == NULL) {
+				BNXT_DRV_DBG(ERR, "Invalid bp\n");
+				return;
+			}
 			ULP_BITMAP_SET(params->hdr_fp_bit.bits,
 				       BNXT_ULP_HDR_BIT_T_VXLAN);
 			ULP_BITMAP_SET(params->cf_bitmap,
 				       BNXT_ULP_CF_BIT_IS_TUNNEL);
+			if (bp->vxlan_ip_upar_in_use &
+			    HWRM_TUNNEL_DST_PORT_QUERY_OUTPUT_UPAR_IN_USE_UPAR0) {
+				ULP_COMP_FLD_IDX_WR(params,
+						    BNXT_ULP_CF_IDX_VXLAN_IP_UPAR_ID,
+						    ULP_WP_SYM_TUN_HDR_TYPE_UPAR1);
+			}
 		}
 	} else {
 		/* if dynamic Vxlan is enabled then skip dport checks */
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 42/47] net/bnxt: tf_ulp: TFC support flow scale query for Thor2
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (29 preceding siblings ...)
  2024-10-01  5:58 ` [PATCH v3 41/47] net/bnxt: tf_ulp: support a few generic template items Sriharsha Basavapatna
@ 2024-10-01  5:58 ` Sriharsha Basavapatna
  2024-10-01  5:58 ` [PATCH v3 44/47] net/bnxt: tf_ulp: enable support for truflow feature configuration Sriharsha Basavapatna
                   ` (2 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:58 UTC (permalink / raw)
  To: dev
  Cc: Shuanglin Wang, Sriharsha Basavapatna, Kishore Padmanabha, Ajit Khaparde

From: Shuanglin Wang <shuanglin.wang@broadcom.com>

TFC supports the flow scale query feature for OVS application.
The resource usage(WC-TCAM) is tracked inside Thor2 firmware.
This patch is to query the wc-tcam usage info when adding/
deleting a flow. It is just for debugging purpose and disabled by
default.

Using the build flag -DTF_FLOW_SCALE_QUERY to enable it.
And users should use niccli to query the resource usage.

Signed-off-by: Shuanglin Wang <shuanglin.wang@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c |  6 ++++++
 drivers/net/bnxt/tf_ulp/ulp_flow_db.c  |  9 +++++----
 drivers/net/bnxt/tf_ulp/ulp_mapper.c   | 26 ++++++++++++++++++++++++--
 drivers/net/bnxt/tf_ulp/ulp_mapper.h   |  5 +++++
 4 files changed, 40 insertions(+), 6 deletions(-)

diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
index 9c9e206285..31ab61b512 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
@@ -34,6 +34,7 @@
 #include "ulp_ha_mgr.h"
 #include "bnxt_tf_pmd_shim.h"
 #include "ulp_template_db_tbl.h"
+#include "tfc_resources.h"
 
 /* define to enable shared table scope */
 #define TFC_SHARED_TBL_SCOPE_ENABLE 0
@@ -1052,6 +1053,11 @@ ulp_tfc_init(struct bnxt *bp,
 		}
 	}
 
+#ifdef TF_FLOW_SCALE_QUERY
+	/* Query resource statstics from firmware */
+	tfc_resc_usage_query_all(bp);
+#endif /* TF_FLOW_SCALE_QUERY */
+
 	BNXT_DRV_DBG(DEBUG, "ulp ctx has been initialized\n");
 	return rc;
 
diff --git a/drivers/net/bnxt/tf_ulp/ulp_flow_db.c b/drivers/net/bnxt/tf_ulp/ulp_flow_db.c
index 341c8c2dfe..8984808b67 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_flow_db.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_flow_db.c
@@ -15,6 +15,7 @@
 #include "ulp_tun.h"
 #ifdef TF_FLOW_SCALE_QUERY
 #include "tf_resources.h"
+#include "tfc_resources.h"
 #endif /* TF_FLOW_SCALE_QUERY */
 
 #define ULP_FLOW_DB_RES_DIR_BIT		31
@@ -963,11 +964,12 @@ ulp_flow_db_flush_flows(struct bnxt_ulp_context *ulp_ctx,
 #ifdef TF_FLOW_SCALE_QUERY
 	tf_resc_pause_usage_update();
 #endif
+
 	while (!ulp_flow_db_next_entry_get(flow_db, flow_type, &fid))
 		ulp_mapper_resources_free(ulp_ctx, flow_type, fid, NULL);
+
 #ifdef TF_FLOW_SCALE_QUERY
-	tf_resc_resume_usage_update();
-	tf_resc_usage_update_all(ulp_ctx->bp);
+	ulp_resc_usage_sync(ulp_ctx);
 #endif
 
 	bnxt_ulp_cntxt_release_fdb_lock(ulp_ctx);
@@ -1017,8 +1019,7 @@ ulp_flow_db_function_flow_flush(struct bnxt_ulp_context *ulp_ctx,
 						  NULL);
 	}
 #ifdef TF_FLOW_SCALE_QUERY
-	tf_resc_resume_usage_update();
-	tf_resc_usage_update_all(ulp_ctx->bp);
+	ulp_resc_usage_sync(ulp_ctx);
 #endif
 	bnxt_ulp_cntxt_release_fdb_lock(ulp_ctx);
 	return 0;
diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.c b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
index 5dfe72df17..c595e7cfc3 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
@@ -24,6 +24,7 @@
 #include "bnxt_tf_pmd_shim.h"
 #ifdef TF_FLOW_SCALE_QUERY
 #include "tf_resources.h"
+#include "tfc_resources.h"
 #endif /* TF_FLOW_SCALE_QUERY */
 
 static uint8_t mapper_fld_zeros[16] = { 0 };
@@ -4322,7 +4323,7 @@ ulp_mapper_resources_free(struct bnxt_ulp_context *ulp_ctx,
 #ifdef TF_FLOW_SCALE_QUERY
 	/* update for regular flows only */
 	if (flow_type == BNXT_ULP_FDB_TYPE_REGULAR)
-		tf_resc_usage_update_all(ulp_ctx->bp);
+		ulp_resc_usage_sync(ulp_ctx);
 #endif /* TF_FLOW_SCALE_QUERY */
 
 	return frc;
@@ -4475,7 +4476,7 @@ ulp_mapper_flow_create(struct bnxt_ulp_context *ulp_ctx,
 	}
 
 #ifdef TF_FLOW_SCALE_QUERY
-	tf_resc_usage_update_all(ulp_ctx->bp);
+	ulp_resc_usage_sync(ulp_ctx);
 #endif /* TF_FLOW_SCALE_QUERY */
 
 	return rc;
@@ -4514,6 +4515,27 @@ ulp_mapper_flow_create(struct bnxt_ulp_context *ulp_ctx,
 	return rc;
 }
 
+#ifdef TF_FLOW_SCALE_QUERY
+/* Sync resource usage state with firmware */
+int ulp_resc_usage_sync(struct bnxt_ulp_context *ulp_ctx)
+{
+	uint32_t dev_id;
+	if (unlikely(bnxt_ulp_cntxt_dev_id_get(ulp_ctx, &dev_id))) {
+		BNXT_DRV_DBG(ERR, "Invalid ulp context\n");
+		return -EINVAL;
+	}
+
+	if (dev_id == BNXT_ULP_DEVICE_ID_THOR) {
+		tf_resc_resume_usage_update();
+		tf_resc_usage_update_all(ulp_ctx->bp);
+	} else if (dev_id == BNXT_ULP_DEVICE_ID_THOR2) {
+		tfc_resc_usage_query_all(ulp_ctx->bp);
+	}
+
+	return 0;
+}
+#endif /* TF_FLOW_SCALE_QUERY */
+
 int32_t
 ulp_mapper_init(struct bnxt_ulp_context *ulp_ctx)
 {
diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.h b/drivers/net/bnxt/tf_ulp/ulp_mapper.h
index 0f43e2a8b5..d2fc716232 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.h
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.h
@@ -302,4 +302,9 @@ ulp_mapper_init(struct bnxt_ulp_context	*ulp_ctx);
 void
 ulp_mapper_deinit(struct bnxt_ulp_context *ulp_ctx);
 
+#ifdef TF_FLOW_SCALE_QUERY
+int32_t
+ulp_resc_usage_sync(struct bnxt_ulp_context *ulp_ctx);
+#endif /* TF_FLOW_SCALE_QUERY */
+
 #endif /* _ULP_MAPPER_H_ */
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 44/47] net/bnxt: tf_ulp: enable support for truflow feature configuration
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (30 preceding siblings ...)
  2024-10-01  5:58 ` [PATCH v3 42/47] net/bnxt: tf_ulp: TFC support flow scale query for Thor2 Sriharsha Basavapatna
@ 2024-10-01  5:58 ` Sriharsha Basavapatna
  2024-10-01  5:58 ` [PATCH v3 45/47] net/bnxt: tf_ulp: support a few feature extensions Sriharsha Basavapatna
  2024-10-01  5:58 ` [PATCH v3 47/47] net/bnxt: tf_ulp: add stats cache for thor2 Sriharsha Basavapatna
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:58 UTC (permalink / raw)
  To: dev
  Cc: Kishore Padmanabha, Sriharsha Basavapatna, Shahaji Bhosle, Ajit Khaparde

From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>

Added truflow feature bit meson configuration parameter to enable
optional capability features of the appplication.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c    |  6 ++++-
 drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c   |  6 ++++-
 drivers/net/bnxt/tf_ulp/bnxt_ulp_utils.h | 32 ++++++++++++++++++++++++
 3 files changed, 42 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
index c591f9327c..fa7e8fe000 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
@@ -476,7 +476,11 @@ ulp_tf_cntxt_app_caps_init(struct bnxt *bp,
 					       info[i].min_flow_priority);
 		bnxt_ulp_max_flow_priority_set(ulp_ctx,
 					       info[i].max_flow_priority);
-		ulp_ctx->cfg_data->feature_bits = info[i].feature_bits;
+		/* Update the capability feature bits*/
+		if (bnxt_ulp_cap_feat_process(info[i].feature_bits,
+					      &ulp_ctx->cfg_data->feature_bits))
+			return -EINVAL;
+
 		bnxt_ulp_cntxt_ptr2_default_class_bits_set(ulp_ctx,
 							   info[i].default_class_bits);
 		bnxt_ulp_cntxt_ptr2_default_act_bits_set(ulp_ctx,
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
index 31ab61b512..cc779826a5 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
@@ -536,7 +536,11 @@ ulp_tfc_cntxt_app_caps_init(struct bnxt *bp, uint8_t app_id, uint32_t dev_id)
 					    "Socket Direct feature is enabled\n");
 			}
 		}
-		ulp_ctx->cfg_data->feature_bits = info[i].feature_bits;
+		/* Update the capability feature bits*/
+		if (bnxt_ulp_cap_feat_process(info[i].feature_bits,
+					      &ulp_ctx->cfg_data->feature_bits))
+			return -EINVAL;
+
 		bnxt_ulp_default_app_priority_set(ulp_ctx,
 						  info[i].default_priority);
 		bnxt_ulp_max_def_priority_set(ulp_ctx,
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_utils.h b/drivers/net/bnxt/tf_ulp/bnxt_ulp_utils.h
index 26087526e8..edc75da05e 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_utils.h
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_utils.h
@@ -1035,4 +1035,36 @@ bnxt_ulp_vfr_session_fid_rem(struct bnxt_ulp_context *ulp_ctx,
 	return rc;
 }
 
+static inline int32_t
+bnxt_ulp_cap_feat_process(uint64_t feat_bits, uint64_t *out_bits)
+{
+#ifdef RTE_BNXT_TF_FEAT_BITS
+	uint64_t bit = RTE_BNXT_TF_FEAT_BITS;
+#else
+	uint64_t bit = 0;
+#endif
+
+	*out_bits = 0;
+	if ((feat_bits | bit) != feat_bits) {
+		BNXT_DRV_DBG(ERR, "Invalid TF feature bit is set %" PRIu64 "\n",
+			     bit);
+		return -EINVAL;
+	}
+	if ((bit & BNXT_ULP_FEATURE_BIT_PARENT_DMAC) &&
+	    (bit & BNXT_ULP_FEATURE_BIT_PORT_DMAC)) {
+		BNXT_DRV_DBG(ERR, "Invalid both Port and Parent Mac set\n");
+		return -EINVAL;
+	}
+
+	if (bit & BNXT_ULP_FEATURE_BIT_PARENT_DMAC)
+		BNXT_DRV_DBG(ERR, "Parent Mac Address Feature is enabled\n");
+	if (bit & BNXT_ULP_FEATURE_BIT_PORT_DMAC)
+		BNXT_DRV_DBG(ERR, "Port Mac Address Feature is enabled\n");
+	if (bit & BNXT_ULP_FEATURE_BIT_MULTI_TUNNEL_FLOW)
+		BNXT_DRV_DBG(ERR, "Multi Tunnel Flow Feature is enabled\n");
+
+	*out_bits =  bit;
+	return 0;
+}
+
 #endif /* _BNXT_ULP_UTILS_H_ */
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 45/47] net/bnxt: tf_ulp: support a few feature extensions
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (31 preceding siblings ...)
  2024-10-01  5:58 ` [PATCH v3 44/47] net/bnxt: tf_ulp: enable support for truflow feature configuration Sriharsha Basavapatna
@ 2024-10-01  5:58 ` Sriharsha Basavapatna
  2024-10-01  5:58 ` [PATCH v3 47/47] net/bnxt: tf_ulp: add stats cache for thor2 Sriharsha Basavapatna
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:58 UTC (permalink / raw)
  To: dev
  Cc: Kishore Padmanabha, Shuanglin Wang, Sriharsha Basavapatna,
	Michael Baucom, Ajit Khaparde

From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>

This patch supports the following features.

add support for port table write operation
	Added support for port table write operation from the
	template so that template can write mirror id details into
	the port database.

support generic template for socket direct
	Support the socket direct feature, which is disabled by
        default. User could  enable it with meson configuration
	parameter truflow feature bit.

add support for truflow promiscuous mode
	The truflow application supports promiscuous mode to enable
	or disable receiving the packets with unknown destination
	mac addresses.

set metadata for profile tcam entry
	The metadata higher bits are currently used for profile
	tcam entry. To make better use of EM entries, it is better
	to use metadata fully instead of only the higher bits of
	the metadata.

support the group miss action
	Generic template supports the feature of setting group miss
	action with the following rte command:

	flow group 0 group_id 1 ingress set_miss_actions jump
		 group 3 / end

fix some build failures
	This change resolves a build issue seen on some OS's and
	compiler versions.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Shuanglin Wang <shuanglin.wang@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Michael Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/bnxt_ulp.h       |  31 +++
 drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c  |  27 ++-
 drivers/net/bnxt/tf_ulp/ulp_alloc_tbl.c  |   4 +
 drivers/net/bnxt/tf_ulp/ulp_def_rules.c  | 286 ++++++++++++++++++++++-
 drivers/net/bnxt/tf_ulp/ulp_mapper.c     |  43 +++-
 drivers/net/bnxt/tf_ulp/ulp_port_db.c    |  89 +++++++
 drivers/net/bnxt/tf_ulp/ulp_port_db.h    |  28 +++
 drivers/net/bnxt/tf_ulp/ulp_rte_parser.c |  17 ++
 8 files changed, 520 insertions(+), 5 deletions(-)

diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.h b/drivers/net/bnxt/tf_ulp/bnxt_ulp.h
index 758b9deb63..a35f79f167 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.h
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.h
@@ -92,9 +92,19 @@ enum bnxt_rte_flow_action_type {
 	BNXT_RTE_FLOW_ACTION_TYPE_LAST
 };
 
+#define BNXT_ULP_MAX_GROUP_CNT		8
+struct bnxt_ulp_grp_rule_info {
+	uint32_t			group_id;
+	uint32_t			flow_id;
+	uint8_t				dir;
+	uint8_t				valid;
+};
+
 struct bnxt_ulp_df_rule_info {
 	uint32_t			def_port_flow_id;
+	uint32_t			promisc_flow_id;
 	uint8_t				valid;
+	struct bnxt_ulp_grp_rule_info	grp_df_rule[BNXT_ULP_MAX_GROUP_CNT];
 };
 
 struct bnxt_ulp_vfr_rule_info {
@@ -291,4 +301,25 @@ bnxt_ulp_cntxt_entry_acquire(void *arg);
 void
 bnxt_ulp_cntxt_entry_release(void);
 
+int32_t
+bnxt_ulp_promisc_mode_set(struct bnxt *bp, uint8_t enable);
+
+int32_t
+bnxt_ulp_set_prio_attribute(struct ulp_rte_parser_params *params,
+			    const struct rte_flow_attr *attr);
+
+void
+bnxt_ulp_set_dir_attributes(struct ulp_rte_parser_params *params,
+			    const struct rte_flow_attr *attr);
+
+void
+bnxt_ulp_init_parser_cf_defaults(struct ulp_rte_parser_params *params,
+				 uint16_t port_id);
+
+int32_t
+bnxt_ulp_grp_miss_act_set(struct rte_eth_dev *dev,
+			  const struct rte_flow_attr *attr,
+			  const struct rte_flow_action actions[],
+			  uint32_t *flow_id);
+
 #endif /* _BNXT_ULP_H_ */
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c
index eea05e129a..334eda99ce 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c
@@ -66,7 +66,7 @@ bnxt_ulp_flow_validate_args(const struct rte_flow_attr *attr,
 	return BNXT_TF_RC_SUCCESS;
 }
 
-static inline void
+void
 bnxt_ulp_set_dir_attributes(struct ulp_rte_parser_params *params,
 			    const struct rte_flow_attr *attr)
 {
@@ -86,7 +86,7 @@ bnxt_ulp_set_dir_attributes(struct ulp_rte_parser_params *params,
 	}
 }
 
-static int32_t
+int32_t
 bnxt_ulp_set_prio_attribute(struct ulp_rte_parser_params *params,
 			    const struct rte_flow_attr *attr)
 {
@@ -117,7 +117,7 @@ bnxt_ulp_set_prio_attribute(struct ulp_rte_parser_params *params,
 	return 0;
 }
 
-static inline void
+void
 bnxt_ulp_init_parser_cf_defaults(struct ulp_rte_parser_params *params,
 				 uint16_t port_id)
 {
@@ -268,6 +268,26 @@ bnxt_ulp_init_mapper_params(struct bnxt_ulp_mapper_parms *mparms,
 		ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_SOCKET_DIRECT_VPORT,
 				    (vport == 1) ? 2 : 1);
 	}
+
+	/* Update the socket direct svif when socket_direct feature enabled. */
+	if (ULP_BITMAP_ISSET(bnxt_ulp_feature_bits_get(params->ulp_ctx),
+			     BNXT_ULP_FEATURE_BIT_SOCKET_DIRECT)) {
+		enum bnxt_ulp_intf_type intf_type;
+		/* For ingress flow on trusted_vf port */
+		intf_type = bnxt_pmd_get_interface_type(params->port_id);
+		if (intf_type == BNXT_ULP_INTF_TYPE_TRUSTED_VF) {
+			uint16_t svif;
+			/* Get the socket direct svif of the given dev port */
+			if (unlikely(ulp_port_db_dev_port_socket_direct_svif_get(params->ulp_ctx,
+										 params->port_id,
+										 &svif))) {
+				BNXT_DRV_DBG(ERR, "Invalid port id %u\n",
+					     params->port_id);
+				return;
+			}
+			ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_SOCKET_DIRECT_SVIF, svif);
+		}
+	}
 }
 
 /* Function to create the rte flow. */
@@ -305,6 +325,7 @@ bnxt_ulp_flow_create(struct rte_eth_dev *dev,
 	/* Initialize the parser params */
 	memset(&params, 0, sizeof(struct ulp_rte_parser_params));
 	params.ulp_ctx = ulp_ctx;
+	params.port_id = dev->data->port_id;
 
 	if (unlikely(bnxt_ulp_cntxt_app_id_get(params.ulp_ctx, &params.app_id))) {
 		BNXT_DRV_DBG(ERR, "failed to get the app id\n");
diff --git a/drivers/net/bnxt/tf_ulp/ulp_alloc_tbl.c b/drivers/net/bnxt/tf_ulp/ulp_alloc_tbl.c
index 6401a7a80f..f09d072ef3 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_alloc_tbl.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_alloc_tbl.c
@@ -181,6 +181,8 @@ ulp_allocator_tbl_list_alloc(struct bnxt_ulp_mapper_data *mapper_data,
 		BNXT_DRV_DBG(ERR, "unable to alloc index %x\n", idx);
 		return -ENOMEM;
 	}
+	/* Not using zero index */
+	*alloc_id += 1;
 	return 0;
 }
 
@@ -210,6 +212,8 @@ ulp_allocator_tbl_list_free(struct bnxt_ulp_mapper_data *mapper_data,
 		BNXT_DRV_DBG(ERR, "invalid table index %x\n", idx);
 		return -EINVAL;
 	}
+	/* not using zero index */
+	index -= 1;
 	if (index < 0 || index > entry->num_entries) {
 		BNXT_DRV_DBG(ERR, "invalid alloc index %x\n", index);
 		return -EINVAL;
diff --git a/drivers/net/bnxt/tf_ulp/ulp_def_rules.c b/drivers/net/bnxt/tf_ulp/ulp_def_rules.c
index 17d2daeea3..b7a893a04f 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_def_rules.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_def_rules.c
@@ -12,7 +12,7 @@
 #include "ulp_port_db.h"
 #include "ulp_flow_db.h"
 #include "ulp_mapper.h"
-
+#include "ulp_rte_parser.h"
 static void
 ulp_l2_custom_tunnel_id_update(struct bnxt *bp,
 			       struct bnxt_ulp_mapper_parms *params);
@@ -485,6 +485,24 @@ ulp_default_flow_destroy(struct rte_eth_dev *eth_dev, uint32_t flow_id)
 	return rc;
 }
 
+static void
+bnxt_ulp_destroy_group_rules(struct bnxt *bp, uint16_t port_id)
+{
+	struct bnxt_ulp_grp_rule_info *info;
+	struct bnxt_ulp_grp_rule_info *grp_rules;
+	uint16_t idx;
+
+	grp_rules = bp->ulp_ctx->cfg_data->df_rule_info[port_id].grp_df_rule;
+
+	for (idx = 0; idx < BNXT_ULP_MAX_GROUP_CNT; idx++) {
+		info = &grp_rules[idx];
+		if (!info->valid)
+			continue;
+		ulp_default_flow_destroy(bp->eth_dev, info->flow_id);
+		memset(info, 0, sizeof(struct bnxt_ulp_grp_rule_info));
+	}
+}
+
 void
 bnxt_ulp_destroy_df_rules(struct bnxt *bp, bool global)
 {
@@ -505,8 +523,14 @@ bnxt_ulp_destroy_df_rules(struct bnxt *bp, bool global)
 		if (!info->valid)
 			return;
 
+		/* Delete the group default rules */
+		bnxt_ulp_destroy_group_rules(bp, port_id);
+
 		ulp_default_flow_destroy(bp->eth_dev,
 					 info->def_port_flow_id);
+		if (info->promisc_flow_id)
+			ulp_default_flow_destroy(bp->eth_dev,
+						 info->promisc_flow_id);
 		memset(info, 0, sizeof(struct bnxt_ulp_df_rule_info));
 		return;
 	}
@@ -517,8 +541,14 @@ bnxt_ulp_destroy_df_rules(struct bnxt *bp, bool global)
 		if (!info->valid)
 			continue;
 
+		/* Delete the group default rules */
+		bnxt_ulp_destroy_group_rules(bp, port_id);
+
 		ulp_default_flow_destroy(bp->eth_dev,
 					 info->def_port_flow_id);
+		if (info->promisc_flow_id)
+			ulp_default_flow_destroy(bp->eth_dev,
+						 info->promisc_flow_id);
 		memset(info, 0, sizeof(struct bnxt_ulp_df_rule_info));
 	}
 }
@@ -552,6 +582,7 @@ bnxt_create_port_app_df_rule(struct bnxt *bp, uint8_t flow_type,
 int32_t
 bnxt_ulp_create_df_rules(struct bnxt *bp)
 {
+	struct rte_eth_dev *dev = bp->eth_dev;
 	struct bnxt_ulp_df_rule_info *info;
 	uint16_t port_id;
 	int rc = 0;
@@ -581,6 +612,9 @@ bnxt_ulp_create_df_rules(struct bnxt *bp)
 	if (rc || BNXT_TESTPMD_EN(bp))
 		bp->tx_cfa_action = 0;
 
+	/* set or reset the promiscuous rule */
+	bnxt_ulp_promisc_mode_set(bp, dev->data->promiscuous);
+
 	info->valid = true;
 	return 0;
 }
@@ -709,3 +743,253 @@ ulp_l2_custom_tunnel_id_update(struct bnxt *bp,
 				    ULP_WP_SYM_TUN_HDR_TYPE_UPAR2);
 	}
 }
+
+/*
+ * Function to execute a specific template, this does not create flow id
+ *
+ * bp [in] Ptr to bnxt
+ * param_list [in] Ptr to a list of parameters (Currently, only DPDK port_id).
+ * ulp_class_tid [in] Class template ID number.
+ *
+ * Returns 0 on success or negative number on failure.
+ */
+static int32_t
+ulp_flow_template_process(struct bnxt *bp,
+			  struct ulp_tlv_param *param_list,
+			  uint32_t ulp_class_tid,
+			  uint16_t port_id,
+			  uint32_t flow_id)
+{
+	struct ulp_rte_hdr_field	hdr_field[BNXT_ULP_PROTO_HDR_MAX];
+	uint64_t			comp_fld[BNXT_ULP_CF_IDX_LAST];
+	struct bnxt_ulp_mapper_parms mapper_params = { 0 };
+	struct ulp_rte_act_prop		act_prop;
+	struct ulp_rte_act_bitmap	act = { 0 };
+	struct bnxt_ulp_context		*ulp_ctx;
+	uint32_t type;
+	int rc = 0;
+
+	memset(&mapper_params, 0, sizeof(mapper_params));
+	memset(hdr_field, 0, sizeof(hdr_field));
+	memset(comp_fld, 0, sizeof(comp_fld));
+	memset(&act_prop, 0, sizeof(act_prop));
+
+	mapper_params.hdr_field = hdr_field;
+	mapper_params.act_bitmap = &act;
+	mapper_params.act_prop = &act_prop;
+	mapper_params.comp_fld = comp_fld;
+	mapper_params.class_tid = ulp_class_tid;
+	mapper_params.port_id = port_id;
+
+	ulp_ctx = bp->ulp_ctx;
+	if (!ulp_ctx) {
+		BNXT_DRV_DBG(ERR,
+			     "ULP is not init'ed. Fail to create dflt flow.\n");
+		return -EINVAL;
+	}
+
+	type = param_list->type;
+	while (type != BNXT_ULP_DF_PARAM_TYPE_LAST) {
+		if (ulp_def_handler_tbl[type].vfr_func) {
+			rc = ulp_def_handler_tbl[type].vfr_func(ulp_ctx,
+								param_list,
+								&mapper_params);
+			if (rc) {
+				BNXT_DRV_DBG(ERR,
+					     "Failed to create default flow\n");
+				return rc;
+			}
+		}
+
+		param_list++;
+		type = param_list->type;
+	}
+	/* Protect flow creation */
+	if (bnxt_ulp_cntxt_acquire_fdb_lock(ulp_ctx)) {
+		BNXT_DRV_DBG(ERR, "Flow db lock acquire failed\n");
+		return -EINVAL;
+	}
+
+	mapper_params.flow_id = flow_id;
+	rc = ulp_mapper_flow_create(ulp_ctx, &mapper_params,
+				    NULL);
+	bnxt_ulp_cntxt_release_fdb_lock(ulp_ctx);
+	return rc;
+}
+
+int32_t
+bnxt_ulp_promisc_mode_set(struct bnxt *bp, uint8_t enable)
+{
+	uint32_t flow_type;
+	struct bnxt_ulp_df_rule_info *info;
+	uint16_t port_id;
+	int rc = 0;
+
+	if (!BNXT_TRUFLOW_EN(bp) || BNXT_ETH_DEV_IS_REPRESENTOR(bp->eth_dev) ||
+	    !bp->ulp_ctx)
+		return rc;
+
+	if (!BNXT_CHIP_P5(bp))
+		return rc;
+
+	port_id = bp->eth_dev->data->port_id;
+	info = &bp->ulp_ctx->cfg_data->df_rule_info[port_id];
+
+	/* create the promiscuous rule */
+	if (enable && !info->promisc_flow_id) {
+		flow_type = BNXT_ULP_TEMPLATE_PROMISCUOUS_ENABLE;
+		rc = bnxt_create_port_app_df_rule(bp, flow_type,
+						  &info->promisc_flow_id);
+		BNXT_DRV_DBG(DEBUG, "enable ulp promisc mode on port %u:%u\n",
+			     port_id, info->promisc_flow_id);
+	} else if (!enable && info->promisc_flow_id) {
+		struct ulp_tlv_param param_list[] = {
+			{
+				.type = BNXT_ULP_DF_PARAM_TYPE_DEV_PORT_ID,
+				.length = 2,
+				.value = {(port_id >> 8) & 0xff, port_id & 0xff}
+			},
+			{
+				.type = BNXT_ULP_DF_PARAM_TYPE_LAST,
+				.length = 0,
+				.value = {0}
+			}
+		};
+
+		flow_type = BNXT_ULP_TEMPLATE_PROMISCUOUS_DISABLE;
+		if (ulp_flow_template_process(bp, param_list, flow_type,
+					      port_id, 0))
+			return -EIO;
+
+		rc = ulp_default_flow_destroy(bp->eth_dev,
+					      info->promisc_flow_id);
+		BNXT_DRV_DBG(DEBUG, "disable ulp promisc mode on port %u:%u\n",
+			     port_id, info->promisc_flow_id);
+		info->promisc_flow_id = 0;
+	}
+	return rc;
+}
+
+/* Function to create the rte flow for miss action. */
+int32_t
+bnxt_ulp_grp_miss_act_set(struct rte_eth_dev *dev,
+			  const struct rte_flow_attr *attr,
+			  const struct rte_flow_action actions[],
+			  uint32_t *flow_id)
+{
+	struct bnxt_ulp_mapper_parms mparms = { 0 };
+	struct ulp_rte_parser_params params;
+	struct bnxt_ulp_context *ulp_ctx;
+	int ret = BNXT_TF_RC_ERROR;
+	uint16_t func_id;
+	uint32_t fid;
+	uint32_t group_id;
+
+	ulp_ctx = bnxt_ulp_eth_dev_ptr2_cntxt_get(dev);
+	if (unlikely(!ulp_ctx)) {
+		BNXT_DRV_DBG(ERR, "ULP context is not initialized\n");
+		goto flow_error;
+	}
+
+	/* Initialize the parser params */
+	memset(&params, 0, sizeof(struct ulp_rte_parser_params));
+	params.ulp_ctx = ulp_ctx;
+	params.port_id = dev->data->port_id;
+	/* classid is the group action template*/
+	params.class_id = BNXT_ULP_TEMPLATE_GROUP_MISS_ACTION;
+
+	if (unlikely(bnxt_ulp_cntxt_app_id_get(params.ulp_ctx, &params.app_id))) {
+		BNXT_DRV_DBG(ERR, "failed to get the app id\n");
+		goto flow_error;
+	}
+
+	/* Set the flow attributes */
+	bnxt_ulp_set_dir_attributes(&params, attr);
+
+	if (unlikely(bnxt_ulp_set_prio_attribute(&params, attr)))
+		goto flow_error;
+
+	bnxt_ulp_init_parser_cf_defaults(&params, params.port_id);
+
+	/* Get the function id */
+	if (unlikely(ulp_port_db_port_func_id_get(ulp_ctx,
+						  params.port_id,
+						  &func_id))) {
+		BNXT_DRV_DBG(ERR, "conversion of port to func id failed\n");
+		goto flow_error;
+	}
+
+	/* Protect flow creation */
+	if (unlikely(bnxt_ulp_cntxt_acquire_fdb_lock(ulp_ctx))) {
+		BNXT_DRV_DBG(ERR, "Flow db lock acquire failed\n");
+		goto flow_error;
+	}
+
+	/* Allocate a Flow ID for attaching all resources for the flow to.
+	 * Once allocated, all errors have to walk the list of resources and
+	 * free each of them.
+	 */
+	ret = ulp_flow_db_fid_alloc(ulp_ctx, BNXT_ULP_FDB_TYPE_DEFAULT,
+				   func_id, &fid);
+	if (unlikely(ret)) {
+		BNXT_DRV_DBG(ERR, "Unable to allocate flow table entry\n");
+		goto release_lock;
+	}
+
+	/* Update the implied SVIF */
+	ulp_rte_parser_implicit_match_port_process(&params);
+
+	/* Parse the rte flow action */
+	ret = bnxt_ulp_rte_parser_act_parse(actions, &params);
+	if (unlikely(ret != BNXT_TF_RC_SUCCESS))
+		goto free_fid;
+
+	/* Verify the jump target group id */
+	if (ULP_BITMAP_ISSET(params.act_bitmap.bits, BNXT_ULP_ACT_BIT_JUMP)) {
+		memcpy(&group_id,
+		       &params.act_prop.act_details[BNXT_ULP_ACT_PROP_IDX_JUMP],
+		       BNXT_ULP_ACT_PROP_SZ_JUMP);
+		if (rte_cpu_to_be_32(group_id) == attr->group) {
+			BNXT_DRV_DBG(ERR, "Jump action cannot jump to its own group.\n");
+			ret = BNXT_TF_RC_ERROR;
+			goto free_fid;
+		}
+	}
+
+	mparms.flow_id = fid;
+	mparms.func_id = func_id;
+	mparms.port_id = params.port_id;
+
+	/* Perform the rte flow post process */
+	bnxt_ulp_rte_parser_post_process(&params);
+
+#ifdef	RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
+#ifdef	RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_PARSER
+	/* Dump the rte flow action */
+	ulp_parser_act_info_dump(&params);
+#endif
+#endif
+
+	ret = ulp_matcher_action_match(&params, &params.act_tmpl);
+	if (unlikely(ret != BNXT_TF_RC_SUCCESS))
+		goto free_fid;
+
+	bnxt_ulp_init_mapper_params(&mparms, &params,
+				    BNXT_ULP_FDB_TYPE_DEFAULT);
+	/* Call the ulp mapper to create the flow in the hardware. */
+	ret = ulp_mapper_flow_create(ulp_ctx, &mparms, NULL);
+	if (unlikely(ret))
+		goto free_fid;
+
+	bnxt_ulp_cntxt_release_fdb_lock(ulp_ctx);
+
+	*flow_id = fid;
+	return 0;
+
+free_fid:
+	ulp_flow_db_fid_free(ulp_ctx, BNXT_ULP_FDB_TYPE_DEFAULT, fid);
+release_lock:
+	bnxt_ulp_cntxt_release_fdb_lock(ulp_ctx);
+flow_error:
+	return ret;
+}
diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.c b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
index c595e7cfc3..721e8f4992 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
@@ -858,6 +858,37 @@ ulp_mapper_field_port_db_process(struct bnxt_ulp_mapper_parms *parms,
 	return 0;
 }
 
+static int32_t
+ulp_mapper_field_port_db_write(struct bnxt_ulp_mapper_parms *parms,
+			       uint32_t port_id,
+			       uint16_t idx,
+			       uint8_t *val,
+			       uint32_t length)
+{
+	enum bnxt_ulp_port_table port_data = idx;
+	uint32_t val32;
+
+	switch (port_data) {
+	case BNXT_ULP_PORT_TABLE_PHY_PORT_MIRROR_ID:
+		if (ULP_BITS_2_BYTE(length) > sizeof(val32)) {
+			BNXT_DRV_DBG(ERR, "Invalid data length %u\n", length);
+			return -EINVAL;
+		}
+		memcpy(&val32, val, ULP_BITS_2_BYTE(length));
+		if (unlikely(ulp_port_db_port_table_mirror_set(parms->ulp_ctx,
+							       port_id,
+							       val32))) {
+			BNXT_DRV_DBG(ERR, "Invalid port id %u\n", port_id);
+			return -EINVAL;
+		}
+		break;
+	default:
+		BNXT_DRV_DBG(ERR, "Invalid port_data %d\n", port_data);
+		return -EINVAL;
+	}
+	return 0;
+}
+
 static int32_t
 ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 			     enum bnxt_ulp_field_src field_src,
@@ -3569,6 +3600,10 @@ ulp_mapper_func_info_process(struct bnxt_ulp_mapper_parms *parms,
 		process_src1 = 1;
 	case BNXT_ULP_FUNC_OPC_COND_LIST:
 		break;
+	case BNXT_ULP_FUNC_OPC_PORT_TABLE:
+		process_src1 = 1;
+		process_src2 = 1;
+		break;
 	default:
 		break;
 	}
@@ -3680,6 +3715,12 @@ ulp_mapper_func_info_process(struct bnxt_ulp_mapper_parms *parms,
 						      &res, sizeof(res)))
 			return -EINVAL;
 		break;
+	case BNXT_ULP_FUNC_OPC_PORT_TABLE:
+		rc = ulp_mapper_field_port_db_write(parms, res1,
+						    func_info->func_dst_opr,
+						    (uint8_t *)&res2,
+						    func_info->func_oper_size);
+		return rc;
 	default:
 		BNXT_DRV_DBG(ERR, "invalid func code %u\n",
 			     func_info->func_opc);
@@ -3842,7 +3883,7 @@ ulp_mapper_cond_execute_list_process(struct bnxt_ulp_mapper_parms *parms,
 {
 	struct bnxt_ulp_mapper_cond_list_info *execute_info;
 	struct bnxt_ulp_mapper_cond_list_info *oper;
-	int32_t cond_list_res, cond_res = 0, rc = 0;
+	int32_t cond_list_res = 0, cond_res = 0, rc = 0;
 	uint32_t idx;
 
 	/* set the execute result to true */
diff --git a/drivers/net/bnxt/tf_ulp/ulp_port_db.c b/drivers/net/bnxt/tf_ulp/ulp_port_db.c
index 384b89da46..6907771725 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_port_db.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_port_db.c
@@ -513,6 +513,49 @@ ulp_port_db_phy_port_svif_get(struct bnxt_ulp_context *ulp_ctxt,
 	return 0;
 }
 
+/*
+ * Api to get the socket direct svif for a given device port.
+ *
+ * ulp_ctxt [in] Ptr to ulp context
+ * port_id [in] device port id
+ * svif [out] the socket direct svif of the given device index
+ *
+ * Returns 0 on success or negative number on failure.
+ */
+int32_t
+ulp_port_db_dev_port_socket_direct_svif_get(struct bnxt_ulp_context *ulp_ctxt,
+					    uint32_t port_id,
+					    uint16_t *svif)
+{
+	struct bnxt_ulp_port_db *port_db;
+	uint32_t ifindex;
+	uint16_t phy_port_id, func_id;
+
+	port_db = bnxt_ulp_cntxt_ptr2_port_db_get(ulp_ctxt);
+
+	if (!port_db || port_id >= RTE_MAX_ETHPORTS) {
+		BNXT_DRV_DBG(ERR, "Invalid Arguments\n");
+		return -EINVAL;
+	}
+	if (!port_db->dev_port_list[port_id])
+		return -ENOENT;
+
+	/* Get physical port id */
+	ifindex = port_db->dev_port_list[port_id];
+	func_id = port_db->ulp_intf_list[ifindex].drv_func_id;
+	phy_port_id = port_db->ulp_func_id_tbl[func_id].phy_port_id;
+
+	/* Calculate physical port id for socket direct port */
+	phy_port_id = phy_port_id ? 0 : 1;
+	if (phy_port_id >= port_db->phy_port_cnt) {
+		BNXT_DRV_DBG(ERR, "Invalid Arguments\n");
+		return -EINVAL;
+	}
+
+	*svif = port_db->phy_port_list[phy_port_id].port_svif;
+	return 0;
+}
+
 /*
  * Api to get the port type for a given ulp ifindex.
  *
@@ -812,3 +855,49 @@ ulp_port_db_port_table_scope_get(struct bnxt_ulp_context *ulp_ctxt,
 	}
 	return -EINVAL;
 }
+
+/* Api to get the PF Mirror Id for a given port id
+ *
+ * ulp_ctxt [in] Ptr to ulp context
+ * port_id [in] dpdk port id
+ * mirror id [in] mirror id
+ *
+ * Returns 0 on success or negative number on failure.
+ */
+int32_t
+ulp_port_db_port_table_mirror_set(struct bnxt_ulp_context *ulp_ctxt,
+				  uint16_t port_id, uint32_t mirror_id)
+{
+	struct ulp_phy_port_info *port_data;
+	struct bnxt_ulp_port_db *port_db;
+	struct ulp_interface_info *intf;
+	struct ulp_func_if_info *func;
+	uint32_t ifindex;
+
+	port_db = bnxt_ulp_cntxt_ptr2_port_db_get(ulp_ctxt);
+	if (!port_db) {
+		BNXT_DRV_DBG(ERR, "Invalid Arguments\n");
+		return -EINVAL;
+	}
+
+	if (ulp_port_db_dev_port_to_ulp_index(ulp_ctxt, port_id, &ifindex)) {
+		BNXT_DRV_DBG(ERR, "Invalid port id %u\n", port_id);
+		return -EINVAL;
+	}
+
+	intf = &port_db->ulp_intf_list[ifindex];
+	func = &port_db->ulp_func_id_tbl[intf->drv_func_id];
+	if (!func->func_valid) {
+		BNXT_DRV_DBG(ERR, "Invalid func for port id %u\n", port_id);
+		return -EINVAL;
+	}
+
+	port_data = &port_db->phy_port_list[func->phy_port_id];
+	if (!port_data->port_valid) {
+		BNXT_DRV_DBG(ERR, "Invalid phy port\n");
+		return -EINVAL;
+	}
+
+	port_data->port_mirror_id = mirror_id;
+	return 0;
+}
diff --git a/drivers/net/bnxt/tf_ulp/ulp_port_db.h b/drivers/net/bnxt/tf_ulp/ulp_port_db.h
index ef164f1e9b..8a2c08fe67 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_port_db.h
+++ b/drivers/net/bnxt/tf_ulp/ulp_port_db.h
@@ -70,6 +70,7 @@ struct ulp_phy_port_info {
 	uint16_t	port_spif;
 	uint16_t	port_parif;
 	uint16_t	port_vport;
+	uint32_t	port_mirror_id;
 };
 
 /* Structure for the Port database */
@@ -240,6 +241,20 @@ ulp_port_db_phy_port_svif_get(struct bnxt_ulp_context *ulp_ctxt,
 			      uint32_t phy_port,
 			      uint16_t *svif);
 
+/*
+ * Api to get the socket direct svif for a given device port.
+ *
+ * ulp_ctxt [in] Ptr to ulp context
+ * port_id [in] device port id
+ * svif [out] the socket direct svif of the given device index
+ *
+ * Returns 0 on success or negative number on failure.
+ */
+int32_t
+ulp_port_db_dev_port_socket_direct_svif_get(struct bnxt_ulp_context *ulp_ctxt,
+					    uint32_t port_id,
+					    uint16_t *svif);
+
 /*
  * Api to get the port type for a given ulp ifindex.
  *
@@ -379,4 +394,17 @@ ulp_port_db_port_vf_fid_get(struct bnxt_ulp_context *ulp_ctxt,
 int32_t
 ulp_port_db_port_table_scope_get(struct bnxt_ulp_context *ulp_ctxt,
 				 uint16_t port_id, uint8_t **tsid);
+
+/* Api to get the PF Mirror Id for a given port id
+ *
+ * ulp_ctxt [in] Ptr to ulp context
+ * port_id [in] dpdk port id
+ * mirror id [in] mirror id
+ *
+ * Returns 0 on success or negative number on failure.
+ */
+int32_t
+ulp_port_db_port_table_mirror_set(struct bnxt_ulp_context *ulp_ctxt,
+				  uint16_t port_id, uint32_t mirror_id);
+
 #endif /* _ULP_PORT_DB_H_ */
diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
index dbd8a118df..dd5985cd7b 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
@@ -307,6 +307,14 @@ bnxt_ulp_comp_fld_intf_update(struct ulp_rte_parser_params *params)
 					    BNXT_ULP_CF_IDX_VF_FUNC_PARIF,
 					    parif);
 
+			/* Set VF func SVIF */
+			if (ulp_port_db_svif_get(params->ulp_ctx, ifindex,
+						 BNXT_ULP_CF_IDX_VF_FUNC_SVIF, &svif)) {
+				BNXT_DRV_DBG(ERR, "ParseErr:ifindex is not valid\n");
+				return;
+			}
+			ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_VF_FUNC_SVIF,
+					    svif);
 		} else {
 			/* Set DRV func PARIF */
 			if (ulp_port_db_parif_get(params->ulp_ctx, ifindex,
@@ -319,6 +327,15 @@ bnxt_ulp_comp_fld_intf_update(struct ulp_rte_parser_params *params)
 			ULP_COMP_FLD_IDX_WR(params,
 					    BNXT_ULP_CF_IDX_DRV_FUNC_PARIF,
 					    parif);
+
+			/* Set DRV SVIF */
+			if (ulp_port_db_svif_get(params->ulp_ctx, ifindex,
+						 BNXT_ULP_DRV_FUNC_SVIF, &svif)) {
+				BNXT_DRV_DBG(ERR, "ParseErr:ifindex is not valid\n");
+				return;
+			}
+			ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_DRV_FUNC_SVIF,
+					    svif);
 		}
 		if (mtype == BNXT_ULP_INTF_TYPE_PF) {
 			ULP_COMP_FLD_IDX_WR(params,
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 47/47] net/bnxt: tf_ulp: add stats cache for thor2
  2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
                   ` (32 preceding siblings ...)
  2024-10-01  5:58 ` [PATCH v3 45/47] net/bnxt: tf_ulp: support a few feature extensions Sriharsha Basavapatna
@ 2024-10-01  5:58 ` Sriharsha Basavapatna
  33 siblings, 0 replies; 35+ messages in thread
From: Sriharsha Basavapatna @ 2024-10-01  5:58 UTC (permalink / raw)
  To: dev
  Cc: Peter Spreadborough, Sriharsha Basavapatna, Jay Ding,
	Shahaji Bhosle, Ajit Khaparde

From: Peter Spreadborough <peter.spreadborough@broadcom.com>

This change adds a stats cache for Thor2 flows using counters.
Flow stats will be harvested periodically in the background
and stats reads by the application will be returned stats from
the cache and not by initiating a read from HW.

This change also adds read-clear functionality for counter resets
and restructures the stats collection while loop to
guarantee full coverage of entries added or removed during the
collection period.

Signed-off-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Jay Ding <jay.ding@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/bnxt_ulp.h       |   2 +
 drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c  |  16 +-
 drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c   |  10 +
 drivers/net/bnxt/tf_ulp/bnxt_ulp_utils.h |  26 ++
 drivers/net/bnxt/tf_ulp/meson.build      |   4 +-
 drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c |  13 +
 drivers/net/bnxt/tf_ulp/ulp_flow_db.c    |   4 +
 drivers/net/bnxt/tf_ulp/ulp_mapper.c     |  73 ++++
 drivers/net/bnxt/tf_ulp/ulp_sc_mgr.c     | 529 +++++++++++++++++++++++
 drivers/net/bnxt/tf_ulp/ulp_sc_mgr.h     | 142 ++++++
 drivers/net/bnxt/tf_ulp/ulp_sc_mgr_tfc.c |  60 +++
 11 files changed, 877 insertions(+), 2 deletions(-)
 create mode 100644 drivers/net/bnxt/tf_ulp/ulp_sc_mgr.c
 create mode 100644 drivers/net/bnxt/tf_ulp/ulp_sc_mgr.h
 create mode 100644 drivers/net/bnxt/tf_ulp/ulp_sc_mgr_tfc.c

diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.h b/drivers/net/bnxt/tf_ulp/bnxt_ulp.h
index a35f79f167..83fb205f68 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.h
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.h
@@ -162,6 +162,8 @@ struct bnxt_ulp_data {
 	uint64_t			feature_bits;
 	uint64_t			default_class_bits;
 	uint64_t			default_act_bits;
+	struct ulp_fc_tfc_stats_cache_entry *stats_cache;
+	struct bnxt_ulp_sc_info		*sc_info;
 };
 
 enum bnxt_ulp_tfo_type {
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c
index 334eda99ce..2c22582e1c 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c
@@ -670,6 +670,7 @@ bnxt_ulp_flow_query(struct rte_eth_dev *eth_dev,
 	struct bnxt_ulp_context *ulp_ctx;
 	struct rte_flow_action_rss *rss_conf;
 	struct rte_flow_query_count *count;
+	enum bnxt_ulp_device_id  dev_id;
 	uint32_t flow_id;
 
 	ulp_ctx = bnxt_ulp_eth_dev_ptr2_cntxt_get(eth_dev);
@@ -681,6 +682,15 @@ bnxt_ulp_flow_query(struct rte_eth_dev *eth_dev,
 		return -EINVAL;
 	}
 
+	rc = bnxt_ulp_cntxt_dev_id_get(ulp_ctx, &dev_id);
+	if (rc) {
+		BNXT_DRV_DBG(ERR, "Can't identify the device\n");
+		rte_flow_error_set(error, EINVAL,
+				   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
+				   "Failed to query flow.");
+		return -EINVAL;
+	}
+
 	flow_id = (uint32_t)(uintptr_t)flow;
 
 	switch (action->type) {
@@ -696,7 +706,11 @@ bnxt_ulp_flow_query(struct rte_eth_dev *eth_dev,
 		break;
 	case RTE_FLOW_ACTION_TYPE_COUNT:
 		count = data;
-		rc = ulp_fc_mgr_query_count_get(ulp_ctx, flow_id, count);
+		if (dev_id == BNXT_ULP_DEVICE_ID_THOR2)
+			rc = ulp_sc_mgr_query_count_get(ulp_ctx, flow_id, count);
+		else
+			rc = ulp_fc_mgr_query_count_get(ulp_ctx, flow_id, count);
+
 		if (unlikely(rc)) {
 			rte_flow_error_set(error, EINVAL,
 					   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
index cc779826a5..df4d2a0220 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
@@ -26,6 +26,7 @@
 #include "ulp_template_struct.h"
 #include "ulp_mark_mgr.h"
 #include "ulp_fc_mgr.h"
+#include "ulp_sc_mgr.h"
 #include "ulp_flow_db.h"
 #include "ulp_mapper.h"
 #include "ulp_matcher.h"
@@ -887,6 +888,9 @@ ulp_tfc_deinit(struct bnxt *bp,
 			BNXT_DRV_DBG(ERR, "Failed to close HA (%d)\n", rc);
 	}
 
+	/* Delete the Stats Counter Manager */
+	ulp_sc_mgr_deinit(bp->ulp_ctx);
+
 	/* cleanup the flow database */
 	ulp_flow_db_deinit(bp->ulp_ctx);
 
@@ -1043,6 +1047,12 @@ ulp_tfc_init(struct bnxt *bp,
 		goto jump_to_error;
 	}
 
+	rc = ulp_sc_mgr_init(bp->ulp_ctx);
+	if (rc) {
+		BNXT_DRV_DBG(ERR, "Failed to initialize ulp stats cache mgr\n");
+		goto jump_to_error;
+	}
+
 	rc = bnxt_ulp_cntxt_dev_id_get(bp->ulp_ctx, &ulp_dev_id);
 	if (rc) {
 		BNXT_DRV_DBG(ERR, "Unable to get device id from ulp.\n");
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_utils.h b/drivers/net/bnxt/tf_ulp/bnxt_ulp_utils.h
index edc75da05e..d027d62802 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_utils.h
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_utils.h
@@ -25,6 +25,7 @@
 #include "ulp_template_struct.h"
 #include "ulp_mark_mgr.h"
 #include "ulp_fc_mgr.h"
+#include "ulp_sc_mgr.h"
 #include "ulp_flow_db.h"
 #include "ulp_mapper.h"
 #include "ulp_matcher.h"
@@ -739,6 +740,31 @@ bnxt_ulp_cntxt_ptr2_fc_info_get(struct bnxt_ulp_context *ulp_ctx)
 	return ulp_ctx->cfg_data->fc_info;
 }
 
+/* Function to set the flow counter info into the context */
+static inline int32_t
+bnxt_ulp_cntxt_ptr2_sc_info_set(struct bnxt_ulp_context *ulp_ctx,
+				struct bnxt_ulp_sc_info *ulp_sc_info)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data)) {
+		BNXT_DRV_DBG(ERR, "Invalid ulp context data\n");
+		return -EINVAL;
+	}
+
+	ulp_ctx->cfg_data->sc_info = ulp_sc_info;
+
+	return 0;
+}
+
+/* Function to retrieve the flow counter info from the context. */
+static inline struct bnxt_ulp_sc_info *
+bnxt_ulp_cntxt_ptr2_sc_info_get(struct bnxt_ulp_context *ulp_ctx)
+{
+	if (unlikely(!ulp_ctx || !ulp_ctx->cfg_data))
+		return NULL;
+
+	return ulp_ctx->cfg_data->sc_info;
+}
+
 /* Function to get the ulp flags from the ulp context. */
 static inline int32_t
 bnxt_ulp_cntxt_ptr2_ulp_flags_get(struct bnxt_ulp_context *ulp_ctx,
diff --git a/drivers/net/bnxt/tf_ulp/meson.build b/drivers/net/bnxt/tf_ulp/meson.build
index e19d51ee01..db6f65539d 100644
--- a/drivers/net/bnxt/tf_ulp/meson.build
+++ b/drivers/net/bnxt/tf_ulp/meson.build
@@ -31,6 +31,8 @@ sources += files(
 	'bnxt_ulp_tfc.c',
 	'ulp_fc_mgr_tfc.c',
 	'ulp_fc_mgr_tf.c',
-	'ulp_alloc_tbl.c')
+	'ulp_alloc_tbl.c',
+	'ulp_sc_mgr.c',
+	'ulp_sc_mgr_tfc.c')
 
 subdir('generic_templates')
diff --git a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c
index 4a93dd1a33..e73fdcd1c7 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c
@@ -30,6 +30,19 @@
 #define ULP_TFC_CNTR_ALIGN 32
 #define ULP_TFC_ACT_WORD_SZ 32
 
+struct ulp_fc_tfc_stats_cache_entry {
+	uint32_t flags;
+	uint64_t timestamp;
+	uint8_t tsid;
+	uint32_t record_size;
+	uint32_t offset;
+	uint8_t dir;
+	uint64_t packet_count;
+	uint64_t byte_count;
+	uint16_t tcp_flags;
+	uint32_t tcp_timestamp;
+};
+
 static int32_t
 ulp_fc_tfc_update_accum_stats(__rte_unused struct bnxt_ulp_context *ctxt,
 			      __rte_unused struct bnxt_ulp_fc_info *fc_info,
diff --git a/drivers/net/bnxt/tf_ulp/ulp_flow_db.c b/drivers/net/bnxt/tf_ulp/ulp_flow_db.c
index 8984808b67..d7b05ae39b 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_flow_db.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_flow_db.c
@@ -12,6 +12,7 @@
 #include "ulp_mapper.h"
 #include "ulp_flow_db.h"
 #include "ulp_fc_mgr.h"
+#include "ulp_sc_mgr.h"
 #include "ulp_tun.h"
 #ifdef TF_FLOW_SCALE_QUERY
 #include "tf_resources.h"
@@ -633,6 +634,9 @@ ulp_flow_db_resource_add(struct bnxt_ulp_context *ulp_ctxt,
 
 		if (!ulp_fc_mgr_thread_isstarted(ulp_ctxt))
 			ulp_fc_mgr_thread_start(ulp_ctxt);
+
+		if (!ulp_sc_mgr_thread_isstarted(ulp_ctxt))
+			ulp_sc_mgr_thread_start(ulp_ctxt);
 	}
 
 	/* all good, return success */
diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.c b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
index 721e8f4992..2429ac2f1a 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
@@ -2950,6 +2950,72 @@ ulp_mapper_vnic_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 	return rc;
 }
 
+static int32_t
+ulp_mapper_stats_cache_tbl_process(struct bnxt_ulp_mapper_parms *parms,
+				   struct bnxt_ulp_mapper_tbl_info *tbl)
+{
+	struct ulp_flow_db_res_params fid_parms;
+	uint64_t counter_handle;
+	struct ulp_blob	data;
+	uint16_t data_len = 0;
+	uint8_t *tmp_data;
+	int32_t rc = 0;
+
+	/* Initialize the blob data */
+	if (unlikely(ulp_blob_init(&data, tbl->result_bit_size,
+				   BNXT_ULP_BYTE_ORDER_BE))) {
+		BNXT_DRV_DBG(ERR, "Failed initial ulp_global table blob\n");
+		return -EINVAL;
+	}
+
+	/* read the arguments from the result table */
+	rc = ulp_mapper_tbl_result_build(parms, tbl, &data,
+					 "ULP Global Result");
+	if (unlikely(rc)) {
+		BNXT_DRV_DBG(ERR, "Failed to build the result blob\n");
+		return rc;
+	}
+
+	tmp_data = ulp_blob_data_get(&data, &data_len);
+	counter_handle = *(uint64_t *)tmp_data;
+	counter_handle = tfp_be_to_cpu_64(counter_handle);
+
+	memset(&fid_parms, 0, sizeof(fid_parms));
+	fid_parms.direction	= tbl->direction;
+	fid_parms.resource_func	= tbl->resource_func;
+	fid_parms.resource_type	= tbl->resource_type;
+	fid_parms.resource_sub_type = tbl->resource_sub_type;
+	fid_parms.resource_hndl	    = counter_handle;
+	fid_parms.critical_resource = tbl->critical_resource;
+	rc = ulp_mapper_fdb_opc_process(parms, tbl, &fid_parms);
+	if (unlikely(rc)) {
+		BNXT_DRV_DBG(ERR, "Failed to link resource to flow rc = %d\n",
+			     rc);
+		return rc;
+	}
+
+	rc = ulp_sc_mgr_entry_alloc(parms, counter_handle, tbl);
+	if (unlikely(rc)) {
+		BNXT_DRV_DBG(ERR, "Failed to link resource to flow rc = %d\n",
+			     rc);
+		return rc;
+	}
+#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
+#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_MAPPER
+	BNXT_DRV_DBG(DEBUG, "flow id =0x%x\n", parms->flow_id);
+#endif
+#endif
+	return rc;
+}
+
+static int32_t
+ulp_mapper_stats_cache_tbl_res_free(struct bnxt_ulp_context *ulp,
+				    uint32_t fid)
+{
+	ulp_sc_mgr_entry_free(ulp, fid);
+	return 0;
+}
+
 /* Free the vnic resource */
 static int32_t
 ulp_mapper_vnic_tbl_res_free(struct bnxt_ulp_context *ulp __rte_unused,
@@ -4148,6 +4214,9 @@ ulp_mapper_tbls_process(struct bnxt_ulp_mapper_parms *parms, void *error)
 		case BNXT_ULP_RESOURCE_FUNC_ALLOCATOR_TABLE:
 			rc = ulp_mapper_allocator_tbl_process(parms, tbl);
 			break;
+		case BNXT_ULP_RESOURCE_FUNC_STATS_CACHE:
+			rc = ulp_mapper_stats_cache_tbl_process(parms, tbl);
+			break;
 		default:
 			BNXT_DRV_DBG(ERR, "Unexpected mapper resource %d\n",
 				     tbl->resource_func);
@@ -4286,6 +4355,10 @@ ulp_mapper_resource_free(struct bnxt_ulp_context *ulp,
 						 res->direction,
 						 res->resource_hndl);
 		break;
+	case BNXT_ULP_RESOURCE_FUNC_STATS_CACHE:
+		rc = ulp_mapper_stats_cache_tbl_res_free(ulp,
+							 fid);
+		break;
 	default:
 		break;
 	}
diff --git a/drivers/net/bnxt/tf_ulp/ulp_sc_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_sc_mgr.c
new file mode 100644
index 0000000000..a98360bc6e
--- /dev/null
+++ b/drivers/net/bnxt/tf_ulp/ulp_sc_mgr.c
@@ -0,0 +1,529 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2014-2021 Broadcom
+ * All rights reserved.
+ */
+
+#include <rte_common.h>
+#include <rte_cycles.h>
+#include <rte_malloc.h>
+#include <rte_log.h>
+#include "bnxt.h"
+#include "bnxt_ulp.h"
+#include "bnxt_ulp_utils.h"
+#include "bnxt_ulp_tfc.h"
+#include "bnxt_tf_common.h"
+#include "ulp_sc_mgr.h"
+#include "ulp_flow_db.h"
+#include "ulp_template_db_enum.h"
+#include "ulp_template_struct.h"
+#include "tfc.h"
+#include "tfc_debug.h"
+#include "tfc_action_handle.h"
+
+#define ULP_TFC_CNTR_READ_BYTES 32
+#define ULP_TFC_CNTR_ALIGN 32
+#define ULP_TFC_ACT_WORD_SZ 32
+
+static const struct bnxt_ulp_sc_core_ops *
+bnxt_ulp_sc_ops_get(struct bnxt_ulp_context *ctxt)
+{
+	int32_t rc;
+	enum bnxt_ulp_device_id  dev_id;
+	const struct bnxt_ulp_sc_core_ops *func_ops;
+
+	rc = bnxt_ulp_cntxt_dev_id_get(ctxt, &dev_id);
+	if (rc)
+		return NULL;
+
+	switch (dev_id) {
+	case BNXT_ULP_DEVICE_ID_THOR2:
+		func_ops = &ulp_sc_tfc_core_ops;
+		break;
+	case BNXT_ULP_DEVICE_ID_THOR:
+	case BNXT_ULP_DEVICE_ID_STINGRAY:
+	case BNXT_ULP_DEVICE_ID_WH_PLUS:
+	default:
+		func_ops = NULL;
+		break;
+	}
+	return func_ops;
+}
+
+int32_t ulp_sc_mgr_init(struct bnxt_ulp_context *ctxt)
+{
+	const struct bnxt_ulp_sc_core_ops *sc_ops;
+	struct bnxt_ulp_device_params *dparms;
+	struct bnxt_ulp_sc_info *ulp_sc_info;
+	uint32_t stats_cache_tbl_sz;
+	uint32_t dev_id;
+	int rc;
+
+	if (!ctxt) {
+		BNXT_DRV_DBG(DEBUG, "Invalid ULP CTXT\n");
+		return -EINVAL;
+	}
+
+	if (bnxt_ulp_cntxt_dev_id_get(ctxt, &dev_id)) {
+		BNXT_DRV_DBG(DEBUG, "Failed to get device id\n");
+		return -EINVAL;
+	}
+
+	dparms = bnxt_ulp_device_params_get(dev_id);
+	if (!dparms) {
+		BNXT_DRV_DBG(DEBUG, "Failed to device parms\n");
+		return -EINVAL;
+	}
+
+	sc_ops = bnxt_ulp_sc_ops_get(ctxt);
+	if (sc_ops == NULL) {
+		BNXT_DRV_DBG(DEBUG, "Failed to get the counter ops\n");
+		return -EINVAL;
+	}
+
+	ulp_sc_info = rte_zmalloc("ulp_sc_info", sizeof(*ulp_sc_info), 0);
+	if (!ulp_sc_info) {
+		rc = -ENOMEM;
+		goto error;
+	}
+
+	ulp_sc_info->sc_ops = sc_ops;
+	ulp_sc_info->flags = 0;
+
+	rc = pthread_mutex_init(&ulp_sc_info->sc_lock, NULL);
+	if (rc) {
+		BNXT_DRV_DBG(ERR, "Failed to initialize sc mutex\n");
+		goto error;
+	}
+
+	/* Add the SC info tbl to the ulp context. */
+	bnxt_ulp_cntxt_ptr2_sc_info_set(ctxt, ulp_sc_info);
+
+	ulp_sc_info->num_counters = dparms->ext_flow_db_num_entries;
+	if (!ulp_sc_info->num_counters) {
+		/* No need for software counters, call fw directly */
+		BNXT_DRV_DBG(DEBUG, "Sw flow counter support not enabled\n");
+		return 0;
+	}
+
+	/*
+	 * Size is determined by the number of flows + 10% to cover IDs
+	 * used for resources.
+	 */
+	stats_cache_tbl_sz = sizeof(struct ulp_sc_tfc_stats_cache_entry) *
+		(ulp_sc_info->num_counters +
+		 (ulp_sc_info->num_counters / 10));
+
+	ulp_sc_info->stats_cache_tbl = rte_zmalloc("ulp_stats_cache_tbl",
+						   stats_cache_tbl_sz, 0);
+	if (!ulp_sc_info->stats_cache_tbl) {
+		rc = -ENOMEM;
+		goto error;
+	}
+
+	ulp_sc_info->read_data = rte_zmalloc("ulp_stats_cache_read_data",
+					     ULP_SC_BATCH_SIZE * ULP_SC_PAGE_SIZE,
+					     ULP_SC_PAGE_SIZE);
+	if (!ulp_sc_info->read_data) {
+		rte_free(ulp_sc_info->stats_cache_tbl);
+		rc = -ENOMEM;
+		goto error;
+	}
+
+	rc = ulp_sc_mgr_thread_start(ctxt);
+	if (rc)
+		BNXT_DRV_DBG(DEBUG, "Stats counter thread start failed\n");
+
+ error:
+	return rc;
+}
+
+/*
+ * Release all resources in the Flow Counter Manager for this ulp context
+ *
+ * ctxt [in] The ulp context for the Flow Counter manager
+ *
+ */
+int32_t
+ulp_sc_mgr_deinit(struct bnxt_ulp_context *ctxt)
+{
+	struct bnxt_ulp_sc_info *ulp_sc_info;
+
+	ulp_sc_info = bnxt_ulp_cntxt_ptr2_sc_info_get(ctxt);
+
+	if (!ulp_sc_info)
+		return -EINVAL;
+
+	pthread_mutex_lock(&ulp_sc_info->sc_lock);
+
+	ulp_sc_mgr_thread_cancel(ctxt);
+
+	pthread_mutex_destroy(&ulp_sc_info->sc_lock);
+
+	if (ulp_sc_info->stats_cache_tbl)
+		rte_free(ulp_sc_info->stats_cache_tbl);
+
+	if (ulp_sc_info->read_data)
+		rte_free(ulp_sc_info->read_data);
+
+	rte_free(ulp_sc_info);
+
+	/* Safe to ignore on deinit */
+	(void)bnxt_ulp_cntxt_ptr2_sc_info_set(ctxt, NULL);
+
+	return 0;
+}
+
+#define ULP_SC_PERIOD_S 1
+#define ULP_SC_PERIOD_MS (ULP_SC_PERIOD_S * 1000)
+
+static void *ulp_stats_cache_main_loop(void *arg)
+{
+	struct ulp_sc_tfc_stats_cache_entry *count;
+	const struct bnxt_ulp_sc_core_ops *sc_ops;
+	struct ulp_sc_tfc_stats_cache_entry *sce;
+	struct ulp_sc_tfc_stats_cache_entry *sce_end;
+	struct tfc_mpc_batch_info_t batch_info;
+	struct bnxt_ulp_sc_info *ulp_sc_info;
+	struct bnxt_ulp_context *ctxt = NULL;
+	uint16_t words = (ULP_TFC_CNTR_READ_BYTES + ULP_TFC_ACT_WORD_SZ - 1) / ULP_TFC_ACT_WORD_SZ;
+	uint32_t batch_size;
+	struct tfc *tfcp = NULL;
+	uint32_t batch;
+	uint32_t delay = ULP_SC_PERIOD_MS;
+	uint64_t start;
+	uint64_t stop;
+	uint64_t hz;
+	int oldstate;
+	int oldtype;
+	uint8_t *data;
+	int rc;
+	static uint32_t loop;
+	uint64_t cycles = 0;
+	uint64_t cpms = 0;
+
+	while (!ctxt) {
+		ctxt = bnxt_ulp_cntxt_entry_acquire(arg);
+
+		if (ctxt)
+			break;
+
+		BNXT_DRV_DBG(INFO, "could not get the ulp context lock\n");
+		rte_delay_us_block(1000);
+	}
+
+
+	ulp_sc_info = bnxt_ulp_cntxt_ptr2_sc_info_get(ctxt);
+	if (!ulp_sc_info) {
+		bnxt_ulp_cntxt_entry_release();
+		goto terminate;
+	}
+
+	sc_ops = ulp_sc_info->sc_ops;
+
+	pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &oldstate);
+	pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);
+
+	hz = rte_get_timer_hz();
+	cpms = hz / 1000;
+
+	while (true) {
+		bnxt_ulp_cntxt_entry_release();
+		ctxt = NULL;
+		rte_delay_ms(delay);
+
+		while (!ctxt) {
+			ctxt = bnxt_ulp_cntxt_entry_acquire(arg);
+
+			if (ctxt)
+				break;
+
+			BNXT_DRV_DBG(INFO, "could not get the ulp context lock\n");
+			rte_delay_us_block(1);
+		}
+
+		start = rte_get_timer_cycles();
+		sce = ulp_sc_info->stats_cache_tbl;
+		sce_end = sce + (ulp_sc_info->num_counters + (ulp_sc_info->num_counters / 10));
+
+		while (ulp_sc_info->num_entries && (sce < sce_end)) {
+			data = ulp_sc_info->read_data;
+
+			rc = tfc_mpc_batch_start(&batch_info);
+			if (rc) {
+				PMD_DRV_LOG(ERR,
+				    "MPC batch start failed rc:%d loop:%d\n", rc, loop);
+				break;
+			}
+
+			if (bnxt_ulp_cntxt_acquire_fdb_lock(ctxt))
+				break;
+
+			rc = pthread_mutex_lock(&ulp_sc_info->sc_lock);
+			if (rc) {
+				PMD_DRV_LOG(ERR,
+				    "Failed to get SC lock, terminating main loop rc:%d loop:%d\n",
+				    rc, loop);
+				goto terminate;
+			}
+
+			for (batch = 0; (batch < ULP_SC_BATCH_SIZE) && (sce < sce_end);) {
+				if (!(sce->flags & ULP_SC_ENTRY_FLAG_VALID)) {
+					sce++;
+					continue;
+				}
+
+				tfcp = bnxt_ulp_cntxt_tfcp_get(sce->ctxt);
+				if (tfcp == NULL) {
+					bnxt_ulp_cntxt_entry_release();
+					goto terminate;
+				}
+
+
+				/* Store the entry pointer to use for counter update */
+				batch_info.em_hdl[batch_info.count] = (uint64_t)sce;
+
+				rc = sc_ops->ulp_stats_cache_update(tfcp,
+								    sce->dir,
+								    data,
+								    sce->handle,
+								    &words,
+								    &batch_info,
+								    sce->reset);
+				if (rc) {
+					/* Abort this batch */
+					PMD_DRV_LOG(ERR,
+						    "loop:%d read_counter() failed:%d\n",
+						    loop, rc);
+					break;
+				}
+
+				if (sce->reset)
+					sce->reset = false;
+
+				/* Next */
+				batch++;
+				sce++;
+				data += ULP_SC_PAGE_SIZE;
+			}
+
+			batch_size = batch_info.count;
+			rc = tfc_mpc_batch_end(tfcp, &batch_info);
+
+			pthread_mutex_unlock(&ulp_sc_info->sc_lock);
+			bnxt_ulp_cntxt_release_fdb_lock(ctxt);
+
+			if (rc) {
+				PMD_DRV_LOG(ERR,
+					    "MPC batch end failed rc:%d loop:%d\n",
+					    rc, loop);
+				batch_info.enabled = false;
+				break;
+			}
+
+			/* Process counts */
+			data = ulp_sc_info->read_data;
+
+			for (batch = 0; batch < batch_size; batch++) {
+				/* Check for error in completion */
+				if (batch_info.result[batch]) {
+					PMD_DRV_LOG(ERR,
+						    "batch:%d result:%d\n",
+						    batch, batch_info.result[batch]);
+				} else {
+					count =
+				(struct ulp_sc_tfc_stats_cache_entry *)((uintptr_t)batch_info.em_hdl[batch]);
+					memcpy(&count->packet_count, data, ULP_TFC_ACT_WORD_SZ);
+				}
+
+				data += ULP_SC_PAGE_SIZE;
+			}
+		}
+
+		loop++;
+		stop = rte_get_timer_cycles();
+		cycles = stop - start;
+		if (cycles > (hz * ULP_SC_PERIOD_S)) {
+			PMD_DRV_LOG(ERR, "%s: Stats collection time exceeded %dmS Cycles:%" PRIu64 "\n",
+				    __func__, ULP_SC_PERIOD_MS, cycles);
+			delay = ULP_SC_PERIOD_MS;
+		} else {
+			delay = ULP_SC_PERIOD_MS - (cycles / cpms);
+
+			if (delay > ULP_SC_PERIOD_MS) {
+				PMD_DRV_LOG(ERR, "%s: Stats collection delay:%dmS exceedes %dmS\n",
+					    __func__, delay, ULP_SC_PERIOD_MS);
+				delay = ULP_SC_PERIOD_MS;
+			}
+		}
+	}
+
+ terminate:
+	return NULL;
+}
+
+/*
+ * Check if the alarm thread that walks through the flows is started
+ *
+ * ctxt [in] The ulp context for the flow counter manager
+ *
+ */
+bool ulp_sc_mgr_thread_isstarted(struct bnxt_ulp_context *ctxt)
+{
+	struct bnxt_ulp_sc_info *ulp_sc_info;
+
+	ulp_sc_info = bnxt_ulp_cntxt_ptr2_sc_info_get(ctxt);
+
+	if (ulp_sc_info)
+		return !!(ulp_sc_info->flags & ULP_FLAG_SC_THREAD);
+
+	return false;
+}
+
+/*
+ * Setup the Flow counter timer thread that will fetch/accumulate raw counter
+ * data from the chip's internal flow counters
+ *
+ * ctxt [in] The ulp context for the flow counter manager
+ *
+ */
+int32_t
+ulp_sc_mgr_thread_start(struct bnxt_ulp_context *ctxt)
+{
+	struct bnxt_ulp_sc_info *ulp_sc_info;
+	int rc;
+
+	ulp_sc_info = bnxt_ulp_cntxt_ptr2_sc_info_get(ctxt);
+
+	if (ulp_sc_info && !(ulp_sc_info->flags & ULP_FLAG_SC_THREAD)) {
+		rc = pthread_create(&ulp_sc_info->tid,
+				    NULL,
+				    &ulp_stats_cache_main_loop,
+				    (void *)ctxt->cfg_data);
+		if (rc)
+			return rc;
+
+		ulp_sc_info->flags |= ULP_FLAG_SC_THREAD;
+	}
+
+	return 0;
+}
+
+/*
+ * Cancel the alarm handler
+ *
+ * ctxt [in] The ulp context for the flow counter manager
+ *
+ */
+void ulp_sc_mgr_thread_cancel(struct bnxt_ulp_context *ctxt)
+{
+	struct bnxt_ulp_sc_info *ulp_sc_info;
+
+	ulp_sc_info = bnxt_ulp_cntxt_ptr2_sc_info_get(ctxt);
+	if (!ulp_sc_info)
+		return;
+
+	ulp_sc_info->flags &= ~ULP_FLAG_SC_THREAD;
+	pthread_cancel(ulp_sc_info->tid);
+}
+
+/*
+ * Fill the rte_flow_query_count 'data' argument passed
+ * in the rte_flow_query() with the values obtained and
+ * accumulated locally.
+ *
+ * ctxt [in] The ulp context for the flow counter manager
+ *
+ * flow_id [in] The HW flow ID
+ *
+ * count [out] The rte_flow_query_count 'data' that is set
+ *
+ */
+int ulp_sc_mgr_query_count_get(struct bnxt_ulp_context *ctxt,
+			       uint32_t flow_id,
+			       struct rte_flow_query_count *count)
+{
+	struct ulp_sc_tfc_stats_cache_entry *sce;
+	struct bnxt_ulp_sc_info *ulp_sc_info;
+	int rc = 0;
+
+	ulp_sc_info = bnxt_ulp_cntxt_ptr2_sc_info_get(ctxt);
+	if (!ulp_sc_info)
+		return -ENODEV;
+
+	sce = ulp_sc_info->stats_cache_tbl;
+	sce += flow_id;
+
+	/* If entry is not valid return an error */
+	if (!(sce->flags & ULP_SC_ENTRY_FLAG_VALID))
+		return -EBUSY;
+
+	count->hits = sce->packet_count;
+	count->hits_set = 1;
+	count->bytes = sce->byte_count;
+	count->bytes_set = 1;
+
+	if (count->reset)
+		sce->reset = true;
+
+	return rc;
+}
+
+
+int ulp_sc_mgr_entry_alloc(struct bnxt_ulp_mapper_parms *parms,
+			   uint64_t counter_handle,
+			   struct bnxt_ulp_mapper_tbl_info *tbl)
+{
+	struct ulp_sc_tfc_stats_cache_entry *sce;
+	struct bnxt_ulp_sc_info *ulp_sc_info;
+
+	ulp_sc_info = bnxt_ulp_cntxt_ptr2_sc_info_get(parms->ulp_ctx);
+	if (!ulp_sc_info)
+		return -ENODEV;
+
+	pthread_mutex_lock(&ulp_sc_info->sc_lock);
+
+	sce = ulp_sc_info->stats_cache_tbl;
+	sce += parms->flow_id;
+
+	/* If entry is not free return an error */
+	if (sce->flags & ULP_SC_ENTRY_FLAG_VALID) {
+		pthread_mutex_unlock(&ulp_sc_info->sc_lock);
+		return -EBUSY;
+	}
+
+	memset(sce, 0, sizeof(*sce));
+	sce->ctxt = parms->ulp_ctx;
+	sce->flags |= ULP_SC_ENTRY_FLAG_VALID;
+	sce->handle = counter_handle;
+	sce->dir = tbl->direction;
+	ulp_sc_info->num_entries++;
+	pthread_mutex_unlock(&ulp_sc_info->sc_lock);
+
+	return 0;
+}
+
+void ulp_sc_mgr_entry_free(struct bnxt_ulp_context *ulp,
+			   uint32_t fid)
+{
+	struct ulp_sc_tfc_stats_cache_entry *sce;
+	struct bnxt_ulp_sc_info *ulp_sc_info;
+
+	ulp_sc_info = bnxt_ulp_cntxt_ptr2_sc_info_get(ulp);
+	if (!ulp_sc_info)
+		return;
+
+	pthread_mutex_lock(&ulp_sc_info->sc_lock);
+
+	sce = ulp_sc_info->stats_cache_tbl;
+	sce += fid;
+
+	if (!(sce->flags & ULP_SC_ENTRY_FLAG_VALID)) {
+		pthread_mutex_unlock(&ulp_sc_info->sc_lock);
+		return;
+	}
+
+	sce->flags = 0;
+	ulp_sc_info->num_entries--;
+
+	pthread_mutex_unlock(&ulp_sc_info->sc_lock);
+}
diff --git a/drivers/net/bnxt/tf_ulp/ulp_sc_mgr.h b/drivers/net/bnxt/tf_ulp/ulp_sc_mgr.h
new file mode 100644
index 0000000000..0155a8d61c
--- /dev/null
+++ b/drivers/net/bnxt/tf_ulp/ulp_sc_mgr.h
@@ -0,0 +1,142 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2014-2023 Broadcom
+ * All rights reserved.
+ */
+
+#ifndef _ULP_SC_MGR_H_
+#define _ULP_SC_MGR_H_
+
+#include "pthread.h"
+#include "bnxt_ulp.h"
+#include "ulp_flow_db.h"
+
+#define ULP_FLAG_SC_THREAD			BIT(0)
+
+#define ULP_SC_ENTRY_FLAG_VALID BIT(0)
+
+#define ULP_SC_BATCH_SIZE   64
+#define ULP_SC_PAGE_SIZE  4096
+
+struct ulp_sc_tfc_stats_cache_entry {
+	struct bnxt_ulp_context *ctxt;
+	uint32_t flags;
+	uint64_t timestamp;
+	uint64_t handle;
+	uint8_t dir;
+	uint64_t packet_count;
+	uint64_t byte_count;
+	uint64_t count_fields1;
+	uint64_t count_fields2;
+	bool reset;
+};
+
+struct bnxt_ulp_sc_info {
+	struct ulp_sc_tfc_stats_cache_entry *stats_cache_tbl;
+	uint8_t                 *read_data;
+	uint32_t		flags;
+	uint32_t		num_entries;
+	pthread_mutex_t		sc_lock;
+	uint32_t		num_counters;
+	pthread_t               tid;
+	const struct bnxt_ulp_sc_core_ops *sc_ops;
+};
+
+struct bnxt_ulp_sc_core_ops {
+	int32_t
+	(*ulp_stats_cache_update)(struct tfc *tfcp,
+				  int dir,
+				  uint8_t *data,
+				  uint64_t handle,
+				  uint16_t *words,
+				  struct tfc_mpc_batch_info_t *batch_info,
+				  bool reset);
+};
+
+/*
+ * Allocate all resources in the stats cache manager for this ulp context
+ *
+ * ctxt [in] The ulp context for the stats cache manager
+ */
+int32_t
+ulp_sc_mgr_init(struct bnxt_ulp_context *ctxt);
+
+/*
+ * Release all resources in the stats cache manager for this ulp context
+ *
+ * ctxt [in] The ulp context for the stats cache manager
+ */
+int32_t
+ulp_sc_mgr_deinit(struct bnxt_ulp_context *ctxt);
+
+/*
+ * Setup the stats cache timer thread that will fetch/accumulate raw counter
+ * data from the chip's internal stats caches
+ *
+ * ctxt [in] The ulp context for the stats cache manager
+ */
+int32_t
+ulp_sc_mgr_thread_start(struct bnxt_ulp_context *ctxt);
+
+/*
+ * Alarm handler that will issue the TF-Core API to fetch
+ * data from the chip's internal stats caches
+ *
+ * ctxt [in] The ulp context for the stats cache manager
+ */
+void
+ulp_sc_mgr_alarm_cb(void *arg);
+
+/*
+ * Cancel the alarm handler
+ *
+ * ctxt [in] The ulp context for the stats cache manager
+ *
+ */
+void ulp_sc_mgr_thread_cancel(struct bnxt_ulp_context *ctxt);
+
+/*
+ * Check if the thread that walks through the flows is started
+ *
+ * ctxt [in] The ulp context for the stats cache manager
+ *
+ */
+bool ulp_sc_mgr_thread_isstarted(struct bnxt_ulp_context *ctxt);
+
+/*
+ * Get the current counts for the given flow id
+ *
+ * ctxt [in] The ulp context for the stats cache manager
+ * flow_id [in] The flow identifier
+ * count [out] structure in which the updated counts are passed
+ * back to the caller.
+ *
+ */
+int ulp_sc_mgr_query_count_get(struct bnxt_ulp_context *ctxt,
+			       uint32_t flow_id,
+			       struct rte_flow_query_count *count);
+
+/*
+ * Allocate a cache entry for flow
+ *
+ * parms [in] Various fields used to identify the flow
+ * counter_handle [in] This is the action table entry identifier.
+ * tbl [in] Various fields used to identify the flow
+ *
+ */
+int ulp_sc_mgr_entry_alloc(struct bnxt_ulp_mapper_parms *parms,
+			   uint64_t counter_handle,
+			   struct bnxt_ulp_mapper_tbl_info *tbl);
+
+/*
+ * Free cache entry
+ *
+ * ulp [in] The ulp context for the stats cache manager
+ * fid [in] The flow identifier
+ *
+ */
+void ulp_sc_mgr_entry_free(struct bnxt_ulp_context *ulp,
+			   uint32_t fid);
+
+extern const struct bnxt_ulp_sc_core_ops ulp_sc_tfc_core_ops;
+
+#endif /* _ULP_SC_MGR_H_ */
diff --git a/drivers/net/bnxt/tf_ulp/ulp_sc_mgr_tfc.c b/drivers/net/bnxt/tf_ulp/ulp_sc_mgr_tfc.c
new file mode 100644
index 0000000000..a8141980d8
--- /dev/null
+++ b/drivers/net/bnxt/tf_ulp/ulp_sc_mgr_tfc.c
@@ -0,0 +1,60 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2014-2021 Broadcom
+ * All rights reserved.
+ */
+
+#include <rte_common.h>
+#include <rte_cycles.h>
+#include <rte_malloc.h>
+#include <rte_log.h>
+#include <rte_alarm.h>
+#include "bnxt.h"
+#include "bnxt_ulp.h"
+#include "bnxt_ulp_utils.h"
+#include "bnxt_ulp_tfc.h"
+#include "bnxt_tf_common.h"
+#include "ulp_sc_mgr.h"
+#include "ulp_flow_db.h"
+#include "ulp_template_db_enum.h"
+#include "ulp_template_struct.h"
+#include "tfc.h"
+#include "tfc_debug.h"
+#include "tfc_action_handle.h"
+
+static int32_t
+ulp_sc_tfc_stats_cache_update(struct tfc *tfcp,
+			      int dir,
+			      uint8_t *data,
+			      uint64_t handle,
+			      uint16_t *words,
+			      struct tfc_mpc_batch_info_t *batch_info,
+			      bool reset)
+{
+	struct tfc_cmm_info cmm_info;
+	struct tfc_cmm_clr cmm_clr;
+	int rc;
+
+	cmm_info.dir = dir;
+	cmm_info.rsubtype = CFA_RSUBTYPE_CMM_ACT;
+	cmm_info.act_handle = handle;
+	cmm_clr.clr = reset;
+
+	if (reset) {
+		cmm_clr.offset_in_byte = 0;
+		cmm_clr.sz_in_byte = 16;
+	}
+
+	rc = tfc_act_get(tfcp,
+			 batch_info,
+			 &cmm_info,
+			 &cmm_clr,
+			 data,
+			 words);
+
+	return rc;
+}
+
+
+const struct bnxt_ulp_sc_core_ops ulp_sc_tfc_core_ops = {
+	.ulp_stats_cache_update = ulp_sc_tfc_stats_cache_update
+};
-- 
2.39.3


^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2024-10-01  5:54 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-01  5:57 [PATCH v3 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
2024-10-01  5:57 ` [PATCH v3 01/47] net/bnxt: tf_core: fix wc tcam multi slice delete issue Sriharsha Basavapatna
2024-10-01  5:57 ` [PATCH v3 02/47] net/bnxt: tf_core: tcam manager data corruption Sriharsha Basavapatna
2024-10-01  5:57 ` [PATCH v3 03/47] net/bnxt: tf_core: External EM support cleanup Sriharsha Basavapatna
2024-10-01  5:57 ` [PATCH v3 04/47] net/bnxt: tf_core: Thor TF EM key size check Sriharsha Basavapatna
2024-10-01  5:57 ` [PATCH v3 05/47] net/bnxt: tf_core: flow scale improvement Sriharsha Basavapatna
2024-10-01  5:57 ` [PATCH v3 06/47] net/bnxt: tf_core: TF support flow scale query Sriharsha Basavapatna
2024-10-01  5:57 ` [PATCH v3 07/47] net/bnxt: tf_core: fix slice count in case of HA entry move Sriharsha Basavapatna
2024-10-01  5:57 ` [PATCH v3 08/47] net/bnxt: tf_core: convert priority based TCAM manager to dynamic allocation Sriharsha Basavapatna
2024-10-01  5:57 ` [PATCH v3 09/47] net/bnxt: tf_core: remove dead AFM code from session-based priority TCAM mgr Sriharsha Basavapatna
2024-10-01  5:57 ` [PATCH v3 10/47] net/bnxt: tf_core: remove dead " Sriharsha Basavapatna
2024-10-01  5:57 ` [PATCH v3 13/47] net/bnxt: tf_ulp: add custom l2 etype tunnel support Sriharsha Basavapatna
2024-10-01  5:58 ` [PATCH v3 14/47] net/bnxt: tf_ulp: add support for vf to vf flow offload Sriharsha Basavapatna
2024-10-01  5:58 ` [PATCH v3 15/47] net/bnxt: tf_ulp: Wh+ mirroring support Sriharsha Basavapatna
2024-10-01  5:58 ` [PATCH v3 16/47] net/bnxt: tf_ulp: miscellaneous fixes Sriharsha Basavapatna
2024-10-01  5:58 ` [PATCH v3 19/47] net/bnxt: tf_ulp: convert recipe table to dynamic memory Sriharsha Basavapatna
2024-10-01  5:58 ` [PATCH v3 21/47] net/bnxt: tf_ulp: add action read and clear support Sriharsha Basavapatna
2024-10-01  5:58 ` [PATCH v3 23/47] net/bnxt: tf_ulp: VFR updates for Thor 2 Sriharsha Basavapatna
2024-10-01  5:58 ` [PATCH v3 25/47] net/bnxt: tf_ulp: update template files Sriharsha Basavapatna
2024-10-01  5:58 ` [PATCH v3 26/47] net/bnxt: tf_ulp: enable recipe id generation Sriharsha Basavapatna
2024-10-01  5:58 ` [PATCH v3 27/47] net/bnxt: tf_ulp: fixed parent child db counters Sriharsha Basavapatna
2024-10-01  5:58 ` [PATCH v3 28/47] net/bnxt: tf_ulp: modify return values to adhere to C coding standard Sriharsha Basavapatna
2024-10-01  5:58 ` [PATCH v3 29/47] net/bnxt: tf_ulp: update template files Sriharsha Basavapatna
2024-10-01  5:58 ` [PATCH v3 30/47] net/bnxt: tf_ulp: add mask defaults when mask is not specified Sriharsha Basavapatna
2024-10-01  5:58 ` [PATCH v3 32/47] net/bnxt: tf_ulp: add support for flow priority Sriharsha Basavapatna
2024-10-01  5:58 ` [PATCH v3 34/47] net/bnxt: tf_ulp: add rte_mtr support for Thor2 Sriharsha Basavapatna
2024-10-01  5:58 ` [PATCH v3 35/47] net/bnxt: tf_ulp: TF support flow scale query Sriharsha Basavapatna
2024-10-01  5:58 ` [PATCH v3 36/47] net/bnxt: tf_ulp: add support for rss flow query to ULP Sriharsha Basavapatna
2024-10-01  5:58 ` [PATCH v3 38/47] net/bnxt: tf_ulp: inline utility functions and use likely/unlikely Sriharsha Basavapatna
2024-10-01  5:58 ` [PATCH v3 39/47] net/bnxt: tf_ulp: switch ulp to use rte crc32 hash Sriharsha Basavapatna
2024-10-01  5:58 ` [PATCH v3 41/47] net/bnxt: tf_ulp: support a few generic template items Sriharsha Basavapatna
2024-10-01  5:58 ` [PATCH v3 42/47] net/bnxt: tf_ulp: TFC support flow scale query for Thor2 Sriharsha Basavapatna
2024-10-01  5:58 ` [PATCH v3 44/47] net/bnxt: tf_ulp: enable support for truflow feature configuration Sriharsha Basavapatna
2024-10-01  5:58 ` [PATCH v3 45/47] net/bnxt: tf_ulp: support a few feature extensions Sriharsha Basavapatna
2024-10-01  5:58 ` [PATCH v3 47/47] net/bnxt: tf_ulp: add stats cache for thor2 Sriharsha Basavapatna

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).