2 * Copyright © 2015 Red Hat, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.ovsdb.openstack.netvirt.sfc.workaround.services;
11 import com.google.common.collect.Lists;
12 import java.math.BigInteger;
13 import java.util.ArrayList;
14 import java.util.List;
15 import org.opendaylight.ovsdb.openstack.netvirt.api.Constants;
16 import org.opendaylight.ovsdb.openstack.netvirt.providers.ConfigInterface;
17 import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.AbstractServiceInstance;
18 import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.Service;
19 import org.opendaylight.ovsdb.openstack.netvirt.sfc.ISfcClassifierService;
20 import org.opendaylight.ovsdb.openstack.netvirt.sfc.NshUtils;
21 import org.opendaylight.ovsdb.utils.mdsal.openflow.ActionUtils;
22 import org.opendaylight.ovsdb.utils.mdsal.openflow.FlowUtils;
23 import org.opendaylight.ovsdb.utils.mdsal.openflow.InstructionUtils;
24 import org.opendaylight.ovsdb.utils.mdsal.openflow.MatchUtils;
25 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev150317.access.lists.acl.access.list.entries.ace.Matches;
26 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev150317.access.lists.acl.access.list.entries.ace.matches.ace.type.AceEth;
27 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev150317.access.lists.acl.access.list.entries.ace.matches.ace.type.AceIp;
28 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev150317.access.lists.acl.access.list.entries.ace.matches.ace.type.ace.ip.ace.ip.version.AceIpv4;
29 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress;
30 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Prefix;
31 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
32 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action;
33 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder;
34 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionKey;
35 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowId;
36 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowBuilder;
37 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowKey;
38 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.OutputPortValues;
39 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.InstructionsBuilder;
40 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder;
41 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder;
42 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.apply.actions._case.ApplyActionsBuilder;
43 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction;
44 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.InstructionBuilder;
45 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.InstructionKey;
46 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeBuilder;
47 import org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.EtherType;
48 import org.osgi.framework.BundleContext;
49 import org.osgi.framework.ServiceReference;
50 import org.slf4j.Logger;
51 import org.slf4j.LoggerFactory;
53 public class SfcClassifierService extends AbstractServiceInstance implements ConfigInterface, ISfcClassifierService {
54 private static final Logger LOG = LoggerFactory.getLogger(SfcClassifierService.class);
55 private static final short TABLE_0 = 0;
56 private static final short UDP_SHORT = 17;
58 public SfcClassifierService(Service service) {
62 public SfcClassifierService() {
63 super(Service.SFC_CLASSIFIER);
67 public void setDependencies(BundleContext bundleContext, ServiceReference serviceReference) {
68 super.setDependencies(bundleContext.getServiceReference(ISfcClassifierService.class.getName()), this);
72 public void setDependencies(Object impl) {}
75 public void programIngressClassifier(long dataPathId, String ruleName, Matches matches,
76 NshUtils nshHeader, long vxGpeOfPort, boolean write) {
77 NodeBuilder nodeBuilder = FlowUtils.createNodeBuilder(dataPathId);
78 FlowBuilder flowBuilder = new FlowBuilder();
80 MatchBuilder matchBuilder = buildMatch(matches);
81 //flowBuilder.setMatch(matchBuilder.build());
82 flowBuilder.setMatch(MatchUtils.addNxRegMatch(
84 new MatchUtils.RegMatch(FlowUtils.REG_FIELD, FlowUtils.REG_VALUE_FROM_LOCAL)).build());
86 String flowId = "sfcIngressClass_" + ruleName;// + "_" + nshHeader.getNshNsp();
87 flowBuilder.setId(new FlowId(flowId));
88 FlowKey key = new FlowKey(new FlowId(flowId));
89 flowBuilder.setBarrier(true);
90 flowBuilder.setTableId(getTable());
91 flowBuilder.setKey(key);
92 flowBuilder.setFlowName(flowId);
93 flowBuilder.setHardTimeout(0);
94 flowBuilder.setIdleTimeout(0);
97 ActionBuilder ab = new ActionBuilder();
98 List<Action> actionList = new ArrayList<>();
100 ab.setAction(ActionUtils.nxMoveTunIdtoNshc2());
101 ab.setOrder(actionList.size());
102 ab.setKey(new ActionKey(actionList.size()));
103 actionList.add(ab.build());
105 getNshAction(nshHeader, actionList);
107 ab.setAction(ActionUtils.outputAction(FlowUtils.getNodeConnectorId(dataPathId, vxGpeOfPort)));
108 ab.setOrder(actionList.size());
109 ab.setKey(new ActionKey(actionList.size()));
110 actionList.add(ab.build());
112 ApplyActionsBuilder aab = new ApplyActionsBuilder();
113 aab.setAction(actionList);
115 InstructionBuilder ib = new InstructionBuilder();
116 ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
118 ib.setKey(new InstructionKey(0));
119 List<Instruction> instructions = Lists.newArrayList();
120 instructions.add(ib.build());
122 InstructionsBuilder isb = new InstructionsBuilder();
123 isb.setInstruction(instructions);
124 flowBuilder.setInstructions(isb.build());
125 writeFlow(flowBuilder, nodeBuilder);
127 removeFlow(flowBuilder, nodeBuilder);
132 public void programSfcTable(long dataPathId, long vxGpeOfPort, short goToTableId, boolean write) {
133 NodeBuilder nodeBuilder = FlowUtils.createNodeBuilder(dataPathId);
134 FlowBuilder flowBuilder = new FlowBuilder();
136 MatchBuilder matchBuilder = new MatchBuilder();
137 flowBuilder.setMatch(MatchUtils.createInPortMatch(matchBuilder, dataPathId, vxGpeOfPort).build());
139 String flowId = "sfcTable_" + vxGpeOfPort;
140 flowBuilder.setId(new FlowId(flowId));
141 FlowKey key = new FlowKey(new FlowId(flowId));
142 flowBuilder.setBarrier(true);
143 flowBuilder.setTableId(TABLE_0);
144 flowBuilder.setKey(key);
145 flowBuilder.setFlowName(flowId);
146 flowBuilder.setHardTimeout(0);
147 flowBuilder.setIdleTimeout(0);
148 flowBuilder.setPriority(1000);
151 InstructionsBuilder isb = new InstructionsBuilder();
152 List<Instruction> instructions = Lists.newArrayList();
153 InstructionBuilder ib =
154 InstructionUtils.createGotoTableInstructions(new InstructionBuilder(), goToTableId);
156 ib.setKey(new InstructionKey(0));
157 instructions.add(ib.build());
159 isb.setInstruction(instructions);
160 flowBuilder.setInstructions(isb.build());
161 writeFlow(flowBuilder, nodeBuilder);
163 removeFlow(flowBuilder, nodeBuilder);
168 public void programEgressClassifier1(long dataPathId, long vxGpeOfPort, long nsp, short nsi,
169 int tunnelOfPort, int tunnelId, short gotoTableId, boolean write) {
170 NodeBuilder nodeBuilder = FlowUtils.createNodeBuilder(dataPathId);
171 FlowBuilder flowBuilder = new FlowBuilder();
173 MatchBuilder matchBuilder = new MatchBuilder();
174 MatchUtils.createInPortMatch(matchBuilder, dataPathId, vxGpeOfPort);
175 MatchUtils.addNxNspMatch(matchBuilder, nsp);
176 flowBuilder.setMatch(MatchUtils.addNxNsiMatch(matchBuilder, nsi).build());
178 String flowId = "sfcEgressClass1_" + vxGpeOfPort;
179 flowBuilder.setId(new FlowId(flowId));
180 FlowKey key = new FlowKey(new FlowId(flowId));
181 flowBuilder.setBarrier(true);
182 flowBuilder.setTableId(TABLE_0);
183 flowBuilder.setKey(key);
184 flowBuilder.setFlowName(flowId);
185 flowBuilder.setHardTimeout(0);
186 flowBuilder.setIdleTimeout(0);
189 InstructionsBuilder isb = new InstructionsBuilder();
190 List<Instruction> instructions = Lists.newArrayList();
191 InstructionBuilder ib = new InstructionBuilder();
193 /*List<Action> actionList = Lists.newArrayList();
195 ActionBuilder ab = new ActionBuilder();
196 ab.setAction(ActionUtils.nxMoveNshc2ToTunId());
198 ab.setKey(new ActionKey(0));
199 actionList.add(ab.build());
201 ApplyActionsBuilder aab = new ApplyActionsBuilder();
202 aab.setAction(actionList);
203 ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
205 ib.setOrder(instructions.size());
206 ib.setKey(new InstructionKey(instructions.size()));
207 instructions.add(ib.build());*/
209 ib = InstructionUtils.createGotoTableInstructions(new InstructionBuilder(), getTable());
210 ib.setOrder(instructions.size());
211 ib.setKey(new InstructionKey(instructions.size()));
212 instructions.add(ib.build());
214 isb.setInstruction(instructions);
215 flowBuilder.setInstructions(isb.build());
216 writeFlow(flowBuilder, nodeBuilder);
218 removeFlow(flowBuilder, nodeBuilder);
223 public void programEgressClassifier2(long dataPathId, long vxGpeOfPort, long nsp, short nsi,
224 int tunnelOfPort, int tunnelId, boolean write) {
225 NodeBuilder nodeBuilder = FlowUtils.createNodeBuilder(dataPathId);
226 FlowBuilder flowBuilder = new FlowBuilder();
228 MatchBuilder matchBuilder = new MatchBuilder();
229 MatchUtils.createInPortMatch(matchBuilder, dataPathId, vxGpeOfPort);
230 MatchUtils.addNxNspMatch(matchBuilder, nsp);
231 flowBuilder.setMatch(MatchUtils.addNxNsiMatch(matchBuilder, nsi).build());
233 String flowId = "sfcEgressClass2_" + vxGpeOfPort;
234 flowBuilder.setId(new FlowId(flowId));
235 FlowKey key = new FlowKey(new FlowId(flowId));
236 flowBuilder.setBarrier(true);
237 flowBuilder.setTableId(getTable());
238 flowBuilder.setKey(key);
239 flowBuilder.setFlowName(flowId);
240 flowBuilder.setHardTimeout(0);
241 flowBuilder.setIdleTimeout(0);
244 InstructionsBuilder isb = new InstructionsBuilder();
245 List<Instruction> instructions = Lists.newArrayList();
246 List<Action> actionList = Lists.newArrayList();
248 ActionBuilder ab = new ActionBuilder();
249 ab.setAction(ActionUtils.nxResubmitAction(tunnelOfPort, TABLE_0));
251 ab.setKey(new ActionKey(0));
252 actionList.add(ab.build());
254 ApplyActionsBuilder aab = new ApplyActionsBuilder();
255 aab.setAction(actionList);
256 InstructionBuilder ib = new InstructionBuilder();
257 ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
260 ib.setKey(new InstructionKey(0));
261 instructions.add(ib.build());
263 isb.setInstruction(instructions);
264 flowBuilder.setInstructions(isb.build());
265 writeFlow(flowBuilder, nodeBuilder);
268 removeFlow(flowBuilder, nodeBuilder);
272 // packet from sf to sff that need to go out local
274 public void program_sfEgress(long dataPathId, int dstPort, boolean write) {
275 NodeBuilder nodeBuilder = FlowUtils.createNodeBuilder(dataPathId);
276 FlowBuilder flowBuilder = new FlowBuilder();
278 MatchBuilder matchBuilder = new MatchBuilder();
279 MatchUtils.createIpProtocolMatch(matchBuilder, UDP_SHORT);
280 MatchUtils.addLayer4Match(matchBuilder, UDP_SHORT, 0, dstPort);
281 flowBuilder.setMatch(MatchUtils.addNxRegMatch(
282 matchBuilder, new MatchUtils.RegMatch(FlowUtils.REG_FIELD, FlowUtils.REG_VALUE_FROM_LOCAL)).build());
284 String flowId = "sfEgress_" + dstPort;
285 flowBuilder.setId(new FlowId(flowId));
286 FlowKey key = new FlowKey(new FlowId(flowId));
287 flowBuilder.setBarrier(true);
288 flowBuilder.setTableId(getTable());
289 flowBuilder.setKey(key);
290 flowBuilder.setFlowName(flowId);
291 flowBuilder.setHardTimeout(0);
292 flowBuilder.setIdleTimeout(0);
295 InstructionBuilder ib = new InstructionBuilder();
296 InstructionsBuilder isb = new InstructionsBuilder();
297 List<Instruction> instructions = Lists.newArrayList();
298 InstructionUtils.createLocalInstructions(ib, dataPathId);
300 ib.setKey(new InstructionKey(0));
301 instructions.add(ib.build());
303 isb.setInstruction(instructions);
304 flowBuilder.setInstructions(isb.build());
305 writeFlow(flowBuilder, nodeBuilder);
307 removeFlow(flowBuilder, nodeBuilder);
311 // looped back sff to sf packets
313 public void program_sfIngress(long dataPathId, int dstPort, long sfOfPort,
314 String ipAddress, String sfDplName, boolean write) {
315 NodeBuilder nodeBuilder = FlowUtils.createNodeBuilder(dataPathId);
316 FlowBuilder flowBuilder = new FlowBuilder();
318 MatchBuilder matchBuilder = new MatchBuilder();
319 MatchUtils.createIpProtocolMatch(matchBuilder, UDP_SHORT);
320 Ipv4Prefix ipCidr = MatchUtils.iPv4PrefixFromIPv4Address(ipAddress);
321 MatchUtils.createDstL3IPv4Match(matchBuilder, new Ipv4Prefix(ipCidr));
322 flowBuilder.setMatch(MatchUtils.addLayer4Match(matchBuilder, UDP_SHORT, 0, dstPort).build());
324 String flowId = "sfIngress_" + dstPort + "_" + ipAddress;
325 flowBuilder.setId(new FlowId(flowId));
326 FlowKey key = new FlowKey(new FlowId(flowId));
327 flowBuilder.setBarrier(true);
328 flowBuilder.setTableId(TABLE_0);
329 flowBuilder.setKey(key);
330 flowBuilder.setFlowName(flowId);
331 flowBuilder.setHardTimeout(0);
332 flowBuilder.setIdleTimeout(0);
335 InstructionBuilder ib = new InstructionBuilder();
336 InstructionsBuilder isb = new InstructionsBuilder();
337 List<Instruction> instructions = Lists.newArrayList();
338 InstructionUtils.createOutputPortInstructions(ib, dataPathId, sfOfPort);
341 ib.setKey(new InstructionKey(0));
342 instructions.add(ib.build());
344 isb.setInstruction(instructions);
345 flowBuilder.setInstructions(isb.build());
346 writeFlow(flowBuilder, nodeBuilder);
348 removeFlow(flowBuilder, nodeBuilder);
353 public void programStaticArpEntry(long dataPathId, long ofPort, String macAddressStr,
354 String ipAddress, boolean write) {
355 NodeBuilder nodeBuilder = FlowUtils.createNodeBuilder(dataPathId);
356 FlowBuilder flowBuilder = new FlowBuilder();
358 MacAddress macAddress = new MacAddress(macAddressStr);
360 MatchBuilder matchBuilder = new MatchBuilder();
361 MatchUtils.createEtherTypeMatch(matchBuilder, new EtherType(Constants.ARP_ETHERTYPE));
362 MatchUtils.createArpDstIpv4Match(matchBuilder, MatchUtils.iPv4PrefixFromIPv4Address(ipAddress));
363 flowBuilder.setMatch(matchBuilder.build());
365 String flowId = "ArpResponder_" + ipAddress;
366 flowBuilder.setId(new FlowId(flowId));
367 FlowKey key = new FlowKey(new FlowId(flowId));
368 flowBuilder.setBarrier(true);
369 flowBuilder.setTableId(TABLE_0);
370 flowBuilder.setKey(key);
371 flowBuilder.setPriority(1024);
372 flowBuilder.setFlowName(flowId);
373 flowBuilder.setHardTimeout(0);
374 flowBuilder.setIdleTimeout(0);
377 InstructionBuilder ib = new InstructionBuilder();
378 InstructionsBuilder isb = new InstructionsBuilder();
379 List<Instruction> instructions = Lists.newArrayList();
380 ApplyActionsBuilder aab = new ApplyActionsBuilder();
381 ActionBuilder ab = new ActionBuilder();
382 List<Action> actionList = Lists.newArrayList();
384 // Move Eth Src to Eth Dst
385 ab.setAction(ActionUtils.nxMoveEthSrcToEthDstAction());
387 ab.setKey(new ActionKey(0));
388 actionList.add(ab.build());
391 ab.setAction(ActionUtils.setDlSrcAction(new MacAddress(macAddress)));
393 ab.setKey(new ActionKey(1));
394 actionList.add(ab.build());
397 ab.setAction(ActionUtils.nxLoadArpOpAction(BigInteger.valueOf(0x02L)));
399 ab.setKey(new ActionKey(2));
400 actionList.add(ab.build());
402 // Move ARP SHA to ARP THA
403 ab.setAction(ActionUtils.nxMoveArpShaToArpThaAction());
405 ab.setKey(new ActionKey(3));
406 actionList.add(ab.build());
408 // Move ARP SPA to ARP TPA
409 ab.setAction(ActionUtils.nxMoveArpSpaToArpTpaAction());
411 ab.setKey(new ActionKey(4));
412 actionList.add(ab.build());
414 // Load Mac to ARP SHA
415 ab.setAction(ActionUtils.nxLoadArpShaAction(macAddress));
417 ab.setKey(new ActionKey(5));
418 actionList.add(ab.build());
420 // Load IP to ARP SPA
421 ab.setAction(ActionUtils.nxLoadArpSpaAction(ipAddress));
423 ab.setKey(new ActionKey(6));
424 actionList.add(ab.build());
427 ab.setAction(ActionUtils.outputAction(
428 FlowUtils.getSpecialNodeConnectorId(dataPathId, OutputPortValues.INPORT.toString())));
430 ab.setKey(new ActionKey(7));
431 actionList.add(ab.build());
433 // Create Apply Actions Instruction
434 aab.setAction(actionList);
435 ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
437 ib.setKey(new InstructionKey(0));
438 instructions.add(ib.build());
440 isb.setInstruction(instructions);
441 flowBuilder.setInstructions(isb.build());
442 writeFlow(flowBuilder, nodeBuilder);
444 removeFlow(flowBuilder, nodeBuilder);
448 private List<Action> getNshAction(NshUtils header, List<Action> actionList) {
449 // Build the Actions to Add the NSH Header
450 org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action nshC1Load =
451 ActionUtils.nxLoadNshc1RegAction(header.getNshMetaC1());
452 org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action nshC2Load =
453 ActionUtils.nxLoadNshc2RegAction(header.getNshMetaC2());
454 org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action nspLoad =
455 ActionUtils.nxSetNspAction(header.getNshNsp());
456 org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action nsiLoad =
457 ActionUtils.nxSetNsiAction(header.getNshNsi());
458 org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action loadChainTunVnid =
459 ActionUtils.nxLoadTunIdAction(BigInteger.valueOf(header.getNshNsp()), false);
460 org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action loadChainTunDest =
461 ActionUtils.nxLoadTunIPv4Action(header.getNshTunIpDst().getValue(), false);
463 int count = actionList.size();
464 actionList.add(new ActionBuilder()
465 .setKey(new ActionKey(count)).setOrder(count++).setAction(nshC1Load).build());
466 //actionList.add(new ActionBuilder()
467 // .setKey(new ActionKey(count)).setOrder(count++).setAction(nshC2Load).build());
468 actionList.add(new ActionBuilder()
469 .setKey(new ActionKey(count)).setOrder(count++).setAction(nspLoad).build());
470 actionList.add(new ActionBuilder()
471 .setKey(new ActionKey(count)).setOrder(count++).setAction(nsiLoad).build());
472 actionList.add(new ActionBuilder()
473 .setKey(new ActionKey(count)).setOrder(count++).setAction(loadChainTunDest).build());
474 actionList.add(new ActionBuilder()
475 .setKey(new ActionKey(count)).setOrder(count).setAction(loadChainTunVnid).build());
479 public MatchBuilder buildMatch(Matches matches) {
480 MatchBuilder matchBuilder = new MatchBuilder();
482 if (matches.getAceType() instanceof AceIp) {
483 AceIp aceIp = (AceIp)matches.getAceType();
484 if (aceIp.getAceIpVersion() instanceof AceIpv4) {
485 //AceIpv4 aceIpv4 = (AceIpv4) aceIp.getAceIpVersion();
486 //MatchUtils.createSrcL3IPv4Match(matchBuilder, aceIpv4.getSourceIpv4Network());
487 //MatchUtils.createDstL3IPv4Match(matchBuilder, aceIpv4.getDestinationIpv4Network());
488 MatchUtils.createIpProtocolMatch(matchBuilder, aceIp.getProtocol());
489 MatchUtils.addLayer4Match(matchBuilder, aceIp.getProtocol().intValue(), 0,
490 aceIp.getDestinationPortRange().getLowerPort().getValue().intValue());
492 MatchUtils.createIpProtocolMatch(matchBuilder, aceIp.getProtocol());
493 MatchUtils.addLayer4Match(matchBuilder, aceIp.getProtocol().intValue(), 0,
494 aceIp.getDestinationPortRange().getLowerPort().getValue().intValue());
496 } else if (matches.getAceType() instanceof AceEth) {
497 AceEth aceEth = (AceEth) matches.getAceType();
498 MatchUtils.createEthSrcMatch(matchBuilder, new MacAddress(aceEth.getSourceMacAddress().getValue()));
499 MatchUtils.createDestEthMatch(matchBuilder, new MacAddress(aceEth.getDestinationMacAddress().getValue()),
500 new MacAddress(aceEth.getDestinationMacAddressMask().getValue()));
503 LOG.info("buildMatch: {}", matchBuilder.build());