net/i40e/base: set TSA table values when parsing CEE config
authorRobin Zhang <robinx.zhang@intel.com>
Sat, 9 Oct 2021 01:39:42 +0000 (01:39 +0000)
committerQi Zhang <qi.z.zhang@intel.com>
Sat, 9 Oct 2021 05:17:39 +0000 (07:17 +0200)
Driver did not Set TSA (Transmit Selection Algorithm) table values when
parsing CEE (Converged Enhanced Ethernet) configuration obtained from FW

Signed-off-by: Pawel Malinowski <pawel.malinowski@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
drivers/net/i40e/base/i40e_dcb.c

index 388af3d..27b52bc 100644 (file)
@@ -315,9 +315,15 @@ static void i40e_parse_cee_pgcfg_tlv(struct i40e_cee_feat_tlv *tlv,
         *        |pg0|pg1|pg2|pg3|pg4|pg5|pg6|pg7|
         *        ---------------------------------
         */
-       for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++)
+       for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) {
                etscfg->tcbwtable[i] = buf[offset++];
 
+               if (etscfg->prioritytable[i] == I40E_CEE_PGID_STRICT)
+                       dcbcfg->etscfg.tsatable[i] = I40E_IEEE_TSA_STRICT;
+               else
+                       dcbcfg->etscfg.tsatable[i] = I40E_IEEE_TSA_ETS;
+       }
+
        /* Number of TCs supported (1 octet) */
        etscfg->maxtcs = buf[offset];
 }