Committed by
Gerrit Code Review
Mostly just fixing typos
Change-Id: If543e9190035016161dfedd51136d66b799b8e26
Showing
8 changed files
with
33 additions
and
29 deletions
| ... | @@ -93,7 +93,7 @@ public class DefaultRoutingHandler { | ... | @@ -93,7 +93,7 @@ public class DefaultRoutingHandler { |
| 93 | try { | 93 | try { |
| 94 | populationStatus = Status.STARTED; | 94 | populationStatus = Status.STARTED; |
| 95 | rulePopulator.resetCounter(); | 95 | rulePopulator.resetCounter(); |
| 96 | - log.info("Starts to populate routing rules"); | 96 | + log.info("Starting to populate segment-routing rules"); |
| 97 | log.debug("populateAllRoutingRules: populationStatus is STARTED"); | 97 | log.debug("populateAllRoutingRules: populationStatus is STARTED"); |
| 98 | 98 | ||
| 99 | for (Device sw : srManager.deviceService.getDevices()) { | 99 | for (Device sw : srManager.deviceService.getDevices()) { |
| ... | @@ -117,7 +117,7 @@ public class DefaultRoutingHandler { | ... | @@ -117,7 +117,7 @@ public class DefaultRoutingHandler { |
| 117 | 117 | ||
| 118 | log.debug("populateAllRoutingRules: populationStatus is SUCCEEDED"); | 118 | log.debug("populateAllRoutingRules: populationStatus is SUCCEEDED"); |
| 119 | populationStatus = Status.SUCCEEDED; | 119 | populationStatus = Status.SUCCEEDED; |
| 120 | - log.info("Completes routing rule population. Total # of rules pushed : {}", | 120 | + log.info("Completed routing rule population. Total # of rules pushed : {}", |
| 121 | rulePopulator.getCounter()); | 121 | rulePopulator.getCounter()); |
| 122 | return true; | 122 | return true; |
| 123 | } finally { | 123 | } finally { |
| ... | @@ -426,7 +426,7 @@ public class DefaultRoutingHandler { | ... | @@ -426,7 +426,7 @@ public class DefaultRoutingHandler { |
| 426 | .get(itrIdx); | 426 | .get(itrIdx); |
| 427 | for (DeviceId targetSw : swViaMap.keySet()) { | 427 | for (DeviceId targetSw : swViaMap.keySet()) { |
| 428 | Set<DeviceId> nextHops = new HashSet<>(); | 428 | Set<DeviceId> nextHops = new HashSet<>(); |
| 429 | - | 429 | + log.debug("** Iter: {} root: {} target: {}", itrIdx, destSw, targetSw); |
| 430 | for (ArrayList<DeviceId> via : swViaMap.get(targetSw)) { | 430 | for (ArrayList<DeviceId> via : swViaMap.get(targetSw)) { |
| 431 | if (via.isEmpty()) { | 431 | if (via.isEmpty()) { |
| 432 | nextHops.add(destSw); | 432 | nextHops.add(destSw); |
| ... | @@ -456,7 +456,7 @@ public class DefaultRoutingHandler { | ... | @@ -456,7 +456,7 @@ public class DefaultRoutingHandler { |
| 456 | // rule for both subnet and router IP. | 456 | // rule for both subnet and router IP. |
| 457 | if (config.isEdgeDevice(targetSw) && config.isEdgeDevice(destSw)) { | 457 | if (config.isEdgeDevice(targetSw) && config.isEdgeDevice(destSw)) { |
| 458 | List<Ip4Prefix> subnets = config.getSubnets(destSw); | 458 | List<Ip4Prefix> subnets = config.getSubnets(destSw); |
| 459 | - log.debug("populateEcmpRoutingRulePartial in device {} towards {} for subnets {}", | 459 | + log.debug("* populateEcmpRoutingRulePartial in device {} towards {} for subnets {}", |
| 460 | targetSw, destSw, subnets); | 460 | targetSw, destSw, subnets); |
| 461 | result = rulePopulator.populateIpRuleForSubnet(targetSw, | 461 | result = rulePopulator.populateIpRuleForSubnet(targetSw, |
| 462 | subnets, | 462 | subnets, |
| ... | @@ -468,7 +468,7 @@ public class DefaultRoutingHandler { | ... | @@ -468,7 +468,7 @@ public class DefaultRoutingHandler { |
| 468 | 468 | ||
| 469 | Ip4Address routerIp = config.getRouterIp(destSw); | 469 | Ip4Address routerIp = config.getRouterIp(destSw); |
| 470 | IpPrefix routerIpPrefix = IpPrefix.valueOf(routerIp, IpPrefix.MAX_INET_MASK_LENGTH); | 470 | IpPrefix routerIpPrefix = IpPrefix.valueOf(routerIp, IpPrefix.MAX_INET_MASK_LENGTH); |
| 471 | - log.debug("populateEcmpRoutingRulePartial in device {} towards {} for router IP {}", | 471 | + log.debug("* populateEcmpRoutingRulePartial in device {} towards {} for router IP {}", |
| 472 | targetSw, destSw, routerIpPrefix); | 472 | targetSw, destSw, routerIpPrefix); |
| 473 | result = rulePopulator.populateIpRuleForRouter(targetSw, routerIpPrefix, destSw, nextHops); | 473 | result = rulePopulator.populateIpRuleForRouter(targetSw, routerIpPrefix, destSw, nextHops); |
| 474 | if (!result) { | 474 | if (!result) { |
| ... | @@ -479,7 +479,7 @@ public class DefaultRoutingHandler { | ... | @@ -479,7 +479,7 @@ public class DefaultRoutingHandler { |
| 479 | } else if (config.isEdgeDevice(targetSw)) { | 479 | } else if (config.isEdgeDevice(targetSw)) { |
| 480 | Ip4Address routerIp = config.getRouterIp(destSw); | 480 | Ip4Address routerIp = config.getRouterIp(destSw); |
| 481 | IpPrefix routerIpPrefix = IpPrefix.valueOf(routerIp, IpPrefix.MAX_INET_MASK_LENGTH); | 481 | IpPrefix routerIpPrefix = IpPrefix.valueOf(routerIp, IpPrefix.MAX_INET_MASK_LENGTH); |
| 482 | - log.debug("populateEcmpRoutingRulePartial in device {} towards {} for router IP {}", | 482 | + log.debug("* populateEcmpRoutingRulePartial in device {} towards {} for router IP {}", |
| 483 | targetSw, destSw, routerIpPrefix); | 483 | targetSw, destSw, routerIpPrefix); |
| 484 | result = rulePopulator.populateIpRuleForRouter(targetSw, routerIpPrefix, destSw, nextHops); | 484 | result = rulePopulator.populateIpRuleForRouter(targetSw, routerIpPrefix, destSw, nextHops); |
| 485 | if (!result) { | 485 | if (!result) { |
| ... | @@ -488,7 +488,7 @@ public class DefaultRoutingHandler { | ... | @@ -488,7 +488,7 @@ public class DefaultRoutingHandler { |
| 488 | } | 488 | } |
| 489 | 489 | ||
| 490 | // Populates MPLS rules to all routers | 490 | // Populates MPLS rules to all routers |
| 491 | - log.debug("populateEcmpRoutingRulePartial in device{} towards {} for all MPLS rules", | 491 | + log.debug("* populateEcmpRoutingRulePartial in device{} towards {} for all MPLS rules", |
| 492 | targetSw, destSw); | 492 | targetSw, destSw); |
| 493 | result = rulePopulator.populateMplsRule(targetSw, destSw, nextHops); | 493 | result = rulePopulator.populateMplsRule(targetSw, destSw, nextHops); |
| 494 | if (!result) { | 494 | if (!result) { |
| ... | @@ -500,7 +500,7 @@ public class DefaultRoutingHandler { | ... | @@ -500,7 +500,7 @@ public class DefaultRoutingHandler { |
| 500 | 500 | ||
| 501 | /** | 501 | /** |
| 502 | * Populates table miss entries for all tables, and pipeline rules for VLAN | 502 | * Populates table miss entries for all tables, and pipeline rules for VLAN |
| 503 | - * and TACM tables. | 503 | + * and TCAM tables. XXX rename/rethink |
| 504 | * | 504 | * |
| 505 | * @param deviceId Switch ID to set the rules | 505 | * @param deviceId Switch ID to set the rules |
| 506 | */ | 506 | */ |
| ... | @@ -534,6 +534,8 @@ public class DefaultRoutingHandler { | ... | @@ -534,6 +534,8 @@ public class DefaultRoutingHandler { |
| 534 | /** | 534 | /** |
| 535 | * Resume the flow rule population process if it was aborted for any reason. | 535 | * Resume the flow rule population process if it was aborted for any reason. |
| 536 | * Mostly the process is aborted when the groups required are not set yet. | 536 | * Mostly the process is aborted when the groups required are not set yet. |
| 537 | + * XXX is this called? | ||
| 538 | + * | ||
| 537 | */ | 539 | */ |
| 538 | public void resumePopulationProcess() { | 540 | public void resumePopulationProcess() { |
| 539 | statusLock.lock(); | 541 | statusLock.lock(); | ... | ... |
| ... | @@ -134,7 +134,7 @@ public class DeviceConfiguration implements DeviceProperties { | ... | @@ -134,7 +134,7 @@ public class DeviceConfiguration implements DeviceProperties { |
| 134 | @Override | 134 | @Override |
| 135 | public int getSegmentId(DeviceId deviceId) { | 135 | public int getSegmentId(DeviceId deviceId) { |
| 136 | if (deviceConfigMap.get(deviceId) != null) { | 136 | if (deviceConfigMap.get(deviceId) != null) { |
| 137 | - log.debug("getSegmentId for device{} is {}", | 137 | + log.trace("getSegmentId for device{} is {}", |
| 138 | deviceId, | 138 | deviceId, |
| 139 | deviceConfigMap.get(deviceId).nodeSid); | 139 | deviceConfigMap.get(deviceId).nodeSid); |
| 140 | return deviceConfigMap.get(deviceId).nodeSid; | 140 | return deviceConfigMap.get(deviceId).nodeSid; |
| ... | @@ -189,7 +189,7 @@ public class DeviceConfiguration implements DeviceProperties { | ... | @@ -189,7 +189,7 @@ public class DeviceConfiguration implements DeviceProperties { |
| 189 | @Override | 189 | @Override |
| 190 | public MacAddress getDeviceMac(DeviceId deviceId) { | 190 | public MacAddress getDeviceMac(DeviceId deviceId) { |
| 191 | if (deviceConfigMap.get(deviceId) != null) { | 191 | if (deviceConfigMap.get(deviceId) != null) { |
| 192 | - log.debug("getDeviceMac for device{} is {}", | 192 | + log.trace("getDeviceMac for device{} is {}", |
| 193 | deviceId, | 193 | deviceId, |
| 194 | deviceConfigMap.get(deviceId).mac); | 194 | deviceConfigMap.get(deviceId).mac); |
| 195 | return deviceConfigMap.get(deviceId).mac; | 195 | return deviceConfigMap.get(deviceId).mac; |
| ... | @@ -209,7 +209,7 @@ public class DeviceConfiguration implements DeviceProperties { | ... | @@ -209,7 +209,7 @@ public class DeviceConfiguration implements DeviceProperties { |
| 209 | */ | 209 | */ |
| 210 | public Ip4Address getRouterIp(DeviceId deviceId) { | 210 | public Ip4Address getRouterIp(DeviceId deviceId) { |
| 211 | if (deviceConfigMap.get(deviceId) != null) { | 211 | if (deviceConfigMap.get(deviceId) != null) { |
| 212 | - log.debug("getDeviceIp for device{} is {}", | 212 | + log.trace("getDeviceIp for device{} is {}", |
| 213 | deviceId, | 213 | deviceId, |
| 214 | deviceConfigMap.get(deviceId).ip); | 214 | deviceConfigMap.get(deviceId).ip); |
| 215 | return deviceConfigMap.get(deviceId).ip; | 215 | return deviceConfigMap.get(deviceId).ip; |
| ... | @@ -231,7 +231,7 @@ public class DeviceConfiguration implements DeviceProperties { | ... | @@ -231,7 +231,7 @@ public class DeviceConfiguration implements DeviceProperties { |
| 231 | @Override | 231 | @Override |
| 232 | public boolean isEdgeDevice(DeviceId deviceId) { | 232 | public boolean isEdgeDevice(DeviceId deviceId) { |
| 233 | if (deviceConfigMap.get(deviceId) != null) { | 233 | if (deviceConfigMap.get(deviceId) != null) { |
| 234 | - log.debug("isEdgeDevice for device{} is {}", | 234 | + log.trace("isEdgeDevice for device{} is {}", |
| 235 | deviceId, | 235 | deviceId, |
| 236 | deviceConfigMap.get(deviceId).isEdge); | 236 | deviceConfigMap.get(deviceId).isEdge); |
| 237 | return deviceConfigMap.get(deviceId).isEdge; | 237 | return deviceConfigMap.get(deviceId).isEdge; |
| ... | @@ -297,7 +297,7 @@ public class DeviceConfiguration implements DeviceProperties { | ... | @@ -297,7 +297,7 @@ public class DeviceConfiguration implements DeviceProperties { |
| 297 | */ | 297 | */ |
| 298 | public List<Ip4Address> getSubnetGatewayIps(DeviceId deviceId) { | 298 | public List<Ip4Address> getSubnetGatewayIps(DeviceId deviceId) { |
| 299 | if (deviceConfigMap.get(deviceId) != null) { | 299 | if (deviceConfigMap.get(deviceId) != null) { |
| 300 | - log.debug("getSubnetGatewayIps for device{} is {}", | 300 | + log.trace("getSubnetGatewayIps for device{} is {}", |
| 301 | deviceId, | 301 | deviceId, |
| 302 | deviceConfigMap.get(deviceId).gatewayIps.values()); | 302 | deviceConfigMap.get(deviceId).gatewayIps.values()); |
| 303 | return new ArrayList<>(deviceConfigMap.get(deviceId).gatewayIps.values()); | 303 | return new ArrayList<>(deviceConfigMap.get(deviceId).gatewayIps.values()); |
| ... | @@ -314,7 +314,7 @@ public class DeviceConfiguration implements DeviceProperties { | ... | @@ -314,7 +314,7 @@ public class DeviceConfiguration implements DeviceProperties { |
| 314 | */ | 314 | */ |
| 315 | public List<Ip4Prefix> getSubnets(DeviceId deviceId) { | 315 | public List<Ip4Prefix> getSubnets(DeviceId deviceId) { |
| 316 | if (deviceConfigMap.get(deviceId) != null) { | 316 | if (deviceConfigMap.get(deviceId) != null) { |
| 317 | - log.debug("getSubnets for device{} is {}", | 317 | + log.trace("getSubnets for device{} is {}", |
| 318 | deviceId, | 318 | deviceId, |
| 319 | deviceConfigMap.get(deviceId).subnets.values()); | 319 | deviceConfigMap.get(deviceId).subnets.values()); |
| 320 | return new ArrayList<>(deviceConfigMap.get(deviceId).subnets.values()); | 320 | return new ArrayList<>(deviceConfigMap.get(deviceId).subnets.values()); | ... | ... |
| ... | @@ -31,7 +31,7 @@ import java.util.List; | ... | @@ -31,7 +31,7 @@ import java.util.List; |
| 31 | 31 | ||
| 32 | /** | 32 | /** |
| 33 | * This class creates bandwidth constrained breadth first tree and returns paths | 33 | * This class creates bandwidth constrained breadth first tree and returns paths |
| 34 | - * from root Device to leaf Devicees which satisfies the bandwidth condition. If | 34 | + * from root Device to leaf Devices which satisfies the bandwidth condition. If |
| 35 | * bandwidth parameter is not specified, the normal breadth first tree will be | 35 | * bandwidth parameter is not specified, the normal breadth first tree will be |
| 36 | * calculated. The paths are snapshot paths at the point of the class | 36 | * calculated. The paths are snapshot paths at the point of the class |
| 37 | * instantiation. | 37 | * instantiation. |
| ... | @@ -281,7 +281,7 @@ public class ECMPShortestPathGraph { | ... | @@ -281,7 +281,7 @@ public class ECMPShortestPathGraph { |
| 281 | * Return the complete info of the computed ECMP paths for each Device | 281 | * Return the complete info of the computed ECMP paths for each Device |
| 282 | * learned in multiple iterations from the root Device. | 282 | * learned in multiple iterations from the root Device. |
| 283 | * | 283 | * |
| 284 | - * @return the hash table of Devicees learned in multiple Dijkstra | 284 | + * @return the hash table of Devices learned in multiple Dijkstra |
| 285 | * iterations and corresponding ECMP paths to it from the root | 285 | * iterations and corresponding ECMP paths to it from the root |
| 286 | * Device | 286 | * Device |
| 287 | */ | 287 | */ |
| ... | @@ -305,8 +305,8 @@ public class ECMPShortestPathGraph { | ... | @@ -305,8 +305,8 @@ public class ECMPShortestPathGraph { |
| 305 | * Return the complete info of the computed ECMP paths for each Device | 305 | * Return the complete info of the computed ECMP paths for each Device |
| 306 | * learned in multiple iterations from the root Device. | 306 | * learned in multiple iterations from the root Device. |
| 307 | * | 307 | * |
| 308 | - * @return the hash table of Devicees learned in multiple Dijkstra | 308 | + * @return the hash table of Devices learned in multiple Dijkstra |
| 309 | - * iterations and corresponding ECMP paths in terms of Devicees to | 309 | + * iterations and corresponding ECMP paths in terms of Devices to |
| 310 | * be traversed to it from the root Device | 310 | * be traversed to it from the root Device |
| 311 | */ | 311 | */ |
| 312 | public HashMap<Integer, HashMap<DeviceId, | 312 | public HashMap<Integer, HashMap<DeviceId, | ... | ... |
| ... | @@ -115,7 +115,7 @@ public class IpHandler { | ... | @@ -115,7 +115,7 @@ public class IpHandler { |
| 115 | /** | 115 | /** |
| 116 | * Forwards IP packets in the buffer to the destination IP address. | 116 | * Forwards IP packets in the buffer to the destination IP address. |
| 117 | * It is called when the controller finds the destination MAC address | 117 | * It is called when the controller finds the destination MAC address |
| 118 | - * via ARP responsees. | 118 | + * via ARP responses. |
| 119 | * | 119 | * |
| 120 | * @param deviceId switch device ID | 120 | * @param deviceId switch device ID |
| 121 | * @param destIpAddress destination IP address | 121 | * @param destIpAddress destination IP address | ... | ... |
| ... | @@ -150,7 +150,7 @@ public class RoutingRulePopulator { | ... | @@ -150,7 +150,7 @@ public class RoutingRulePopulator { |
| 150 | /** | 150 | /** |
| 151 | * Populates IP flow rules for the router IP address. | 151 | * Populates IP flow rules for the router IP address. |
| 152 | * | 152 | * |
| 153 | - * @param deviceId device ID to set the rules | 153 | + * @param deviceId target device ID to set the rules |
| 154 | * @param ipPrefix the IP address of the destination router | 154 | * @param ipPrefix the IP address of the destination router |
| 155 | * @param destSw device ID of the destination router | 155 | * @param destSw device ID of the destination router |
| 156 | * @param nextHops next hop switch ID list | 156 | * @param nextHops next hop switch ID list |
| ... | @@ -210,9 +210,9 @@ public class RoutingRulePopulator { | ... | @@ -210,9 +210,9 @@ public class RoutingRulePopulator { |
| 210 | } | 210 | } |
| 211 | 211 | ||
| 212 | /** | 212 | /** |
| 213 | - * Populates MPLS flow rules to all transit routers. | 213 | + * Populates MPLS flow rules to all routers. |
| 214 | * | 214 | * |
| 215 | - * @param deviceId device ID of the switch to set the rules | 215 | + * @param deviceId target device ID of the switch to set the rules |
| 216 | * @param destSwId destination switch device ID | 216 | * @param destSwId destination switch device ID |
| 217 | * @param nextHops next hops switch ID list | 217 | * @param nextHops next hops switch ID list |
| 218 | * @return true if all rules are set successfully, false otherwise | 218 | * @return true if all rules are set successfully, false otherwise |
| ... | @@ -379,7 +379,7 @@ public class RoutingRulePopulator { | ... | @@ -379,7 +379,7 @@ public class RoutingRulePopulator { |
| 379 | .addCondition(Criteria.matchEthDst(config | 379 | .addCondition(Criteria.matchEthDst(config |
| 380 | .getDeviceMac(deviceId))); | 380 | .getDeviceMac(deviceId))); |
| 381 | fob.permit().fromApp(srManager.appId); | 381 | fob.permit().fromApp(srManager.appId); |
| 382 | - log.debug("populateTableVlan: Installing filtering objective for router mac"); | 382 | + log.debug("populateTableTMac: Installing filtering objective for router mac"); |
| 383 | srManager.flowObjectiveService. | 383 | srManager.flowObjectiveService. |
| 384 | filter(deviceId, | 384 | filter(deviceId, |
| 385 | fob.add(new SRObjectiveContext(deviceId, | 385 | fob.add(new SRObjectiveContext(deviceId, | ... | ... |
| ... | @@ -296,7 +296,8 @@ public class SegmentRoutingManager implements SegmentRoutingService { | ... | @@ -296,7 +296,8 @@ public class SegmentRoutingManager implements SegmentRoutingService { |
| 296 | } | 296 | } |
| 297 | 297 | ||
| 298 | /** | 298 | /** |
| 299 | - * Returns the GrouopKey object for the device and the NighborSet given. | 299 | + * Returns the GroupKey object for the device and the NeighborSet given. |
| 300 | + * XXX is this called | ||
| 300 | * | 301 | * |
| 301 | * @param ns NeightborSet object for the GroupKey | 302 | * @param ns NeightborSet object for the GroupKey |
| 302 | * @return GroupKey object for the NeighborSet | 303 | * @return GroupKey object for the NeighborSet | ... | ... |
| ... | @@ -35,13 +35,14 @@ import org.onosproject.store.service.EventuallyConsistentMap; | ... | @@ -35,13 +35,14 @@ import org.onosproject.store.service.EventuallyConsistentMap; |
| 35 | * where D0 and D3 are edge devices and D1 and D2 are transit devices. | 35 | * where D0 and D3 are edge devices and D1 and D2 are transit devices. |
| 36 | * Assume device D0 is connected to 2 neighbors (D1 and D2 ). | 36 | * Assume device D0 is connected to 2 neighbors (D1 and D2 ). |
| 37 | * The following groups will be created in D0: | 37 | * The following groups will be created in D0: |
| 38 | - * 1) all ports to D1 + with no label push, | 38 | + * 1) all ports to D1 + with no label push, // direct attach case, seen |
| 39 | - * 2) all ports to D1 + with label 102 pushed, | 39 | + * 2) all ports to D1 + with label 102 pushed, // this is not needed |
| 40 | - * 3) all ports to D1 + with label 103 pushed, | 40 | + * 3) all ports to D1 + with label 103 pushed, // maybe needed, sometimes seen |
| 41 | * 4) all ports to D2 + with no label push, | 41 | * 4) all ports to D2 + with no label push, |
| 42 | * 5) all ports to D2 + with label 101 pushed, | 42 | * 5) all ports to D2 + with label 101 pushed, |
| 43 | * 6) all ports to D2 + with label 103 pushed, | 43 | * 6) all ports to D2 + with label 103 pushed, |
| 44 | - * 7) all ports to D1 and D2 + with label 103 pushed | 44 | + * 7) all ports to D1 and D2 + with label 103 pushed // ecmp case |
| 45 | + * 8) what about ecmp no label case | ||
| 45 | */ | 46 | */ |
| 46 | public class DefaultEdgeGroupHandler extends DefaultGroupHandler { | 47 | public class DefaultEdgeGroupHandler extends DefaultGroupHandler { |
| 47 | 48 | ... | ... |
| ... | @@ -169,7 +169,7 @@ public class CpqdOFDPA1Pipeline extends OFDPA1Pipeline { | ... | @@ -169,7 +169,7 @@ public class CpqdOFDPA1Pipeline extends OFDPA1Pipeline { |
| 169 | })); | 169 | })); |
| 170 | } | 170 | } |
| 171 | 171 | ||
| 172 | - private void processAclTable() { | 172 | + protected void processAclTable() { |
| 173 | //table miss entry - catch all to executed action-set | 173 | //table miss entry - catch all to executed action-set |
| 174 | FlowRuleOperations.Builder ops = FlowRuleOperations.builder(); | 174 | FlowRuleOperations.Builder ops = FlowRuleOperations.builder(); |
| 175 | TrafficSelector.Builder selector = DefaultTrafficSelector.builder(); | 175 | TrafficSelector.Builder selector = DefaultTrafficSelector.builder(); | ... | ... |
-
Please register or login to post a comment