- SwitchManager getNodes() not to return null
Change-Id: I7fc6bcc3953108745505c6c3ed8060618f500fe3
Signed-off-by: Jason Ye <yisye@cisco.com>
# of.discoveryTimeoutMultiple=2
# For newly added ports, allow one more retry if the elapsed time exceeds this threshold (default 30 sec)
# of.discoveryThreshold=30
# of.discoveryTimeoutMultiple=2
# For newly added ports, allow one more retry if the elapsed time exceeds this threshold (default 30 sec)
# of.discoveryThreshold=30
-# The maximum number of ports handled in one discovery batch (default 1024)
-# of.discoveryBatchMaxPorts=1024
+# The maximum number of ports handled in one discovery batch (default 512)
+# of.discoveryBatchMaxPorts=512
# TLS configuration
# To enable TLS, set secureChannelEnabled=true and specify the location of controller Java KeyStore and TrustStore files.
# TLS configuration
# To enable TLS, set secureChannelEnabled=true and specify the location of controller Java KeyStore and TrustStore files.
class DiscoveryTransmit implements Runnable {
private final BlockingQueue<NodeConnector> transmitQ;
class DiscoveryTransmit implements Runnable {
private final BlockingQueue<NodeConnector> transmitQ;
DiscoveryTransmit(BlockingQueue<NodeConnector> transmitQ) {
this.transmitQ = transmitQ;
DiscoveryTransmit(BlockingQueue<NodeConnector> transmitQ) {
this.transmitQ = transmitQ;
RawPacket outPkt = createDiscoveryPacket(nodeConnector);
sendDiscoveryPacket(nodeConnector, outPkt);
nodeConnector = null;
RawPacket outPkt = createDiscoveryPacket(nodeConnector);
sendDiscoveryPacket(nodeConnector, outPkt);
nodeConnector = null;
+ if ((++count & 0x7f) == 0) {
+ Thread.sleep(10);
+ }
} catch (InterruptedException e1) {
logger.warn("DiscoveryTransmit interupted", e1.getMessage());
if (shuttingDown) {
} catch (InterruptedException e1) {
logger.warn("DiscoveryTransmit interupted", e1.getMessage());
if (shuttingDown) {
*/
private int getDiscoveryBatchMaxPorts() {
String val = System.getProperty("of.discoveryBatchMaxPorts");
*/
private int getDiscoveryBatchMaxPorts() {
String val = System.getProperty("of.discoveryBatchMaxPorts");
@Override
public Set<Node> getNodes() {
return (nodeProps != null) ? new HashSet<Node>(nodeProps.keySet())
@Override
public Set<Node> getNodes() {
return (nodeProps != null) ? new HashSet<Node>(nodeProps.keySet())