DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/bnxt: fix Thor svif size mismatch for generic tables
@ 2021-11-22  6:14 Venkat Duvvuru
  2021-11-22  7:14 ` Ajit Khaparde
  0 siblings, 1 reply; 2+ messages in thread
From: Venkat Duvvuru @ 2021-11-22  6:14 UTC (permalink / raw)
  To: dev; +Cc: Mike Baucom, stable, Venkat Duvvuru

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

The size of the svif in the generic tables was incorrectly set to the
Wh+ size of 8 bits.  This resulted in incorrect l2 context entries being
associated with a flow once the svif became greater than 255.

Fixes: ad9eed0248ad ("net/bnxt: support flow template for Thor")
Cc: stable@dpdk.org

Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
---
 .../generic_templates/ulp_template_db_enum.h  |  15 +-
 .../generic_templates/ulp_template_db_tbl.c   |  73 ++++++--
 .../ulp_template_db_thor_class.c              | 175 ++++++++++--------
 3 files changed, 156 insertions(+), 107 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 c01ae1601d..e744a6409e 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
@@ -3,7 +3,7 @@
  * All rights reserved.
  */
 
-/* date: Fri Oct  8 11:41:10 2021 */
+/* date: Fri Nov 12 19:33:52 2021 */
 
 #ifndef ULP_TEMPLATE_DB_H_
 #define ULP_TEMPLATE_DB_H_
@@ -28,7 +28,7 @@
 #define BNXT_ULP_ACT_HID_MASK 2047
 #define BNXT_ULP_APP_RESOURCE_RESV_LIST_MAX_SZ 16
 #define BNXT_ULP_GLB_RESOURCE_TBL_MAX_SZ 132
-#define BNXT_ULP_APP_GLB_RESOURCE_TBL_MAX_SZ 140
+#define BNXT_ULP_APP_GLB_RESOURCE_TBL_MAX_SZ 144
 #define BNXT_ULP_RESOURCE_RESV_LIST_MAX_SZ 409
 #define BNXT_ULP_APP_CAP_TBL_MAX_SZ 12
 #define BNXT_ULP_COND_GOTO_REJECT 1023
@@ -450,10 +450,12 @@ enum bnxt_ulp_glb_rf_idx {
 	BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_0 = 58,
 	BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_1 = 59,
 	BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_2 = 60,
-	BNXT_ULP_GLB_RF_IDX_APP_GLB_AREC_PTR_0 = 61,
-	BNXT_ULP_GLB_RF_IDX_APP_GLB_AREC_PTR_1 = 62,
-	BNXT_ULP_GLB_RF_IDX_GRE_PROF_FUNC_ID = 63,
-	BNXT_ULP_GLB_RF_IDX_LAST = 64
+	BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_3 = 61,
+	BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_4 = 62,
+	BNXT_ULP_GLB_RF_IDX_APP_GLB_AREC_PTR_0 = 63,
+	BNXT_ULP_GLB_RF_IDX_APP_GLB_AREC_PTR_1 = 64,
+	BNXT_ULP_GLB_RF_IDX_GRE_PROF_FUNC_ID = 65,
+	BNXT_ULP_GLB_RF_IDX_LAST = 66
 };
 
 enum bnxt_ulp_hdr_type {
@@ -2312,3 +2314,4 @@ enum bnxt_ulp_df_tpl {
 };
 
 #endif
+
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 d5aea4d456..66e7663241 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
@@ -3,7 +3,7 @@
  * All rights reserved.
  */
 
-/* date: Fri Oct  8 11:41:10 2021 */
+/* date: Fri Nov 12 19:33:52 2021 */
 
 #include "ulp_template_db_enum.h"
 #include "ulp_template_db_field.h"
@@ -15,7 +15,7 @@ struct bnxt_ulp_generic_tbl_params ulp_generic_tbl_params[] = {
 	[BNXT_ULP_RESOURCE_SUB_TYPE_GENERIC_TABLE_L2_CNTXT_TCAM << 1 |
 		BNXT_ULP_DIRECTION_INGRESS] = {
 	.name                    = "INGRESS GENERIC_TABLE_L2_CNTXT_TCAM",
-	.result_num_entries      = 256,
+	.result_num_entries      = 2048,
 	.result_num_bytes        = 8,
 	.key_num_bytes           = 0,
 	.num_buckets             = 0,
@@ -25,7 +25,7 @@ struct bnxt_ulp_generic_tbl_params ulp_generic_tbl_params[] = {
 	[BNXT_ULP_RESOURCE_SUB_TYPE_GENERIC_TABLE_L2_CNTXT_TCAM << 1 |
 		BNXT_ULP_DIRECTION_EGRESS] = {
 	.name                    = "EGRESS GENERIC_TABLE_L2_CNTXT_TCAM",
-	.result_num_entries      = 256,
+	.result_num_entries      = 2048,
 	.result_num_bytes        = 8,
 	.key_num_bytes           = 0,
 	.num_buckets             = 0,
@@ -75,21 +75,21 @@ struct bnxt_ulp_generic_tbl_params ulp_generic_tbl_params[] = {
 	[BNXT_ULP_RESOURCE_SUB_TYPE_GENERIC_TABLE_MAC_ADDR_CACHE << 1 |
 		BNXT_ULP_DIRECTION_INGRESS] = {
 	.name                    = "INGRESS GENERIC_TABLE_MAC_ADDR_CACHE",
-	.result_num_entries      = 256,
+	.result_num_entries      = 512,
 	.result_num_bytes        = 8,
 	.key_num_bytes           = 10,
 	.num_buckets             = 8,
-	.hash_tbl_entries        = 1024,
+	.hash_tbl_entries        = 2048,
 	.result_byte_order       = BNXT_ULP_BYTE_ORDER_LE
 	},
 	[BNXT_ULP_RESOURCE_SUB_TYPE_GENERIC_TABLE_MAC_ADDR_CACHE << 1 |
 		BNXT_ULP_DIRECTION_EGRESS] = {
 	.name                    = "EGRESS GENERIC_TABLE_MAC_ADDR_CACHE",
-	.result_num_entries      = 256,
+	.result_num_entries      = 512,
 	.result_num_bytes        = 8,
 	.key_num_bytes           = 10,
 	.num_buckets             = 8,
-	.hash_tbl_entries        = 1024,
+	.hash_tbl_entries        = 2048,
 	.result_byte_order       = BNXT_ULP_BYTE_ORDER_LE
 	},
 	[BNXT_ULP_RESOURCE_SUB_TYPE_GENERIC_TABLE_PORT_TABLE << 1 |
@@ -117,7 +117,7 @@ struct bnxt_ulp_generic_tbl_params ulp_generic_tbl_params[] = {
 	.name                    = "INGRESS GENERIC_TABLE_TUNNEL_CACHE",
 	.result_num_entries      = 256,
 	.result_num_bytes        = 7,
-	.key_num_bytes           = 2,
+	.key_num_bytes           = 3,
 	.num_buckets             = 8,
 	.hash_tbl_entries        = 1024,
 	.result_byte_order       = BNXT_ULP_BYTE_ORDER_LE
@@ -127,7 +127,7 @@ struct bnxt_ulp_generic_tbl_params ulp_generic_tbl_params[] = {
 	.name                    = "EGRESS GENERIC_TABLE_TUNNEL_CACHE",
 	.result_num_entries      = 256,
 	.result_num_bytes        = 7,
-	.key_num_bytes           = 2,
+	.key_num_bytes           = 3,
 	.num_buckets             = 8,
 	.hash_tbl_entries        = 1024,
 	.result_byte_order       = BNXT_ULP_BYTE_ORDER_LE
@@ -367,8 +367,7 @@ struct bnxt_ulp_app_capabilities_info ulp_app_cap_info_list[] = {
 	.device_id               = BNXT_ULP_DEVICE_ID_THOR,
 	.flags                   = BNXT_ULP_APP_CAP_SHARED_EN |
 				   BNXT_ULP_APP_CAP_HOT_UPGRADE_EN |
-				   BNXT_ULP_APP_CAP_UNICAST_ONLY |
-				   BNXT_ULP_APP_CAP_SOCKET_DIRECT
+				   BNXT_ULP_APP_CAP_UNICAST_ONLY
 	},
 	{
 	.app_id                  = 2,
@@ -417,7 +416,8 @@ struct bnxt_ulp_app_capabilities_info ulp_app_cap_info_list[] = {
 	.app_id                  = 5,
 	.device_id               = BNXT_ULP_DEVICE_ID_THOR,
 	.flags                   = BNXT_ULP_APP_CAP_SHARED_EN |
-				   BNXT_ULP_APP_CAP_UNICAST_ONLY
+				   BNXT_ULP_APP_CAP_UNICAST_ONLY |
+				   BNXT_ULP_APP_CAP_SOCKET_DIRECT
 	}
 };
 
@@ -517,7 +517,7 @@ struct bnxt_ulp_resource_resv_info ulp_app_resource_resv_list[] = {
 	.direction               = TF_DIR_RX,
 	.resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
 	.resource_type           = TF_TCAM_TBL_TYPE_WC_TCAM,
-	.count                   = 1024
+	.count                   = 6648
 	},
 	{
 	.app_id                  = 5,
@@ -549,7 +549,7 @@ struct bnxt_ulp_resource_resv_info ulp_app_resource_resv_list[] = {
 	.direction               = TF_DIR_RX,
 	.resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
 	.resource_type           = TF_TCAM_TBL_TYPE_WC_TCAM,
-	.count                   = 1024
+	.count                   = 6648
 	}
 };
 
@@ -1311,6 +1311,22 @@ struct bnxt_ulp_glb_resource_info ulp_app_glb_resource_tbl[] = {
 	.app_id                  = 4,
 	.device_id               = BNXT_ULP_DEVICE_ID_THOR,
 	.resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+	.resource_type           = TF_TBL_TYPE_WC_FKB,
+	.glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_3,
+	.direction               = TF_DIR_RX
+	},
+	{
+	.app_id                  = 4,
+	.device_id               = BNXT_ULP_DEVICE_ID_THOR,
+	.resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+	.resource_type           = TF_TBL_TYPE_WC_FKB,
+	.glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_4,
+	.direction               = TF_DIR_RX
+	},
+	{
+	.app_id                  = 4,
+	.device_id               = BNXT_ULP_DEVICE_ID_THOR,
+	.resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
 	.resource_type           = TF_TBL_TYPE_FULL_ACT_RECORD,
 	.glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_AREC_PTR_0,
 	.direction               = TF_DIR_RX
@@ -1663,6 +1679,22 @@ struct bnxt_ulp_glb_resource_info ulp_app_glb_resource_tbl[] = {
 	.app_id                  = 5,
 	.device_id               = BNXT_ULP_DEVICE_ID_THOR,
 	.resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+	.resource_type           = TF_TBL_TYPE_WC_FKB,
+	.glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_3,
+	.direction               = TF_DIR_RX
+	},
+	{
+	.app_id                  = 5,
+	.device_id               = BNXT_ULP_DEVICE_ID_THOR,
+	.resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+	.resource_type           = TF_TBL_TYPE_WC_FKB,
+	.glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_4,
+	.direction               = TF_DIR_RX
+	},
+	{
+	.app_id                  = 5,
+	.device_id               = BNXT_ULP_DEVICE_ID_THOR,
+	.resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
 	.resource_type           = TF_TBL_TYPE_FULL_ACT_RECORD,
 	.glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_AREC_PTR_0,
 	.direction               = TF_DIR_RX
@@ -4713,7 +4745,7 @@ struct bnxt_ulp_resource_resv_info ulp_resource_resv_list[] = {
 	.direction               = TF_DIR_RX,
 	.resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
 	.resource_type           = TF_TBL_TYPE_FULL_ACT_RECORD,
-	.count                   = 4096
+	.count                   = 8192
 	},
 	{
 	.app_id                  = 3,
@@ -4721,7 +4753,7 @@ struct bnxt_ulp_resource_resv_info ulp_resource_resv_list[] = {
 	.direction               = TF_DIR_RX,
 	.resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
 	.resource_type           = TF_TBL_TYPE_ACT_STATS_64,
-	.count                   = 1024
+	.count                   = 8192
 	},
 	{
 	.app_id                  = 3,
@@ -4801,7 +4833,7 @@ struct bnxt_ulp_resource_resv_info ulp_resource_resv_list[] = {
 	.direction               = TF_DIR_RX,
 	.resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
 	.resource_type           = TF_TCAM_TBL_TYPE_WC_TCAM,
-	.count                   = 2048
+	.count                   = 7168
 	},
 	{
 	.app_id                  = 3,
@@ -4809,7 +4841,7 @@ struct bnxt_ulp_resource_resv_info ulp_resource_resv_list[] = {
 	.direction               = TF_DIR_RX,
 	.resource_func           = BNXT_ULP_RESOURCE_FUNC_EM_TABLE,
 	.resource_type           = TF_EM_TBL_TYPE_EM_RECORD,
-	.count                   = 6144
+	.count                   = 26624
 	},
 	{
 	.app_id                  = 3,
@@ -5273,7 +5305,7 @@ struct bnxt_ulp_resource_resv_info ulp_resource_resv_list[] = {
 	.direction               = TF_DIR_RX,
 	.resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
 	.resource_type           = TF_TBL_TYPE_FULL_ACT_RECORD,
-	.count                   = 528
+	.count                   = 3340
 	},
 	{
 	.app_id                  = 4,
@@ -5281,7 +5313,7 @@ struct bnxt_ulp_resource_resv_info ulp_resource_resv_list[] = {
 	.direction               = TF_DIR_RX,
 	.resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
 	.resource_type           = TF_TBL_TYPE_ACT_STATS_64,
-	.count                   = 256
+	.count                   = 3340
 	},
 	{
 	.app_id                  = 4,
@@ -6890,3 +6922,4 @@ uint8_t ulp_glb_field_tbl[] = {
 	[7638] = 6,
 	[7642] = 7
 };
+
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 2d464fb7c4..1937bd728b 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
@@ -3,7 +3,7 @@
  * All rights reserved.
  */
 
-/* date: Fri Oct  8 11:41:10 2021 */
+/* date: Fri Nov 12 19:33:52 2021 */
 
 #include "ulp_template_db_enum.h"
 #include "ulp_template_db_field.h"
@@ -102,8 +102,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.key_start_idx = 1,
-	.blob_key_bit_size = 8,
-	.key_bit_size = 8,
+	.blob_key_bit_size = 11,
+	.key_bit_size = 11,
 	.key_num_fields = 1,
 	.ident_start_idx = 3,
 	.ident_nums = 1
@@ -123,8 +123,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_HASH,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.key_start_idx = 2,
-	.blob_key_bit_size = 73,
-	.key_bit_size = 73,
+	.blob_key_bit_size = 76,
+	.key_bit_size = 76,
 	.key_num_fields = 5,
 	.ident_start_idx = 4,
 	.ident_nums = 1
@@ -182,8 +182,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_HASH,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.key_start_idx = 28,
-	.blob_key_bit_size = 73,
-	.key_bit_size = 73,
+	.blob_key_bit_size = 76,
+	.key_bit_size = 76,
 	.key_num_fields = 5,
 	.result_start_idx = 6,
 	.result_bit_size = 62,
@@ -697,8 +697,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_HASH,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.key_start_idx = 1087,
-	.blob_key_bit_size = 16,
-	.key_bit_size = 16,
+	.blob_key_bit_size = 19,
+	.key_bit_size = 19,
 	.key_num_fields = 2,
 	.ident_start_idx = 16,
 	.ident_nums = 1
@@ -756,8 +756,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_HASH,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.key_start_idx = 1110,
-	.blob_key_bit_size = 16,
-	.key_bit_size = 16,
+	.blob_key_bit_size = 19,
+	.key_bit_size = 19,
 	.key_num_fields = 2,
 	.result_start_idx = 413,
 	.result_bit_size = 52,
@@ -789,8 +789,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_HASH,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.key_start_idx = 1112,
-	.blob_key_bit_size = 73,
-	.key_bit_size = 73,
+	.blob_key_bit_size = 76,
+	.key_bit_size = 76,
 	.key_num_fields = 5,
 	.ident_start_idx = 18,
 	.ident_nums = 1
@@ -848,8 +848,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_HASH,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.key_start_idx = 1138,
-	.blob_key_bit_size = 73,
-	.key_bit_size = 73,
+	.blob_key_bit_size = 76,
+	.key_bit_size = 76,
 	.key_num_fields = 5,
 	.result_start_idx = 422,
 	.result_bit_size = 62,
@@ -1146,8 +1146,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.key_start_idx = 1469,
-	.blob_key_bit_size = 8,
-	.key_bit_size = 8,
+	.blob_key_bit_size = 11,
+	.key_bit_size = 11,
 	.key_num_fields = 1,
 	.ident_start_idx = 27,
 	.ident_nums = 1
@@ -1564,8 +1564,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.key_start_idx = 2068,
-	.blob_key_bit_size = 8,
-	.key_bit_size = 8,
+	.blob_key_bit_size = 11,
+	.key_bit_size = 11,
 	.key_num_fields = 1,
 	.ident_start_idx = 35,
 	.ident_nums = 0
@@ -1625,8 +1625,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.key_start_idx = 2090,
-	.blob_key_bit_size = 8,
-	.key_bit_size = 8,
+	.blob_key_bit_size = 11,
+	.key_bit_size = 11,
 	.key_num_fields = 1,
 	.result_start_idx = 978,
 	.result_bit_size = 62,
@@ -1735,8 +1735,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.key_start_idx = 2092,
-	.blob_key_bit_size = 8,
-	.key_bit_size = 8,
+	.blob_key_bit_size = 11,
+	.key_bit_size = 11,
 	.key_num_fields = 1,
 	.ident_start_idx = 36,
 	.ident_nums = 0
@@ -1786,8 +1786,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.key_start_idx = 2093,
-	.blob_key_bit_size = 8,
-	.key_bit_size = 8,
+	.blob_key_bit_size = 11,
+	.key_bit_size = 11,
 	.key_num_fields = 1,
 	.result_start_idx = 1014,
 	.result_bit_size = 62,
@@ -1808,8 +1808,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.key_start_idx = 2094,
-	.blob_key_bit_size = 8,
-	.key_bit_size = 8,
+	.blob_key_bit_size = 11,
+	.key_bit_size = 11,
 	.key_num_fields = 1,
 	.ident_start_idx = 36,
 	.ident_nums = 0
@@ -1867,8 +1867,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.key_start_idx = 2116,
-	.blob_key_bit_size = 8,
-	.key_bit_size = 8,
+	.blob_key_bit_size = 11,
+	.key_bit_size = 11,
 	.key_num_fields = 1,
 	.result_start_idx = 1024,
 	.result_bit_size = 62,
@@ -1966,8 +1966,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.key_start_idx = 2118,
-	.blob_key_bit_size = 8,
-	.key_bit_size = 8,
+	.blob_key_bit_size = 11,
+	.key_bit_size = 11,
 	.key_num_fields = 1,
 	.ident_start_idx = 37,
 	.ident_nums = 0
@@ -2025,8 +2025,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.key_start_idx = 2140,
-	.blob_key_bit_size = 8,
-	.key_bit_size = 8,
+	.blob_key_bit_size = 11,
+	.key_bit_size = 11,
 	.key_num_fields = 1,
 	.result_start_idx = 1058,
 	.result_bit_size = 62,
@@ -2120,8 +2120,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.key_start_idx = 2141,
-	.blob_key_bit_size = 8,
-	.key_bit_size = 8,
+	.blob_key_bit_size = 11,
+	.key_bit_size = 11,
 	.key_num_fields = 1,
 	.ident_start_idx = 38,
 	.ident_nums = 0
@@ -2171,8 +2171,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.key_start_idx = 2142,
-	.blob_key_bit_size = 8,
-	.key_bit_size = 8,
+	.blob_key_bit_size = 11,
+	.key_bit_size = 11,
 	.key_num_fields = 1,
 	.result_start_idx = 1097,
 	.result_bit_size = 62,
@@ -2252,8 +2252,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.key_start_idx = 2143,
-	.blob_key_bit_size = 8,
-	.key_bit_size = 8,
+	.blob_key_bit_size = 11,
+	.key_bit_size = 11,
 	.key_num_fields = 1,
 	.ident_start_idx = 38,
 	.ident_nums = 0
@@ -2356,8 +2356,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
 	.gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
 	.fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
 	.key_start_idx = 2208,
-	.blob_key_bit_size = 8,
-	.key_bit_size = 8,
+	.blob_key_bit_size = 11,
+	.key_bit_size = 11,
 	.key_num_fields = 1,
 	.result_start_idx = 1286,
 	.result_bit_size = 62,
@@ -2694,7 +2694,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 	{
 	.field_info_mask = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_HF,
 		.field_opr1 = {
@@ -2703,7 +2703,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		},
 	.field_info_spec = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_HF,
 		.field_opr1 = {
@@ -2715,7 +2715,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 	{
 	.field_info_mask = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_HF,
 		.field_opr1 = {
@@ -2724,7 +2724,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		},
 	.field_info_spec = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_HF,
 		.field_opr1 = {
@@ -3115,7 +3115,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 	{
 	.field_info_mask = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_HF,
 		.field_opr1 = {
@@ -3124,7 +3124,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		},
 	.field_info_spec = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_HF,
 		.field_opr1 = {
@@ -17472,7 +17472,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 	{
 	.field_info_mask = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_HF,
 		.field_opr1 = {
@@ -17481,7 +17481,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		},
 	.field_info_spec = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_HF,
 		.field_opr1 = {
@@ -17815,7 +17815,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 	{
 	.field_info_mask = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_HF,
 		.field_opr1 = {
@@ -17824,7 +17824,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		},
 	.field_info_spec = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_HF,
 		.field_opr1 = {
@@ -17855,7 +17855,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 	{
 	.field_info_mask = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_HF,
 		.field_opr1 = {
@@ -17864,7 +17864,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		},
 	.field_info_spec = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_HF,
 		.field_opr1 = {
@@ -18255,7 +18255,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 	{
 	.field_info_mask = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_HF,
 		.field_opr1 = {
@@ -18264,7 +18264,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		},
 	.field_info_spec = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_HF,
 		.field_opr1 = {
@@ -22928,7 +22928,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 	{
 	.field_info_mask = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_HF,
 		.field_opr1 = {
@@ -22937,7 +22937,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 		},
 	.field_info_spec = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_HF,
 		.field_opr1 = {
@@ -31167,15 +31167,16 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 	{
 	.field_info_mask = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.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 = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_CF,
 		.field_opr1 = {
@@ -31492,15 +31493,16 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 	{
 	.field_info_mask = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.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 = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_CF,
 		.field_opr1 = {
@@ -31533,15 +31535,16 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 	{
 	.field_info_mask = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.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 = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_CF,
 		.field_opr1 = {
@@ -31553,15 +31556,16 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 	{
 	.field_info_mask = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.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 = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_CF,
 		.field_opr1 = {
@@ -31573,15 +31577,16 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 	{
 	.field_info_mask = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.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 = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_CF,
 		.field_opr1 = {
@@ -31898,15 +31903,16 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 	{
 	.field_info_mask = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.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 = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_CF,
 		.field_opr1 = {
@@ -31939,15 +31945,16 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 	{
 	.field_info_mask = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.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 = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_CF,
 		.field_opr1 = {
@@ -32264,15 +32271,16 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 	{
 	.field_info_mask = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.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 = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_CF,
 		.field_opr1 = {
@@ -32284,15 +32292,16 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 	{
 	.field_info_mask = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.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 = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_CF,
 		.field_opr1 = {
@@ -32304,15 +32313,16 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 	{
 	.field_info_mask = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.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 = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_CF,
 		.field_opr1 = {
@@ -32324,15 +32334,16 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 	{
 	.field_info_mask = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.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 = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_CF,
 		.field_opr1 = {
@@ -33265,15 +33276,16 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
 	{
 	.field_info_mask = {
 		.description = "svif",
-		.field_bit_size = 8,
+		.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 = 8,
+		.field_bit_size = 11,
 		.field_opc = BNXT_ULP_FIELD_OPC_SRC1,
 		.field_src1 = BNXT_ULP_FIELD_SRC_CF,
 		.field_opr1 = {
@@ -43541,3 +43553,4 @@ struct bnxt_ulp_mapper_ident_info ulp_thor_class_ident_list[] = {
 	.ident_bit_pos = 29
 	}
 };
+
-- 
2.17.1


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

* Re: [PATCH] net/bnxt: fix Thor svif size mismatch for generic tables
  2021-11-22  6:14 [PATCH] net/bnxt: fix Thor svif size mismatch for generic tables Venkat Duvvuru
@ 2021-11-22  7:14 ` Ajit Khaparde
  0 siblings, 0 replies; 2+ messages in thread
From: Ajit Khaparde @ 2021-11-22  7:14 UTC (permalink / raw)
  To: Venkat Duvvuru; +Cc: dpdk-dev, Mike Baucom, dpdk stable, Ferruh Yigit

On Sun, Nov 21, 2021 at 10:15 PM Venkat Duvvuru
<venkatkumar.duvvuru@broadcom.com> wrote:
>
> From: Mike Baucom <michael.baucom@broadcom.com>
>
> The size of the svif in the generic tables was incorrectly set to the
> Wh+ size of 8 bits.  This resulted in incorrect l2 context entries being
> associated with a flow once the svif became greater than 255.
>
> Fixes: ad9eed0248ad ("net/bnxt: support flow template for Thor")
> Cc: stable@dpdk.org
>
> Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
> Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
> Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Patch applied to dpdk-next-net-brcm. Thanks

> ---
>  .../generic_templates/ulp_template_db_enum.h  |  15 +-
>  .../generic_templates/ulp_template_db_tbl.c   |  73 ++++++--
>  .../ulp_template_db_thor_class.c              | 175 ++++++++++--------
>  3 files changed, 156 insertions(+), 107 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 c01ae1601d..e744a6409e 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
> @@ -3,7 +3,7 @@
>   * All rights reserved.
>   */
>
> -/* date: Fri Oct  8 11:41:10 2021 */
> +/* date: Fri Nov 12 19:33:52 2021 */
>
>  #ifndef ULP_TEMPLATE_DB_H_
>  #define ULP_TEMPLATE_DB_H_
> @@ -28,7 +28,7 @@
>  #define BNXT_ULP_ACT_HID_MASK 2047
>  #define BNXT_ULP_APP_RESOURCE_RESV_LIST_MAX_SZ 16
>  #define BNXT_ULP_GLB_RESOURCE_TBL_MAX_SZ 132
> -#define BNXT_ULP_APP_GLB_RESOURCE_TBL_MAX_SZ 140
> +#define BNXT_ULP_APP_GLB_RESOURCE_TBL_MAX_SZ 144
>  #define BNXT_ULP_RESOURCE_RESV_LIST_MAX_SZ 409
>  #define BNXT_ULP_APP_CAP_TBL_MAX_SZ 12
>  #define BNXT_ULP_COND_GOTO_REJECT 1023
> @@ -450,10 +450,12 @@ enum bnxt_ulp_glb_rf_idx {
>         BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_0 = 58,
>         BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_1 = 59,
>         BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_2 = 60,
> -       BNXT_ULP_GLB_RF_IDX_APP_GLB_AREC_PTR_0 = 61,
> -       BNXT_ULP_GLB_RF_IDX_APP_GLB_AREC_PTR_1 = 62,
> -       BNXT_ULP_GLB_RF_IDX_GRE_PROF_FUNC_ID = 63,
> -       BNXT_ULP_GLB_RF_IDX_LAST = 64
> +       BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_3 = 61,
> +       BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_4 = 62,
> +       BNXT_ULP_GLB_RF_IDX_APP_GLB_AREC_PTR_0 = 63,
> +       BNXT_ULP_GLB_RF_IDX_APP_GLB_AREC_PTR_1 = 64,
> +       BNXT_ULP_GLB_RF_IDX_GRE_PROF_FUNC_ID = 65,
> +       BNXT_ULP_GLB_RF_IDX_LAST = 66
>  };
>
>  enum bnxt_ulp_hdr_type {
> @@ -2312,3 +2314,4 @@ enum bnxt_ulp_df_tpl {
>  };
>
>  #endif
> +
> 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 d5aea4d456..66e7663241 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
> @@ -3,7 +3,7 @@
>   * All rights reserved.
>   */
>
> -/* date: Fri Oct  8 11:41:10 2021 */
> +/* date: Fri Nov 12 19:33:52 2021 */
>
>  #include "ulp_template_db_enum.h"
>  #include "ulp_template_db_field.h"
> @@ -15,7 +15,7 @@ struct bnxt_ulp_generic_tbl_params ulp_generic_tbl_params[] = {
>         [BNXT_ULP_RESOURCE_SUB_TYPE_GENERIC_TABLE_L2_CNTXT_TCAM << 1 |
>                 BNXT_ULP_DIRECTION_INGRESS] = {
>         .name                    = "INGRESS GENERIC_TABLE_L2_CNTXT_TCAM",
> -       .result_num_entries      = 256,
> +       .result_num_entries      = 2048,
>         .result_num_bytes        = 8,
>         .key_num_bytes           = 0,
>         .num_buckets             = 0,
> @@ -25,7 +25,7 @@ struct bnxt_ulp_generic_tbl_params ulp_generic_tbl_params[] = {
>         [BNXT_ULP_RESOURCE_SUB_TYPE_GENERIC_TABLE_L2_CNTXT_TCAM << 1 |
>                 BNXT_ULP_DIRECTION_EGRESS] = {
>         .name                    = "EGRESS GENERIC_TABLE_L2_CNTXT_TCAM",
> -       .result_num_entries      = 256,
> +       .result_num_entries      = 2048,
>         .result_num_bytes        = 8,
>         .key_num_bytes           = 0,
>         .num_buckets             = 0,
> @@ -75,21 +75,21 @@ struct bnxt_ulp_generic_tbl_params ulp_generic_tbl_params[] = {
>         [BNXT_ULP_RESOURCE_SUB_TYPE_GENERIC_TABLE_MAC_ADDR_CACHE << 1 |
>                 BNXT_ULP_DIRECTION_INGRESS] = {
>         .name                    = "INGRESS GENERIC_TABLE_MAC_ADDR_CACHE",
> -       .result_num_entries      = 256,
> +       .result_num_entries      = 512,
>         .result_num_bytes        = 8,
>         .key_num_bytes           = 10,
>         .num_buckets             = 8,
> -       .hash_tbl_entries        = 1024,
> +       .hash_tbl_entries        = 2048,
>         .result_byte_order       = BNXT_ULP_BYTE_ORDER_LE
>         },
>         [BNXT_ULP_RESOURCE_SUB_TYPE_GENERIC_TABLE_MAC_ADDR_CACHE << 1 |
>                 BNXT_ULP_DIRECTION_EGRESS] = {
>         .name                    = "EGRESS GENERIC_TABLE_MAC_ADDR_CACHE",
> -       .result_num_entries      = 256,
> +       .result_num_entries      = 512,
>         .result_num_bytes        = 8,
>         .key_num_bytes           = 10,
>         .num_buckets             = 8,
> -       .hash_tbl_entries        = 1024,
> +       .hash_tbl_entries        = 2048,
>         .result_byte_order       = BNXT_ULP_BYTE_ORDER_LE
>         },
>         [BNXT_ULP_RESOURCE_SUB_TYPE_GENERIC_TABLE_PORT_TABLE << 1 |
> @@ -117,7 +117,7 @@ struct bnxt_ulp_generic_tbl_params ulp_generic_tbl_params[] = {
>         .name                    = "INGRESS GENERIC_TABLE_TUNNEL_CACHE",
>         .result_num_entries      = 256,
>         .result_num_bytes        = 7,
> -       .key_num_bytes           = 2,
> +       .key_num_bytes           = 3,
>         .num_buckets             = 8,
>         .hash_tbl_entries        = 1024,
>         .result_byte_order       = BNXT_ULP_BYTE_ORDER_LE
> @@ -127,7 +127,7 @@ struct bnxt_ulp_generic_tbl_params ulp_generic_tbl_params[] = {
>         .name                    = "EGRESS GENERIC_TABLE_TUNNEL_CACHE",
>         .result_num_entries      = 256,
>         .result_num_bytes        = 7,
> -       .key_num_bytes           = 2,
> +       .key_num_bytes           = 3,
>         .num_buckets             = 8,
>         .hash_tbl_entries        = 1024,
>         .result_byte_order       = BNXT_ULP_BYTE_ORDER_LE
> @@ -367,8 +367,7 @@ struct bnxt_ulp_app_capabilities_info ulp_app_cap_info_list[] = {
>         .device_id               = BNXT_ULP_DEVICE_ID_THOR,
>         .flags                   = BNXT_ULP_APP_CAP_SHARED_EN |
>                                    BNXT_ULP_APP_CAP_HOT_UPGRADE_EN |
> -                                  BNXT_ULP_APP_CAP_UNICAST_ONLY |
> -                                  BNXT_ULP_APP_CAP_SOCKET_DIRECT
> +                                  BNXT_ULP_APP_CAP_UNICAST_ONLY
>         },
>         {
>         .app_id                  = 2,
> @@ -417,7 +416,8 @@ struct bnxt_ulp_app_capabilities_info ulp_app_cap_info_list[] = {
>         .app_id                  = 5,
>         .device_id               = BNXT_ULP_DEVICE_ID_THOR,
>         .flags                   = BNXT_ULP_APP_CAP_SHARED_EN |
> -                                  BNXT_ULP_APP_CAP_UNICAST_ONLY
> +                                  BNXT_ULP_APP_CAP_UNICAST_ONLY |
> +                                  BNXT_ULP_APP_CAP_SOCKET_DIRECT
>         }
>  };
>
> @@ -517,7 +517,7 @@ struct bnxt_ulp_resource_resv_info ulp_app_resource_resv_list[] = {
>         .direction               = TF_DIR_RX,
>         .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
>         .resource_type           = TF_TCAM_TBL_TYPE_WC_TCAM,
> -       .count                   = 1024
> +       .count                   = 6648
>         },
>         {
>         .app_id                  = 5,
> @@ -549,7 +549,7 @@ struct bnxt_ulp_resource_resv_info ulp_app_resource_resv_list[] = {
>         .direction               = TF_DIR_RX,
>         .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
>         .resource_type           = TF_TCAM_TBL_TYPE_WC_TCAM,
> -       .count                   = 1024
> +       .count                   = 6648
>         }
>  };
>
> @@ -1311,6 +1311,22 @@ struct bnxt_ulp_glb_resource_info ulp_app_glb_resource_tbl[] = {
>         .app_id                  = 4,
>         .device_id               = BNXT_ULP_DEVICE_ID_THOR,
>         .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
> +       .resource_type           = TF_TBL_TYPE_WC_FKB,
> +       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_3,
> +       .direction               = TF_DIR_RX
> +       },
> +       {
> +       .app_id                  = 4,
> +       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
> +       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
> +       .resource_type           = TF_TBL_TYPE_WC_FKB,
> +       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_4,
> +       .direction               = TF_DIR_RX
> +       },
> +       {
> +       .app_id                  = 4,
> +       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
> +       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
>         .resource_type           = TF_TBL_TYPE_FULL_ACT_RECORD,
>         .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_AREC_PTR_0,
>         .direction               = TF_DIR_RX
> @@ -1663,6 +1679,22 @@ struct bnxt_ulp_glb_resource_info ulp_app_glb_resource_tbl[] = {
>         .app_id                  = 5,
>         .device_id               = BNXT_ULP_DEVICE_ID_THOR,
>         .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
> +       .resource_type           = TF_TBL_TYPE_WC_FKB,
> +       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_3,
> +       .direction               = TF_DIR_RX
> +       },
> +       {
> +       .app_id                  = 5,
> +       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
> +       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
> +       .resource_type           = TF_TBL_TYPE_WC_FKB,
> +       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_4,
> +       .direction               = TF_DIR_RX
> +       },
> +       {
> +       .app_id                  = 5,
> +       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
> +       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
>         .resource_type           = TF_TBL_TYPE_FULL_ACT_RECORD,
>         .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_AREC_PTR_0,
>         .direction               = TF_DIR_RX
> @@ -4713,7 +4745,7 @@ struct bnxt_ulp_resource_resv_info ulp_resource_resv_list[] = {
>         .direction               = TF_DIR_RX,
>         .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
>         .resource_type           = TF_TBL_TYPE_FULL_ACT_RECORD,
> -       .count                   = 4096
> +       .count                   = 8192
>         },
>         {
>         .app_id                  = 3,
> @@ -4721,7 +4753,7 @@ struct bnxt_ulp_resource_resv_info ulp_resource_resv_list[] = {
>         .direction               = TF_DIR_RX,
>         .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
>         .resource_type           = TF_TBL_TYPE_ACT_STATS_64,
> -       .count                   = 1024
> +       .count                   = 8192
>         },
>         {
>         .app_id                  = 3,
> @@ -4801,7 +4833,7 @@ struct bnxt_ulp_resource_resv_info ulp_resource_resv_list[] = {
>         .direction               = TF_DIR_RX,
>         .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
>         .resource_type           = TF_TCAM_TBL_TYPE_WC_TCAM,
> -       .count                   = 2048
> +       .count                   = 7168
>         },
>         {
>         .app_id                  = 3,
> @@ -4809,7 +4841,7 @@ struct bnxt_ulp_resource_resv_info ulp_resource_resv_list[] = {
>         .direction               = TF_DIR_RX,
>         .resource_func           = BNXT_ULP_RESOURCE_FUNC_EM_TABLE,
>         .resource_type           = TF_EM_TBL_TYPE_EM_RECORD,
> -       .count                   = 6144
> +       .count                   = 26624
>         },
>         {
>         .app_id                  = 3,
> @@ -5273,7 +5305,7 @@ struct bnxt_ulp_resource_resv_info ulp_resource_resv_list[] = {
>         .direction               = TF_DIR_RX,
>         .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
>         .resource_type           = TF_TBL_TYPE_FULL_ACT_RECORD,
> -       .count                   = 528
> +       .count                   = 3340
>         },
>         {
>         .app_id                  = 4,
> @@ -5281,7 +5313,7 @@ struct bnxt_ulp_resource_resv_info ulp_resource_resv_list[] = {
>         .direction               = TF_DIR_RX,
>         .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
>         .resource_type           = TF_TBL_TYPE_ACT_STATS_64,
> -       .count                   = 256
> +       .count                   = 3340
>         },
>         {
>         .app_id                  = 4,
> @@ -6890,3 +6922,4 @@ uint8_t ulp_glb_field_tbl[] = {
>         [7638] = 6,
>         [7642] = 7
>  };
> +
> 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 2d464fb7c4..1937bd728b 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
> @@ -3,7 +3,7 @@
>   * All rights reserved.
>   */
>
> -/* date: Fri Oct  8 11:41:10 2021 */
> +/* date: Fri Nov 12 19:33:52 2021 */
>
>  #include "ulp_template_db_enum.h"
>  #include "ulp_template_db_field.h"
> @@ -102,8 +102,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
>         .gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
>         .fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
>         .key_start_idx = 1,
> -       .blob_key_bit_size = 8,
> -       .key_bit_size = 8,
> +       .blob_key_bit_size = 11,
> +       .key_bit_size = 11,
>         .key_num_fields = 1,
>         .ident_start_idx = 3,
>         .ident_nums = 1
> @@ -123,8 +123,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
>         .gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_HASH,
>         .fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
>         .key_start_idx = 2,
> -       .blob_key_bit_size = 73,
> -       .key_bit_size = 73,
> +       .blob_key_bit_size = 76,
> +       .key_bit_size = 76,
>         .key_num_fields = 5,
>         .ident_start_idx = 4,
>         .ident_nums = 1
> @@ -182,8 +182,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
>         .gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_HASH,
>         .fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
>         .key_start_idx = 28,
> -       .blob_key_bit_size = 73,
> -       .key_bit_size = 73,
> +       .blob_key_bit_size = 76,
> +       .key_bit_size = 76,
>         .key_num_fields = 5,
>         .result_start_idx = 6,
>         .result_bit_size = 62,
> @@ -697,8 +697,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
>         .gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_HASH,
>         .fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
>         .key_start_idx = 1087,
> -       .blob_key_bit_size = 16,
> -       .key_bit_size = 16,
> +       .blob_key_bit_size = 19,
> +       .key_bit_size = 19,
>         .key_num_fields = 2,
>         .ident_start_idx = 16,
>         .ident_nums = 1
> @@ -756,8 +756,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
>         .gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_HASH,
>         .fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
>         .key_start_idx = 1110,
> -       .blob_key_bit_size = 16,
> -       .key_bit_size = 16,
> +       .blob_key_bit_size = 19,
> +       .key_bit_size = 19,
>         .key_num_fields = 2,
>         .result_start_idx = 413,
>         .result_bit_size = 52,
> @@ -789,8 +789,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
>         .gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_HASH,
>         .fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
>         .key_start_idx = 1112,
> -       .blob_key_bit_size = 73,
> -       .key_bit_size = 73,
> +       .blob_key_bit_size = 76,
> +       .key_bit_size = 76,
>         .key_num_fields = 5,
>         .ident_start_idx = 18,
>         .ident_nums = 1
> @@ -848,8 +848,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
>         .gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_HASH,
>         .fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
>         .key_start_idx = 1138,
> -       .blob_key_bit_size = 73,
> -       .key_bit_size = 73,
> +       .blob_key_bit_size = 76,
> +       .key_bit_size = 76,
>         .key_num_fields = 5,
>         .result_start_idx = 422,
>         .result_bit_size = 62,
> @@ -1146,8 +1146,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
>         .gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
>         .fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
>         .key_start_idx = 1469,
> -       .blob_key_bit_size = 8,
> -       .key_bit_size = 8,
> +       .blob_key_bit_size = 11,
> +       .key_bit_size = 11,
>         .key_num_fields = 1,
>         .ident_start_idx = 27,
>         .ident_nums = 1
> @@ -1564,8 +1564,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
>         .gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
>         .fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
>         .key_start_idx = 2068,
> -       .blob_key_bit_size = 8,
> -       .key_bit_size = 8,
> +       .blob_key_bit_size = 11,
> +       .key_bit_size = 11,
>         .key_num_fields = 1,
>         .ident_start_idx = 35,
>         .ident_nums = 0
> @@ -1625,8 +1625,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
>         .gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
>         .fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
>         .key_start_idx = 2090,
> -       .blob_key_bit_size = 8,
> -       .key_bit_size = 8,
> +       .blob_key_bit_size = 11,
> +       .key_bit_size = 11,
>         .key_num_fields = 1,
>         .result_start_idx = 978,
>         .result_bit_size = 62,
> @@ -1735,8 +1735,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
>         .gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
>         .fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
>         .key_start_idx = 2092,
> -       .blob_key_bit_size = 8,
> -       .key_bit_size = 8,
> +       .blob_key_bit_size = 11,
> +       .key_bit_size = 11,
>         .key_num_fields = 1,
>         .ident_start_idx = 36,
>         .ident_nums = 0
> @@ -1786,8 +1786,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
>         .gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
>         .fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
>         .key_start_idx = 2093,
> -       .blob_key_bit_size = 8,
> -       .key_bit_size = 8,
> +       .blob_key_bit_size = 11,
> +       .key_bit_size = 11,
>         .key_num_fields = 1,
>         .result_start_idx = 1014,
>         .result_bit_size = 62,
> @@ -1808,8 +1808,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
>         .gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
>         .fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
>         .key_start_idx = 2094,
> -       .blob_key_bit_size = 8,
> -       .key_bit_size = 8,
> +       .blob_key_bit_size = 11,
> +       .key_bit_size = 11,
>         .key_num_fields = 1,
>         .ident_start_idx = 36,
>         .ident_nums = 0
> @@ -1867,8 +1867,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
>         .gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
>         .fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
>         .key_start_idx = 2116,
> -       .blob_key_bit_size = 8,
> -       .key_bit_size = 8,
> +       .blob_key_bit_size = 11,
> +       .key_bit_size = 11,
>         .key_num_fields = 1,
>         .result_start_idx = 1024,
>         .result_bit_size = 62,
> @@ -1966,8 +1966,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
>         .gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
>         .fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
>         .key_start_idx = 2118,
> -       .blob_key_bit_size = 8,
> -       .key_bit_size = 8,
> +       .blob_key_bit_size = 11,
> +       .key_bit_size = 11,
>         .key_num_fields = 1,
>         .ident_start_idx = 37,
>         .ident_nums = 0
> @@ -2025,8 +2025,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
>         .gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
>         .fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
>         .key_start_idx = 2140,
> -       .blob_key_bit_size = 8,
> -       .key_bit_size = 8,
> +       .blob_key_bit_size = 11,
> +       .key_bit_size = 11,
>         .key_num_fields = 1,
>         .result_start_idx = 1058,
>         .result_bit_size = 62,
> @@ -2120,8 +2120,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
>         .gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
>         .fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
>         .key_start_idx = 2141,
> -       .blob_key_bit_size = 8,
> -       .key_bit_size = 8,
> +       .blob_key_bit_size = 11,
> +       .key_bit_size = 11,
>         .key_num_fields = 1,
>         .ident_start_idx = 38,
>         .ident_nums = 0
> @@ -2171,8 +2171,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
>         .gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
>         .fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
>         .key_start_idx = 2142,
> -       .blob_key_bit_size = 8,
> -       .key_bit_size = 8,
> +       .blob_key_bit_size = 11,
> +       .key_bit_size = 11,
>         .key_num_fields = 1,
>         .result_start_idx = 1097,
>         .result_bit_size = 62,
> @@ -2252,8 +2252,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
>         .gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
>         .fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
>         .key_start_idx = 2143,
> -       .blob_key_bit_size = 8,
> -       .key_bit_size = 8,
> +       .blob_key_bit_size = 11,
> +       .key_bit_size = 11,
>         .key_num_fields = 1,
>         .ident_start_idx = 38,
>         .ident_nums = 0
> @@ -2356,8 +2356,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_thor_class_tbl_list[] = {
>         .gen_tbl_lkup_type = BNXT_ULP_GENERIC_TBL_LKUP_TYPE_INDEX,
>         .fdb_opcode = BNXT_ULP_FDB_OPC_PUSH_FID,
>         .key_start_idx = 2208,
> -       .blob_key_bit_size = 8,
> -       .key_bit_size = 8,
> +       .blob_key_bit_size = 11,
> +       .key_bit_size = 11,
>         .key_num_fields = 1,
>         .result_start_idx = 1286,
>         .result_bit_size = 62,
> @@ -2694,7 +2694,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>         {
>         .field_info_mask = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_HF,
>                 .field_opr1 = {
> @@ -2703,7 +2703,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>                 },
>         .field_info_spec = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_HF,
>                 .field_opr1 = {
> @@ -2715,7 +2715,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>         {
>         .field_info_mask = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_HF,
>                 .field_opr1 = {
> @@ -2724,7 +2724,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>                 },
>         .field_info_spec = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_HF,
>                 .field_opr1 = {
> @@ -3115,7 +3115,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>         {
>         .field_info_mask = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_HF,
>                 .field_opr1 = {
> @@ -3124,7 +3124,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>                 },
>         .field_info_spec = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_HF,
>                 .field_opr1 = {
> @@ -17472,7 +17472,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>         {
>         .field_info_mask = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_HF,
>                 .field_opr1 = {
> @@ -17481,7 +17481,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>                 },
>         .field_info_spec = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_HF,
>                 .field_opr1 = {
> @@ -17815,7 +17815,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>         {
>         .field_info_mask = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_HF,
>                 .field_opr1 = {
> @@ -17824,7 +17824,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>                 },
>         .field_info_spec = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_HF,
>                 .field_opr1 = {
> @@ -17855,7 +17855,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>         {
>         .field_info_mask = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_HF,
>                 .field_opr1 = {
> @@ -17864,7 +17864,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>                 },
>         .field_info_spec = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_HF,
>                 .field_opr1 = {
> @@ -18255,7 +18255,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>         {
>         .field_info_mask = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_HF,
>                 .field_opr1 = {
> @@ -18264,7 +18264,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>                 },
>         .field_info_spec = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_HF,
>                 .field_opr1 = {
> @@ -22928,7 +22928,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>         {
>         .field_info_mask = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_HF,
>                 .field_opr1 = {
> @@ -22937,7 +22937,7 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>                 },
>         .field_info_spec = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_HF,
>                 .field_opr1 = {
> @@ -31167,15 +31167,16 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>         {
>         .field_info_mask = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .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 = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_CF,
>                 .field_opr1 = {
> @@ -31492,15 +31493,16 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>         {
>         .field_info_mask = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .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 = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_CF,
>                 .field_opr1 = {
> @@ -31533,15 +31535,16 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>         {
>         .field_info_mask = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .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 = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_CF,
>                 .field_opr1 = {
> @@ -31553,15 +31556,16 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>         {
>         .field_info_mask = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .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 = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_CF,
>                 .field_opr1 = {
> @@ -31573,15 +31577,16 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>         {
>         .field_info_mask = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .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 = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_CF,
>                 .field_opr1 = {
> @@ -31898,15 +31903,16 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>         {
>         .field_info_mask = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .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 = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_CF,
>                 .field_opr1 = {
> @@ -31939,15 +31945,16 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>         {
>         .field_info_mask = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .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 = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_CF,
>                 .field_opr1 = {
> @@ -32264,15 +32271,16 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>         {
>         .field_info_mask = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .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 = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_CF,
>                 .field_opr1 = {
> @@ -32284,15 +32292,16 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>         {
>         .field_info_mask = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .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 = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_CF,
>                 .field_opr1 = {
> @@ -32304,15 +32313,16 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>         {
>         .field_info_mask = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .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 = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_CF,
>                 .field_opr1 = {
> @@ -32324,15 +32334,16 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>         {
>         .field_info_mask = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .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 = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_CF,
>                 .field_opr1 = {
> @@ -33265,15 +33276,16 @@ struct bnxt_ulp_mapper_key_info ulp_thor_class_key_info_list[] = {
>         {
>         .field_info_mask = {
>                 .description = "svif",
> -               .field_bit_size = 8,
> +               .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 = 8,
> +               .field_bit_size = 11,
>                 .field_opc = BNXT_ULP_FIELD_OPC_SRC1,
>                 .field_src1 = BNXT_ULP_FIELD_SRC_CF,
>                 .field_opr1 = {
> @@ -43541,3 +43553,4 @@ struct bnxt_ulp_mapper_ident_info ulp_thor_class_ident_list[] = {
>         .ident_bit_pos = 29
>         }
>  };
> +
> --
> 2.17.1
>

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

end of thread, other threads:[~2021-11-22  7:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-22  6:14 [PATCH] net/bnxt: fix Thor svif size mismatch for generic tables Venkat Duvvuru
2021-11-22  7:14 ` Ajit Khaparde

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).