Saurav Das
Committed by Gerrit Code Review

Mostly just fixing typos

Change-Id: If543e9190035016161dfedd51136d66b799b8e26
......@@ -93,7 +93,7 @@ public class DefaultRoutingHandler {
try {
populationStatus = Status.STARTED;
rulePopulator.resetCounter();
log.info("Starts to populate routing rules");
log.info("Starting to populate segment-routing rules");
log.debug("populateAllRoutingRules: populationStatus is STARTED");
for (Device sw : srManager.deviceService.getDevices()) {
......@@ -117,7 +117,7 @@ public class DefaultRoutingHandler {
log.debug("populateAllRoutingRules: populationStatus is SUCCEEDED");
populationStatus = Status.SUCCEEDED;
log.info("Completes routing rule population. Total # of rules pushed : {}",
log.info("Completed routing rule population. Total # of rules pushed : {}",
rulePopulator.getCounter());
return true;
} finally {
......@@ -426,7 +426,7 @@ public class DefaultRoutingHandler {
.get(itrIdx);
for (DeviceId targetSw : swViaMap.keySet()) {
Set<DeviceId> nextHops = new HashSet<>();
log.debug("** Iter: {} root: {} target: {}", itrIdx, destSw, targetSw);
for (ArrayList<DeviceId> via : swViaMap.get(targetSw)) {
if (via.isEmpty()) {
nextHops.add(destSw);
......@@ -456,7 +456,7 @@ public class DefaultRoutingHandler {
// rule for both subnet and router IP.
if (config.isEdgeDevice(targetSw) && config.isEdgeDevice(destSw)) {
List<Ip4Prefix> subnets = config.getSubnets(destSw);
log.debug("populateEcmpRoutingRulePartial in device {} towards {} for subnets {}",
log.debug("* populateEcmpRoutingRulePartial in device {} towards {} for subnets {}",
targetSw, destSw, subnets);
result = rulePopulator.populateIpRuleForSubnet(targetSw,
subnets,
......@@ -468,7 +468,7 @@ public class DefaultRoutingHandler {
Ip4Address routerIp = config.getRouterIp(destSw);
IpPrefix routerIpPrefix = IpPrefix.valueOf(routerIp, IpPrefix.MAX_INET_MASK_LENGTH);
log.debug("populateEcmpRoutingRulePartial in device {} towards {} for router IP {}",
log.debug("* populateEcmpRoutingRulePartial in device {} towards {} for router IP {}",
targetSw, destSw, routerIpPrefix);
result = rulePopulator.populateIpRuleForRouter(targetSw, routerIpPrefix, destSw, nextHops);
if (!result) {
......@@ -479,7 +479,7 @@ public class DefaultRoutingHandler {
} else if (config.isEdgeDevice(targetSw)) {
Ip4Address routerIp = config.getRouterIp(destSw);
IpPrefix routerIpPrefix = IpPrefix.valueOf(routerIp, IpPrefix.MAX_INET_MASK_LENGTH);
log.debug("populateEcmpRoutingRulePartial in device {} towards {} for router IP {}",
log.debug("* populateEcmpRoutingRulePartial in device {} towards {} for router IP {}",
targetSw, destSw, routerIpPrefix);
result = rulePopulator.populateIpRuleForRouter(targetSw, routerIpPrefix, destSw, nextHops);
if (!result) {
......@@ -488,7 +488,7 @@ public class DefaultRoutingHandler {
}
// Populates MPLS rules to all routers
log.debug("populateEcmpRoutingRulePartial in device{} towards {} for all MPLS rules",
log.debug("* populateEcmpRoutingRulePartial in device{} towards {} for all MPLS rules",
targetSw, destSw);
result = rulePopulator.populateMplsRule(targetSw, destSw, nextHops);
if (!result) {
......@@ -500,7 +500,7 @@ public class DefaultRoutingHandler {
/**
* Populates table miss entries for all tables, and pipeline rules for VLAN
* and TACM tables.
* and TCAM tables. XXX rename/rethink
*
* @param deviceId Switch ID to set the rules
*/
......@@ -534,6 +534,8 @@ public class DefaultRoutingHandler {
/**
* Resume the flow rule population process if it was aborted for any reason.
* Mostly the process is aborted when the groups required are not set yet.
* XXX is this called?
*
*/
public void resumePopulationProcess() {
statusLock.lock();
......
......@@ -134,7 +134,7 @@ public class DeviceConfiguration implements DeviceProperties {
@Override
public int getSegmentId(DeviceId deviceId) {
if (deviceConfigMap.get(deviceId) != null) {
log.debug("getSegmentId for device{} is {}",
log.trace("getSegmentId for device{} is {}",
deviceId,
deviceConfigMap.get(deviceId).nodeSid);
return deviceConfigMap.get(deviceId).nodeSid;
......@@ -189,7 +189,7 @@ public class DeviceConfiguration implements DeviceProperties {
@Override
public MacAddress getDeviceMac(DeviceId deviceId) {
if (deviceConfigMap.get(deviceId) != null) {
log.debug("getDeviceMac for device{} is {}",
log.trace("getDeviceMac for device{} is {}",
deviceId,
deviceConfigMap.get(deviceId).mac);
return deviceConfigMap.get(deviceId).mac;
......@@ -209,7 +209,7 @@ public class DeviceConfiguration implements DeviceProperties {
*/
public Ip4Address getRouterIp(DeviceId deviceId) {
if (deviceConfigMap.get(deviceId) != null) {
log.debug("getDeviceIp for device{} is {}",
log.trace("getDeviceIp for device{} is {}",
deviceId,
deviceConfigMap.get(deviceId).ip);
return deviceConfigMap.get(deviceId).ip;
......@@ -231,7 +231,7 @@ public class DeviceConfiguration implements DeviceProperties {
@Override
public boolean isEdgeDevice(DeviceId deviceId) {
if (deviceConfigMap.get(deviceId) != null) {
log.debug("isEdgeDevice for device{} is {}",
log.trace("isEdgeDevice for device{} is {}",
deviceId,
deviceConfigMap.get(deviceId).isEdge);
return deviceConfigMap.get(deviceId).isEdge;
......@@ -297,7 +297,7 @@ public class DeviceConfiguration implements DeviceProperties {
*/
public List<Ip4Address> getSubnetGatewayIps(DeviceId deviceId) {
if (deviceConfigMap.get(deviceId) != null) {
log.debug("getSubnetGatewayIps for device{} is {}",
log.trace("getSubnetGatewayIps for device{} is {}",
deviceId,
deviceConfigMap.get(deviceId).gatewayIps.values());
return new ArrayList<>(deviceConfigMap.get(deviceId).gatewayIps.values());
......@@ -314,7 +314,7 @@ public class DeviceConfiguration implements DeviceProperties {
*/
public List<Ip4Prefix> getSubnets(DeviceId deviceId) {
if (deviceConfigMap.get(deviceId) != null) {
log.debug("getSubnets for device{} is {}",
log.trace("getSubnets for device{} is {}",
deviceId,
deviceConfigMap.get(deviceId).subnets.values());
return new ArrayList<>(deviceConfigMap.get(deviceId).subnets.values());
......
......@@ -31,7 +31,7 @@ import java.util.List;
/**
* This class creates bandwidth constrained breadth first tree and returns paths
* from root Device to leaf Devicees which satisfies the bandwidth condition. If
* from root Device to leaf Devices which satisfies the bandwidth condition. If
* bandwidth parameter is not specified, the normal breadth first tree will be
* calculated. The paths are snapshot paths at the point of the class
* instantiation.
......@@ -281,7 +281,7 @@ public class ECMPShortestPathGraph {
* Return the complete info of the computed ECMP paths for each Device
* learned in multiple iterations from the root Device.
*
* @return the hash table of Devicees learned in multiple Dijkstra
* @return the hash table of Devices learned in multiple Dijkstra
* iterations and corresponding ECMP paths to it from the root
* Device
*/
......@@ -305,8 +305,8 @@ public class ECMPShortestPathGraph {
* Return the complete info of the computed ECMP paths for each Device
* learned in multiple iterations from the root Device.
*
* @return the hash table of Devicees learned in multiple Dijkstra
* iterations and corresponding ECMP paths in terms of Devicees to
* @return the hash table of Devices learned in multiple Dijkstra
* iterations and corresponding ECMP paths in terms of Devices to
* be traversed to it from the root Device
*/
public HashMap<Integer, HashMap<DeviceId,
......
......@@ -115,7 +115,7 @@ public class IpHandler {
/**
* Forwards IP packets in the buffer to the destination IP address.
* It is called when the controller finds the destination MAC address
* via ARP responsees.
* via ARP responses.
*
* @param deviceId switch device ID
* @param destIpAddress destination IP address
......
......@@ -150,7 +150,7 @@ public class RoutingRulePopulator {
/**
* Populates IP flow rules for the router IP address.
*
* @param deviceId device ID to set the rules
* @param deviceId target device ID to set the rules
* @param ipPrefix the IP address of the destination router
* @param destSw device ID of the destination router
* @param nextHops next hop switch ID list
......@@ -210,9 +210,9 @@ public class RoutingRulePopulator {
}
/**
* Populates MPLS flow rules to all transit routers.
* Populates MPLS flow rules to all routers.
*
* @param deviceId device ID of the switch to set the rules
* @param deviceId target device ID of the switch to set the rules
* @param destSwId destination switch device ID
* @param nextHops next hops switch ID list
* @return true if all rules are set successfully, false otherwise
......@@ -379,7 +379,7 @@ public class RoutingRulePopulator {
.addCondition(Criteria.matchEthDst(config
.getDeviceMac(deviceId)));
fob.permit().fromApp(srManager.appId);
log.debug("populateTableVlan: Installing filtering objective for router mac");
log.debug("populateTableTMac: Installing filtering objective for router mac");
srManager.flowObjectiveService.
filter(deviceId,
fob.add(new SRObjectiveContext(deviceId,
......
......@@ -296,7 +296,8 @@ public class SegmentRoutingManager implements SegmentRoutingService {
}
/**
* Returns the GrouopKey object for the device and the NighborSet given.
* Returns the GroupKey object for the device and the NeighborSet given.
* XXX is this called
*
* @param ns NeightborSet object for the GroupKey
* @return GroupKey object for the NeighborSet
......
......@@ -35,13 +35,14 @@ import org.onosproject.store.service.EventuallyConsistentMap;
* where D0 and D3 are edge devices and D1 and D2 are transit devices.
* Assume device D0 is connected to 2 neighbors (D1 and D2 ).
* The following groups will be created in D0:
* 1) all ports to D1 + with no label push,
* 2) all ports to D1 + with label 102 pushed,
* 3) all ports to D1 + with label 103 pushed,
* 1) all ports to D1 + with no label push, // direct attach case, seen
* 2) all ports to D1 + with label 102 pushed, // this is not needed
* 3) all ports to D1 + with label 103 pushed, // maybe needed, sometimes seen
* 4) all ports to D2 + with no label push,
* 5) all ports to D2 + with label 101 pushed,
* 6) all ports to D2 + with label 103 pushed,
* 7) all ports to D1 and D2 + with label 103 pushed
* 7) all ports to D1 and D2 + with label 103 pushed // ecmp case
* 8) what about ecmp no label case
*/
public class DefaultEdgeGroupHandler extends DefaultGroupHandler {
......
......@@ -169,7 +169,7 @@ public class CpqdOFDPA1Pipeline extends OFDPA1Pipeline {
}));
}
private void processAclTable() {
protected void processAclTable() {
//table miss entry - catch all to executed action-set
FlowRuleOperations.Builder ops = FlowRuleOperations.builder();
TrafficSelector.Builder selector = DefaultTrafficSelector.builder();
......