Cherry-pick from https://gerrit.onos.onlab.us/#/c/335/
Move to FlowManager & Running SDN-IP on multiple onos instances (ONOS-668)
Make DISCARD_FIRST_HOP_ENTRY, KEEP_ONLY_FIRST_HOP_ENTRY accessible
Add a new type of BroadcastPacketOutNotification without inSwitch/inPort
Send Arp Request to all ONOS instances, not just to the local one
Get rid of BgpProxyArpManager.java
Improvements patch (ONOS-668)
change FlowPathFlag from private to public
delete BroadcastPacketOutNotification with no dpid/port
sendPacketOutNotification to specific out-dpid/our-port
Conflicts:
src/main/java/net/onrc/onos/ofcontroller/bgproute/BgpRoute.java
src/main/java/net/onrc/onos/ofcontroller/proxyarp/BgpProxyArpManager.java
NOTE: The above conflicts have been resolved by hand.
Change-Id: I449717d2289d14c2655af10ae7f628ea62187c63
diff --git a/src/main/java/net/onrc/onos/ofcontroller/proxyarp/ProxyArpManager.java b/src/main/java/net/onrc/onos/ofcontroller/proxyarp/ProxyArpManager.java
index f5fee45..c7d495c 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/proxyarp/ProxyArpManager.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/proxyarp/ProxyArpManager.java
@@ -229,7 +229,6 @@
// TODO check whether this is OK from this thread
IDeviceObject targetDevice =
deviceStorage.getDeviceByIP(InetAddresses.coerceToInteger(entry.getKey()));
-
if (targetDevice != null) {
deviceStorage.removeDevice(targetDevice);
if (log.isDebugEnabled()) {
@@ -253,6 +252,8 @@
log.debug("Resending ARP request for {}", address.getHostAddress());
+ // Only ARP requests sent by the controller will have the retry flag
+ // set, so for now we can just send a new ARP request for that address.
sendArpRequestForAddress(address);
for (ArpRequest request : entry.getValue()) {
@@ -433,8 +434,6 @@
MACAddress senderMacAddress = MACAddress.valueOf(arp.getSenderHardwareAddress());
- //arpCache.update(senderIpAddress, senderMacAddress);
-
//See if anyone's waiting for this ARP reply
Set<ArpRequest> requests = arpRequests.get(senderIpAddress);
@@ -504,7 +503,8 @@
.setPriorityCode((byte)0);
}
- sendArpRequestToSwitches(ipAddress, eth.serialize());
+ //sendArpRequestToSwitches(ipAddress, eth.serialize());
+ datagrid.sendPacketOutNotification(new SinglePacketOutNotification(eth.serialize(),intf.getDpid(),intf.getPort()));
}
private void sendArpRequestToSwitches(InetAddress dstAddress, byte[] arpRequest) {
@@ -531,7 +531,8 @@
}
}
else {
- broadcastArpRequestOutEdge(arpRequest, inSwitch, inPort);
+ //broadcastArpRequestOutEdge(arpRequest, inSwitch, inPort);
+ broadcastArpRequestOutMyEdge(arpRequest, inSwitch, inPort);
}
}