commit 7267b5a6c7e850636f2bd310ce455ef4b6568c19
parent 18b588b16f8ed2d56405679f0efcd937a3ec4359
Author: Broadcom SDK Release <sdk.releases@broadcom.com>
Date: Wed, 8 Jan 2020 17:08:02 -0800
SDK-175527: Fix the logic to rest pg_is_lossless
Devices: 56980_A0,56980_B0
Module: MMU
Symptom:
TH3: Setting PG_IS_LOSSLESS to 0 using priority_group_properties_set API
doesnt work
Diffstat:
3 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/sdk-6.5.16/src/appl/diag/cint/bcm_cint_data.c b/sdk-6.5.16/src/appl/diag/cint/bcm_cint_data.c
@@ -2171,7 +2171,7 @@ CINT_FWRAPPER_CREATE2_RP5(int, int, 0, 0,
bcm_port_t,bcm_port_t,port,0,0,CINT_PARAM_IN,
int,int,priority_group_id,0,0,CINT_PARAM_IN,
bcm_cosq_port_prigroup_control_t,bcm_cosq_port_prigroup_control_t,type,0,0,CINT_PARAM_IN,
- int*,int,arg,1,0,CINT_PARAM_IN);
+ int*,int,arg,1,0,CINT_PARAM_OUT);
CINT_FWRAPPER_CREATE2_RP3(int, int, 0, 0,
bcm_cosq_control_dynamic_get, \
int,int,unit,0,0,CINT_PARAM_IN,
diff --git a/sdk-6.5.16/src/bcm/rpc/client.c b/sdk-6.5.16/src/bcm/rpc/client.c
@@ -9304,7 +9304,7 @@ bcm_client_cosq_port_priority_group_property_get(
uint32 r_key[] = {
0x2b901133,0x2482e998,0x9e259b6e,0x4ef78026,0xd6e00a32 };
- r_pkt = bcm_rpc_setup('C', r_key, 21, 0, BCM_CONTROL(unit)->unit);
+ r_pkt = bcm_rpc_setup('C', r_key, 17, 0, BCM_CONTROL(unit)->unit);
if (r_pkt == NULL) {
return BCM_E_MEMORY;
}
@@ -9312,12 +9312,7 @@ bcm_client_cosq_port_priority_group_property_get(
BCM_PACK_U32(r_pp, port);
BCM_PACK_U32(r_pp, priority_group_id);
BCM_PACK_U32(r_pp, type);
- if (arg == NULL) {
- BCM_PACK_U8(r_pp, 1);
- } else {
- BCM_PACK_U8(r_pp, 0);
- BCM_PACK_U32(r_pp, *arg);
- }
+ BCM_PACK_U8(r_pp, (arg == NULL) ? 1 : 0);
r_rv = bcm_rpc_request(unit, r_pkt, r_pp-r_pkt, &r_rpkt, &r_cookie);
if (r_rv < 0) {
@@ -9325,6 +9320,11 @@ bcm_client_cosq_port_priority_group_property_get(
}
r_pp = r_rpkt + BCM_RPC_HLEN;
BCM_UNPACK_U32(r_pp, r_ret);
+ if (r_ret >= 0) {
+ if (arg != NULL) {
+ BCM_UNPACK_U32(r_pp, *arg);
+ }
+ }
bcm_rpc_free(r_rpkt, r_cookie);
return r_ret;
diff --git a/sdk-6.5.16/src/bcm/rpc/server.c b/sdk-6.5.16/src/bcm/rpc/server.c
@@ -9004,14 +9004,18 @@ bcm_server_cosq_port_priority_group_property_get(cpudb_key_t r_cpu, uint8 *r_pkt
r_p_arg = NULL;
} else {
r_p_arg = &arg;
- BCM_UNPACK_U32(r_pp, *r_p_arg);
}
bcm_rpc_free(r_pkt, r_cookie);
r_ret = bcm_cosq_port_priority_group_property_get(unit, port, priority_group_id, type, r_p_arg);
- r_pkt = bcm_rpc_setup('S', (uint32 *)0, 4, r_seq, r_ret);
+ r_pkt = bcm_rpc_setup('S', (uint32 *)0, 8, r_seq, r_ret);
r_pp = r_pkt + BCM_RPC_HLEN+4;
+ if ((r_ret >= 0) && (r_pkt != NULL)) {
+ if (r_p_arg != NULL) {
+ BCM_PACK_U32(r_pp, *r_p_arg);
+ }
+ }
bcm_rpc_reply(r_cpu, r_pkt, r_pp-r_pkt);
}