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 { ...@@ -230,13 +230,6 @@ public class RoutingRulePopulator {
230 public boolean populateIpRuleForRouter(DeviceId deviceId, 230 public boolean populateIpRuleForRouter(DeviceId deviceId,
231 IpPrefix ipPrefix, DeviceId destSw, 231 IpPrefix ipPrefix, DeviceId destSw,
232 Set<DeviceId> nextHops) { 232 Set<DeviceId> nextHops) {
233 - // TODO: OFDPA does not support /32 with ECMP group at this moment.
234 - // Use /31 instead
235 - IpPrefix effectivePrefix =
236 - (ipPrefix.prefixLength() == IpPrefix.MAX_INET_MASK_LENGTH) ?
237 - IpPrefix.valueOf(ipPrefix.getIp4Prefix().address(), 31) :
238 - ipPrefix;
239 -
240 int segmentId; 233 int segmentId;
241 try { 234 try {
242 segmentId = config.getSegmentId(destSw); 235 segmentId = config.getSegmentId(destSw);
...@@ -246,7 +239,7 @@ public class RoutingRulePopulator { ...@@ -246,7 +239,7 @@ public class RoutingRulePopulator {
246 } 239 }
247 240
248 TrafficSelector.Builder sbuilder = DefaultTrafficSelector.builder(); 241 TrafficSelector.Builder sbuilder = DefaultTrafficSelector.builder();
249 - sbuilder.matchIPDst(effectivePrefix); 242 + sbuilder.matchIPDst(ipPrefix);
250 sbuilder.matchEthType(Ethernet.TYPE_IPV4); 243 sbuilder.matchEthType(Ethernet.TYPE_IPV4);
251 TrafficSelector selector = sbuilder.build(); 244 TrafficSelector selector = sbuilder.build();
252 245
...@@ -284,7 +277,7 @@ public class RoutingRulePopulator { ...@@ -284,7 +277,7 @@ public class RoutingRulePopulator {
284 .makePermanent() 277 .makePermanent()
285 .nextStep(nextId) 278 .nextStep(nextId)
286 .withSelector(selector) 279 .withSelector(selector)
287 - .withPriority(2000 * effectivePrefix.prefixLength()) 280 + .withPriority(2000 * ipPrefix.prefixLength())
288 .withFlag(ForwardingObjective.Flag.SPECIFIC); 281 .withFlag(ForwardingObjective.Flag.SPECIFIC);
289 if (treatment != null) { 282 if (treatment != null) {
290 fwdBuilder.withTreatment(treatment); 283 fwdBuilder.withTreatment(treatment);
......