6c153fd501636e305c8c0669300bdaafadcb06f3
[netvirt.git] / aclservice / impl / src / test / java / org / opendaylight / netvirt / aclservice / tests / FlowEntryObjectsStateful.xtend
1 /*
2  * Copyright (c) 2016 Red Hat, Inc. and others. All rights reserved.
3  *
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
7  */
8 package org.opendaylight.netvirt.aclservice.tests
9
10 import org.opendaylight.genius.mdsalutil.MetaDataUtil
11 import org.opendaylight.genius.mdsalutil.NwConstants
12 import org.opendaylight.genius.mdsalutil.actions.ActionDrop
13 import org.opendaylight.genius.mdsalutil.actions.ActionNxConntrack
14 import org.opendaylight.genius.mdsalutil.actions.ActionNxCtClear
15 import org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit
16 import org.opendaylight.genius.mdsalutil.instructions.InstructionApplyActions
17 import org.opendaylight.genius.mdsalutil.instructions.InstructionGotoTable
18 import org.opendaylight.genius.mdsalutil.matches.MatchArpSha
19 import org.opendaylight.genius.mdsalutil.matches.MatchArpSpa
20 import org.opendaylight.genius.mdsalutil.matches.MatchEthernetDestination
21 import org.opendaylight.genius.mdsalutil.matches.MatchEthernetSource
22 import org.opendaylight.genius.mdsalutil.matches.MatchEthernetType
23 import org.opendaylight.genius.mdsalutil.matches.MatchIcmpv4
24 import org.opendaylight.genius.mdsalutil.matches.MatchIcmpv6
25 import org.opendaylight.genius.mdsalutil.matches.MatchIpProtocol
26 import org.opendaylight.genius.mdsalutil.matches.MatchIpv4Destination
27 import org.opendaylight.genius.mdsalutil.matches.MatchIpv4Source
28 import org.opendaylight.genius.mdsalutil.matches.MatchMetadata
29 import org.opendaylight.genius.mdsalutil.matches.MatchUdpDestinationPort
30 import org.opendaylight.genius.mdsalutil.matches.MatchUdpSourcePort
31 import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchCtState
32 import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchRegister
33 import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchTcpDestinationPort
34 import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchUdpDestinationPort
35 import org.opendaylight.genius.mdsalutil.FlowEntityBuilder
36 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix
37 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress
38 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg6
39
40 import static extension org.opendaylight.mdsal.binding.testutils.XtendBuilderExtensions.operator_doubleGreaterThan
41 import org.opendaylight.netvirt.aclservice.utils.AclConstants
42 import java.math.BigInteger
43 import java.util.Collections
44
45 import org.opendaylight.genius.mdsalutil.instructions.InstructionWriteMetadata
46
47
48 class FlowEntryObjectsStateful extends FlowEntryObjectsBase {
49
50     protected def etherFlows() {
51         fixedIngressFlowsPort1
52         + fixedConntrackIngressFlowsPort1
53         + fixedEgressL2BroadcastFlowsPort1
54         + fixedIngressL3BroadcastFlows
55         + fixedEgressFlowsPort1
56         + fixedConntrackEgressFlowsPort1
57         + etherEgressFlowsPort1
58         + fixedIngressFlowsPort2
59         + fixedConntrackIngressFlowsPort2
60         + etherIngressFlowsPort2
61         + etherIngressFlowsPort2
62         + fixedEgressL2BroadcastFlowsPort2
63         + fixedIngressL3BroadcastFlows
64         + fixedEgressFlowsPort2
65         + fixedConntrackEgressFlowsPort2
66         + etheregressFlowPort2
67         + remoteEgressFlowsPort1
68         + remoteEgressFlowsPort2
69         + ingressCommitNonConntrack1
70         + ingressCommitNonConntrack1
71         + egressCommitNonConntrack1
72         + egressCommitNonConntrack1
73         + ingressCommitConntrack1
74         + ingressCommitConntrack1
75         + egressCommitConntrack1
76         + egressCommitConntrack1
77         + ingressfixedAclMissDrop1
78         + ingressfixedAclMissDrop1
79         + egressfixedAclMissDrop1
80         + egressfixedAclMissDrop1
81         + ingressDispatcherFirst
82         + ingressDispatcherFirst
83         + ingressDispatcherLast
84         + ingressDispatcherLast
85     }
86
87     protected def tcpFlows() {
88         fixedIngressFlowsPort1
89         + fixedConntrackIngressFlowsPort1
90         + tcpIngressFlowPort1
91         + fixedEgressL2BroadcastFlowsPort1
92         + fixedIngressL3BroadcastFlows
93         + fixedEgressFlowsPort1
94         + fixedConntrackEgressFlowsPort1
95         + fixedIngressFlowsPort2
96         + fixedConntrackIngressFlowsPort2
97         + tcpIngressFlowPort2
98         + fixedEgressL2BroadcastFlowsPort2
99         + fixedIngressL3BroadcastFlows
100         + fixedEgressFlowsPort2
101         + fixedConntrackEgressFlowsPort2
102         + tcpEgressFlowPort2
103         + tcpEgressFlowPort2
104         + egressDispatcherFirst
105         + egressDispatcherFirst
106         + egressDispatcherLast
107         + egressDispatcherLast
108         + remoteIngressFlowsPort1
109         + remoteIngressFlowsPort2
110         + ingressCommitNonConntrack1
111         + ingressCommitNonConntrack1
112         + egressCommitNonConntrack1
113         + egressCommitNonConntrack1
114         + ingressCommitConntrack1
115         + ingressCommitConntrack1
116         + egressCommitConntrack1
117         + egressCommitConntrack1
118         + ingressfixedAclMissDrop1
119         + ingressfixedAclMissDrop1
120         + egressfixedAclMissDrop1
121         + egressfixedAclMissDrop1
122
123     }
124
125     protected def udpFlows() {
126         fixedIngressFlowsPort1
127         + fixedConntrackIngressFlowsPort1
128         + fixedEgressL2BroadcastFlowsPort1
129         + fixedIngressL3BroadcastFlows
130         + fixedEgressFlowsPort1
131         + fixedConntrackEgressFlowsPort1
132         + udpEgressFlowsPort1
133         + fixedIngressFlowsPort2
134         + fixedConntrackIngressFlowsPort2
135         + udpIngressFlowsPort2
136         + udpIngressFlowsPort2
137         + fixedEgressL2BroadcastFlowsPort2
138         + fixedIngressL3BroadcastFlows
139         + fixedEgressFlowsPort2
140         + fixedConntrackEgressFlowsPort2
141         + udpEgressFlowsPort2
142         + ingressDispatcherFirst
143         + ingressDispatcherFirst
144         + ingressDispatcherLast
145         + ingressDispatcherLast
146         + remoteEgressFlowsPort1
147         + remoteEgressFlowsPort2
148         + ingressCommitNonConntrack1
149         + ingressCommitNonConntrack1
150         + egressCommitNonConntrack1
151         + egressCommitNonConntrack1
152         + ingressCommitConntrack1
153         + ingressCommitConntrack1
154         + egressCommitConntrack1
155         + egressCommitConntrack1
156         + ingressfixedAclMissDrop1
157         + ingressfixedAclMissDrop1
158         + egressfixedAclMissDrop1
159         + egressfixedAclMissDrop1
160     }
161
162     protected def icmpFlows() {
163         fixedIngressFlowsPort1
164         + fixedConntrackIngressFlowsPort1
165         + icmpIngressFlowsPort1
166         + fixedEgressL2BroadcastFlowsPort1
167         + fixedIngressL3BroadcastFlows
168         + fixedEgressFlowsPort1
169         + fixedConntrackEgressFlowsPort1
170         + fixedIngressFlowsPort2
171         + fixedConntrackIngressFlowsPort2
172         + icmpIngressFlowsPort2
173         + fixedEgressL2BroadcastFlowsPort2
174         + fixedIngressL3BroadcastFlows
175         + fixedEgressFlowsPort2
176         + fixedConntrackEgressFlowsPort2
177         + icmpEgressFlowsPort2
178         + icmpEgressFlowsPort2
179         + egressDispatcherFirst
180         + egressDispatcherFirst
181         + egressDispatcherLast
182         + egressDispatcherLast
183         + remoteIngressFlowsPort1
184         + remoteIngressFlowsPort2
185         + ingressCommitNonConntrack1
186         + ingressCommitNonConntrack1
187         + egressCommitNonConntrack1
188         + egressCommitNonConntrack1
189         + ingressCommitConntrack1
190         + ingressCommitConntrack1
191         + egressCommitConntrack1
192         + egressCommitConntrack1
193         + ingressfixedAclMissDrop1
194         + ingressfixedAclMissDrop1
195         + egressfixedAclMissDrop1
196         + egressfixedAclMissDrop1
197     }
198
199     protected def dstRangeFlows() {
200         fixedIngressFlowsPort1
201         +fixedConntrackIngressFlowsPort1
202         + udpIngressPortRangeFlows
203         + fixedEgressL2BroadcastFlowsPort1
204         + fixedIngressL3BroadcastFlows
205         + fixedEgressFlowsPort1
206         + fixedConntrackEgressFlowsPort1
207         + tcpEgressRangeFlows
208         + ingressCommitNonConntrack1
209         + egressCommitNonConntrack1
210         + ingressCommitConntrack1
211         + egressCommitConntrack1
212         + ingressfixedAclMissDrop1
213         + egressfixedAclMissDrop1
214
215     }
216
217     protected def dstAllFlows() {
218         fixedIngressFlowsPort1
219         + fixedConntrackIngressFlowsPort1
220         + udpIngressAllFlows
221         + fixedEgressL2BroadcastFlowsPort1
222         + fixedIngressL3BroadcastFlows
223         + fixedEgressFlowsPort1
224         + fixedConntrackEgressFlowsPort1
225         + tcpEgressAllFlows
226         + ingressCommitNonConntrack1
227         + egressCommitNonConntrack1
228         + ingressCommitConntrack1
229         + egressCommitConntrack1
230         + ingressfixedAclMissDrop1
231         + egressfixedAclMissDrop1
232     }
233
234     protected def icmpFlowsForTwoAclsHavingSameRules() {
235         fixedIngressFlowsPort3
236         + fixedConntrackIngressFlowsPort3
237         + icmpIngressFlowsPort3
238         + fixedEgressFlowsPort3
239         + fixedConntrackEgressFlowsPort3
240         + icmpEgressFlowsPort3
241         + ingressCommitConntrack1
242         + egressCommitConntrack1
243         + ingressCommitNonConntrack1
244         + egressCommitNonConntrack1
245         + ingressfixedAclMissDrop1
246         + egressfixedAclMissDrop1
247         + fixedIngressL3BroadcastFlows
248         + fixedEgressL2BroadcastFlowsPort3
249     }
250
251     protected def aapWithIpv4AllFlows() {
252         icmpFlows()
253         + aapIpv4AllFlowsPort2
254     }
255
256     protected def aapFlows() {
257         icmpFlows()
258         + aapRemoteFlowsPort1
259         + aapFlowsPort2
260     }
261
262     protected def multipleAcl() {
263         fixedIngressFlowsPort1
264         + fixedConntrackIngressFlowsPort1
265         + fixedEgressL2BroadcastFlowsPort1
266         + fixedIngressL3BroadcastFlows
267         + fixedEgressFlowsPort1
268         + fixedConntrackEgressFlowsPort1
269         + etherEgressFlowsPort1
270         + fixedIngressFlowsPort2
271         + fixedConntrackIngressFlowsPort2
272         + etherIngressFlowsPort2
273         + etherIngressFlowsPort2
274         + fixedEgressL2BroadcastFlowsPort2
275         + fixedIngressL3BroadcastFlows
276         + fixedEgressFlowsPort2
277         + fixedConntrackEgressFlowsPort2
278         + etheregressFlowPort2
279         + remoteEgressFlowsPort1
280         + remoteEgressFlowsPort2
281         + tcpEgressFlowPort2WithRemoteIpSg
282         + tcpEgressFlowPort2WithRemoteIpSg
283         + tcpIngressFlowPort1WithMultipleSG
284         + tcpIngressFlowPort1WithMultipleSG
285         + ingressCommitNonConntrack1
286         + ingressCommitNonConntrack1
287         + egressCommitNonConntrack1
288         + egressCommitNonConntrack1
289         + ingressCommitConntrack1
290         + ingressCommitConntrack1
291         + egressCommitConntrack1
292         + egressCommitConntrack1
293         + ingressfixedAclMissDrop1
294         + ingressfixedAclMissDrop1
295         + egressfixedAclMissDrop1
296         + egressfixedAclMissDrop1
297         + remoteEgressFlowsPort3
298         + egressDispatcherLast1
299         + egressDispatcherFirst1
300         + ingressDispatcherLast
301         + ingressDispatcherFirst
302         + egressDispatcherLast1
303         + egressDispatcherFirst1
304         + ingressDispatcherLast
305         + ingressDispatcherFirst
306         + ingressDispatcherFirst
307         + ingressDispatcherFirst
308         + ingressDispatcherLast
309         + ingressDispatcherLast
310
311     }
312
313     protected def tcpEgressFlowPort2WithRemoteIpSg() {
314         val theFlowId1 ="TCP_DESTINATION_80_65535Egress_123_987_85cc3048-abc3-43cc-89b3-377341426a21"
315         #[
316              new FlowEntityBuilder >> [
317                 dpnId = 123bi
318                 cookie = 110100480bi
319                 flowId = theFlowId1
320                 flowName = "ACL"
321                 instructionInfoList = #[
322                     new InstructionGotoTable(NwConstants.INGRESS_REMOTE_ACL_TABLE)
323                 ]
324                 matchInfoList = #[
325                     new MatchEthernetType(2048L),
326                     new MatchEthernetType(2048L),
327                     new NxMatchTcpDestinationPort(80, 65535),
328                     new MatchIpProtocol(6 as short),
329                     new MatchMetadata(1085217976614976bi, 1152920405111996400bi)
330                 ]
331                 priority = IdHelper.getId(theFlowId1)
332                 tableId = NwConstants.INGRESS_ACL_RULE_BASED_FILTER_TABLE
333             ]
334         ]
335     }
336
337     protected def tcpIngressFlowPort1WithMultipleSG() {
338         val theFlowId = "TCP_DESTINATION_80_65535Ingress_123_987_85cc3048-abc3-43cc-89b3-377341426a22"
339         #[
340             new FlowEntityBuilder >> [
341                 dpnId = 123bi
342                 cookie = 110100480bi
343                 flowId = theFlowId
344                 flowName = "ACL"
345                 instructionInfoList = #[
346                     new InstructionGotoTable(NwConstants.EGRESS_ACL_COMMITTER_TABLE)
347                 ]
348                 matchInfoList = #[
349                     new MatchEthernetType(2048L),
350                     new MatchEthernetType(2048L),
351                     new NxMatchTcpDestinationPort(80, 65535),
352                     new MatchIpProtocol(6 as short),
353                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
354                 ]
355                 priority = IdHelper.getId(theFlowId)
356                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
357             ]
358         ]
359     }
360
361     protected def aapIpv4AllFlowsPort2() {
362         #[
363             new FlowEntityBuilder >> [
364                 dpnId = 123bi
365                 cookie = 110100480bi
366                 flowId = "Egress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:F4_0.0.0.0/0"
367                 flowName = "ACL"
368                 instructionInfoList = #[
369                     new InstructionGotoTable(211 as short)
370                 ]
371                 matchInfoList = #[
372                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
373                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F4")),
374                     new MatchEthernetType(2048L)
375                 ]
376                 priority = 61010
377                 tableId = 210 as short
378             ],
379             new FlowEntityBuilder >> [
380                 dpnId = 123bi
381                 cookie = 110100480bi
382                 flowId = "Ingress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:F4_0.0.0.0/0"
383                 flowName = "ACL"
384                 instructionInfoList = #[
385                     new InstructionGotoTable(NwConstants.EGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
386                 ]
387                 matchInfoList = #[
388                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
389                     new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F4")),
390                     new MatchEthernetType(2048L)
391                 ]
392                 priority = 61010
393                 tableId = 240 as short
394             ],
395             new FlowEntityBuilder >> [
396                 dpnId = 123bi
397                 cookie = 110100480bi
398                 flowId = "Egress_ARP_123_987_0D:AA:D8:42:30:F40.0.0.0/0"
399                 flowName = "ACL"
400                 instructionInfoList = #[
401                     new InstructionApplyActions(#[
402                         new ActionNxResubmit(17 as short)
403                     ])
404                 ]
405                 matchInfoList = #[
406                     new MatchEthernetType(2054L),
407                     new MatchArpSha(new MacAddress("0D:AA:D8:42:30:F4")),
408                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F4")),
409                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
410                 ]
411                 priority = 63010
412                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
413             ],
414             new FlowEntityBuilder >> [
415                 dpnId = 123bi
416                 cookie = 110100480bi
417                 flowId = "Egress_DHCP_Client_v4123_987_0D:AA:D8:42:30:F4_Permit_"
418                 flowName = "ACL"
419                 instructionInfoList = #[
420                     new InstructionApplyActions(#[
421                     new ActionNxResubmit(17 as short)
422                     ])
423                 ]
424                 matchInfoList = #[
425                     new MatchEthernetType(2048L),
426                     new MatchIpProtocol(17 as short),
427                     new MatchUdpDestinationPort(67 as short),
428                     new MatchUdpSourcePort(68 as short),
429                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
430                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F4"))
431                 ]
432                 priority = 63010
433                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
434             ]
435         ]
436     }
437
438     protected def aapRemoteFlowsPort1() {
439         #[
440             remoteIngressFlowsPort("10.0.0.100"),
441             remoteIngressFlowsPort("10.0.0.101")
442         ]
443     }
444
445     protected def aapFlowsPort2() {
446         #[
447             new FlowEntityBuilder >> [
448                 dpnId = 123bi
449                 cookie = 110100480bi
450                 flowId = "Egress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:F4_10.0.0.100/32"
451                 flowName = "ACL"
452                 instructionInfoList = #[
453                    new InstructionGotoTable(211 as short)
454                 ]
455                 matchInfoList = #[
456                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
457                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F4")),
458                     new MatchEthernetType(2048L),
459                     new MatchIpv4Source("10.0.0.100", "32")
460                 ]
461                 priority = 61010
462                 tableId = 210 as short
463             ],
464             new FlowEntityBuilder >> [
465                 dpnId = 123bi
466                 cookie = 110100480bi
467                 flowId = "Ingress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:F4_10.0.0.100/32"
468                 flowName = "ACL"
469                 instructionInfoList = #[
470                     new InstructionGotoTable(NwConstants.EGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
471                 ]
472                 matchInfoList = #[
473                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
474                     new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F4")),
475                     new MatchEthernetType(2048L),
476                     new MatchIpv4Destination("10.0.0.100", "32")
477                 ]
478                 priority = 61010
479                 tableId = 240 as short
480             ],
481             new FlowEntityBuilder >> [
482                 dpnId = 123bi
483                 cookie = 110100480bi
484                 flowId = "Egress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:A4_10.0.0.101/32"
485                 flowName = "ACL"
486                 instructionInfoList = #[
487                     new InstructionGotoTable(211 as short)
488                 ]
489                 matchInfoList = #[
490                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
491                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:A4")),
492                     new MatchEthernetType(2048L),
493                     new MatchIpv4Source("10.0.0.101", "32")
494                 ]
495                 priority = 61010
496                 tableId = 210 as short
497             ],
498             new FlowEntityBuilder >> [
499                 dpnId = 123bi
500                 cookie = 110100480bi
501                 flowId = "Ingress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:A4_10.0.0.101/32"
502                 flowName = "ACL"
503                 instructionInfoList = #[
504                     new InstructionGotoTable(NwConstants.EGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
505                 ]
506                 matchInfoList = #[
507                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
508                     new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:A4")),
509                     new MatchEthernetType(2048L),
510                     new MatchIpv4Destination("10.0.0.101", "32")
511                 ]
512                 priority = 61010
513                 tableId = 240 as short
514             ],
515             new FlowEntityBuilder >> [
516                 dpnId = 123bi
517                 cookie = 110100480bi
518                 flowId = "Egress_ARP_123_987_0D:AA:D8:42:30:F410.0.0.100/32"
519                 flowName = "ACL"
520                 instructionInfoList = #[
521                     new InstructionApplyActions(#[
522                         new ActionNxResubmit(17 as short)
523                     ])
524                 ]
525                 matchInfoList = #[
526                     new MatchEthernetType(2054L),
527                     new MatchArpSha(new MacAddress("0D:AA:D8:42:30:F4")),
528                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F4")),
529                     new MatchArpSpa(new Ipv4Prefix("10.0.0.100/32")),
530                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
531                 ]
532                 priority = 63010
533                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
534             ],
535             new FlowEntityBuilder >> [
536                 dpnId = 123bi
537                 cookie = 110100480bi
538                 flowId = "Egress_ARP_123_987_0D:AA:D8:42:30:A410.0.0.101/32"
539                 flowName = "ACL"
540                 instructionInfoList = #[
541                     new InstructionApplyActions(#[
542                         new ActionNxResubmit(17 as short)
543                     ])
544                 ]
545                 matchInfoList = #[
546                     new MatchEthernetType(2054L),
547                     new MatchArpSha(new MacAddress("0D:AA:D8:42:30:A4")),
548                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:A4")),
549                     new MatchArpSpa(new Ipv4Prefix("10.0.0.101/32")),
550                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
551                 ]
552                 priority = 63010
553                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
554             ],
555             new FlowEntityBuilder >> [
556                 dpnId = 123bi
557                 cookie = 110100480bi
558                 flowId = "Egress_DHCP_Client_v4123_987_0D:AA:D8:42:30:A4_Permit_"
559                 flowName = "ACL"
560                 instructionInfoList = #[
561                     new InstructionApplyActions(#[
562                         new ActionNxResubmit(17 as short)
563                     ])
564                 ]
565                 matchInfoList = #[
566                     new MatchEthernetType(2048L),
567                     new MatchIpProtocol(17 as short),
568                     new MatchUdpDestinationPort(67 as short),
569                     new MatchUdpSourcePort(68 as short),
570                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
571                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:A4"))
572                 ]
573                 priority = 63010
574                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
575             ],
576             new FlowEntityBuilder >> [
577                 dpnId = 123bi
578                 cookie = 110100480bi
579                 flowId = "Egress_DHCP_Client_v4123_987_0D:AA:D8:42:30:F4_Permit_"
580                 flowName = "ACL"
581                 instructionInfoList = #[
582                     new InstructionApplyActions(#[
583                         new ActionNxResubmit(17 as short)
584                     ])
585                 ]
586                 matchInfoList = #[
587                     new MatchEthernetType(2048L),
588                     new MatchIpProtocol(17 as short),
589                     new MatchUdpDestinationPort(67 as short),
590                     new MatchUdpSourcePort(68 as short),
591                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
592                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F4"))
593                 ]
594                 priority = 63010
595                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
596             ],
597             new FlowEntityBuilder >> [
598                 dpnId = 123bi
599                 cookie = 110100480bi
600                 flowId = "Egress_L2Broadcast_123_987_0D:AA:D8:42:30:A4"
601                 flowName = "ACL"
602                 instructionInfoList = #[
603                     new InstructionApplyActions(#[
604                         new ActionNxResubmit(17 as short)
605                     ])
606                 ]
607                 matchInfoList = #[
608                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:A4")),
609                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
610                 ]
611                 priority = 61005
612                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
613             ]
614         ]
615     }
616
617     protected def fixedConntrackIngressFlowsPort1() {
618         #[
619             new FlowEntityBuilder >> [
620                 dpnId = 123bi
621                 cookie = 110100480bi
622                 flowId = "Ingress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:F3_10.0.0.1/32"
623             flowName = "ACL"
624             instructionInfoList = #[
625                 new InstructionGotoTable(NwConstants.EGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
626             ]
627             matchInfoList = #[
628                 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
629                 new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F3")),
630                 new MatchEthernetType(2048L),
631                 new MatchIpv4Destination("10.0.0.1", "32")
632                 ]
633                 priority = 61010
634                 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
635             ],
636             new FlowEntityBuilder >> [
637                 dpnId = 123bi
638                 cookie = 110100480bi
639                 flowId = "Ingress_Fixed_Conntrk_123_987_MatchEthernetType[2048]_Recirc"
640                 flowName = "ACL"
641                 instructionInfoList = #[
642                     new InstructionApplyActions(#[
643                         new ActionNxConntrack(2, 0, 0, 5000, 243 as short)
644                     ])
645                 ]
646                 matchInfoList = #[
647                     new MatchEthernetType(2048L),
648                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
649                 ]
650                 priority = 100
651                 tableId = NwConstants.EGRESS_ACL_CONNTRACK_SENDER_TABLE
652             ],
653             new FlowEntityBuilder >> [
654                 dpnId = 123bi
655                 cookie = 1085218086715393bi
656                 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
657                 flowName = "ACL"
658                 instructionInfoList = #[
659                     new InstructionApplyActions(#[
660                         new ActionDrop()
661                     ])
662                 ]
663                 matchInfoList = #[
664                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
665                     new NxMatchCtState(48L, 48L)
666                 ]
667                 priority = 62020
668                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
669             ]
670         ]
671     }
672
673     protected def etherIngressFlowsPort2() {
674         val theFlowId = "ETHERnullIngress_123_987_85cc3048-abc3-43cc-89b3-377341426ac7"
675         #[
676             new FlowEntityBuilder >> [
677                 dpnId = 123bi
678                 cookie = 110100480bi
679                 flowId = theFlowId
680                 flowName = "ACL"
681                 instructionInfoList = #[
682                      new InstructionGotoTable(NwConstants.EGRESS_REMOTE_ACL_TABLE)
683                 ]
684                 matchInfoList = #[
685                     new MatchEthernetType(2048L),
686                     new MatchEthernetType(2048L),
687                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
688                     new MatchMetadata(32bi, 16777200bi)
689                 ]
690                 priority = IdHelper.getId(theFlowId)
691                 tableId = NwConstants.EGRESS_ACL_RULE_BASED_FILTER_TABLE
692             ]
693         ]
694     }
695
696     protected def fixedConntrackEgressFlowsPort1() {
697         #[
698             new FlowEntityBuilder >> [
699                 dpnId = 123bi
700                 cookie = 110100480bi
701                 flowId = "Egress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:F3_10.0.0.1/32"
702                 flowName = "ACL"
703                 instructionInfoList = #[
704                     new InstructionGotoTable(211 as short)
705                 ]
706                 matchInfoList = #[
707                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
708                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F3")),
709                     new MatchEthernetType(2048L),
710                     new MatchIpv4Source("10.0.0.1", "32")
711                 ]
712                 priority = 61010
713                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
714             ],
715             new FlowEntityBuilder >> [
716                 dpnId = 123bi
717                 cookie = 110100480bi
718                 flowId = "Egress_Fixed_Conntrk_123_987_MatchEthernetType[2048]_Recirc"
719                 flowName = "ACL"
720                 instructionInfoList = #[
721                     new InstructionApplyActions(#[
722                        new ActionNxConntrack(2, 0, 0, 5000, NwConstants.INGRESS_ACL_FOR_EXISTING_TRAFFIC_TABLE)
723                     ])
724                 ]
725                 matchInfoList = #[
726                     new MatchEthernetType(2048L),
727                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
728                 ]
729                 priority = 100
730                 tableId = NwConstants.INGRESS_ACL_CONNTRACK_SENDER_TABLE
731             ],
732             new FlowEntityBuilder >> [
733                 dpnId = 123bi
734                 cookie = 1085218086715393bi
735                 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
736                 flowName = "ACL"
737                 instructionInfoList = #[
738                     new InstructionApplyActions(#[
739                         new ActionDrop()
740                     ])
741                 ]
742                 matchInfoList = #[
743                    new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
744                    new NxMatchCtState(48L, 48L)
745                 ]
746                 priority = 62020
747                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
748             ]
749         ]
750     }
751
752     protected def fixedConntrackIngressFlowsPort2() {
753         #[
754              new FlowEntityBuilder >> [
755                 dpnId = 123bi
756                 cookie = 110100480bi
757                 flowId = "Ingress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:F4_10.0.0.2/32"
758                 flowName = "ACL"
759                 instructionInfoList = #[
760                     new InstructionGotoTable(NwConstants.EGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
761                 ]
762                 matchInfoList = #[
763                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
764                     new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F4")),
765                     new MatchEthernetType(2048L),
766                     new MatchIpv4Destination("10.0.0.2", "32")
767                 ]
768                 priority = 61010
769                 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
770             ],
771             new FlowEntityBuilder >> [
772                 dpnId = 123bi
773                 cookie = 110100480bi
774                 flowId = "Ingress_Fixed_Conntrk_123_987_MatchEthernetType[2048]_Recirc"
775                 flowName = "ACL"
776                 instructionInfoList = #[
777                     new InstructionApplyActions(#[
778                         new ActionNxConntrack(2, 0, 0, 5000, NwConstants.EGRESS_ACL_FOR_EXISTING_TRAFFIC_TABLE)
779                     ])
780                 ]
781                 matchInfoList = #[
782                     new MatchEthernetType(2048L),
783                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
784                 ]
785                 priority = 100
786                 tableId = NwConstants.EGRESS_ACL_CONNTRACK_SENDER_TABLE
787             ],
788             new FlowEntityBuilder >> [
789                 dpnId = 123bi
790                 cookie = 1085218086715393bi
791                 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
792                 flowName = "ACL"
793                 instructionInfoList = #[
794                     new InstructionApplyActions(#[
795                         new ActionDrop()
796                     ])
797                 ]
798                 matchInfoList = #[
799                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
800                     new NxMatchCtState(48L, 48L)
801                 ]
802                 priority = 62020
803                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
804             ]
805         ]
806     }
807
808     protected def fixedConntrackEgressFlowsPort2() {
809         #[
810             new FlowEntityBuilder >> [
811                 dpnId = 123bi
812                 cookie = 110100480bi
813                 flowId = "Egress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:F4_10.0.0.2/32"
814                 flowName = "ACL"
815                 instructionInfoList = #[
816                     new InstructionGotoTable(NwConstants.INGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
817                 ]
818                 matchInfoList = #[
819                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
820                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F4")),
821                     new MatchEthernetType(2048L),
822                     new MatchIpv4Source("10.0.0.2", "32")
823                 ]
824                 priority = 61010
825                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
826             ],
827             new FlowEntityBuilder >> [
828                 dpnId = 123bi
829                 cookie = 110100480bi
830                 flowId = "Egress_Fixed_Conntrk_123_987_MatchEthernetType[2048]_Recirc"
831                 flowName = "ACL"
832                 instructionInfoList = #[
833                     new InstructionApplyActions(#[
834                         new ActionNxConntrack(2, 0, 0, 5000, 213 as short)
835                     ])
836                 ]
837                 matchInfoList = #[
838                     new MatchEthernetType(2048L),
839                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
840                 ]
841                 priority = 100
842                 tableId = NwConstants.INGRESS_ACL_CONNTRACK_SENDER_TABLE
843             ],
844             new FlowEntityBuilder >> [
845                 dpnId = 123bi
846                 cookie = 1085218086715393bi
847                 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
848                 flowName = "ACL"
849                 instructionInfoList = #[
850                     new InstructionApplyActions(#[
851                         new ActionDrop()
852                     ])
853                 ]
854                 matchInfoList = #[
855                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
856                     new NxMatchCtState(48L, 48L)
857                 ]
858                 priority = 62020
859                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
860             ]
861         ]
862     }
863
864     protected def fixedConntrackIngressFlowsPort3() {
865         #[
866             new FlowEntityBuilder >> [
867                 dpnId = 123bi
868                 cookie = 110100480bi
869                 flowId = "Ingress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:F5_10.0.0.3/32"
870                 flowName = "ACL"
871                 instructionInfoList = #[
872                     new InstructionGotoTable(NwConstants.EGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
873                 ]
874                 matchInfoList = #[
875                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
876                     new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F5")),
877                     new MatchEthernetType(2048L),
878                     new MatchIpv4Destination("10.0.0.3", "32")
879                 ]
880                 priority = 61010
881                 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
882             ],
883             new FlowEntityBuilder >> [
884                 dpnId = 123bi
885                 cookie = 110100480bi
886                 flowId = "Ingress_Fixed_Conntrk_123_987_MatchEthernetType[2048]_Recirc"
887                 flowName = "ACL"
888                 instructionInfoList = #[
889                     new InstructionApplyActions(#[
890                         new ActionNxConntrack(2, 0, 0, 5000, NwConstants.EGRESS_ACL_FOR_EXISTING_TRAFFIC_TABLE)
891                     ])
892                 ]
893                 matchInfoList = #[
894                     new MatchEthernetType(2048L),
895                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
896                 ]
897                 priority = 100
898                 tableId = NwConstants.EGRESS_ACL_CONNTRACK_SENDER_TABLE
899             ],
900             new FlowEntityBuilder >> [
901                 dpnId = 123bi
902                 cookie = 1085218086715393bi
903                 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
904                 flowName = "ACL"
905                 instructionInfoList = #[
906                     new InstructionApplyActions(#[
907                         new ActionDrop()
908                     ])
909                 ]
910                 matchInfoList = #[
911                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
912                     new NxMatchCtState(48L, 48L)
913                 ]
914                 priority = 62020
915                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
916             ]
917         ]
918     }
919
920     protected def fixedConntrackEgressFlowsPort3() {
921         #[
922             new FlowEntityBuilder >> [
923                 dpnId = 123bi
924                 cookie = 110100480bi
925                 flowId = "Egress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:F5_10.0.0.3/32"
926                 flowName = "ACL"
927                 instructionInfoList = #[
928                     new InstructionGotoTable(NwConstants.INGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
929                 ]
930                 matchInfoList = #[
931                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
932                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F5")),
933                     new MatchEthernetType(2048L),
934                     new MatchIpv4Source("10.0.0.3", "32")
935                 ]
936                 priority = 61010
937                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
938             ],
939             new FlowEntityBuilder >> [
940                 dpnId = 123bi
941                 cookie = 110100480bi
942                 flowId = "Egress_Fixed_Conntrk_123_987_MatchEthernetType[2048]_Recirc"
943                 flowName = "ACL"
944                 instructionInfoList = #[
945                     new InstructionApplyActions(#[
946                         new ActionNxConntrack(2, 0, 0, 5000, NwConstants.INGRESS_ACL_FOR_EXISTING_TRAFFIC_TABLE)
947                     ])
948                 ]
949                 matchInfoList = #[
950                     new MatchEthernetType(2048L),
951                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
952                 ]
953                 priority = 100
954                 tableId = NwConstants.INGRESS_ACL_CONNTRACK_SENDER_TABLE
955             ],
956             new FlowEntityBuilder >> [
957                 dpnId = 123bi
958                 cookie = 1085218086715393bi
959                 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
960                 flowName = "ACL"
961                 instructionInfoList = #[
962                     new InstructionApplyActions(#[
963                         new ActionDrop()
964                     ])
965                 ]
966                 matchInfoList = #[
967                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
968                     new NxMatchCtState(48L, 48L)
969                 ]
970                 priority = 62020
971                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
972             ]
973         ]
974     }
975
976     static def fixedConntrackIngressFlowsPort4() {
977         #[
978             new FlowEntityBuilder >> [
979                 dpnId = 123bi
980                 cookie = 110100480bi
981                 flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F6_10.0.0.4/32_Recirc"
982                 flowName = "ACL"
983                 instructionInfoList = #[
984                     new InstructionApplyActions(#[
985                         new ActionNxConntrack(2, 0, 0, 5000, NwConstants.EGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
986                     ])
987                 ]
988                 matchInfoList = #[
989                     new MatchEthernetType(2048L),
990                     new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F6")),
991                     new MatchEthernetType(2048L),
992                     new MatchIpv4Destination("10.0.0.4", "32")
993                 ]
994                 priority = 61010
995                 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
996             ],
997             new FlowEntityBuilder >> [
998                 dpnId = 123bi
999                 cookie = 110100480bi
1000                 flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F6_0.0.0.0/0_Recirc"
1001                 flowName = "ACL"
1002                 instructionInfoList = #[
1003                     new InstructionApplyActions(#[
1004                         new ActionNxConntrack(2, 0, 0, 5000, NwConstants.EGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
1005                     ])
1006                 ]
1007                 matchInfoList = #[
1008                     new MatchEthernetType(2048L),
1009                     new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F6")),
1010                     new MatchEthernetType(2048L)
1011                 ]
1012                 priority = 61010
1013                 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
1014             ],
1015             new FlowEntityBuilder >> [
1016                 dpnId = 123bi
1017                 cookie = 1085218086715393bi
1018                 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_New"
1019                 flowName = "ACL"
1020                 instructionInfoList = #[
1021                     new InstructionApplyActions(#[
1022                         new ActionDrop()
1023                     ])
1024                 ]
1025                 matchInfoList = #[
1026                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1027                     new NxMatchCtState(32L, 32L)
1028                 ]
1029                 priority = 50
1030                 tableId = NwConstants.INGRESS_ACL_FOR_EXISTING_TRAFFIC_TABLE
1031             ],
1032             new FlowEntityBuilder >> [
1033                 dpnId = 123bi
1034                 cookie = 1085218086715393bi
1035                 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
1036                 flowName = "ACL"
1037                 instructionInfoList = #[
1038                     new InstructionApplyActions(#[
1039                         new ActionDrop()
1040                     ])
1041                 ]
1042                 matchInfoList = #[
1043                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1044                     new NxMatchCtState(48L, 48L)
1045                 ]
1046                 priority = 62020
1047                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1048             ]
1049         ]
1050     }
1051
1052     static def fixedConntrackEgressFlowsPort4() {
1053         #[
1054             new FlowEntityBuilder >> [
1055                 dpnId = 123bi
1056                 cookie = 110100480bi
1057                 flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F6_10.0.0.4/32_Recirc"
1058                 flowName = "ACL"
1059                 instructionInfoList = #[
1060                     new InstructionApplyActions(#[
1061                         new ActionNxConntrack(2, 0, 0, 5000, NwConstants.INGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
1062                     ])
1063                 ]
1064                 matchInfoList = #[
1065                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F6")),
1066                     new MatchEthernetType(2048L),
1067                     new MatchIpv4Source("10.0.0.4", "32")
1068                 ]
1069                 priority = 61010
1070                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
1071             ],
1072             new FlowEntityBuilder >> [
1073                 dpnId = 123bi
1074                 cookie = 110100480bi
1075                 flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F6_0.0.0.0/0_Recirc"
1076                 flowName = "ACL"
1077                 instructionInfoList = #[
1078                     new InstructionApplyActions(#[
1079                         new ActionNxConntrack(2, 0, 0, 5000, NwConstants.INGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
1080                     ])
1081                 ]
1082                 matchInfoList = #[
1083                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F6")),
1084                     new MatchEthernetType(2048L)
1085                 ]
1086                 priority = 61010
1087                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
1088             ],
1089             new FlowEntityBuilder >> [
1090                 dpnId = 123bi
1091                 cookie = 1085218086715393bi
1092                 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_New"
1093                 flowName = "ACL"
1094                 instructionInfoList = #[
1095                     new InstructionApplyActions(#[
1096                         new ActionDrop()
1097                     ])
1098                 ]
1099                 matchInfoList = #[
1100                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1101                     new NxMatchCtState(32L, 32L)
1102                 ]
1103                 priority = 50
1104                 tableId = NwConstants.EGRESS_ACL_FOR_EXISTING_TRAFFIC_TABLE
1105             ],
1106             new FlowEntityBuilder >> [
1107                 dpnId = 123bi
1108                 cookie = 1085218086715393bi
1109                 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
1110                 flowName = "ACL"
1111                 instructionInfoList = #[
1112                     new InstructionApplyActions(#[
1113                         new ActionDrop()
1114                     ])
1115                 ]
1116                 matchInfoList = #[
1117                    new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1118                     new NxMatchCtState(48L, 48L)
1119                 ]
1120                 priority = 62020
1121                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1122             ]
1123         ]
1124     }
1125
1126     protected def etherEgressFlowsPort1() {
1127         val theFlowId = "ETHERnullEgress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1128         #[
1129             new FlowEntityBuilder >> [
1130                 dpnId = 123bi
1131                 cookie = 110100480bi
1132                 flowId = theFlowId
1133                 flowName = "ACL"
1134                 instructionInfoList = #[
1135                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1136                 ]
1137                 matchInfoList = #[
1138                     new MatchEthernetType(2048L),
1139                     new MatchEthernetType(2048L),
1140                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1141                 ]
1142                 priority = IdHelper.getId(theFlowId)
1143                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1144             ]
1145         ]
1146     }
1147
1148     protected def etheregressFlowPort2() {
1149         val theFlowId = "ETHERnullEgress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1150         #[
1151             new FlowEntityBuilder >> [
1152                 dpnId = 123bi
1153                 cookie = 110100480bi
1154                 flowId = theFlowId
1155                 flowName = "ACL"
1156                 instructionInfoList = #[
1157                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1158                 ]
1159                 matchInfoList = #[
1160                     new MatchEthernetType(2048L),
1161                     new MatchEthernetType(2048L),
1162                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1163                 ]
1164                 priority = IdHelper.getId(theFlowId)
1165                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1166             ]
1167         ]
1168     }
1169
1170     protected def tcpIngressFlowPort1() {
1171         val theFlowId = "TCP_DESTINATION_80_65535Ingress_123_987_85cc3048-abc3-43cc-89b3-377341426ac7"
1172         #[
1173             new FlowEntityBuilder >> [
1174                 dpnId = 123bi
1175                 cookie = 110100480bi
1176                 flowId = theFlowId
1177                 flowName = "ACL"
1178                 instructionInfoList = #[
1179                    new InstructionGotoTable(NwConstants.EGRESS_ACL_COMMITTER_TABLE)
1180                 ]
1181                 matchInfoList = #[
1182                     new MatchEthernetType(2048L),
1183                     new MatchEthernetType(2048L),
1184                     new NxMatchTcpDestinationPort(80, 65535),
1185                     new MatchIpProtocol(6 as short),
1186                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1187                 ]
1188                 priority = IdHelper.getId(theFlowId)
1189                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1190             ]
1191         ]
1192     }
1193
1194     protected def tcpIngressFlowPort2() {
1195         val theFlowId = "TCP_DESTINATION_80_65535Ingress_123_987_85cc3048-abc3-43cc-89b3-377341426ac7"
1196         #[
1197             new FlowEntityBuilder >> [
1198                 dpnId = 123bi
1199                 cookie = 110100480bi
1200                 flowId = theFlowId
1201                 flowName = "ACL"
1202                 instructionInfoList = #[
1203                     new InstructionGotoTable(NwConstants.EGRESS_ACL_COMMITTER_TABLE)
1204                 ]
1205                 matchInfoList = #[
1206                     new MatchEthernetType(2048L),
1207                     new MatchEthernetType(2048L),
1208                     new NxMatchTcpDestinationPort(80, 65535),
1209                     new MatchIpProtocol(6 as short),
1210                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1211                 ]
1212                 priority = IdHelper.getId(theFlowId)
1213                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1214             ]
1215         ]
1216     }
1217
1218     protected def tcpEgressFlowPort2() {
1219         val theFlowId = "TCP_DESTINATION_80_65535Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1220         #[
1221             new FlowEntityBuilder >> [
1222                 dpnId = 123bi
1223                 cookie = 110100480bi
1224                 flowId = theFlowId
1225                 flowName = "ACL"
1226                 instructionInfoList = #[
1227                     new InstructionGotoTable(NwConstants.INGRESS_REMOTE_ACL_TABLE)
1228                 ]
1229                 matchInfoList = #[
1230                     new MatchEthernetType(2048L),
1231                     new MatchEthernetType(2048L),
1232                     new NxMatchTcpDestinationPort(80, 65535),
1233                     new MatchIpProtocol(6 as short),
1234                     new MatchMetadata(1085217976614944bi, 1152920405111996400bi)
1235                 ]
1236                 priority = IdHelper.getId(theFlowId)
1237                 tableId = NwConstants.INGRESS_ACL_RULE_BASED_FILTER_TABLE
1238             ]
1239         ]
1240     }
1241
1242     protected def udpEgressFlowsPort1() {
1243         val theFlowId = "UDP_DESTINATION_80_65535Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1244         #[
1245              new FlowEntityBuilder >> [
1246                 dpnId = 123bi
1247                 cookie = 110100480bi
1248                 flowId = theFlowId
1249                 flowName = "ACL"
1250                 instructionInfoList = #[
1251                      new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1252                 ]
1253                 matchInfoList = #[
1254                     new MatchEthernetType(2048L),
1255                     new MatchEthernetType(2048L),
1256                     new NxMatchUdpDestinationPort(80, 65535),
1257                     new MatchIpProtocol(17 as short),
1258                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1259                 ]
1260                 priority = IdHelper.getId(theFlowId)
1261                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1262             ]
1263         ]
1264     }
1265
1266     protected def udpIngressFlowsPort2() {
1267         val theFlowId = "UDP_DESTINATION_80_65535Ingress_123_987_85cc3048-abc3-43cc-89b3-377341426ac7"
1268         #[
1269             new FlowEntityBuilder >> [
1270                 dpnId = 123bi
1271                 cookie = 110100480bi
1272                 flowId = theFlowId
1273                 flowName = "ACL"
1274                 instructionInfoList = #[
1275                     new InstructionGotoTable(NwConstants.EGRESS_REMOTE_ACL_TABLE)
1276                 ]
1277                 matchInfoList = #[
1278                     new MatchEthernetType(2048L),
1279                     new MatchEthernetType(2048L),
1280                     new NxMatchUdpDestinationPort(80, 65535),
1281                     new MatchIpProtocol(17 as short),
1282                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1283                     new MatchMetadata(32bi, 16777200bi)
1284                 ]
1285                 priority = IdHelper.getId(theFlowId)
1286                 tableId = NwConstants.EGRESS_ACL_RULE_BASED_FILTER_TABLE
1287             ]
1288         ]
1289     }
1290
1291     protected def udpEgressFlowsPort2() {
1292         val theFlowId = "UDP_DESTINATION_80_65535Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1293         #[
1294             new FlowEntityBuilder >> [
1295                 dpnId = 123bi
1296                 cookie = 110100480bi
1297                 flowId = theFlowId
1298                 flowName = "ACL"
1299                 instructionInfoList = #[
1300                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1301                 ]
1302                 matchInfoList = #[
1303                     new MatchEthernetType(2048L),
1304                     new MatchEthernetType(2048L),
1305                     new NxMatchUdpDestinationPort(80, 65535),
1306                     new MatchIpProtocol(17 as short),
1307                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1308                 ]
1309                 priority = IdHelper.getId(theFlowId)
1310                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1311             ]
1312         ]
1313     }
1314
1315     protected def icmpIngressFlowsPort1() {
1316         val theFlowId = "ICMP_V4_DESTINATION_23_Ingress_123_987_85cc3048-abc3-43cc-89b3-377341426ac7"
1317         #[
1318             new FlowEntityBuilder >> [
1319                 dpnId = 123bi
1320                 cookie = 110100480bi
1321                 flowId = theFlowId
1322                 flowName = "ACL"
1323                 instructionInfoList = #[
1324                     new InstructionGotoTable(NwConstants.EGRESS_ACL_COMMITTER_TABLE)
1325                 ]
1326                 matchInfoList = #[
1327                     new MatchEthernetType(2048L),
1328                     new MatchEthernetType(2048L),
1329                     new MatchIcmpv4(2 as short, 3 as short),
1330                     new MatchIpProtocol(1 as short),
1331                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1332                 ]
1333                 priority = IdHelper.getId(theFlowId)
1334                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1335             ]
1336         ]
1337     }
1338
1339     protected def icmpIngressFlowsPort2() {
1340         val theFlowId = "ICMP_V4_DESTINATION_23_Ingress_123_987_85cc3048-abc3-43cc-89b3-377341426ac7"
1341         #[
1342             new FlowEntityBuilder >> [
1343                 dpnId = 123bi
1344                 cookie = 110100480bi
1345                 flowId = theFlowId
1346                 flowName = "ACL"
1347                 instructionInfoList = #[
1348                     new InstructionGotoTable(NwConstants.EGRESS_ACL_COMMITTER_TABLE)
1349                 ]
1350                 matchInfoList = #[
1351                     new MatchEthernetType(2048L),
1352                     new MatchEthernetType(2048L),
1353                     new MatchIcmpv4(2 as short, 3 as short),
1354                     new MatchIpProtocol(1 as short),
1355                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1356                 ]
1357                 priority = IdHelper.getId(theFlowId)
1358                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1359             ]
1360         ]
1361     }
1362
1363     protected def icmpEgressFlowsPort2() {
1364         val theFlowId = "ICMP_V4_DESTINATION_23_Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1365         #[
1366             new FlowEntityBuilder >> [
1367                 dpnId = 123bi
1368                 cookie = 110100480bi
1369                 flowId = theFlowId
1370                 flowName = "ACL"
1371                 instructionInfoList = #[
1372                     new InstructionGotoTable(NwConstants.INGRESS_REMOTE_ACL_TABLE)
1373                 ]
1374                 matchInfoList = #[
1375                     new MatchEthernetType(2048L),
1376                     new MatchEthernetType(2048L),
1377                     new MatchIcmpv4(2 as short, 3 as short),
1378                     new MatchIpProtocol(1 as short),
1379                     new MatchMetadata(1085217976614944bi, 1152920405111996400bi)
1380                 ]
1381                 priority = IdHelper.getId(theFlowId)
1382                 tableId = NwConstants.INGRESS_ACL_RULE_BASED_FILTER_TABLE
1383             ]
1384         ]
1385     }
1386
1387     protected def udpIngressPortRangeFlows() {
1388         val theFlowId = "UDP_DESTINATION_2000_65532Ingress_123_987_85cc3048-abc3-43cc-89b3-377341426ac7"
1389         #[
1390             new FlowEntityBuilder >> [
1391                 dpnId = 123bi
1392                 cookie = 110100480bi
1393                 flowId = theFlowId
1394                 flowName = "ACL"
1395                 instructionInfoList = #[
1396                     new InstructionGotoTable(NwConstants.EGRESS_ACL_COMMITTER_TABLE)
1397                 ]
1398                 matchInfoList = #[
1399                     new MatchEthernetType(2048L),
1400                     new MatchEthernetType(2048L),
1401                     new NxMatchUdpDestinationPort(2000, 65532),
1402                     new MatchIpProtocol(17 as short),
1403                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1404                 ]
1405                 priority = IdHelper.getId(theFlowId)
1406                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1407             ]
1408         ]
1409     }
1410
1411     protected def tcpEgressRangeFlows() {
1412         val flowId1 = "TCP_DESTINATION_776_65534Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1413         val flowId2 = "TCP_DESTINATION_512_65280Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1414         val flowId3 = "TCP_DESTINATION_334_65534Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1415         val flowId4 = "TCP_DESTINATION_333_65535Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1416         val flowId5 = "TCP_DESTINATION_336_65520Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1417         val flowId6 = "TCP_DESTINATION_352_65504Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1418         val flowId7 = "TCP_DESTINATION_384_65408Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1419         val flowId8 = "TCP_DESTINATION_768_65528Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1420         #[
1421             new FlowEntityBuilder >> [
1422                 dpnId = 123bi
1423                 cookie = 110100480bi
1424                 flowId = flowId1
1425                 flowName = "ACL"
1426                 instructionInfoList = #[
1427                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1428                 ]
1429                 matchInfoList = #[
1430                     new MatchEthernetType(2048L),
1431                     new MatchEthernetType(2048L),
1432                     new NxMatchTcpDestinationPort(776, 65534),
1433                     new MatchIpProtocol(6 as short),
1434                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1435                 ]
1436                 priority = IdHelper.getId(flowId1)
1437                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1438             ],
1439             new FlowEntityBuilder >> [
1440                 dpnId = 123bi
1441                 cookie = 110100480bi
1442                 flowId = flowId2
1443                 flowName = "ACL"
1444                 instructionInfoList = #[
1445                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1446                 ]
1447                 matchInfoList = #[
1448                     new MatchEthernetType(2048L),
1449                     new MatchEthernetType(2048L),
1450                     new NxMatchTcpDestinationPort(512, 65280),
1451                     new MatchIpProtocol(6 as short),
1452                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1453                 ]
1454                 priority = IdHelper.getId(flowId2)
1455                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1456             ],
1457             new FlowEntityBuilder >> [
1458                 dpnId = 123bi
1459                 cookie = 110100480bi
1460                 flowId = flowId3
1461                 flowName = "ACL"
1462                 instructionInfoList = #[
1463                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1464                 ]
1465                 matchInfoList = #[
1466                     new MatchEthernetType(2048L),
1467                     new MatchEthernetType(2048L),
1468                     new NxMatchTcpDestinationPort(334, 65534),
1469                     new MatchIpProtocol(6 as short),
1470                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1471                 ]
1472                 priority = IdHelper.getId(flowId3)
1473                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1474             ],
1475             new FlowEntityBuilder >> [
1476                 dpnId = 123bi
1477                 cookie = 110100480bi
1478                 flowId = flowId4
1479                 flowName = "ACL"
1480                 instructionInfoList = #[
1481                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1482                 ]
1483                 matchInfoList = #[
1484                     new MatchEthernetType(2048L),
1485                     new MatchEthernetType(2048L),
1486                     new NxMatchTcpDestinationPort(333, 65535),
1487                     new MatchIpProtocol(6 as short),
1488                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1489                 ]
1490                 priority = IdHelper.getId(flowId4)
1491                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1492             ],
1493             new FlowEntityBuilder >> [
1494                 dpnId = 123bi
1495                 cookie = 110100480bi
1496                 flowId = flowId5
1497                 flowName = "ACL"
1498                 instructionInfoList = #[
1499                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1500                 ]
1501                 matchInfoList = #[
1502                     new MatchEthernetType(2048L),
1503                     new MatchEthernetType(2048L),
1504                     new NxMatchTcpDestinationPort(336, 65520),
1505                     new MatchIpProtocol(6 as short),
1506                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1507                 ]
1508                 priority = IdHelper.getId(flowId5)
1509                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1510             ],
1511             new FlowEntityBuilder >> [
1512                 dpnId = 123bi
1513                 cookie = 110100480bi
1514                 flowId = flowId6
1515                 flowName = "ACL"
1516                 instructionInfoList = #[
1517                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1518                 ]
1519                 matchInfoList = #[
1520                     new MatchEthernetType(2048L),
1521                     new MatchEthernetType(2048L),
1522                     new NxMatchTcpDestinationPort(352, 65504),
1523                     new MatchIpProtocol(6 as short),
1524                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1525                 ]
1526                 priority = IdHelper.getId(flowId6)
1527                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1528             ],
1529             new FlowEntityBuilder >> [
1530                 dpnId = 123bi
1531                 cookie = 110100480bi
1532                 flowId = flowId7
1533                 flowName = "ACL"
1534                 instructionInfoList = #[
1535                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1536                 ]
1537                 matchInfoList = #[
1538                     new MatchEthernetType(2048L),
1539                     new MatchEthernetType(2048L),
1540                     new NxMatchTcpDestinationPort(384, 65408),
1541                     new MatchIpProtocol(6 as short),
1542                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1543                 ]
1544                 priority = IdHelper.getId(flowId7)
1545                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1546             ],
1547             new FlowEntityBuilder >> [
1548                 dpnId = 123bi
1549                 cookie = 110100480bi
1550                 flowId = flowId8
1551                 flowName = "ACL"
1552                 instructionInfoList = #[
1553                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1554                 ]
1555                 matchInfoList = #[
1556                     new MatchEthernetType(2048L),
1557                     new MatchEthernetType(2048L),
1558                     new NxMatchTcpDestinationPort(768, 65528),
1559                     new MatchIpProtocol(6 as short),
1560                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1561                 ]
1562                 priority = IdHelper.getId(flowId8)
1563                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1564             ]
1565         ]
1566     }
1567
1568     protected def udpIngressAllFlows() {
1569         val theFlowId = "UDP_DESTINATION_1_0Ingress_123_987_85cc3048-abc3-43cc-89b3-377341426ac7"
1570         #[
1571             new FlowEntityBuilder >> [
1572                 dpnId = 123bi
1573                 cookie = 110100480bi
1574                 flowId = theFlowId
1575                 flowName = "ACL"
1576                 instructionInfoList = #[
1577                     new InstructionGotoTable(NwConstants.EGRESS_ACL_COMMITTER_TABLE)
1578                 ]
1579                 matchInfoList = #[
1580                     new MatchEthernetType(2048L),
1581                     new MatchEthernetType(2048L),
1582                     new MatchIpProtocol(17 as short),
1583                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1584                 ]
1585                 priority = IdHelper.getId(theFlowId)
1586                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1587             ]
1588         ]
1589     }
1590
1591     protected def tcpEgressAllFlows() {
1592         val theFlowId = "TCP_DESTINATION_1_0Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1593          #[
1594              new FlowEntityBuilder >> [
1595                 dpnId = 123bi
1596                 cookie = 110100480bi
1597                 flowId = theFlowId
1598                 flowName = "ACL"
1599                 instructionInfoList = #[
1600                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1601                 ]
1602                 matchInfoList = #[
1603                     new MatchEthernetType(2048L),
1604                     new MatchEthernetType(2048L),
1605                     new MatchIpProtocol(6 as short),
1606                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1607                 ]
1608                 priority = IdHelper.getId(theFlowId)
1609                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1610             ]
1611          ]
1612
1613      }
1614
1615     protected def icmpIngressFlowsPort3() {
1616         val flowId1 = "ICMP_V4_DESTINATION_23_Ingress_123_987_85cc3048-abc3-43cc-89b3-377341426ac7"
1617         val flowId2 = "ICMP_V4_DESTINATION_23_Ingress_123_987_85cc3048-abc3-43cc-89b3-377341426a22"
1618         #[
1619             new FlowEntityBuilder >> [
1620                 dpnId = 123bi
1621                 cookie = 110100480bi
1622                 flowId = flowId1
1623                 flowName = "ACL"
1624                 instructionInfoList = #[
1625                     new InstructionGotoTable(NwConstants.EGRESS_ACL_COMMITTER_TABLE)
1626                 ]
1627                 matchInfoList = #[
1628                     new MatchEthernetType(2048L),
1629                     new MatchEthernetType(2048L),
1630                     new MatchIcmpv4(2 as short, 3 as short),
1631                     new MatchIpProtocol(1 as short),
1632                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1633                 ]
1634                 priority = IdHelper.getId(flowId1)
1635                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1636             ],
1637             new FlowEntityBuilder >> [
1638                 dpnId = 123bi
1639                 cookie = 110100480bi
1640                 flowId = flowId2
1641                 flowName = "ACL"
1642                 instructionInfoList = #[
1643                     new InstructionGotoTable(NwConstants.EGRESS_ACL_COMMITTER_TABLE)
1644                 ]
1645                 matchInfoList = #[
1646                     new MatchEthernetType(2048L),
1647                     new MatchEthernetType(2048L),
1648                     new MatchIcmpv4(2 as short, 3 as short),
1649                     new MatchIpProtocol(1 as short),
1650                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1651                 ]
1652                 priority = IdHelper.getId(flowId2)
1653                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1654             ]
1655         ]
1656     }
1657
1658     protected def icmpEgressFlowsPort3() {
1659         val flowId1 = "ICMP_V4_DESTINATION_23_Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1660         val flowId2 = "ICMP_V4_DESTINATION_23_Egress_123_987_85cc3048-abc3-43cc-89b3-377341426a21"
1661         #[
1662             new FlowEntityBuilder >> [
1663                 dpnId = 123bi
1664                 cookie = 110100480bi
1665                 flowId = flowId1
1666                 flowName = "ACL"
1667                 instructionInfoList = #[
1668                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1669                 ]
1670                 matchInfoList = #[
1671                     new MatchEthernetType(2048L),
1672                     new MatchEthernetType(2048L),
1673                     new MatchIcmpv4(2 as short, 3 as short),
1674                     new MatchIpProtocol(1 as short),
1675                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1676                 ]
1677                 priority = IdHelper.getId(flowId1)
1678                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1679             ],
1680             new FlowEntityBuilder >> [
1681                 dpnId = 123bi
1682                 cookie = 110100480bi
1683                 flowId = flowId2
1684                 flowName = "ACL"
1685                 instructionInfoList = #[
1686                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1687                 ]
1688                 matchInfoList = #[
1689                     new MatchEthernetType(2048L),
1690                     new MatchEthernetType(2048L),
1691                     new MatchIcmpv4(2 as short, 3 as short),
1692                     new MatchIpProtocol(1 as short),
1693                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1694                 ]
1695                 priority = IdHelper.getId(flowId2)
1696                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1697             ]
1698         ]
1699     }
1700
1701     override def expectedFlows(String mac) {
1702         // Code auto. generated by https://github.com/vorburger/xtendbeans
1703         #[
1704             new FlowEntityBuilder >> [
1705                 dpnId = 123bi
1706                 cookie = 110100480bi
1707                 flowId = "Ingress_DHCP_Server_v4123_987_Permit_"
1708                 flowName = "ACL"
1709                 instructionInfoList = #[
1710                     new InstructionApplyActions(#[
1711                         new ActionNxResubmit(220 as short)
1712                     ])
1713                 ]
1714                 matchInfoList = #[
1715                     new MatchEthernetType(2048L),
1716                     new MatchIpProtocol(17 as short),
1717                     new MatchUdpDestinationPort(68 as short),
1718                     new MatchUdpSourcePort(67 as short),
1719                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1720                 ]
1721                 priority = 63010
1722                 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
1723             ],
1724             new FlowEntityBuilder >> [
1725                 dpnId = 123bi
1726                 cookie = 110100480bi
1727                 flowId = "Ingress_DHCP_Server_v6_123_987_Permit_"
1728                 flowName = "ACL"
1729                 instructionInfoList = #[
1730                     new InstructionApplyActions(#[
1731                         new ActionNxResubmit(220 as short)
1732                     ])
1733                 ]
1734                 matchInfoList = #[
1735                     new MatchEthernetType(34525L),
1736                     new MatchIpProtocol(17 as short),
1737                     new MatchUdpDestinationPort(546 as short),
1738                     new MatchUdpSourcePort(547 as short),
1739                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1740                 ]
1741                 priority = 63010
1742                 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
1743             ],
1744             new FlowEntityBuilder >> [
1745                 dpnId = 123bi
1746                 cookie = 110100480bi
1747                 flowId = "Ingress_ICMPv6_123_987_130_Permit_"
1748                 flowName = "ACL"
1749                 instructionInfoList = #[
1750                     new InstructionApplyActions(#[
1751                         new ActionNxResubmit(220 as short)
1752                     ])
1753                 ]
1754                 matchInfoList = #[
1755                     new MatchEthernetType(34525L),
1756                     new MatchIpProtocol(58 as short),
1757                     new MatchIcmpv6(130 as short, 0 as short),
1758                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1759                 ]
1760                 priority = 63010
1761                 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
1762             ],
1763             new FlowEntityBuilder >> [
1764                 dpnId = 123bi
1765                 cookie = 110100480bi
1766                 flowId = "Ingress_ICMPv6_123_987_135_Permit_"
1767                 flowName = "ACL"
1768                 instructionInfoList = #[
1769                     new InstructionApplyActions(#[
1770                         new ActionNxResubmit(220 as short)
1771                     ])
1772                 ]
1773                 matchInfoList = #[
1774                     new MatchEthernetType(34525L),
1775                     new MatchIpProtocol(58 as short),
1776                     new MatchIcmpv6(135 as short, 0 as short),
1777                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1778                 ]
1779                 priority = 63010
1780                 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
1781             ],
1782             new FlowEntityBuilder >> [
1783                 dpnId = 123bi
1784                 cookie = 110100480bi
1785                 flowId = "Ingress_ICMPv6_123_987_136_Permit_"
1786                 flowName = "ACL"
1787                 instructionInfoList = #[
1788                     new InstructionApplyActions(#[
1789                         new ActionNxResubmit(220 as short)
1790                     ])
1791                 ]
1792                 matchInfoList = #[
1793                     new MatchEthernetType(34525L),
1794                     new MatchIpProtocol(58 as short),
1795                     new MatchIcmpv6(136 as short, 0 as short),
1796                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1797                 ]
1798                 priority = 63010
1799                 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
1800             ],
1801             new FlowEntityBuilder >> [
1802                 dpnId = 123bi
1803                 cookie = 110100480bi
1804                 flowId = "Ingress_ARP_123_987"
1805                 flowName = "ACL"
1806                 instructionInfoList = #[
1807                     new InstructionApplyActions(#[
1808                         new ActionNxResubmit(220 as short)
1809                     ])
1810                 ]
1811                 matchInfoList = #[
1812                     new MatchEthernetType(2054L),
1813                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1814                 ]
1815                 priority = 63010
1816                 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
1817             ],
1818             new FlowEntityBuilder >> [
1819                 dpnId = 123bi
1820                 cookie = 110100480bi
1821                 flowId = "Ingress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:F3_10.0.0.1/32"
1822                 flowName = "ACL"
1823                 instructionInfoList = #[
1824                     new InstructionGotoTable(NwConstants.EGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
1825                 ]
1826                 matchInfoList = #[
1827                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1828                     new MatchEthernetDestination(new MacAddress(mac)),
1829                     new MatchEthernetType(2048L),
1830                     new MatchIpv4Destination("10.0.0.1", "32")
1831                 ]
1832                 priority = 61010
1833                 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
1834             ],
1835             new FlowEntityBuilder >> [
1836                 dpnId = 123bi
1837                 cookie = 1085218086715393bi
1838                 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
1839                 flowName = "ACL"
1840                 instructionInfoList = #[
1841                     new InstructionApplyActions(#[
1842                         new ActionDrop()
1843                     ])
1844                 ]
1845                 matchInfoList = #[
1846                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1847                     new NxMatchCtState(48L, 48L)
1848                 ]
1849                 priority = 62020
1850                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1851             ],
1852             new FlowEntityBuilder >> [
1853                 dpnId = 123bi
1854                 cookie = 110100480bi
1855                 flowId = "Egress_DHCP_Client_v4123_987_" + mac + "_Permit_"
1856                 flowName = "ACL"
1857                 instructionInfoList = #[
1858                     new InstructionApplyActions(#[
1859                         new ActionNxResubmit(17 as short)
1860                     ])
1861                 ]
1862                 matchInfoList = #[
1863                     new MatchEthernetType(2048L),
1864                     new MatchIpProtocol(17 as short),
1865                     new MatchUdpDestinationPort(67 as short),
1866                     new MatchUdpSourcePort(68 as short),
1867                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1868                     new MatchEthernetSource(new MacAddress(mac))
1869                 ]
1870                 priority = 63010
1871                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
1872             ],
1873             new FlowEntityBuilder >> [
1874                 dpnId = 123bi
1875                 cookie = 110100480bi
1876                 flowId = "Egress_ICMPv6_123_987_133_Permit_"
1877                 flowName = "ACL"
1878                 instructionInfoList = #[
1879                     new InstructionApplyActions(#[
1880                         new ActionNxResubmit(17 as short)
1881                     ])
1882                 ]
1883                 matchInfoList = #[
1884                     new MatchEthernetType(34525L),
1885                     new MatchIpProtocol(58 as short),
1886                     new MatchIcmpv6(133 as short, 0 as short),
1887                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1888                 ]
1889                 priority = 63010
1890                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
1891             ],
1892             new FlowEntityBuilder >> [
1893                 dpnId = 123bi
1894                 cookie = 110100480bi
1895                 flowId = "Egress_ICMPv6_123_987_135_Permit_"
1896                 flowName = "ACL"
1897                 instructionInfoList = #[
1898                     new InstructionApplyActions(#[
1899                         new ActionNxResubmit(17 as short)
1900                     ])
1901                 ]
1902                 matchInfoList = #[
1903                     new MatchEthernetType(34525L),
1904                     new MatchIpProtocol(58 as short),
1905                     new MatchIcmpv6(135 as short, 0 as short),
1906                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1907                 ]
1908                 priority = 63010
1909                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
1910             ],
1911             new FlowEntityBuilder >> [
1912                 dpnId = 123bi
1913                 cookie = 110100480bi
1914                 flowId = "Egress_ICMPv6_123_987_136_Permit_"
1915                 flowName = "ACL"
1916                 instructionInfoList = #[
1917                     new InstructionApplyActions(#[
1918                         new ActionNxResubmit(17 as short)
1919                     ])
1920                 ]
1921                 matchInfoList = #[
1922                     new MatchEthernetType(34525L),
1923                     new MatchIpProtocol(58 as short),
1924                     new MatchIcmpv6(136 as short, 0 as short),
1925                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1926                 ]
1927                 priority = 63010
1928                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
1929             ],
1930             new FlowEntityBuilder >> [
1931                 dpnId = 123bi
1932                 cookie = 110100480bi
1933                 flowId = "Egress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:F3_10.0.0.1/32"
1934                 flowName = "ACL"
1935                 instructionInfoList = #[
1936                     new InstructionGotoTable(211 as short)
1937                 ]
1938                 matchInfoList = #[
1939                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1940                     new MatchEthernetSource(new MacAddress(mac)),
1941                     new MatchEthernetType(2048L),
1942                     new MatchIpv4Source("10.0.0.1", "32")
1943                 ]
1944                 priority = 61010
1945                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
1946             ],
1947             new FlowEntityBuilder >> [
1948                 dpnId = 123bi
1949                 cookie = 1085218086715393bi
1950                 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
1951                 flowName = "ACL"
1952                 instructionInfoList = #[
1953                     new InstructionApplyActions(#[
1954                         new ActionDrop()
1955                     ])
1956                 ]
1957                 matchInfoList = #[
1958                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1959                     new NxMatchCtState(48L, 48L)
1960                 ]
1961                 priority = 62020
1962                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1963             ],
1964             new FlowEntityBuilder >> [
1965                 dpnId = 123bi
1966                 cookie = 110100480bi
1967                 flowId = "Ingress_Fixed_Conntrk_123_987_MatchEthernetType[2048]_Recirc"
1968             flowName = "ACL"
1969             instructionInfoList = #[
1970                 new InstructionApplyActions(#[
1971                     new ActionNxConntrack(2, 0, 0, 5000, NwConstants.EGRESS_ACL_FOR_EXISTING_TRAFFIC_TABLE)
1972                 ])
1973             ]
1974             matchInfoList = #[
1975                 new MatchEthernetType(2048L),
1976                 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1977                 ]
1978                 priority = 100
1979                 tableId = NwConstants.EGRESS_ACL_CONNTRACK_SENDER_TABLE
1980             ],
1981             new FlowEntityBuilder >> [
1982                 dpnId = 123bi
1983                 cookie = 110100480bi
1984                 flowId = "Egress_Fixed_Conntrk_123_987_MatchEthernetType[2048]_Recirc"
1985                 flowName = "ACL"
1986                 instructionInfoList = #[
1987                     new InstructionApplyActions(#[
1988                         new ActionNxConntrack(2, 0, 0, 5000, NwConstants.INGRESS_ACL_FOR_EXISTING_TRAFFIC_TABLE)
1989                     ])
1990                 ]
1991                 matchInfoList = #[
1992                     new MatchEthernetType(2048L),
1993                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1994                 ]
1995                 priority = 100
1996                 tableId = NwConstants.INGRESS_ACL_CONNTRACK_SENDER_TABLE
1997             ],
1998             new FlowEntityBuilder >> [
1999                 dpnId = 123bi
2000                 cookie = 110100480bi
2001                 flowId = "Egress_ARP_123_987_" + mac + "10.0.0.1/32"
2002                 flowName = "ACL"
2003                 instructionInfoList = #[
2004                     new InstructionApplyActions(#[
2005                         new ActionNxResubmit(17 as short)
2006                     ])
2007                 ]
2008                 matchInfoList = #[
2009                     new MatchEthernetType(2054L),
2010                     new MatchArpSha(new MacAddress(mac)),
2011                     new MatchEthernetSource(new MacAddress(mac)),
2012                     new MatchArpSpa(new Ipv4Prefix("10.0.0.1/32")),
2013                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
2014                 ]
2015                 priority = 63010
2016                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
2017             ],
2018             new FlowEntityBuilder >> [
2019                 dpnId = 123bi
2020                 cookie = 110100480bi
2021                 flowId = "Egress_L2Broadcast_123_987_" + mac
2022                 flowName = "ACL"
2023                 instructionInfoList = #[
2024                     new InstructionApplyActions(#[
2025                         new ActionNxResubmit(17 as short)
2026                     ])
2027                 ]
2028                 matchInfoList = #[
2029                     new MatchEthernetSource(new MacAddress(mac)),
2030                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
2031                 ]
2032                 priority = 61005
2033                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
2034             ],
2035             new FlowEntityBuilder >> [
2036                 cookie = 110100480bi
2037                 dpnId = 123bi
2038                 flowId = "Ingress_v4_Broadcast_123_987_10.0.0.255_Permit"
2039                 flowName = "ACL"
2040                 hardTimeOut = 0
2041                 idleTimeOut = 0
2042                 instructionInfoList = #[
2043                     new InstructionGotoTable(NwConstants.EGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
2044                 ]
2045                 matchInfoList = #[
2046                     new MatchEthernetDestination(new MacAddress("ff:ff:ff:ff:ff:ff")),
2047                     new MatchEthernetType(2048L),
2048                     new MatchIpv4Destination(new Ipv4Prefix("10.0.0.255/32")),
2049                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
2050                 ]
2051                 priority = 61010
2052                 sendFlowRemFlag = false
2053                 strictFlag = false
2054                 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
2055             ],
2056             new FlowEntityBuilder >> [
2057                 dpnId = 123bi
2058                 cookie = 110100480bi
2059                 flowId = "Ingress_Acl_Commit_Conntrack_123_987_MatchEthernetType[2048]"
2060                 flowName = "ACL"
2061                 instructionInfoList = #[
2062                     new InstructionApplyActions(#[
2063                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short,
2064                             Collections.singletonList(new ActionNxConntrack.NxCtMark(AclConstants.CT_MARK_EST_STATE))
2065                         ),
2066                         new ActionNxCtClear(),
2067                         new ActionNxResubmit(220 as short)
2068                     ])
2069                 ]
2070                 matchInfoList = #[
2071                     new MatchEthernetType(2048L),
2072                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
2073                     new MatchMetadata(0bi, 2bi)
2074                     ]
2075                 priority = 100
2076                 tableId = 247 as short
2077             ],
2078             new FlowEntityBuilder >> [
2079                 dpnId = 123bi
2080                 cookie = 110100480bi
2081                 flowId = "Ingress_Acl_Commit_Conntrack_123_987_MatchEthernetType[34525]"
2082                 flowName = "ACL"
2083                 instructionInfoList = #[
2084                     new InstructionApplyActions(#[
2085                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short,
2086                             Collections.singletonList(new ActionNxConntrack.NxCtMark(AclConstants.CT_MARK_EST_STATE))
2087                         ),
2088                         new ActionNxCtClear(),
2089                         new ActionNxResubmit(220 as short)
2090                     ])
2091                 ]
2092                 matchInfoList = #[
2093                     new MatchEthernetType(34525L),
2094                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
2095                     new MatchMetadata(0bi, 2bi)
2096                 ]
2097                 priority = 100
2098                 tableId = 247 as short
2099             ],
2100             new FlowEntityBuilder >> [
2101                 dpnId = 123bi
2102                 cookie = 110100480bi
2103                 flowId = "Egress_Acl_Commit_Conntrack_123_987_MatchEthernetType[2048]"
2104                 flowName = "ACL"
2105                 instructionInfoList = #[
2106                     new InstructionApplyActions(#[
2107                     new ActionNxConntrack(2, 1, 0, 5000, 255 as short,
2108                             Collections.singletonList(new ActionNxConntrack.NxCtMark(AclConstants.CT_MARK_EST_STATE))
2109                     ),
2110                     new ActionNxCtClear(),
2111                     new ActionNxResubmit(17 as short)
2112                     ])
2113                 ]
2114                 matchInfoList = #[
2115                     new MatchEthernetType(2048L),
2116                     new MatchMetadata(1085217976614912bi, 1152920405095219202bi)
2117                 ]
2118                 priority = 100
2119                 tableId = 217 as short
2120             ],
2121             new FlowEntityBuilder >> [
2122                 dpnId = 123bi
2123                 cookie = 110100480bi
2124                 flowId = "Egress_Acl_Commit_Conntrack_123_987_MatchEthernetType[34525]"
2125                 flowName = "ACL"
2126                 instructionInfoList = #[
2127                     new InstructionApplyActions(#[
2128                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short,
2129                             Collections.singletonList(new ActionNxConntrack.NxCtMark(AclConstants.CT_MARK_EST_STATE))
2130                         ),
2131                         new ActionNxCtClear(),
2132                         new ActionNxResubmit(17 as short)
2133                     ])
2134                 ]
2135                 matchInfoList = #[
2136                     new MatchEthernetType(34525L),
2137                         new MatchMetadata(1085217976614912bi, 1152920405095219202bi)
2138                 ]
2139                 priority = 100
2140                 tableId = 217 as short
2141             ],
2142             new FlowEntityBuilder >> [
2143                 dpnId = 123bi
2144                 cookie = 110100480bi
2145                 flowId = "Egress_Acl_Commit_Non_Conntrack_123_987"
2146                 flowName = "ACL"
2147                 instructionInfoList = #[
2148                     new InstructionApplyActions(#[
2149                         new ActionNxResubmit(17 as short)
2150                     ])
2151                 ]
2152                 matchInfoList = #[
2153                 new MatchMetadata(1085217976614914bi, 1152920405095219202bi)
2154                 ]
2155                 priority = 100
2156                 tableId = 217 as short
2157             ],
2158             new FlowEntityBuilder >> [
2159                 dpnId = 123bi
2160                 cookie = 1085218086715393bi
2161                 flowId = "Egress_123_987_Drop"
2162                 flowName = "ACL"
2163                 instructionInfoList = #[
2164                     new InstructionApplyActions(#[
2165                         new ActionDrop()
2166                     ])
2167                 ]
2168                 matchInfoList = #[
2169                    new MatchMetadata(1085217976614916bi, new BigInteger("0FFFFF0000000004", 16))
2170                 ]
2171                 priority = 62020
2172                 tableId = 217 as short
2173             ],
2174             new FlowEntityBuilder >> [
2175                 dpnId = 123bi
2176                 cookie = 110100480bi
2177                 flowId = "Ingress_Acl_Commit_Non_Conntrack_123_987"
2178                 flowName = "ACL"
2179                 instructionInfoList = #[
2180                     new InstructionApplyActions(#[
2181                     new ActionNxResubmit(220 as short)
2182                     ])
2183                 ]
2184                 matchInfoList = #[
2185                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
2186                     new MatchMetadata(2bi, 2bi)
2187                 ]
2188                 priority = 100
2189                 tableId = 247 as short
2190             ],
2191             new FlowEntityBuilder >> [
2192                 dpnId = 123bi
2193                 cookie = 1085218086715393bi
2194                 flowId = "Ingress_123_987_Drop"
2195                 flowName = "ACL"
2196                 instructionInfoList = #[
2197                     new InstructionApplyActions(#[
2198                         new ActionDrop()
2199                     ])
2200                 ]
2201                 matchInfoList = #[
2202                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
2203                     new MatchMetadata(4bi, 4bi)
2204                 ]
2205                 priority = 62020
2206                 tableId = 247 as short
2207             ],
2208             new FlowEntityBuilder >> [
2209                 dpnId = 123bi
2210                 cookie = 1085218086715393bi
2211                 flowId = "Ingress_Fixed_Acl_Rule_Miss_Drop_123_987"
2212                 flowName = "ACL"
2213                 instructionInfoList = #[
2214                     new InstructionApplyActions(#[
2215                         new ActionDrop()
2216                     ])
2217                 ]
2218                 matchInfoList = #[
2219                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
2220                 ]
2221                 priority = 50
2222                 tableId = 244 as short
2223             ],
2224             new FlowEntityBuilder >> [
2225                 dpnId = 123bi
2226                 cookie = 1085218086715393bi
2227                 flowId = "Egress_Fixed_Acl_Rule_Miss_Drop_123_987"
2228                 flowName = "ACL"
2229                 instructionInfoList = #[
2230                     new InstructionApplyActions(#[
2231                         new ActionDrop()
2232                     ])
2233                 ]
2234                 matchInfoList = #[
2235                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
2236                 ]
2237                 priority = 50
2238                 tableId = 214 as short
2239             ]
2240         ]
2241     }
2242
2243     protected def ingressCommitConntrack1() {
2244         val flowId1 = "Ingress_Acl_Commit_Conntrack_123_987_MatchEthernetType[2048]"
2245         val flowId2 = "Ingress_Acl_Commit_Conntrack_123_987_MatchEthernetType[34525]"
2246         #[
2247             new FlowEntityBuilder >> [
2248                     dpnId = 123bi
2249                     cookie = 110100480bi
2250                     flowId = flowId1
2251                     flowName = "ACL"
2252                     instructionInfoList = #[
2253                         new InstructionApplyActions(#[
2254                             new ActionNxConntrack(2, 1, 0, 5000, 255 as short,
2255                                 Collections.singletonList(new ActionNxConntrack.NxCtMark(AclConstants.CT_MARK_EST_STATE)
2256                                 )
2257                             ),
2258                             new ActionNxCtClear(),
2259                             new ActionNxResubmit(220 as short)
2260                         ])
2261                     ]
2262                     matchInfoList = #[
2263                         new MatchEthernetType(2048L),
2264                         new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
2265                         new MatchMetadata(0bi, 2bi)
2266                     ]
2267                     priority = 100
2268                     tableId = 247 as short
2269             ],
2270             new FlowEntityBuilder >> [
2271                 dpnId = 123bi
2272                 cookie = 110100480bi
2273                 flowId = flowId2
2274                 flowName = "ACL"
2275                 instructionInfoList = #[
2276                     new InstructionApplyActions(#[
2277                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short,
2278                             Collections.singletonList(new ActionNxConntrack.NxCtMark(AclConstants.CT_MARK_EST_STATE))
2279                         ),
2280                         new ActionNxCtClear(),
2281                         new ActionNxResubmit(220 as short)
2282                         ])
2283                     ]
2284                     matchInfoList = #[
2285                         new MatchEthernetType(34525L),
2286                         new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
2287                         new MatchMetadata(0bi, 2bi)
2288                     ]
2289                     priority = 100
2290                     tableId = 247 as short
2291             ]
2292         ]
2293     }
2294
2295     protected def egressCommitConntrack1() {
2296         val flowId1 = "Egress_Acl_Commit_Conntrack_123_987_MatchEthernetType[2048]"
2297         val flowId2 = "Egress_Acl_Commit_Conntrack_123_987_MatchEthernetType[34525]"
2298         #[
2299             new FlowEntityBuilder >> [
2300                 dpnId = 123bi
2301                 cookie = 110100480bi
2302                 flowId = flowId1
2303                 flowName = "ACL"
2304                 instructionInfoList = #[
2305                     new InstructionApplyActions(#[
2306                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short,
2307                             Collections.singletonList(new ActionNxConntrack.NxCtMark(AclConstants.CT_MARK_EST_STATE))
2308                         ),
2309                         new ActionNxCtClear(),
2310                         new ActionNxResubmit(17 as short)
2311                     ])
2312                 ]
2313                 matchInfoList = #[
2314                     new MatchEthernetType(2048L),
2315                     new MatchMetadata(1085217976614912bi, 1152920405095219202bi)
2316                 ]
2317                 priority = 100
2318                 tableId = 217 as short
2319             ],
2320             new FlowEntityBuilder >> [
2321                 dpnId = 123bi
2322                 cookie = 110100480bi
2323                 flowId = flowId2
2324                 flowName = "ACL"
2325                 instructionInfoList = #[
2326                     new InstructionApplyActions(#[
2327                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short,
2328                             Collections.singletonList(new ActionNxConntrack.NxCtMark(AclConstants.CT_MARK_EST_STATE))
2329                         ),
2330                         new ActionNxCtClear(),
2331                         new ActionNxResubmit(17 as short)
2332                     ])
2333                 ]
2334                 matchInfoList = #[
2335                     new MatchEthernetType(34525L),
2336                         new MatchMetadata(1085217976614912bi, 1152920405095219202bi)
2337                 ]
2338                 priority = 100
2339                 tableId = 217 as short
2340             ]
2341         ]
2342     }
2343
2344     protected def egressCommitNonConntrack1() {
2345         val flowId1 = "Egress_Acl_Commit_Non_Conntrack_123_987"
2346         #[
2347             new FlowEntityBuilder >> [
2348                 dpnId = 123bi
2349                 cookie = 110100480bi
2350                 flowId = flowId1
2351                 flowName = "ACL"
2352                 instructionInfoList = #[
2353                     new InstructionApplyActions(#[
2354                     new ActionNxResubmit(17 as short)
2355                     ])
2356                 ]
2357                 matchInfoList = #[
2358                     new MatchMetadata(1085217976614914bi, 1152920405095219202bi)
2359                 ]
2360                 priority = 100
2361                 tableId = 217 as short
2362             ],
2363             new FlowEntityBuilder >> [
2364                 dpnId = 123bi
2365                 cookie = 1085218086715393bi
2366                 flowId = "Egress_123_987_Drop"
2367                 flowName = "ACL"
2368                 instructionInfoList = #[
2369                     new InstructionApplyActions(#[
2370                         new ActionDrop()
2371                     ])
2372                 ]
2373                 matchInfoList = #[
2374                     new MatchMetadata(1085217976614916bi, new BigInteger("0FFFFF0000000004", 16))
2375                 ]
2376                 priority = 62020
2377                 tableId = 217 as short
2378             ]
2379         ]
2380     }
2381
2382     protected def ingressCommitNonConntrack1() {
2383         val flowId1 = "Ingress_Acl_Commit_Non_Conntrack_123_987"
2384         #[
2385             new FlowEntityBuilder >> [
2386                 dpnId = 123bi
2387                 cookie = 110100480bi
2388                 flowId = flowId1
2389                 flowName = "ACL"
2390                 instructionInfoList = #[
2391                     new InstructionApplyActions(#[
2392                         new ActionNxResubmit(220 as short)
2393                     ])
2394                 ]
2395                  matchInfoList = #[
2396                      new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
2397                          new MatchMetadata(2bi, 2bi)
2398                      ]
2399                  priority = 100
2400                  tableId = 247 as short
2401             ],
2402             new FlowEntityBuilder >> [
2403                 dpnId = 123bi
2404                 cookie = 1085218086715393bi
2405                 flowId = "Ingress_123_987_Drop"
2406                 flowName = "ACL"
2407                 instructionInfoList = #[
2408                     new InstructionApplyActions(#[
2409                         new ActionDrop()
2410                     ])
2411                 ]
2412                 matchInfoList = #[
2413                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
2414                     new MatchMetadata(4bi, 4bi)
2415                 ]
2416                 priority = 62020
2417                 tableId = 247 as short
2418             ]
2419         ]
2420     }
2421
2422     protected def ingressfixedAclMissDrop1() {
2423         val flowId1 = "Ingress_Fixed_Acl_Rule_Miss_Drop_123_987"
2424         #[
2425             new FlowEntityBuilder >> [
2426                 dpnId = 123bi
2427                 cookie = 1085218086715393bi
2428                 flowId = flowId1
2429                 flowName = "ACL"
2430                 instructionInfoList = #[
2431                     new InstructionApplyActions(#[
2432                         new ActionDrop()
2433                     ])
2434                 ]
2435                 matchInfoList = #[
2436                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
2437                 ]
2438                 priority = 50
2439                 tableId = 244 as short
2440             ]
2441         ]
2442     }
2443
2444     protected def egressfixedAclMissDrop1() {
2445         val flowId1 = "Egress_Fixed_Acl_Rule_Miss_Drop_123_987"
2446         #[
2447             new FlowEntityBuilder >> [
2448                 dpnId = 123bi
2449                 cookie = 1085218086715393bi
2450                 flowId = flowId1
2451                 flowName = "ACL"
2452                 instructionInfoList = #[
2453                     new InstructionApplyActions(#[
2454                         new ActionDrop()
2455                     ])
2456                 ]
2457                 matchInfoList = #[
2458                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
2459                 ]
2460                 priority = 50
2461                 tableId = 214 as short
2462             ]
2463         ]
2464     }
2465
2466     protected def ingressDispatcherFirst() {
2467         val flowId1 = "Ingress_ACL_Dispatcher_First_123_987_2"
2468         #[
2469             new FlowEntityBuilder >> [
2470                 dpnId = 123bi
2471                 cookie = 110100480bi
2472                 flowId = flowId1
2473                 flowName = "ACL"
2474                 instructionInfoList = #[
2475                     new InstructionGotoTable(245 as short),
2476                     new InstructionWriteMetadata(32bi, 16777200bi)
2477                 ]
2478                 matchInfoList = #[
2479                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
2480                 ]
2481                 priority = IdHelper.getId(flowId1)
2482                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
2483             ]
2484         ]
2485     }
2486
2487     protected def ingressDispatcherLast() {
2488         val flowId1 = "Ingress_ACL_Dispatcher_Last_123_987_2"
2489         #[
2490             new FlowEntityBuilder >> [
2491                 dpnId = 123bi
2492                 cookie = 1085218086715393bi
2493                 flowId = flowId1
2494                 flowName = "ACL"
2495                 instructionInfoList = #[
2496                     new InstructionApplyActions(#[
2497                         new ActionDrop()
2498                     ])
2499                 ]
2500                 matchInfoList = #[
2501                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
2502                     new MatchMetadata(32bi, 16777200bi)
2503                 ]
2504                 priority = IdHelper.getId(flowId1)
2505                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
2506             ]
2507         ]
2508     }
2509
2510     protected def egressDispatcherFirst() {
2511         val flowId1 = "Egress_ACL_Dispatcher_First_123_987_2"
2512         #[
2513             new FlowEntityBuilder >> [
2514                 dpnId = 123bi
2515                 cookie = 110100480bi
2516                 flowId = flowId1
2517                 flowName = "ACL"
2518                 instructionInfoList = #[
2519                     new InstructionGotoTable(215 as short),
2520                     new InstructionWriteMetadata(32bi, 16777200bi)
2521                 ]
2522                 matchInfoList = #[
2523                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
2524                 ]
2525                 priority = IdHelper.getId(flowId1)
2526                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
2527             ]
2528         ]
2529     }
2530
2531     protected def egressDispatcherLast() {
2532         val flowId1 = "Egress_ACL_Dispatcher_Last_123_987_2"
2533         #[
2534             new FlowEntityBuilder >> [
2535                 dpnId = 123bi
2536                 cookie = 1085218086715393bi
2537                 flowId = flowId1
2538                 flowName = "ACL"
2539                 instructionInfoList = #[
2540                     new InstructionApplyActions(#[
2541                         new ActionDrop()
2542                     ])
2543                 ]
2544                 matchInfoList = #[
2545                     new MatchMetadata(1085217976614944bi, 1152920405111996400bi)
2546                 ]
2547                 priority = IdHelper.getId(flowId1)
2548                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
2549             ]
2550         ]
2551     }
2552
2553     protected def egressDispatcherFirst1() {
2554             val flowId1 = "Egress_ACL_Dispatcher_First_123_987_4"
2555             #[
2556                 new FlowEntityBuilder >> [
2557                     dpnId = 123bi
2558                     cookie = 110100480bi
2559                     flowId = flowId1
2560                     flowName = "ACL"
2561                     instructionInfoList = #[
2562                         new InstructionGotoTable(215 as short),
2563                         new InstructionWriteMetadata(64bi, 16777200bi)
2564                     ]
2565                     matchInfoList = #[
2566                         new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
2567                     ]
2568                     priority = IdHelper.getId(flowId1)
2569                     tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
2570                 ]
2571             ]
2572         }
2573
2574         protected def egressDispatcherLast1() {
2575             val flowId1 = "Egress_ACL_Dispatcher_Last_123_987_4"
2576             #[
2577                 new FlowEntityBuilder >> [
2578                     dpnId = 123bi
2579                     cookie = 1085218086715393bi
2580                     flowId = flowId1
2581                     flowName = "ACL"
2582                     instructionInfoList = #[
2583                         new InstructionApplyActions(#[
2584                             new ActionDrop()
2585                         ])
2586                     ]
2587                     matchInfoList = #[
2588                         new MatchMetadata(1085217976614976bi, 1152920405111996400bi)
2589                     ]
2590                     priority = IdHelper.getId(flowId1)
2591                     tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
2592                 ]
2593             ]
2594         }
2595 }