[dpdk-dev] [PATCH 11/13] net/bnxt: remove flow db table type from templates

Somnath Kotur somnath.kotur at broadcom.com
Fri Oct 9 13:11:28 CEST 2020


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

FDB type is now driven by the caller, not the template.

Signed-off-by: Mike Baucom <michael.baucom at broadcom.com>
Reviewed-by: Ajit Kumar Khaparde <ajit.khaparde at broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha at broadcom.com>
---
 .../net/bnxt/tf_ulp/ulp_template_db_stingray_act.c | 18 ++----
 .../bnxt/tf_ulp/ulp_template_db_stingray_class.c   | 69 ++++++++--------------
 .../net/bnxt/tf_ulp/ulp_template_db_wh_plus_act.c  | 18 ++----
 .../bnxt/tf_ulp/ulp_template_db_wh_plus_class.c    | 69 ++++++++--------------
 drivers/net/bnxt/tf_ulp/ulp_template_struct.h      |  1 -
 5 files changed, 58 insertions(+), 117 deletions(-)

diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db_stingray_act.c b/drivers/net/bnxt/tf_ulp/ulp_template_db_stingray_act.c
index 68e4d8e..2237ffb 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_template_db_stingray_act.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_template_db_stingray_act.c
@@ -12,38 +12,32 @@ struct bnxt_ulp_mapper_tbl_list_info ulp_stingray_act_tmpl_list[] = {
 	[1] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 6,
-	.start_tbl_idx = 0,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 0
 	},
 	[2] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 3,
-	.start_tbl_idx = 6,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 6
 	},
 	[3] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 3,
-	.start_tbl_idx = 9,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 9
 	},
 	[4] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 6,
-	.start_tbl_idx = 12,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 12
 	},
 	[5] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 6,
-	.start_tbl_idx = 18,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 18
 	},
 	[6] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 5,
-	.start_tbl_idx = 24,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 24
 	}
 };
 
diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db_stingray_class.c b/drivers/net/bnxt/tf_ulp/ulp_template_db_stingray_class.c
index 1fa364e..62b940d 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_template_db_stingray_class.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_template_db_stingray_class.c
@@ -12,140 +12,117 @@ struct bnxt_ulp_mapper_tbl_list_info ulp_stingray_class_tmpl_list[] = {
 	[1] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 6,
-	.start_tbl_idx = 0,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_DEFAULT
+	.start_tbl_idx = 0
 	},
 	[2] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 7,
-	.start_tbl_idx = 6,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_DEFAULT
+	.start_tbl_idx = 6
 	},
 	[3] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 7,
-	.start_tbl_idx = 13,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_DEFAULT
+	.start_tbl_idx = 13
 	},
 	[4] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 7,
-	.start_tbl_idx = 20,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_DEFAULT
+	.start_tbl_idx = 20
 	},
 	[5] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 1,
-	.start_tbl_idx = 27,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_DEFAULT
+	.start_tbl_idx = 27
 	},
 	[6] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 5,
-	.start_tbl_idx = 28,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 28
 	},
 	[7] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 5,
-	.start_tbl_idx = 33,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 33
 	},
 	[8] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 6,
-	.start_tbl_idx = 38,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 38
 	},
 	[9] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 6,
-	.start_tbl_idx = 44,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 44
 	},
 	[10] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 6,
-	.start_tbl_idx = 50,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 50
 	},
 	[11] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 6,
-	.start_tbl_idx = 56,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 56
 	},
 	[12] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 5,
-	.start_tbl_idx = 62,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 62
 	},
 	[13] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 5,
-	.start_tbl_idx = 67,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 67
 	},
 	[14] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 5,
-	.start_tbl_idx = 72,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 72
 	},
 	[15] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 5,
-	.start_tbl_idx = 77,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 77
 	},
 	[16] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 5,
-	.start_tbl_idx = 82,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 82
 	},
 	[17] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 5,
-	.start_tbl_idx = 87,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 87
 	},
 	[18] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 6,
-	.start_tbl_idx = 92,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 92
 	},
 	[19] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 6,
-	.start_tbl_idx = 98,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 98
 	},
 	[20] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 6,
-	.start_tbl_idx = 104,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 104
 	},
 	[21] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 6,
-	.start_tbl_idx = 110,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 110
 	},
 	[22] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 5,
-	.start_tbl_idx = 116,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 116
 	},
 	[23] = {
 	.device_name = BNXT_ULP_DEVICE_ID_STINGRAY,
 	.num_tbls = 5,
-	.start_tbl_idx = 121,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 121
 	}
 };
 
diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_act.c b/drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_act.c
index 381278e..39e8ec4 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_act.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_act.c
@@ -12,38 +12,32 @@ struct bnxt_ulp_mapper_tbl_list_info ulp_wh_plus_act_tmpl_list[] = {
 	[1] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 6,
-	.start_tbl_idx = 0,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 0
 	},
 	[2] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 3,
-	.start_tbl_idx = 6,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 6
 	},
 	[3] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 3,
-	.start_tbl_idx = 9,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 9
 	},
 	[4] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 6,
-	.start_tbl_idx = 12,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 12
 	},
 	[5] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 6,
-	.start_tbl_idx = 18,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 18
 	},
 	[6] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 5,
-	.start_tbl_idx = 24,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 24
 	}
 };
 
diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c b/drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c
index 7024658..470d91c 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c
@@ -12,140 +12,117 @@ struct bnxt_ulp_mapper_tbl_list_info ulp_wh_plus_class_tmpl_list[] = {
 	[1] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 6,
-	.start_tbl_idx = 0,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_DEFAULT
+	.start_tbl_idx = 0
 	},
 	[2] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 7,
-	.start_tbl_idx = 6,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_DEFAULT
+	.start_tbl_idx = 6
 	},
 	[3] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 7,
-	.start_tbl_idx = 13,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_DEFAULT
+	.start_tbl_idx = 13
 	},
 	[4] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 7,
-	.start_tbl_idx = 20,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_DEFAULT
+	.start_tbl_idx = 20
 	},
 	[5] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 1,
-	.start_tbl_idx = 27,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_DEFAULT
+	.start_tbl_idx = 27
 	},
 	[6] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 5,
-	.start_tbl_idx = 28,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 28
 	},
 	[7] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 5,
-	.start_tbl_idx = 33,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 33
 	},
 	[8] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 6,
-	.start_tbl_idx = 38,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 38
 	},
 	[9] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 6,
-	.start_tbl_idx = 44,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 44
 	},
 	[10] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 6,
-	.start_tbl_idx = 50,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 50
 	},
 	[11] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 6,
-	.start_tbl_idx = 56,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 56
 	},
 	[12] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 5,
-	.start_tbl_idx = 62,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 62
 	},
 	[13] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 5,
-	.start_tbl_idx = 67,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 67
 	},
 	[14] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 5,
-	.start_tbl_idx = 72,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 72
 	},
 	[15] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 5,
-	.start_tbl_idx = 77,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 77
 	},
 	[16] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 5,
-	.start_tbl_idx = 82,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 82
 	},
 	[17] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 5,
-	.start_tbl_idx = 87,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 87
 	},
 	[18] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 6,
-	.start_tbl_idx = 92,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 92
 	},
 	[19] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 6,
-	.start_tbl_idx = 98,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 98
 	},
 	[20] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 6,
-	.start_tbl_idx = 104,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 104
 	},
 	[21] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 6,
-	.start_tbl_idx = 110,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 110
 	},
 	[22] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 5,
-	.start_tbl_idx = 116,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 116
 	},
 	[23] = {
 	.device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
 	.num_tbls = 5,
-	.start_tbl_idx = 121,
-	.flow_db_table_type = BNXT_ULP_FDB_TYPE_REGULAR
+	.start_tbl_idx = 121
 	}
 };
 
diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_struct.h b/drivers/net/bnxt/tf_ulp/ulp_template_struct.h
index 107a06a..69bb61e 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_template_struct.h
+++ b/drivers/net/bnxt/tf_ulp/ulp_template_struct.h
@@ -175,7 +175,6 @@ struct bnxt_ulp_mapper_tbl_list_info {
 	uint32_t		device_name;
 	uint32_t		start_tbl_idx;
 	uint32_t		num_tbls;
-	enum bnxt_ulp_fdb_type	flow_db_table_type;
 };
 
 struct bnxt_ulp_mapper_tbl_info {
-- 
2.7.4



More information about the dev mailing list