commit b32c618782c368946eb83329fe0f667f7d76e4ae
parent a772ad60a8460ee8c24f6689bed8237c26fc6ff1
Author: Broadcom SDK Release <sdk.releases@broadcom.com>
Date: Wed, 24 Apr 2019 17:43:39 -0700
SDK-177762: PFC Flow control just the UC queue
Devices: 56980_A0,56980_B0
Module: MMU
Symptom:
SDK control needed to flow control only UC when both UC+MC queues are
connected to same COS
Diffstat:
1 file changed, 25 insertions(+), 5 deletions(-)
diff --git a/sdk-6.5.16/src/soc/esw/tomahawk3/traffic_manager/pfc.c b/sdk-6.5.16/src/soc/esw/tomahawk3/traffic_manager/pfc.c
@@ -434,6 +434,7 @@ _soc_th3_pfc_rx_mapping_hw_write(
int i, pri, cos, pri_ebg, mmuq1 = -1, mmuq2 = -1;
uint32 cos_bmp, mmuq_bmp, ebg_bmp, sp_bmp, hp_bmp, reg_index, rval;
uint64 rval64;
+ int fc_only_uc = 0, cos_f_q = 0;
soc_reg_t pri_reg = MMU_INTFI_PFCPRI_PROFILEr,
mmuq_reg = MMU_EBCFP_MMUQ_EBGRP_PROFILEr,
@@ -472,12 +473,31 @@ _soc_th3_pfc_rx_mapping_hw_write(
mmuq1 = th3_sched_profile_info[unit][profile_id][l0_idx].mmuq[0];
mmuq2 = th3_sched_profile_info[unit][profile_id][l0_idx].mmuq[1];
}
- if (mmuq1 != -1) {
- mmuq_bmp |= 1U << mmuq1;
- }
- if (mmuq2 != -1) {
- mmuq_bmp |= 1U << mmuq2;
+
+ /* flow control just the UC queue when FC_ONLY_UC=1. */
+ if ((mmuq1 != -1) && (mmuq2 != -1)) {
+ cos_f_q = soc_tomahawk3_get_cos_for_mmu_queue(unit, profile_id, mmuq1);
+ if (cos_f_q == -1) {
+ return SOC_E_PARAM;
+ }
+ fc_only_uc = soc_tomahawk3_get_fc_only_uc_for_cos(unit, profile_id,
+ cos_f_q);
+ if (!(_soc_th3_pfc_mmuq_is_mc(unit, mmuq1) && (fc_only_uc))) {
+ mmuq_bmp |= 1U << mmuq1;
+ }
+
+ if (!(_soc_th3_pfc_mmuq_is_mc(unit, mmuq2) && (fc_only_uc))) {
+ mmuq_bmp |= 1U << mmuq2;
+ }
+ } else {
+ if (mmuq1 != -1) {
+ mmuq_bmp |= 1U << mmuq1;
+ }
+ if (mmuq2 != -1) {
+ mmuq_bmp |= 1U << mmuq2;
+ }
}
+
pri_ebg = eb_config->eb_group[cos];
if (eb_config->eb_group_opt[pri_ebg] == 1) {
ebg_bmp |= 1U << pri_ebg;