bp->ulp_ctx->cfg_data = ulp_data;
session->cfg_data = ulp_data;
ulp_data->ref_cnt++;
+ ulp_data->ulp_flags |= BNXT_ULP_VF_REP_ENABLED;
/* Open the ulp session. */
rc = ulp_ctx_session_open(bp, session);
return ulp_ctx->cfg_data->fc_info;
}
+
+/* Function to get the ulp flags from the ulp context. */
+int32_t
+bnxt_ulp_cntxt_ptr2_ulp_flags_get(struct bnxt_ulp_context *ulp_ctx,
+ uint32_t *flags)
+{
+ if (!ulp_ctx || !ulp_ctx->cfg_data)
+ return -1;
+
+ *flags = ulp_ctx->cfg_data->ulp_flags;
+ return 0;
+}
#include "ulp_template_db_enum.h"
+/* defines for the ulp_flags */
+#define BNXT_ULP_VF_REP_ENABLED 0x1
+#define ULP_VF_REP_IS_ENABLED(flag) ((flag) & BNXT_ULP_VF_REP_ENABLED)
+
struct bnxt_ulp_data {
uint32_t tbl_scope_id;
struct bnxt_ulp_mark_tbl *mark_tbl;
void *mapper_data;
struct bnxt_ulp_port_db *port_db;
struct bnxt_ulp_fc_info *fc_info;
+ uint32_t ulp_flags;
uint32_t port_to_app_flow_id;
uint32_t app_to_port_flow_id;
uint32_t tx_cfa_action;
struct bnxt_ulp_fc_info *
bnxt_ulp_cntxt_ptr2_fc_info_get(struct bnxt_ulp_context *ulp_ctx);
+int32_t
+bnxt_ulp_cntxt_ptr2_ulp_flags_get(struct bnxt_ulp_context *ulp_ctx,
+ uint32_t *flags);
+
#endif /* _BNXT_ULP_H_ */
struct ulp_rte_act_prop act_prop;
struct ulp_rte_act_bitmap act = { 0 };
struct bnxt_ulp_context *ulp_ctx;
- uint32_t type;
+ uint32_t type, ulp_flags = 0;
int rc;
memset(&mapper_params, 0, sizeof(mapper_params));
return -EINVAL;
}
+ /* update the vf rep flag */
+ if (bnxt_ulp_cntxt_ptr2_ulp_flags_get(ulp_ctx, &ulp_flags)) {
+ BNXT_TF_DBG(ERR, "Error in getting ULP context flags\n");
+ return -EINVAL;
+ }
+ if (ULP_VF_REP_IS_ENABLED(ulp_flags))
+ ULP_COMP_FLD_IDX_WR(&mapper_params,
+ BNXT_ULP_CF_IDX_VFR_MODE, 1);
+
type = param_list->type;
while (type != BNXT_ULP_DF_PARAM_TYPE_LAST) {
if (ulp_def_handler_tbl[type].vfr_func) {
BNXT_ULP_CF_IDX_VF_TO_VF = 38,
BNXT_ULP_CF_IDX_L3_HDR_CNT = 39,
BNXT_ULP_CF_IDX_L4_HDR_CNT = 40,
- BNXT_ULP_CF_IDX_LAST = 41
+ BNXT_ULP_CF_IDX_VFR_MODE = 41,
+ BNXT_ULP_CF_IDX_LAST = 42
};
enum bnxt_ulp_cond_opcode {