Fix to avoid unnecessary configuration message when switch does not have buffer
Change-Id: I688964ebd1f1218b51736b9918f3cc9184552fe5
diff --git a/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OFChannelHandler.java b/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OFChannelHandler.java
index 730bf28..450aa82 100644
--- a/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OFChannelHandler.java
+++ b/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OFChannelHandler.java
@@ -1263,12 +1263,16 @@
// Ensure we receive the full packet via PacketIn
// FIXME: We don't set the reassembly flags.
- OFSetConfig sc = factory
- .buildSetConfig()
- .setMissSendLen((short) 0xffff)
- .setXid(this.handshakeTransactionIds--)
- .build();
- msglist.add(sc);
+ // Only send config to switches to send full packets, if they have a buffer.
+ // Saves a packet & OFSetConfig can't be handled by certain switches.
+ if(this.featuresReply.getNBuffers() > 0) {
+ OFSetConfig sc = factory
+ .buildSetConfig()
+ .setMissSendLen((short) 0xffff)
+ .setXid(this.handshakeTransactionIds--)
+ .build();
+ msglist.add(sc);
+ }
// Barrier
OFBarrierRequest br = factory