Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Bug-590: Packet loss on first time ping test
[controller.git]
/
opendaylight
/
samples
/
simpleforwarding
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
samples
/
simpleforwarding
/
internal
/
SimpleForwardingImpl.java
diff --git
a/opendaylight/samples/simpleforwarding/src/main/java/org/opendaylight/controller/samples/simpleforwarding/internal/SimpleForwardingImpl.java
b/opendaylight/samples/simpleforwarding/src/main/java/org/opendaylight/controller/samples/simpleforwarding/internal/SimpleForwardingImpl.java
index b9d8fee986131328ea00be70394eb66f61b246ce..d3cefd41b3dcaa49ca0062c51c4787c9ad84714f 100644
(file)
--- a/
opendaylight/samples/simpleforwarding/src/main/java/org/opendaylight/controller/samples/simpleforwarding/internal/SimpleForwardingImpl.java
+++ b/
opendaylight/samples/simpleforwarding/src/main/java/org/opendaylight/controller/samples/simpleforwarding/internal/SimpleForwardingImpl.java
@@
-999,12
+999,18
@@
public class SimpleForwardingImpl implements IfNewHostNotify,
return;
}
HostNodeConnector destHost = hostTracker.hostFind(dIP);
return;
}
HostNodeConnector destHost = hostTracker.hostFind(dIP);
+ /*
+ * In cases when incoming and outgoing connectors are in the same node, there is no need
+ * to verify that there is a route. Because of that, we will only need routing.getRoute()
+ * if we know that src and dst nodes are different.
+ */
if (destHost != null
if (destHost != null
- && (routing == null ||
+ && (incomingNodeConnector.getNode().equals(destHost.getnodeconnectorNode()) ||
+ routing == null ||
routing.getRoute(incomingNodeConnector.getNode(), destHost.getnodeconnectorNode()) != null)) {
log.trace("Host {} is at {}", dIP, destHost.getnodeConnector());
routing.getRoute(incomingNodeConnector.getNode(), destHost.getnodeconnectorNode()) != null)) {
log.trace("Host {} is at {}", dIP, destHost.getnodeConnector());
- HostNodePair key = new HostNodePair(destHost,
incomingNodeConnector.get
Node());
+ HostNodePair key = new HostNodePair(destHost,
destHost.getnodeconnector
Node());
// If SimpleForwarding is aware of this host, it will try to install
// a path. Forward packet until it's done.
// If SimpleForwarding is aware of this host, it will try to install
// a path. Forward packet until it's done.