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
diff --git a/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java b/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java
index 8ca29b0..6017e8b 100644
--- a/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java
+++ b/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java
@@ -230,13 +230,6 @@
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 @@
}
TrafficSelector.Builder sbuilder = DefaultTrafficSelector.builder();
- sbuilder.matchIPDst(effectivePrefix);
+ sbuilder.matchIPDst(ipPrefix);
sbuilder.matchEthType(Ethernet.TYPE_IPV4);
TrafficSelector selector = sbuilder.build();
@@ -284,7 +277,7 @@
.makePermanent()
.nextStep(nextId)
.withSelector(selector)
- .withPriority(2000 * effectivePrefix.prefixLength())
+ .withPriority(2000 * ipPrefix.prefixLength())
.withFlag(ForwardingObjective.Flag.SPECIFIC);
if (treatment != null) {
fwdBuilder.withTreatment(treatment);