Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 1 | /* |
alshabib | b452fd7 | 2015-04-22 20:46:20 -0700 | [diff] [blame] | 2 | * Copyright 2015 Open Networking Laboratory |
Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 3 | * |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 7 | * |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 15 | */ |
alshabib | b452fd7 | 2015-04-22 20:46:20 -0700 | [diff] [blame] | 16 | package org.onosproject.driver.handshaker; |
Praseed Balakrishnan | e48aa68 | 2014-10-08 17:31:37 -0700 | [diff] [blame] | 17 | |
Ayaka Koshibe | 5460d62 | 2015-05-14 12:19:19 -0700 | [diff] [blame] | 18 | import org.onosproject.openflow.controller.OpenFlowOpticalSwitch; |
| 19 | import org.onosproject.openflow.controller.PortDescPropertyType; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 20 | import org.onosproject.openflow.controller.driver.AbstractOpenFlowSwitch; |
| 21 | import org.onosproject.openflow.controller.driver.SwitchDriverSubHandshakeAlreadyStarted; |
| 22 | import org.onosproject.openflow.controller.driver.SwitchDriverSubHandshakeCompleted; |
| 23 | import org.onosproject.openflow.controller.driver.SwitchDriverSubHandshakeNotStarted; |
Praseed Balakrishnan | a22eadf | 2014-10-20 14:21:45 -0700 | [diff] [blame] | 24 | import org.projectfloodlight.openflow.protocol.OFCircuitPortStatus; |
Praseed Balakrishnan | e48aa68 | 2014-10-08 17:31:37 -0700 | [diff] [blame] | 25 | import org.projectfloodlight.openflow.protocol.OFCircuitPortsReply; |
| 26 | import org.projectfloodlight.openflow.protocol.OFCircuitPortsRequest; |
Ayaka Koshibe | 3c24077 | 2015-05-20 16:23:40 -0700 | [diff] [blame] | 27 | import org.projectfloodlight.openflow.protocol.OFFactories; |
| 28 | import org.projectfloodlight.openflow.protocol.OFFactory; |
| 29 | import org.projectfloodlight.openflow.protocol.OFFlowMod; |
| 30 | import org.projectfloodlight.openflow.protocol.OFFlowModCommand; |
| 31 | import org.projectfloodlight.openflow.protocol.OFInstructionType; |
Praseed Balakrishnan | e48aa68 | 2014-10-08 17:31:37 -0700 | [diff] [blame] | 32 | import org.projectfloodlight.openflow.protocol.OFMessage; |
Ayaka Koshibe | 5460d62 | 2015-05-14 12:19:19 -0700 | [diff] [blame] | 33 | import org.projectfloodlight.openflow.protocol.OFObject; |
Praseed Balakrishnan | e48aa68 | 2014-10-08 17:31:37 -0700 | [diff] [blame] | 34 | import org.projectfloodlight.openflow.protocol.OFPortDesc; |
Praseed Balakrishnan | a22eadf | 2014-10-20 14:21:45 -0700 | [diff] [blame] | 35 | import org.projectfloodlight.openflow.protocol.OFStatsReply; |
| 36 | import org.projectfloodlight.openflow.protocol.OFStatsType; |
Ayaka Koshibe | 3c24077 | 2015-05-20 16:23:40 -0700 | [diff] [blame] | 37 | import org.projectfloodlight.openflow.protocol.OFType; |
| 38 | import org.projectfloodlight.openflow.protocol.OFVersion; |
| 39 | import org.projectfloodlight.openflow.protocol.action.OFAction; |
| 40 | import org.projectfloodlight.openflow.protocol.action.OFActionCircuit; |
| 41 | import org.projectfloodlight.openflow.protocol.instruction.OFInstruction; |
| 42 | import org.projectfloodlight.openflow.protocol.instruction.OFInstructionApplyActions; |
| 43 | import org.projectfloodlight.openflow.protocol.match.Match; |
| 44 | import org.projectfloodlight.openflow.protocol.match.MatchField; |
| 45 | import org.projectfloodlight.openflow.protocol.OFActionType; |
| 46 | import org.projectfloodlight.openflow.types.CircuitSignalID; |
| 47 | import org.projectfloodlight.openflow.types.OFPort; |
| 48 | import org.projectfloodlight.openflow.types.U8; |
alshabib | 452234e | 2014-11-25 00:03:49 -0500 | [diff] [blame] | 49 | |
Ayaka Koshibe | 5460d62 | 2015-05-14 12:19:19 -0700 | [diff] [blame] | 50 | import com.google.common.collect.ImmutableList; |
| 51 | import com.google.common.collect.ImmutableSet; |
| 52 | |
Praseed Balakrishnan | e48aa68 | 2014-10-08 17:31:37 -0700 | [diff] [blame] | 53 | import java.io.IOException; |
Sho SHIMIZU | 50e7d9c | 2015-05-22 11:35:28 -0700 | [diff] [blame] | 54 | import java.util.Collections; |
Praseed Balakrishnan | e48aa68 | 2014-10-08 17:31:37 -0700 | [diff] [blame] | 55 | import java.util.List; |
Ayaka Koshibe | 3c24077 | 2015-05-20 16:23:40 -0700 | [diff] [blame] | 56 | import java.util.Map; |
| 57 | import java.util.ArrayList; |
Ayaka Koshibe | 5460d62 | 2015-05-14 12:19:19 -0700 | [diff] [blame] | 58 | import java.util.Set; |
Ayaka Koshibe | 3c24077 | 2015-05-20 16:23:40 -0700 | [diff] [blame] | 59 | import java.util.BitSet; |
| 60 | import java.util.stream.Collectors; |
Praseed Balakrishnan | e48aa68 | 2014-10-08 17:31:37 -0700 | [diff] [blame] | 61 | import java.util.concurrent.atomic.AtomicBoolean; |
Ayaka Koshibe | 3c24077 | 2015-05-20 16:23:40 -0700 | [diff] [blame] | 62 | import java.util.concurrent.ConcurrentMap; |
| 63 | import java.util.concurrent.ConcurrentHashMap; |
| 64 | |
| 65 | import static org.projectfloodlight.openflow.protocol.OFFlowMod.Builder; |
Praseed Balakrishnan | e48aa68 | 2014-10-08 17:31:37 -0700 | [diff] [blame] | 66 | |
| 67 | /** |
| 68 | * LINC-OE Optical Emulator switch class. |
| 69 | */ |
Ayaka Koshibe | 5460d62 | 2015-05-14 12:19:19 -0700 | [diff] [blame] | 70 | public class OFOpticalSwitchImplLINC13 |
| 71 | extends AbstractOpenFlowSwitch implements OpenFlowOpticalSwitch { |
Ayaka Koshibe | 3c24077 | 2015-05-20 16:23:40 -0700 | [diff] [blame] | 72 | // default number of lambdas, assuming 50GHz channels. |
| 73 | private static final int NUM_CHLS = 80; |
| 74 | private final OFFactory factory = OFFactories.getFactory(OFVersion.OF_13); |
Praseed Balakrishnan | e48aa68 | 2014-10-08 17:31:37 -0700 | [diff] [blame] | 75 | |
alshabib | b452fd7 | 2015-04-22 20:46:20 -0700 | [diff] [blame] | 76 | private final AtomicBoolean driverHandshakeComplete = new AtomicBoolean(false); |
Praseed Balakrishnan | e48aa68 | 2014-10-08 17:31:37 -0700 | [diff] [blame] | 77 | private long barrierXidToWaitFor = -1; |
| 78 | |
Ayaka Koshibe | 5460d62 | 2015-05-14 12:19:19 -0700 | [diff] [blame] | 79 | private OFCircuitPortsReply wPorts; |
Ayaka Koshibe | 3c24077 | 2015-05-20 16:23:40 -0700 | [diff] [blame] | 80 | // book-keeping maps for allocated Linc-OE lambdas |
| 81 | protected final ConcurrentMap<OFPort, BitSet> portChannelMap = new ConcurrentHashMap<>(); |
| 82 | protected final ConcurrentMap<Match, Integer> matchMap = new ConcurrentHashMap<>(); |
Praseed Balakrishnan | a22eadf | 2014-10-20 14:21:45 -0700 | [diff] [blame] | 83 | |
Praseed Balakrishnan | e48aa68 | 2014-10-08 17:31:37 -0700 | [diff] [blame] | 84 | @Override |
| 85 | public void startDriverHandshake() { |
Praseed Balakrishnan | a22eadf | 2014-10-20 14:21:45 -0700 | [diff] [blame] | 86 | log.warn("Starting driver handshake for sw {}", getStringId()); |
Praseed Balakrishnan | e48aa68 | 2014-10-08 17:31:37 -0700 | [diff] [blame] | 87 | if (startDriverHandshakeCalled) { |
| 88 | throw new SwitchDriverSubHandshakeAlreadyStarted(); |
| 89 | } |
| 90 | startDriverHandshakeCalled = true; |
| 91 | try { |
| 92 | sendHandshakeOFExperimenterPortDescRequest(); |
| 93 | } catch (IOException e) { |
Praseed Balakrishnan | a22eadf | 2014-10-20 14:21:45 -0700 | [diff] [blame] | 94 | log.error("LINC-OE exception while sending experimenter port desc:", |
| 95 | e.getMessage()); |
Praseed Balakrishnan | e48aa68 | 2014-10-08 17:31:37 -0700 | [diff] [blame] | 96 | e.printStackTrace(); |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | @Override |
| 101 | public boolean isDriverHandshakeComplete() { |
Praseed Balakrishnan | e48aa68 | 2014-10-08 17:31:37 -0700 | [diff] [blame] | 102 | return driverHandshakeComplete.get(); |
| 103 | } |
| 104 | |
| 105 | @Override |
| 106 | public void processDriverHandshakeMessage(OFMessage m) { |
alshabib | 9af7007 | 2015-02-09 14:34:16 -0800 | [diff] [blame] | 107 | if (!startDriverHandshakeCalled) { |
Praseed Balakrishnan | e48aa68 | 2014-10-08 17:31:37 -0700 | [diff] [blame] | 108 | throw new SwitchDriverSubHandshakeNotStarted(); |
| 109 | } |
| 110 | if (driverHandshakeComplete.get()) { |
| 111 | throw new SwitchDriverSubHandshakeCompleted(m); |
| 112 | } |
| 113 | |
| 114 | switch (m.getType()) { |
| 115 | case BARRIER_REPLY: |
| 116 | if (m.getXid() == barrierXidToWaitFor) { |
| 117 | log.debug("LINC-OE Received barrier response"); |
| 118 | } |
| 119 | break; |
| 120 | case ERROR: |
Yuta HIGUCHI | f5416d8 | 2014-10-24 21:17:40 -0700 | [diff] [blame] | 121 | log.error("Switch {} Error {}", getStringId(), m); |
Praseed Balakrishnan | e48aa68 | 2014-10-08 17:31:37 -0700 | [diff] [blame] | 122 | break; |
| 123 | case FEATURES_REPLY: |
| 124 | break; |
| 125 | case FLOW_REMOVED: |
| 126 | break; |
| 127 | case GET_ASYNC_REPLY: |
| 128 | break; |
| 129 | case PACKET_IN: |
| 130 | break; |
| 131 | case PORT_STATUS: |
Praseed Balakrishnan | a22eadf | 2014-10-20 14:21:45 -0700 | [diff] [blame] | 132 | log.warn("****LINC-OE Port Status {} {}", getStringId(), m); |
| 133 | processOFPortStatus((OFCircuitPortStatus) m); |
Praseed Balakrishnan | e48aa68 | 2014-10-08 17:31:37 -0700 | [diff] [blame] | 134 | break; |
| 135 | case QUEUE_GET_CONFIG_REPLY: |
| 136 | break; |
| 137 | case ROLE_REPLY: |
| 138 | break; |
| 139 | case STATS_REPLY: |
Praseed Balakrishnan | a22eadf | 2014-10-20 14:21:45 -0700 | [diff] [blame] | 140 | OFStatsReply stats = (OFStatsReply) m; |
| 141 | if (stats.getStatsType() == OFStatsType.EXPERIMENTER) { |
| 142 | log.warn("LINC-OE : Received stats reply message {}", m); |
Ayaka Koshibe | 5460d62 | 2015-05-14 12:19:19 -0700 | [diff] [blame] | 143 | wPorts = (OFCircuitPortsReply) m; |
Praseed Balakrishnan | a22eadf | 2014-10-20 14:21:45 -0700 | [diff] [blame] | 144 | driverHandshakeComplete.set(true); |
| 145 | } |
Praseed Balakrishnan | e48aa68 | 2014-10-08 17:31:37 -0700 | [diff] [blame] | 146 | break; |
| 147 | default: |
Praseed Balakrishnan | a22eadf | 2014-10-20 14:21:45 -0700 | [diff] [blame] | 148 | log.warn("Received message {} during switch-driver " + |
| 149 | "subhandshake " + "from switch {} ... " + |
| 150 | "Ignoring message", m, |
| 151 | getStringId()); |
Praseed Balakrishnan | e48aa68 | 2014-10-08 17:31:37 -0700 | [diff] [blame] | 152 | |
| 153 | } |
| 154 | } |
| 155 | |
Praseed Balakrishnan | a22eadf | 2014-10-20 14:21:45 -0700 | [diff] [blame] | 156 | public void processOFPortStatus(OFCircuitPortStatus ps) { |
| 157 | log.debug("LINC-OE ..OF Port Status :", ps); |
| 158 | |
| 159 | } |
Praseed Balakrishnan | e48aa68 | 2014-10-08 17:31:37 -0700 | [diff] [blame] | 160 | |
Praseed Balakrishnan | e48aa68 | 2014-10-08 17:31:37 -0700 | [diff] [blame] | 161 | private void sendHandshakeOFExperimenterPortDescRequest() throws |
| 162 | IOException { |
| 163 | // send multi part message for port description for optical switches |
| 164 | OFCircuitPortsRequest circuitPortsRequest = factory() |
| 165 | .buildCircuitPortsRequest().setXid(getNextTransactionId()) |
| 166 | .build(); |
Praseed Balakrishnan | a22eadf | 2014-10-20 14:21:45 -0700 | [diff] [blame] | 167 | log.warn("LINC-OE : Sending experimented circuit port stats " + |
| 168 | "message " + |
| 169 | "{}", |
| 170 | circuitPortsRequest.toString()); |
alshabib | a2df7b2a | 2015-05-06 13:57:10 -0700 | [diff] [blame] | 171 | this.sendHandshakeMessage(circuitPortsRequest); |
Praseed Balakrishnan | a22eadf | 2014-10-20 14:21:45 -0700 | [diff] [blame] | 172 | } |
| 173 | |
Praseed Balakrishnan | a22eadf | 2014-10-20 14:21:45 -0700 | [diff] [blame] | 174 | @Override |
Ayaka Koshibe | 5460d62 | 2015-05-14 12:19:19 -0700 | [diff] [blame] | 175 | /** |
| 176 | * Returns a list of standard (Ethernet) ports. |
| 177 | * |
| 178 | * @return List of ports |
| 179 | */ |
Praseed Balakrishnan | a22eadf | 2014-10-20 14:21:45 -0700 | [diff] [blame] | 180 | public List<OFPortDesc> getPorts() { |
Ayaka Koshibe | 5460d62 | 2015-05-14 12:19:19 -0700 | [diff] [blame] | 181 | return ImmutableList.copyOf(super.getPorts()); |
Praseed Balakrishnan | e48aa68 | 2014-10-08 17:31:37 -0700 | [diff] [blame] | 182 | } |
| 183 | |
Praseed Balakrishnan | e48aa68 | 2014-10-08 17:31:37 -0700 | [diff] [blame] | 184 | |
| 185 | @Override |
| 186 | public Boolean supportNxRole() { |
| 187 | return false; |
| 188 | } |
| 189 | |
Praseed Balakrishnan | a22eadf | 2014-10-20 14:21:45 -0700 | [diff] [blame] | 190 | @Override |
| 191 | public boolean isOptical() { |
| 192 | return true; |
| 193 | } |
| 194 | |
Ayaka Koshibe | 5460d62 | 2015-05-14 12:19:19 -0700 | [diff] [blame] | 195 | @Override |
| 196 | public List<? extends OFObject> getPortsOf(PortDescPropertyType type) { |
| 197 | return ImmutableList.copyOf(wPorts.getEntries()); |
| 198 | } |
| 199 | |
| 200 | @Override |
| 201 | public Set<PortDescPropertyType> getPortTypes() { |
| 202 | return ImmutableSet.of(PortDescPropertyType.OPTICAL_TRANSPORT); |
| 203 | } |
| 204 | |
Ayaka Koshibe | 3c24077 | 2015-05-20 16:23:40 -0700 | [diff] [blame] | 205 | @Override |
| 206 | public OFMessage prepareMessage(OFMessage msg) { |
| 207 | if (OFVersion.OF_13 != msg.getVersion() || msg.getType() != OFType.FLOW_MOD) { |
| 208 | return msg; |
| 209 | } |
| 210 | OFFlowMod fm = (OFFlowMod) msg; |
| 211 | Match match = fm.getMatch(); |
| 212 | // Don't touch FlowMods that aren't Optical-related. |
| 213 | if (match.get(MatchField.OCH_SIGTYPE) == null) { |
| 214 | return msg; |
| 215 | } |
| 216 | |
| 217 | OFMessage newFM; |
| 218 | Builder builder = null; |
| 219 | List<OFAction> actions = new ArrayList<>(); |
| 220 | if (fm.getCommand() == OFFlowModCommand.ADD) { |
| 221 | builder = factory.buildFlowAdd(); |
| 222 | int lambda = allocateLambda(match.get(MatchField.IN_PORT), match); |
| 223 | CircuitSignalID sigid = new CircuitSignalID((byte) 1, (byte) 2, (short) lambda, (short) 1); |
| 224 | List<OFInstruction> instructions = fm.getInstructions(); |
| 225 | |
| 226 | newFM = buildFlowMod(builder, fm, buildMatch(match, sigid), buildActions(instructions, sigid)); |
| 227 | } else if (fm.getCommand() == OFFlowModCommand.DELETE) { |
| 228 | builder = factory.buildFlowDelete(); |
| 229 | int lambda = freeLambda(match.get(MatchField.IN_PORT), match); |
| 230 | CircuitSignalID sigid = new CircuitSignalID((byte) 1, (byte) 2, (short) lambda, (short) 1); |
| 231 | |
| 232 | newFM = buildFlowMod(builder, fm, buildMatch(match, sigid), actions); |
| 233 | } else { |
| 234 | newFM = msg; |
| 235 | } |
| 236 | log.debug("new FM = {}", newFM); |
| 237 | return newFM; |
| 238 | } |
| 239 | |
| 240 | // fetch the next available channel as the flat lambda value, or the lambda |
| 241 | // associated with a port/match combination |
| 242 | private int allocateLambda(OFPort port, Match match) { |
| 243 | Integer lambda = null; |
| 244 | synchronized (this) { |
| 245 | BitSet channels = portChannelMap.getOrDefault(port, new BitSet(NUM_CHLS + 1)); |
| 246 | lambda = matchMap.get(match); |
| 247 | if (lambda == null) { |
| 248 | // TODO : double check behavior when bitset is full |
| 249 | // Linc lambdas start at 1. |
| 250 | lambda = channels.nextClearBit(1); |
| 251 | channels.set(lambda); |
| 252 | portChannelMap.put(port, channels); |
| 253 | matchMap.put(match, lambda); |
| 254 | } |
| 255 | } |
| 256 | return lambda; |
| 257 | } |
| 258 | |
| 259 | // free lambda that was mapped to Port/Match combination and return its |
| 260 | // value to caller. |
| 261 | private int freeLambda(OFPort port, Match match) { |
| 262 | synchronized (this) { |
| 263 | Integer lambda = matchMap.get(match); |
| 264 | if (lambda != null) { |
| 265 | portChannelMap.get(port).clear(lambda); |
| 266 | return lambda; |
| 267 | } |
| 268 | // 1 is a sane-ish default for Linc. |
| 269 | return 1; |
| 270 | } |
| 271 | } |
| 272 | |
| 273 | // build matches - *tons of assumptions are made here based on Linc-OE's behavior.* |
| 274 | // gridType = 1 (DWDM) |
| 275 | // channelSpacing = 2 (50GHz) |
| 276 | // spectralWidth = 1 (fixed grid default value) |
| 277 | private Match buildMatch(Match original, CircuitSignalID sigid) { |
| 278 | Match.Builder mBuilder = factory.buildMatch(); |
| 279 | |
| 280 | original.getMatchFields().forEach(mf -> { |
| 281 | String name = mf.getName(); |
| 282 | if (MatchField.OCH_SIGID.getName().equals(name)) { |
| 283 | mBuilder.setExact(MatchField.OCH_SIGID, sigid); |
| 284 | } else if (MatchField.OCH_SIGTYPE.getName().equals(name)) { |
| 285 | mBuilder.setExact(MatchField.OCH_SIGTYPE, U8.of((short) 1)); |
| 286 | } else if (MatchField.IN_PORT.getName().equals(name)) { |
| 287 | mBuilder.setExact(MatchField.IN_PORT, original.get(MatchField.IN_PORT)); |
| 288 | } |
| 289 | }); |
| 290 | |
| 291 | return mBuilder.build(); |
| 292 | } |
| 293 | |
| 294 | private List<OFAction> buildActions(List<OFInstruction> iList, CircuitSignalID sigid) { |
Ayaka Koshibe | 3c24077 | 2015-05-20 16:23:40 -0700 | [diff] [blame] | 295 | Map<OFInstructionType, OFInstruction> instructions = iList.stream() |
| 296 | .collect(Collectors.toMap(OFInstruction::getType, inst -> inst)); |
| 297 | |
| 298 | OFInstruction inst = instructions.get(OFInstructionType.APPLY_ACTIONS); |
Sho SHIMIZU | 50e7d9c | 2015-05-22 11:35:28 -0700 | [diff] [blame] | 299 | if (inst == null) { |
| 300 | return Collections.emptyList(); |
Ayaka Koshibe | 3c24077 | 2015-05-20 16:23:40 -0700 | [diff] [blame] | 301 | } |
Sho SHIMIZU | 50e7d9c | 2015-05-22 11:35:28 -0700 | [diff] [blame] | 302 | |
| 303 | List<OFAction> actions = new ArrayList<>(); |
| 304 | OFInstructionApplyActions iaa = (OFInstructionApplyActions) inst; |
| 305 | if (iaa.getActions() == null) { |
| 306 | return actions; |
| 307 | } |
| 308 | iaa.getActions().forEach(action -> { |
| 309 | if (OFActionType.EXPERIMENTER == action.getType()) { |
| 310 | OFActionCircuit.Builder cBuilder = factory.actions().buildCircuit() |
| 311 | .setField(factory.oxms() |
| 312 | .buildOchSigid() |
| 313 | .setValue(sigid) |
| 314 | .build()); |
| 315 | actions.add(cBuilder.build()); |
| 316 | } else { |
| 317 | actions.add(action); |
| 318 | } |
| 319 | }); |
Ayaka Koshibe | 3c24077 | 2015-05-20 16:23:40 -0700 | [diff] [blame] | 320 | return actions; |
| 321 | } |
| 322 | |
| 323 | private OFMessage buildFlowMod(Builder builder, OFFlowMod fm, Match m, List<OFAction> act) { |
| 324 | return builder |
| 325 | .setXid(fm.getXid()) |
| 326 | .setCookie(fm.getCookie()) |
| 327 | .setCookieMask(fm.getCookieMask()) |
| 328 | .setTableId(fm.getTableId()) |
| 329 | .setIdleTimeout(fm.getIdleTimeout()) |
| 330 | .setHardTimeout(fm.getHardTimeout()) |
| 331 | .setBufferId(fm.getBufferId()) |
| 332 | .setOutPort(fm.getOutPort()) |
| 333 | .setOutGroup(fm.getOutGroup()) |
| 334 | .setFlags(fm.getFlags()) |
| 335 | .setMatch(m) |
| 336 | .setActions(act) |
| 337 | .build(); |
| 338 | } |
Praseed Balakrishnan | e48aa68 | 2014-10-08 17:31:37 -0700 | [diff] [blame] | 339 | } |