[07/14] net/bnxt: replace NAT IPv4 action SRC/DEST
diff mbox series

Message ID 20200717141451.11705-8-somnath.kotur@broadcom.com
State Superseded, archived
Delegated to: Ajit Khaparde
Headers show
Series
  • bnxt patches
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Somnath Kotur July 17, 2020, 2:14 p.m. UTC
From: Jay Ding <jay.ding@broadcom.com>

Use NAT IPv4 instead of NAT IPv4 SRC and DST.

Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/tf_core/tf_core.h      | 4 +---
 drivers/net/bnxt/tf_core/tf_device_p4.h | 1 -
 drivers/net/bnxt/tf_core/tf_util.c      | 6 ++----
 3 files changed, 3 insertions(+), 8 deletions(-)

Patch
diff mbox series

diff --git a/drivers/net/bnxt/tf_core/tf_core.h b/drivers/net/bnxt/tf_core/tf_core.h
index 8fa734a..67415ad 100644
--- a/drivers/net/bnxt/tf_core/tf_core.h
+++ b/drivers/net/bnxt/tf_core/tf_core.h
@@ -228,9 +228,7 @@  enum tf_tbl_type {
 	/** Wh+/SR Action Modify L4 Dest Port */
 	TF_TBL_TYPE_ACT_MODIFY_DPORT,
 	/** Wh+/SR Action Modify IPv4 Source */
-	TF_TBL_TYPE_ACT_MODIFY_IPV4_SRC,
-	/** Wh+/SR Action _Modify L4 Dest Port */
-	TF_TBL_TYPE_ACT_MODIFY_IPV4_DEST,
+	TF_TBL_TYPE_ACT_MODIFY_IPV4,
 	/** Meter Profiles */
 	TF_TBL_TYPE_METER_PROF,
 	/** Meter Instance */
diff --git a/drivers/net/bnxt/tf_core/tf_device_p4.h b/drivers/net/bnxt/tf_core/tf_device_p4.h
index 06c3ecf..7e58469 100644
--- a/drivers/net/bnxt/tf_core/tf_device_p4.h
+++ b/drivers/net/bnxt/tf_core/tf_device_p4.h
@@ -50,7 +50,6 @@  struct tf_rm_element_cfg tf_tbl_p4[TF_TBL_TYPE_MAX] = {
 	{ TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P4_NAT_PORT },
 	{ TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P4_NAT_PORT },
 	{ TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P4_NAT_IPV4 },
-	{ TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P4_NAT_IPV4 },
 	{ TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P4_METER_PROF },
 	{ TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P4_METER },
 	{ TF_RM_ELEM_CFG_HCAPI_BA, CFA_RESOURCE_TYPE_P4_MIRROR },
diff --git a/drivers/net/bnxt/tf_core/tf_util.c b/drivers/net/bnxt/tf_core/tf_util.c
index bf6a6a3..34f4305 100644
--- a/drivers/net/bnxt/tf_core/tf_util.c
+++ b/drivers/net/bnxt/tf_core/tf_util.c
@@ -92,10 +92,8 @@  tf_tbl_type_2_str(enum tf_tbl_type tbl_type)
 		return "NAT Source Port";
 	case TF_TBL_TYPE_ACT_MODIFY_DPORT:
 		return "NAT Destination Port";
-	case TF_TBL_TYPE_ACT_MODIFY_IPV4_SRC:
-		return "NAT IPv4 Source";
-	case TF_TBL_TYPE_ACT_MODIFY_IPV4_DEST:
-		return "NAT IPv4 Destination";
+	case TF_TBL_TYPE_ACT_MODIFY_IPV4:
+		return "NAT IPv4";
 	case TF_TBL_TYPE_METER_PROF:
 		return "Meter Profile";
 	case TF_TBL_TYPE_METER_INST: