#include "ulp_mapper.h"
#include "ulp_fc_mgr.h"
#include "ulp_port_db.h"
+#include "ulp_ha_mgr.h"
#include <rte_malloc.h>
static int32_t
mapper_cparms->flow_pattern_id = params->flow_pattern_id;
mapper_cparms->act_pattern_id = params->act_pattern_id;
mapper_cparms->app_id = params->app_id;
+ mapper_cparms->port_id = params->port_id;
/* update the signature fields into the computed field list */
ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_HDR_SIG_ID,
/* 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)) {
- /* TBD: read the state and Set the WC priority */
- ULP_COMP_FLD_IDX_WR(params,
- BNXT_ULP_CF_IDX_WC_IS_HA_HIGH_REG, 1);
+ enum ulp_ha_mgr_region region = ULP_HA_REGION_LOW;
+ int32_t rc;
+
+ rc = ulp_ha_mgr_region_get(params->ulp_ctx, ®ion);
+ if (rc)
+ BNXT_TF_DBG(ERR, "Unable to get WC region\n");
+ if (region == ULP_HA_REGION_HI)
+ ULP_COMP_FLD_IDX_WR(params,
+ BNXT_ULP_CF_IDX_WC_IS_HA_HIGH_REG,
+ 1);
}
-
}
/* Function to create the rte flow. */