common/mlx5: add Direct Verbs constants for Windows
[dpdk.git] / drivers / net / bnxt / tf_ulp / bnxt_ulp.c
index 183bae6..bd57229 100644 (file)
@@ -830,6 +830,7 @@ ulp_ctx_init(struct bnxt *bp,
                BNXT_TF_DBG(ERR, "Unable to set app_id for ULP init.\n");
                goto error_deinit;
        }
+       BNXT_TF_DBG(DEBUG, "Ulp initialized with app id %d\n", bp->app_id);
 
        rc = bnxt_ulp_cntxt_app_caps_init(bp->ulp_ctx, bp->app_id, devid);
        if (rc) {
@@ -838,11 +839,6 @@ ulp_ctx_init(struct bnxt *bp,
                goto error_deinit;
        }
 
-       if (devid == BNXT_ULP_DEVICE_ID_THOR) {
-               ulp_data->ulp_flags &= ~BNXT_ULP_VF_REP_ENABLED;
-               BNXT_TF_DBG(ERR, "Enabled non-VFR mode\n");
-       }
-
        /*
         * Shared session must be created before first regular session but after
         * the ulp_ctx is valid.
@@ -858,8 +854,6 @@ ulp_ctx_init(struct bnxt *bp,
        if (rc)
                goto error_deinit;
 
-       ulp_tun_tbl_init(ulp_data->tun_tbl);
-
        bnxt_ulp_cntxt_tfp_set(bp->ulp_ctx, &bp->tfp);
        return rc;
 
@@ -902,7 +896,7 @@ ulp_dparms_init(struct bnxt *bp, struct bnxt_ulp_context *ulp_ctx)
        dparms->ext_flow_db_num_entries = bp->max_num_kflows * 1024;
        /* GFID =  2 * num_flows */
        dparms->mark_db_gfid_entries = dparms->ext_flow_db_num_entries * 2;
-       BNXT_TF_DBG(DEBUG, "Set the number of flows = %"PRIu64"\n",
+       BNXT_TF_DBG(DEBUG, "Set the number of flows = %" PRIu64 "\n",
                    dparms->ext_flow_db_num_entries);
 
        return 0;
@@ -1401,7 +1395,7 @@ bnxt_ulp_port_init(struct bnxt *bp)
        }
 
        if (!BNXT_TRUFLOW_EN(bp)) {
-               BNXT_TF_DBG(DEBUG,
+               BNXT_TF_DBG(ERR,
                            "Skip ulp init for port: %d, truflow is not enabled\n",
                            bp->eth_dev->data->port_id);
                return rc;
@@ -1532,7 +1526,7 @@ bnxt_ulp_port_deinit(struct bnxt *bp)
        }
 
        if (!BNXT_TRUFLOW_EN(bp)) {
-               BNXT_TF_DBG(DEBUG,
+               BNXT_TF_DBG(ERR,
                            "Skip ULP deinit for port:%d, truflow is not enabled\n",
                            bp->eth_dev->data->port_id);
                return;
@@ -2041,7 +2035,7 @@ bnxt_ulp_cntxt_list_del(struct bnxt_ulp_context *ulp_ctx)
        struct ulp_context_list_entry   *entry, *temp;
 
        rte_spinlock_lock(&bnxt_ulp_ctxt_lock);
-       TAILQ_FOREACH_SAFE(entry, &ulp_cntx_list, next, temp) {
+       RTE_TAILQ_FOREACH_SAFE(entry, &ulp_cntx_list, next, temp) {
                if (entry->ulp_ctx == ulp_ctx) {
                        TAILQ_REMOVE(&ulp_cntx_list, entry, next);
                        rte_free(entry);
@@ -2070,3 +2064,13 @@ bnxt_ulp_cntxt_entry_release(void)
 {
        rte_spinlock_unlock(&bnxt_ulp_ctxt_lock);
 }
+
+/* Function to get the app tunnel details from the ulp context. */
+struct bnxt_flow_app_tun_ent *
+bnxt_ulp_cntxt_ptr2_app_tun_list_get(struct bnxt_ulp_context *ulp)
+{
+       if (!ulp || !ulp->cfg_data)
+               return NULL;
+
+       return ulp->cfg_data->app_tun;
+}