net/i40e: support ESP in customized code
[dpdk.git] / drivers / net / ice / base / ice_dcb.c
index 008c7a1..7048dbd 100644 (file)
@@ -445,9 +445,15 @@ ice_parse_cee_pgcfg_tlv(struct ice_cee_feat_tlv *tlv,
         *        |pg0|pg1|pg2|pg3|pg4|pg5|pg6|pg7|
         *        ---------------------------------
         */
-       ice_for_each_traffic_class(i)
+       ice_for_each_traffic_class(i) {
                etscfg->tcbwtable[i] = buf[offset++];
 
+               if (etscfg->prio_table[i] == ICE_CEE_PGID_STRICT)
+                       dcbcfg->etscfg.tsatable[i] = ICE_IEEE_TSA_STRICT;
+               else
+                       dcbcfg->etscfg.tsatable[i] = ICE_IEEE_TSA_ETS;
+       }
+
        /* Number of TCs supported (1 octet) */
        etscfg->maxtcs = buf[offset];
 }
@@ -960,9 +966,9 @@ enum ice_status ice_init_dcb(struct ice_hw *hw, bool enable_mib_change)
            pi->dcbx_status == ICE_DCBX_STATUS_NOT_STARTED) {
                /* Get current DCBX configuration */
                ret = ice_get_dcb_cfg(pi);
-               pi->is_sw_lldp = (hw->adminq.sq_last_status == ICE_AQ_RC_EPERM);
                if (ret)
                        return ret;
+               pi->is_sw_lldp = false;
        } else if (pi->dcbx_status == ICE_DCBX_STATUS_DIS) {
                return ICE_ERR_NOT_READY;
        }
@@ -970,8 +976,8 @@ enum ice_status ice_init_dcb(struct ice_hw *hw, bool enable_mib_change)
        /* Configure the LLDP MIB change event */
        if (enable_mib_change) {
                ret = ice_aq_cfg_lldp_mib_change(hw, true, NULL);
-               if (!ret)
-                       pi->is_sw_lldp = false;
+               if (ret)
+                       pi->is_sw_lldp = true;
        }
 
        return ret;