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 72ab9b085cc966c6918598c0e49603fa504e9ee0
parent f3d9d88987fc5b5525f627a3594e657b144a3fa9
Author: Broadcom SDK Release <sdk.releases@broadcom.com>
Date:   Tue,  5 Nov 2019 12:11:11 -0800

SDK-194699: Withe the state information recovered after warm boot, the API bc...

Devices: 56980_A0,56980_B0
Module: Warmboot

Symptom:
bcm_trunk_find doesn't find programmed trunks on TH3 post warmboot

Withe the state information recovered after warm boot, the API
bcm_trunk_find() now works after warm boot also.

Diffstat:
Msdk-6.5.16/src/bcm/esw/tomahawk3/trunk.c | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/sdk-6.5.16/src/bcm/esw/tomahawk3/trunk.c b/sdk-6.5.16/src/bcm/esw/tomahawk3/trunk.c @@ -1506,7 +1506,8 @@ int _bcm_th3_trunk_member_info_set(int unit, bcm_trunk_t tid, uint16 num_ports, uint8 *member_port, uint32 *member_flags) { - int i; + int i, rv; + bcm_module_t mod = 0; /* Save new trunk member info. Free up the old memory and allocate new space * since there may be a different number of entries. */ @@ -1537,6 +1538,11 @@ _bcm_th3_trunk_member_info_set(int unit, bcm_trunk_t tid, for (i = 0; i < num_ports; i++) { MEMBER_INFO(unit, tid).port[i] = member_port[i]; MEMBER_INFO(unit, tid).member_flags[i] = member_flags[i]; + /* restore inverted relationship also */ + if ((rv = _bcm_th3_trunk_port_map_set(unit, mod, + member_port[i], tid)) != BCM_E_NONE) { + return rv; + } } return BCM_E_NONE; }