Comment 15 for bug 1518501

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/15683
Committed: http://github.org/Juniper/contrail-controller/commit/6389d9cd0106b8fa25c81c6fe373d5e27bfe8d6a
Submitter: Zuul
Branch: R2.21.x

commit 6389d9cd0106b8fa25c81c6fe373d5e27bfe8d6a
Author: Manish <email address hidden>
Date: Tue Dec 8 22:59:03 2015 +0530

Mpls label from index vector not reused.

Problem:
In multicast evpn label, allocation happens from regular unicast range. When
this label is deleted it is not reset in index vector(Index vector manages
labels).
This used to result in freed label not being re-used by new allocations.

Solution:
Multicast has two sets of labels. First is fabric replication labels which are
reserved at init itself and remains till end of life.
Second set ie evpn label as mentioned above is allocated from non reserved
range. Both these labels are of type MCAST_NH. Now when evpn label is freed the
destructor used to check for MCAST_NH and skip de-allocation from index vector.
Fix is to check if mcast label is from fabric label reserved range and then
refrain from de-allocation. In all other case do the de-allocation.

Closes-bug: 1518501

Conflicts:
 src/vnsw/agent/cmn/agent.cc

Change-Id: Idd584a84d30f768818de30bfad30a1d1d811447c