openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

commit 5f7c27b0a22f6ef32c3d275460dd20b051599668
parent 1188d650e4c3dc61a5b51f864e0253e37eef83fc
Author: Broadcom SDK Release <sdk.releases@broadcom.com>
Date:   Thu,  4 Apr 2019 17:39:32 -0700

SDK-175529: Changed error type to BCM_E_RESOURCE when threshold settings cann...

Devices: 56980_A0,56980_B0
Module: MMU

Symptom:
MMU configuration functions should return BCM_E_RESOURCE when
appropriate.

Changed error type to BCM_E_RESOURCE when threshold settings cannot be
changed because of insufficient buffer space

Diffstat:
Msdk-6.5.16/src/bcm/esw/tomahawk3/thresholds.c | 2+-
Msdk-6.5.16/src/bcm/tomahawk3/cosq.c | 6+++---
Msdk-6.5.16/src/soc/esw/tomahawk3/traffic_manager/traffic_manager_thresholds.c | 2+-
3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/sdk-6.5.16/src/bcm/esw/tomahawk3/thresholds.c b/sdk-6.5.16/src/bcm/esw/tomahawk3/thresholds.c @@ -3086,7 +3086,7 @@ _bcm_th3_adjust_delta_hdrm_service_pools(int unit, int itm, int hdrm_pool, int "than available shared space: %d for itm:" "%d. Try reducing the number of lossless" "classes\n"), cur_sp_limit[itm], itm)); - return BCM_E_PARAM; + return BCM_E_RESOURCE; } } /* Update the saved shared limit */ diff --git a/sdk-6.5.16/src/bcm/tomahawk3/cosq.c b/sdk-6.5.16/src/bcm/tomahawk3/cosq.c @@ -5019,7 +5019,7 @@ _bcm_th3_cosq_ing_res_set(int unit, bcm_gport_t gport, bcm_cos_queue_t cosq, if ((itm_map & (1 << itm)) && (delta[itm] > 0)) { /* no space to decrease shared limit */ if (delta[itm] > shd_size[itm]) { - return BCM_E_PARAM; + return BCM_E_RESOURCE; } shd_size[itm] -= delta[itm]; update = 1; @@ -5264,7 +5264,7 @@ _bcm_th3_cosq_egr_queue_set(int unit, bcm_gport_t gport, bcm_cos_queue_t cosq, if (delta[itm] > 0) { /* no space to decrease shared limit */ if (delta[itm] > shd_size[itm]) { - return BCM_E_PARAM; + return BCM_E_RESOURCE; } shd_size[itm] -= delta[itm]; update = 1; @@ -5826,7 +5826,7 @@ _bcm_th3_cosq_qgroup_limit_set(int unit, bcm_gport_t gport, bcm_cos_t cosq, if (delta[itm] > 0) { /* no space to decrease shared limit */ if (delta[itm] > shd_size[itm]) { - return BCM_E_PARAM; + return BCM_E_RESOURCE; } shd_size[itm] -= delta[itm]; } diff --git a/sdk-6.5.16/src/soc/esw/tomahawk3/traffic_manager/traffic_manager_thresholds.c b/sdk-6.5.16/src/soc/esw/tomahawk3/traffic_manager/traffic_manager_thresholds.c @@ -2534,7 +2534,7 @@ _soc_th3_mmu_cfg_buf_check(int unit, _soc_mmu_cfg_buf_t *buf, LOG_CLI((BSL_META_U(unit, "Pool %d has no shared space after " "deducting guaranteed !!"), idx)); - return SOC_E_FAIL; + return SOC_E_RESOURCE; } if (buf_pool->yellow_size & _MMU_CFG_BUF_PERCENT_FLAG) {