[v2,11/12] net/bnxt: remove flow db table type from templates

Message ID 20201010041153.63921-12-ajit.khaparde@broadcom.com (mailing list archive)
State Accepted, archived
Delegated to: Ajit Khaparde
Headers
Series [v2,01/12] net/bnxt: fix the corruption of the session details |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Ajit Khaparde Oct. 10, 2020, 4:11 a.m. UTC
  From: Mike Baucom <michael.baucom@broadcom.com>

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

Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
---
 .../tf_ulp/ulp_template_db_stingray_act.c     | 18 ++---
 .../tf_ulp/ulp_template_db_stingray_class.c   | 69 +++++++------------
 .../bnxt/tf_ulp/ulp_template_db_wh_plus_act.c | 18 ++---
 .../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(-)
  

Patch

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 68e4d8e59..2237ffb94 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 1fa364e29..62b940daa 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 381278ee9..39e8ec40b 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 7024658ce..470d91ce2 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 107a06a3d..69bb61e11 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 {