Charles Chan
Committed by Gerrit Code Review

Remove OFDPA /32 -> ECMP workaround

OFDPA software build 12.1.1+accton1.7-1 fixes this issue.
This workaround is no longer required.

Change-Id: I9952d8739cf0f72d671bbc217dabc09edf8820cc
......@@ -230,13 +230,6 @@ public class RoutingRulePopulator {
public boolean populateIpRuleForRouter(DeviceId deviceId,
IpPrefix ipPrefix, DeviceId destSw,
Set<DeviceId> nextHops) {
// TODO: OFDPA does not support /32 with ECMP group at this moment.
// Use /31 instead
IpPrefix effectivePrefix =
(ipPrefix.prefixLength() == IpPrefix.MAX_INET_MASK_LENGTH) ?
IpPrefix.valueOf(ipPrefix.getIp4Prefix().address(), 31) :
ipPrefix;
int segmentId;
try {
segmentId = config.getSegmentId(destSw);
......@@ -246,7 +239,7 @@ public class RoutingRulePopulator {
}
TrafficSelector.Builder sbuilder = DefaultTrafficSelector.builder();
sbuilder.matchIPDst(effectivePrefix);
sbuilder.matchIPDst(ipPrefix);
sbuilder.matchEthType(Ethernet.TYPE_IPV4);
TrafficSelector selector = sbuilder.build();
......@@ -284,7 +277,7 @@ public class RoutingRulePopulator {
.makePermanent()
.nextStep(nextId)
.withSelector(selector)
.withPriority(2000 * effectivePrefix.prefixLength())
.withPriority(2000 * ipPrefix.prefixLength())
.withFlag(ForwardingObjective.Flag.SPECIFIC);
if (treatment != null) {
fwdBuilder.withTreatment(treatment);
......