net/bnxt: update log messages in TruFlow path
[dpdk.git] / drivers / net / bnxt / tf_ulp / ulp_rte_parser.c
index 40da953..d21c088 100644 (file)
@@ -137,10 +137,10 @@ bnxt_ulp_rte_parser_hdr_parse(const struct rte_flow_item pattern[],
 
        /* Parse all the items in the pattern */
        while (item && item->type != RTE_FLOW_ITEM_TYPE_END) {
-               if (item->type >= (uint32_t)
+               if (item->type >= (typeof(item->type))
                    BNXT_RTE_FLOW_ITEM_TYPE_END) {
                        if (item->type >=
-                           (uint32_t)BNXT_RTE_FLOW_ITEM_TYPE_LAST)
+                           (typeof(item->type))BNXT_RTE_FLOW_ITEM_TYPE_LAST)
                                goto hdr_parser_error;
                        /* get the header information */
                        hdr_info = &ulp_vendor_hdr_info[item->type -
@@ -186,9 +186,9 @@ bnxt_ulp_rte_parser_act_parse(const struct rte_flow_action actions[],
        /* Parse all the items in the pattern */
        while (action_item && action_item->type != RTE_FLOW_ACTION_TYPE_END) {
                if (action_item->type >=
-                   (uint32_t)BNXT_RTE_FLOW_ACTION_TYPE_END) {
+                   (typeof(action_item->type))BNXT_RTE_FLOW_ACTION_TYPE_END) {
                        if (action_item->type >=
-                           (uint32_t)BNXT_RTE_FLOW_ACTION_TYPE_LAST)
+                           (typeof(action_item->type))BNXT_RTE_FLOW_ACTION_TYPE_LAST)
                                goto act_parser_error;
                        /* get the header information from bnxt actinfo table */
                        hdr_info = &ulp_vendor_act_info[action_item->type -
@@ -1119,7 +1119,8 @@ ulp_rte_ipv4_hdr_handler(const struct rte_flow_item *item,
 
        /* Set the ipv4 header bitmap and computed l3 header bitmaps */
        if (ULP_BITMAP_ISSET(hdr_bitmap->bits, BNXT_ULP_HDR_BIT_O_IPV4) ||
-           ULP_BITMAP_ISSET(hdr_bitmap->bits, BNXT_ULP_HDR_BIT_O_IPV6)) {
+           ULP_BITMAP_ISSET(hdr_bitmap->bits, BNXT_ULP_HDR_BIT_O_IPV6) ||
+           ULP_COMP_FLD_IDX_RD(params, BNXT_ULP_CF_IDX_L3_TUN)) {
                ULP_BITMAP_SET(hdr_bitmap->bits, BNXT_ULP_HDR_BIT_I_IPV4);
                ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_I_L3, 1);
                inner_flag = 1;
@@ -1245,7 +1246,8 @@ ulp_rte_ipv6_hdr_handler(const struct rte_flow_item *item,
 
        /* Set the ipv6 header bitmap and computed l3 header bitmaps */
        if (ULP_BITMAP_ISSET(hdr_bitmap->bits, BNXT_ULP_HDR_BIT_O_IPV4) ||
-           ULP_BITMAP_ISSET(hdr_bitmap->bits, BNXT_ULP_HDR_BIT_O_IPV6)) {
+           ULP_BITMAP_ISSET(hdr_bitmap->bits, BNXT_ULP_HDR_BIT_O_IPV6) ||
+           ULP_COMP_FLD_IDX_RD(params, BNXT_ULP_CF_IDX_L3_TUN)) {
                ULP_BITMAP_SET(hdr_bitmap->bits, BNXT_ULP_HDR_BIT_I_IPV6);
                ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_I_L3, 1);
                inner_flag = 1;
@@ -2127,7 +2129,6 @@ ulp_rte_vxlan_decap_act_handler(const struct rte_flow_action *action_item
                       BNXT_ULP_ACT_BIT_VXLAN_DECAP);
        /* Update computational field with tunnel decap info */
        ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_L3_TUN_DECAP, 1);
-       ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_L3_TUN, 1);
        return BNXT_TF_RC_SUCCESS;
 }