net/bnxt: enable wildcard match for ingress flows
[dpdk.git] / drivers / net / bnxt / tf_ulp / bnxt_ulp_flow.c
index 413e4c3..272195f 100644 (file)
@@ -14,9 +14,6 @@
 #include "ulp_ha_mgr.h"
 #include "ulp_tun.h"
 #include <rte_malloc.h>
-#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
-#include "ulp_template_debug_proto.h"
-#endif
 
 static int32_t
 bnxt_ulp_flow_validate_args(const struct rte_flow_attr *attr,
@@ -118,9 +115,11 @@ bnxt_ulp_init_mapper_params(struct bnxt_ulp_mapper_create_parms *mapper_cparms,
        ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_FLOW_SIG_ID,
                            params->flow_sig_id);
 
+       if (bnxt_ulp_cntxt_ptr2_ulp_flags_get(params->ulp_ctx, &ulp_flags))
+               return;
+
        /* update the WC Priority flag */
-       if (!bnxt_ulp_cntxt_ptr2_ulp_flags_get(params->ulp_ctx, &ulp_flags) &&
-           ULP_HIGH_AVAIL_IS_ENABLED(ulp_flags)) {
+       if (ULP_HIGH_AVAIL_IS_ENABLED(ulp_flags)) {
                enum ulp_ha_mgr_region region = ULP_HA_REGION_LOW;
                int32_t rc;
 
@@ -132,6 +131,10 @@ bnxt_ulp_init_mapper_params(struct bnxt_ulp_mapper_create_parms *mapper_cparms,
                                            BNXT_ULP_CF_IDX_WC_IS_HA_HIGH_REG,
                                            1);
        }
+
+       /* Update the socket direct flag */
+       if (ULP_SOCKET_DIRECT_IS_ENABLED(ulp_flags))
+               ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_SOCKET_DIRECT, 1);
 }
 
 /* Function to create the rte flow. */
@@ -231,15 +234,6 @@ bnxt_ulp_flow_create(struct rte_eth_dev *dev,
        if (ret == BNXT_TF_RC_ERROR)
                goto free_fid;
 
-#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG
-#ifdef RTE_LIBRTE_BNXT_TRUFLOW_DEBUG_PARSER
-       /* Dump the rte flow pattern */
-       ulp_parser_hdr_info_dump(&params);
-       /* Dump the rte flow action */
-       ulp_parser_act_info_dump(&params);
-#endif
-#endif
-
        ret = ulp_matcher_pattern_match(&params, &params.class_id);
        if (ret != BNXT_TF_RC_SUCCESS)
                goto free_fid;