Don't install table miss entry for OVS 1.3 or CPqD switches.
We shouldn't have special behaviour for some switches, and we want send-to-controller behaviour to be determined by the applications rather than the switch type. Change-Id: I87fd0c0c0b567660378d325286101d19d86aba33
Showing
3 changed files
with
16 additions
and
44 deletions
| ... | @@ -39,10 +39,6 @@ public final class DriverManager implements OpenFlowSwitchDriverFactory { | ... | @@ -39,10 +39,6 @@ public final class DriverManager implements OpenFlowSwitchDriverFactory { |
| 39 | 39 | ||
| 40 | private static final Logger log = LoggerFactory.getLogger(DriverManager.class); | 40 | private static final Logger log = LoggerFactory.getLogger(DriverManager.class); |
| 41 | 41 | ||
| 42 | - // Whether to use an OF 1.3 configured TTP, or to use an OF 1.0-style | ||
| 43 | - // single table with packet-ins. | ||
| 44 | - private static boolean cpqdUsePipeline13 = false; | ||
| 45 | - | ||
| 46 | /** | 42 | /** |
| 47 | * Return an IOFSwitch object based on switch's manufacturer description | 43 | * Return an IOFSwitch object based on switch's manufacturer description |
| 48 | * from OFDescStatsReply. | 44 | * from OFDescStatsReply. |
| ... | @@ -59,7 +55,7 @@ public final class DriverManager implements OpenFlowSwitchDriverFactory { | ... | @@ -59,7 +55,7 @@ public final class DriverManager implements OpenFlowSwitchDriverFactory { |
| 59 | if (vendor.startsWith("Stanford University, Ericsson Research and CPqD Research") | 55 | if (vendor.startsWith("Stanford University, Ericsson Research and CPqD Research") |
| 60 | && | 56 | && |
| 61 | hw.startsWith("OpenFlow 1.3 Reference Userspace Switch")) { | 57 | hw.startsWith("OpenFlow 1.3 Reference Userspace Switch")) { |
| 62 | - return new OFSwitchImplCPqD13(dpid, desc, cpqdUsePipeline13); | 58 | + return new OFSwitchImplCPqD13(dpid, desc); |
| 63 | } | 59 | } |
| 64 | 60 | ||
| 65 | if (hw.startsWith("Open vSwitch")) { | 61 | if (hw.startsWith("Open vSwitch")) { |
| ... | @@ -129,18 +125,6 @@ public final class DriverManager implements OpenFlowSwitchDriverFactory { | ... | @@ -129,18 +125,6 @@ public final class DriverManager implements OpenFlowSwitchDriverFactory { |
| 129 | private DriverManager() { | 125 | private DriverManager() { |
| 130 | } | 126 | } |
| 131 | 127 | ||
| 132 | - /** | ||
| 133 | - * Sets the configuration parameter which determines how the CPqD switch | ||
| 134 | - * is set up. If usePipeline13 is true, a 1.3 pipeline will be set up on | ||
| 135 | - * the switch. Otherwise, the switch will be set up in a 1.0 style with | ||
| 136 | - * a single table where missed packets are sent to the controller. | ||
| 137 | - * | ||
| 138 | - * @param usePipeline13 whether to use a 1.3 pipeline or not | ||
| 139 | - */ | ||
| 140 | - public static void setConfigForCpqd(boolean usePipeline13) { | ||
| 141 | - cpqdUsePipeline13 = usePipeline13; | ||
| 142 | - } | ||
| 143 | - | ||
| 144 | public static OpenFlowSwitchDriver getSwitch(Dpid dpid, | 128 | public static OpenFlowSwitchDriver getSwitch(Dpid dpid, |
| 145 | OFDescStatsReply desc, OFVersion ofv) { | 129 | OFDescStatsReply desc, OFVersion ofv) { |
| 146 | return new DriverManager().getOFSwitchImpl(dpid, desc, ofv); | 130 | return new DriverManager().getOFSwitchImpl(dpid, desc, ofv); | ... | ... |
| ... | @@ -15,6 +15,14 @@ | ... | @@ -15,6 +15,14 @@ |
| 15 | */ | 15 | */ |
| 16 | package org.onosproject.openflow.drivers; | 16 | package org.onosproject.openflow.drivers; |
| 17 | 17 | ||
| 18 | +import java.io.IOException; | ||
| 19 | +import java.util.ArrayList; | ||
| 20 | +import java.util.Collections; | ||
| 21 | +import java.util.List; | ||
| 22 | +import java.util.Map; | ||
| 23 | +import java.util.concurrent.ConcurrentHashMap; | ||
| 24 | +import java.util.concurrent.atomic.AtomicBoolean; | ||
| 25 | + | ||
| 18 | import org.onosproject.openflow.controller.Dpid; | 26 | import org.onosproject.openflow.controller.Dpid; |
| 19 | import org.onosproject.openflow.controller.RoleState; | 27 | import org.onosproject.openflow.controller.RoleState; |
| 20 | import org.onosproject.openflow.controller.driver.AbstractOpenFlowSwitch; | 28 | import org.onosproject.openflow.controller.driver.AbstractOpenFlowSwitch; |
| ... | @@ -57,14 +65,6 @@ import org.projectfloodlight.openflow.types.U32; | ... | @@ -57,14 +65,6 @@ import org.projectfloodlight.openflow.types.U32; |
| 57 | import org.projectfloodlight.openflow.types.U64; | 65 | import org.projectfloodlight.openflow.types.U64; |
| 58 | import org.projectfloodlight.openflow.util.HexString; | 66 | import org.projectfloodlight.openflow.util.HexString; |
| 59 | 67 | ||
| 60 | -import java.io.IOException; | ||
| 61 | -import java.util.ArrayList; | ||
| 62 | -import java.util.Collections; | ||
| 63 | -import java.util.List; | ||
| 64 | -import java.util.Map; | ||
| 65 | -import java.util.concurrent.ConcurrentHashMap; | ||
| 66 | -import java.util.concurrent.atomic.AtomicBoolean; | ||
| 67 | - | ||
| 68 | /** | 68 | /** |
| 69 | * OFDescriptionStatistics Vendor (Manufacturer Desc.): Stanford University, | 69 | * OFDescriptionStatistics Vendor (Manufacturer Desc.): Stanford University, |
| 70 | * Ericsson Research and CPqD Research. Make (Hardware Desc.) : OpenFlow 1.3 | 70 | * Ericsson Research and CPqD Research. Make (Hardware Desc.) : OpenFlow 1.3 |
| ... | @@ -107,15 +107,11 @@ public class OFSwitchImplCPqD13 extends AbstractOpenFlowSwitch { | ... | @@ -107,15 +107,11 @@ public class OFSwitchImplCPqD13 extends AbstractOpenFlowSwitch { |
| 107 | 107 | ||
| 108 | private final Map<Integer, OFGroup> l2groups; | 108 | private final Map<Integer, OFGroup> l2groups; |
| 109 | 109 | ||
| 110 | - private final boolean usePipeline13; | 110 | + public OFSwitchImplCPqD13(Dpid dpid, OFDescStatsReply desc) { |
| 111 | - | ||
| 112 | - public OFSwitchImplCPqD13(Dpid dpid, OFDescStatsReply desc, boolean usePipeline13) { | ||
| 113 | super(dpid); | 111 | super(dpid); |
| 114 | driverHandshakeComplete = new AtomicBoolean(false); | 112 | driverHandshakeComplete = new AtomicBoolean(false); |
| 115 | l2groups = new ConcurrentHashMap<Integer, OFGroup>(); | 113 | l2groups = new ConcurrentHashMap<Integer, OFGroup>(); |
| 116 | setSwitchDescription(desc); | 114 | setSwitchDescription(desc); |
| 117 | - | ||
| 118 | - this.usePipeline13 = usePipeline13; | ||
| 119 | } | 115 | } |
| 120 | 116 | ||
| 121 | /* (non-Javadoc) | 117 | /* (non-Javadoc) |
| ... | @@ -136,12 +132,7 @@ public class OFSwitchImplCPqD13 extends AbstractOpenFlowSwitch { | ... | @@ -136,12 +132,7 @@ public class OFSwitchImplCPqD13 extends AbstractOpenFlowSwitch { |
| 136 | } | 132 | } |
| 137 | startDriverHandshakeCalled = true; | 133 | startDriverHandshakeCalled = true; |
| 138 | factory = this.factory(); | 134 | factory = this.factory(); |
| 139 | - if (!usePipeline13) { | 135 | + |
| 140 | - // Send packet-in to controller if a packet misses the first table | ||
| 141 | - populateTableMissEntry(0, true, false, false, 0); | ||
| 142 | - } //else { | ||
| 143 | - // configureSwitch(); | ||
| 144 | - //} | ||
| 145 | sendBarrier(true); | 136 | sendBarrier(true); |
| 146 | } | 137 | } |
| 147 | 138 | ... | ... |
| ... | @@ -15,6 +15,11 @@ | ... | @@ -15,6 +15,11 @@ |
| 15 | */ | 15 | */ |
| 16 | package org.onosproject.openflow.drivers; | 16 | package org.onosproject.openflow.drivers; |
| 17 | 17 | ||
| 18 | +import java.util.ArrayList; | ||
| 19 | +import java.util.Collections; | ||
| 20 | +import java.util.List; | ||
| 21 | +import java.util.concurrent.atomic.AtomicBoolean; | ||
| 22 | + | ||
| 18 | import org.onosproject.openflow.controller.Dpid; | 23 | import org.onosproject.openflow.controller.Dpid; |
| 19 | import org.onosproject.openflow.controller.driver.AbstractOpenFlowSwitch; | 24 | import org.onosproject.openflow.controller.driver.AbstractOpenFlowSwitch; |
| 20 | import org.onosproject.openflow.controller.driver.SwitchDriverSubHandshakeAlreadyStarted; | 25 | import org.onosproject.openflow.controller.driver.SwitchDriverSubHandshakeAlreadyStarted; |
| ... | @@ -32,11 +37,6 @@ import org.projectfloodlight.openflow.types.OFBufferId; | ... | @@ -32,11 +37,6 @@ import org.projectfloodlight.openflow.types.OFBufferId; |
| 32 | import org.projectfloodlight.openflow.types.OFPort; | 37 | import org.projectfloodlight.openflow.types.OFPort; |
| 33 | import org.projectfloodlight.openflow.types.TableId; | 38 | import org.projectfloodlight.openflow.types.TableId; |
| 34 | 39 | ||
| 35 | -import java.util.ArrayList; | ||
| 36 | -import java.util.Collections; | ||
| 37 | -import java.util.List; | ||
| 38 | -import java.util.concurrent.atomic.AtomicBoolean; | ||
| 39 | - | ||
| 40 | /** | 40 | /** |
| 41 | * OFDescriptionStatistics Vendor (Manufacturer Desc.): Nicira, Inc. Make | 41 | * OFDescriptionStatistics Vendor (Manufacturer Desc.): Nicira, Inc. Make |
| 42 | * (Hardware Desc.) : Open vSwitch Model (Datapath Desc.) : None Software : | 42 | * (Hardware Desc.) : Open vSwitch Model (Datapath Desc.) : None Software : |
| ... | @@ -132,13 +132,10 @@ public class OFSwitchImplOVS13 extends AbstractOpenFlowSwitch { | ... | @@ -132,13 +132,10 @@ public class OFSwitchImplOVS13 extends AbstractOpenFlowSwitch { |
| 132 | } | 132 | } |
| 133 | } | 133 | } |
| 134 | 134 | ||
| 135 | - | ||
| 136 | private void configureSwitch() { | 135 | private void configureSwitch() { |
| 137 | - populateTableMissEntry(0, true, false, false, 0); | ||
| 138 | sendBarrier(true); | 136 | sendBarrier(true); |
| 139 | } | 137 | } |
| 140 | 138 | ||
| 141 | - | ||
| 142 | private void sendBarrier(boolean finalBarrier) { | 139 | private void sendBarrier(boolean finalBarrier) { |
| 143 | int xid = getNextTransactionId(); | 140 | int xid = getNextTransactionId(); |
| 144 | if (finalBarrier) { | 141 | if (finalBarrier) { | ... | ... |
-
Please register or login to post a comment