alshabib

esthetic changes

...@@ -156,9 +156,7 @@ public class ReactiveForwarding { ...@@ -156,9 +156,7 @@ public class ReactiveForwarding {
156 private void installRule(PacketContext context, PortNumber portNumber) { 156 private void installRule(PacketContext context, PortNumber portNumber) {
157 // we don't yet support bufferids in the flowservice so packet out and 157 // we don't yet support bufferids in the flowservice so packet out and
158 // then install a flowmod. 158 // then install a flowmod.
159 - context.treatmentBuilder().add(Instructions.createOutput(portNumber)); 159 + packetOutFlood(context);
160 - context.send();
161 -
162 160
163 Ethernet inPkt = context.inPacket().parsed(); 161 Ethernet inPkt = context.inPacket().parsed();
164 TrafficSelector.Builder builder = new DefaultTrafficSelector.Builder(); 162 TrafficSelector.Builder builder = new DefaultTrafficSelector.Builder();
......
...@@ -78,7 +78,8 @@ public final class DefaultOpenFlowPacketContext implements OpenFlowPacketContext ...@@ -78,7 +78,8 @@ public final class DefaultOpenFlowPacketContext implements OpenFlowPacketContext
78 return new Dpid(sw.getId()); 78 return new Dpid(sw.getId());
79 } 79 }
80 80
81 - public static OpenFlowPacketContext packetContextFromPacketIn(OpenFlowSwitch s, OFPacketIn pkt) { 81 + public static OpenFlowPacketContext packetContextFromPacketIn(OpenFlowSwitch s,
82 + OFPacketIn pkt) {
82 return new DefaultOpenFlowPacketContext(s, pkt); 83 return new DefaultOpenFlowPacketContext(s, pkt);
83 } 84 }
84 85
......
...@@ -53,8 +53,6 @@ public class Controller { ...@@ -53,8 +53,6 @@ public class Controller {
53 protected static final OFFactory FACTORY13 = OFFactories.getFactory(OFVersion.OF_13); 53 protected static final OFFactory FACTORY13 = OFFactories.getFactory(OFVersion.OF_13);
54 protected static final OFFactory FACTORY10 = OFFactories.getFactory(OFVersion.OF_10); 54 protected static final OFFactory FACTORY10 = OFFactories.getFactory(OFVersion.OF_10);
55 55
56 -
57 -
58 // The controllerNodeIPsCache maps Controller IDs to their IP address. 56 // The controllerNodeIPsCache maps Controller IDs to their IP address.
59 // It's only used by handleControllerNodeIPsChanged 57 // It's only used by handleControllerNodeIPsChanged
60 protected HashMap<String, String> controllerNodeIPsCache; 58 protected HashMap<String, String> controllerNodeIPsCache;
...@@ -68,16 +66,12 @@ public class Controller { ...@@ -68,16 +66,12 @@ public class Controller {
68 // Start time of the controller 66 // Start time of the controller
69 protected long systemStartTime; 67 protected long systemStartTime;
70 68
71 - // Flag to always flush flow table on switch reconnect (HA or otherwise)
72 - protected boolean alwaysClearFlowsOnSwAdd = false;
73 private OpenFlowAgent agent; 69 private OpenFlowAgent agent;
74 70
75 private NioServerSocketChannelFactory execFactory; 71 private NioServerSocketChannelFactory execFactory;
76 72
77 // Perf. related configuration 73 // Perf. related configuration
78 protected static final int SEND_BUFFER_SIZE = 4 * 1024 * 1024; 74 protected static final int SEND_BUFFER_SIZE = 4 * 1024 * 1024;
79 - protected static final int BATCH_MAX_SIZE = 100;
80 - protected static final boolean ALWAYS_DECODE_ETH = true;
81 75
82 // *************** 76 // ***************
83 // Getters/Setters 77 // Getters/Setters
......
...@@ -538,43 +538,41 @@ class OFChannelHandler extends IdleStateAwareChannelHandler { ...@@ -538,43 +538,41 @@ class OFChannelHandler extends IdleStateAwareChannelHandler {
538 @Override 538 @Override
539 void processOFStatisticsReply(OFChannelHandler h, 539 void processOFStatisticsReply(OFChannelHandler h,
540 OFStatsReply m) { 540 OFStatsReply m) {
541 - h.sw.handleMessage(m); 541 + h.dispatchMessage(m);
542 } 542 }
543 543
544 @Override 544 @Override
545 void processOFExperimenter(OFChannelHandler h, OFExperimenter m) 545 void processOFExperimenter(OFChannelHandler h, OFExperimenter m)
546 - throws IOException, SwitchStateException { 546 + throws SwitchStateException {
547 h.sw.handleNiciraRole(m); 547 h.sw.handleNiciraRole(m);
548 } 548 }
549 549
550 @Override 550 @Override
551 void processOFRoleReply(OFChannelHandler h, OFRoleReply m) 551 void processOFRoleReply(OFChannelHandler h, OFRoleReply m)
552 - throws SwitchStateException, IOException { 552 + throws SwitchStateException {
553 h.sw.handleRole(m); 553 h.sw.handleRole(m);
554 } 554 }
555 555
556 @Override 556 @Override
557 void processOFPortStatus(OFChannelHandler h, OFPortStatus m) 557 void processOFPortStatus(OFChannelHandler h, OFPortStatus m)
558 - throws IOException, SwitchStateException { 558 + throws SwitchStateException {
559 handlePortStatusMessage(h, m, true); 559 handlePortStatusMessage(h, m, true);
560 h.dispatchMessage(m); 560 h.dispatchMessage(m);
561 } 561 }
562 562
563 @Override 563 @Override
564 - void processOFPacketIn(OFChannelHandler h, OFPacketIn m) 564 + void processOFPacketIn(OFChannelHandler h, OFPacketIn m) {
565 - throws IOException {
566 h.dispatchMessage(m); 565 h.dispatchMessage(m);
567 } 566 }
568 567
569 @Override 568 @Override
570 void processOFFlowRemoved(OFChannelHandler h, 569 void processOFFlowRemoved(OFChannelHandler h,
571 - OFFlowRemoved m) throws IOException { 570 + OFFlowRemoved m) {
572 h.dispatchMessage(m); 571 h.dispatchMessage(m);
573 } 572 }
574 573
575 @Override 574 @Override
576 - void processOFBarrierReply(OFChannelHandler h, OFBarrierReply m) 575 + void processOFBarrierReply(OFChannelHandler h, OFBarrierReply m) {
577 - throws IOException {
578 h.dispatchMessage(m); 576 h.dispatchMessage(m);
579 } 577 }
580 578
...@@ -1092,7 +1090,7 @@ class OFChannelHandler extends IdleStateAwareChannelHandler { ...@@ -1092,7 +1090,7 @@ class OFChannelHandler extends IdleStateAwareChannelHandler {
1092 return this.state.isHandshakeComplete(); 1090 return this.state.isHandshakeComplete();
1093 } 1091 }
1094 1092
1095 - private void dispatchMessage(OFMessage m) throws IOException { 1093 + private void dispatchMessage(OFMessage m) {
1096 sw.handleMessage(m); 1094 sw.handleMessage(m);
1097 } 1095 }
1098 1096
......