examples/ipsec-secgw: fix session mempool initialisation
[dpdk.git] / drivers / net / qede / base / ecore_dcbx.c
index 7981c42..31234f1 100644 (file)
@@ -148,7 +148,7 @@ ecore_dcbx_set_params(struct ecore_dcbx_results *p_data,
        p_data->arr[type].update = UPDATE_DCB_DSCP;
 
        /* Do not add valn tag 0 when DCB is enabled and port is in UFP mode */
-       if (OSAL_TEST_BIT(ECORE_MF_UFP_SPECIFIC, &p_hwfn->p_dev->mf_bits))
+       if (OSAL_GET_BIT(ECORE_MF_UFP_SPECIFIC, &p_hwfn->p_dev->mf_bits))
                p_data->arr[type].dont_add_vlan0 = true;
 
        /* QM reconf data */
@@ -156,10 +156,10 @@ ecore_dcbx_set_params(struct ecore_dcbx_results *p_data,
                p_hwfn->hw_info.offload_tc = tc;
 
        /* Configure dcbx vlan priority in doorbell block for roce EDPM */
-       if (OSAL_TEST_BIT(ECORE_MF_UFP_SPECIFIC, &p_hwfn->p_dev->mf_bits) &&
-           (type == DCBX_PROTOCOL_ROCE)) {
+       if (OSAL_GET_BIT(ECORE_MF_UFP_SPECIFIC, &p_hwfn->p_dev->mf_bits) &&
+           type == DCBX_PROTOCOL_ROCE) {
                ecore_wr(p_hwfn, p_ptt, DORQ_REG_TAG1_OVRD_MODE, 1);
-               ecore_wr(p_hwfn, p_ptt, DORQ_REG_PF_PCP_BB_K2, prio << 1);
+               ecore_wr(p_hwfn, p_ptt, DORQ_REG_PF_PCP, prio << 1);
        }
 }
 
@@ -293,7 +293,7 @@ ecore_dcbx_process_tlv(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
        }
 
        /* If Eth TLV is not detected, use UFP TC as default TC */
-       if (OSAL_TEST_BIT(ECORE_MF_UFP_SPECIFIC,
+       if (OSAL_GET_BIT(ECORE_MF_UFP_SPECIFIC,
                          &p_hwfn->p_dev->mf_bits) && !eth_tlv)
                p_data->arr[DCBX_PROTOCOL_ETH].tc = p_hwfn->ufp_info.tc;
 
@@ -310,8 +310,9 @@ ecore_dcbx_process_tlv(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
                        continue;
 
                /* if no app tlv was present, don't override in FW */
-               ecore_dcbx_update_app_info(p_data, p_hwfn, p_ptt, false,
-                                          priority, tc, type);
+               ecore_dcbx_update_app_info(p_data, p_hwfn, p_ptt,
+                                         p_data->arr[DCBX_PROTOCOL_ETH].enable,
+                                         priority, tc, type);
        }
 
        return ECORE_SUCCESS;
@@ -325,7 +326,7 @@ ecore_dcbx_process_mib_info(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt)
 {
        struct dcbx_app_priority_feature *p_app;
        struct dcbx_app_priority_entry *p_tbl;
-       struct ecore_dcbx_results data = { 0 };
+       struct ecore_dcbx_results data;
        struct dcbx_ets_feature *p_ets;
        struct ecore_hw_info *p_info;
        u32 pri_tc_tbl, flags;
@@ -345,6 +346,7 @@ ecore_dcbx_process_mib_info(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt)
        p_info = &p_hwfn->hw_info;
        num_entries = GET_MFW_FIELD(p_app->flags, DCBX_APP_NUM_ENTRIES);
 
+       OSAL_MEMSET(&data, 0, sizeof(struct ecore_dcbx_results));
        rc = ecore_dcbx_process_tlv(p_hwfn, p_ptt, &data, p_tbl, pri_tc_tbl,
                                    num_entries, dcbx_version);
        if (rc != ECORE_SUCCESS)