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 60da5b586fe1c064d2fd00772a7f6364b94899d8
parent 07baa0393f21c4e7d3da1f5e68bc47ff38262370
Author: Broadcom SDK Release <sdk.releases@broadcom.com>
Date:   Thu, 18 Apr 2019 07:07:51 -0700

SDK-177481: In Parallel or TCAM mixed modes, if pivot's Associate Data DESTIN...

Devices: 56980_A0,56980_B0
Module: ALPM

Symptom:
ALPM route lookup miss in parallel mode due to default_miss=1 in pre-
pivot table

In Parallel or TCAM mixed modes, if pivot's Associate Data DESTINATION=0
(NHOP or ECMP interface index) we assume it has not BPM (or default)
route. So we set pivot DEFAULT_MISS=1.     This is not longer valid if
user is using NHOP or ECMP interface index 0 for drop (or sink) port. It
affects our original pivot DEFAULT_MISS logic.    To avoid the conflict,
instead of using DESTINATION == 0 (defip_ecmp_index), we use true pivot
BPM default route pointer (PVT_BKT_DEF(pvt_node) == NULL) as condition
for pivot DEFAULT_MISS in Parallel/TCAM modes.

Diffstat:
Msdk-6.5.16/src/bcm/esw/tomahawk3/alpm.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sdk-6.5.16/src/bcm/esw/tomahawk3/alpm.c b/sdk-6.5.16/src/bcm/esw/tomahawk3/alpm.c @@ -1735,7 +1735,7 @@ th3_alpm_ent_assemble(int u, _alpm_cb_t *acb, fmt_a2d.KSHIFT = lpm_cfg->bkt_kshift; fmt_a2d.ROFS = bkt_info->rofs + offset; fmt_a2d.BKT_PTR = bkt_info->bkt_idx; - if (ALPM_TCAM_ZONED(u) && lpm_cfg->defip_ecmp_index == 0) { + if (ALPM_TCAM_ZONED(u) && PVT_BKT_DEF(pvt_node) == NULL) { /* TH3TBD, Parallel & Mixed ALPM need to set DEFAULT_MISS to 1 * if assoc_data is NOT set, in case of missing default */ fmt_a2d.DEFAULT_MISS = 1; @@ -2616,12 +2616,12 @@ th3_tcam_entry_from_cfg(int u, int pkm, _bcm_defip_cfg_t *lpm_cfg, void *e, int sal_memset(&fmt_a1d, 0, sizeof(fmt_a1d)); fmt_a1d.DIRECT_ROUTE = ALPM_LPM_DIRECT_RTE(u, lpm_cfg); - if (ALPM_TCAM_ZONED(u) && lpm_cfg->defip_ecmp_index == 0) { + pvt_node = (_alpm_pvt_node_t *)lpm_cfg->pvt_node; + if (ALPM_TCAM_ZONED(u) && (!pvt_node || PVT_BKT_DEF(pvt_node) == NULL)) { /* TH3TBD, Parallel & Mixed ALPM need to set DEFAULT_MISS to 1 * if assoc_data is NOT set, in case of missing default */ fmt_a1d.DEFAULT_MISS = 1; } - pvt_node = (_alpm_pvt_node_t *)lpm_cfg->pvt_node; if (pvt_node != NULL) { int offset = 0; _alpm_tbl_t tbl;