net/bnxt: use NAT IPv4 action
authorJay Ding <jay.ding@broadcom.com>
Fri, 17 Jul 2020 14:14:44 +0000 (19:44 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Jul 2020 11:54:54 +0000 (13:54 +0200)
Use NAT IPv4 instead of NAT IPv4 SRC and DST.

Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
drivers/net/bnxt/tf_core/tf_core.h
drivers/net/bnxt/tf_core/tf_device_p4.h
drivers/net/bnxt/tf_core/tf_util.c

index 8fa734a..67415ad 100644 (file)
@@ -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 */
index 06c3ecf..7e58469 100644 (file)
@@ -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 },
index bf6a6a3..34f4305 100644 (file)
@@ -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: