use of org.opendaylight.genius.mdsalutil.instructions.InstructionGotoTable in project netvirt by opendaylight.
the class AclServiceOFFlowBuilder method getGotoInstructionInfo.
/**
* Gets the goto instruction info which specifies goto to the specified
* table.
*
* @param gotoTableId the goto table id
* @return the goto instruction info
*/
public static List<InstructionInfo> getGotoInstructionInfo(short gotoTableId) {
List<InstructionInfo> instructions = new ArrayList<>();
instructions.add(new InstructionGotoTable(gotoTableId));
return instructions;
}
use of org.opendaylight.genius.mdsalutil.instructions.InstructionGotoTable in project netvirt by opendaylight.
the class EgressAclServiceImpl method programGotoClassifierTableRules.
@Override
protected void programGotoClassifierTableRules(BigInteger dpId, List<AllowedAddressPairs> aaps, int lportTag, int addOrRemove) {
List<AllowedAddressPairs> filteredAAPs = AclServiceUtils.excludeMulticastAAPs(aaps);
for (AllowedAddressPairs aap : filteredAAPs) {
IpPrefixOrAddress attachIp = aap.getIpAddress();
MacAddress mac = aap.getMacAddress();
List<MatchInfoBase> matches = new ArrayList<>();
matches.add(AclServiceUtils.buildLPortTagMatch(lportTag, serviceMode));
matches.add(new MatchEthernetSource(mac));
matches.addAll(AclServiceUtils.buildIpMatches(attachIp, MatchCriteria.MATCH_SOURCE));
List<InstructionInfo> gotoInstructions = new ArrayList<>();
gotoInstructions.add(new InstructionGotoTable(getAclConntrackClassifierTable()));
String flowName = "Egress_Fixed_Goto_Classifier_" + dpId + "_" + lportTag + "_" + mac.getValue() + "_" + String.valueOf(attachIp.getValue());
syncFlow(dpId, getAclAntiSpoofingTable(), flowName, AclConstants.PROTO_MATCH_PRIORITY, "ACL", 0, 0, AclConstants.COOKIE_ACL_BASE, matches, gotoInstructions, addOrRemove);
}
}
use of org.opendaylight.genius.mdsalutil.instructions.InstructionGotoTable in project netvirt by opendaylight.
the class IngressAclServiceImpl method programGotoClassifierTableRules.
@Override
protected void programGotoClassifierTableRules(BigInteger dpId, List<AllowedAddressPairs> aaps, int lportTag, int addOrRemove) {
for (AllowedAddressPairs aap : aaps) {
IpPrefixOrAddress attachIp = aap.getIpAddress();
MacAddress mac = aap.getMacAddress();
List<MatchInfoBase> matches = new ArrayList<>();
matches.add(AclServiceUtils.buildLPortTagMatch(lportTag, serviceMode));
matches.add(new MatchEthernetDestination(mac));
matches.addAll(AclServiceUtils.buildIpMatches(attachIp, MatchCriteria.MATCH_DESTINATION));
List<InstructionInfo> gotoInstructions = new ArrayList<>();
gotoInstructions.add(new InstructionGotoTable(getAclConntrackClassifierTable()));
String flowName = "Ingress_Fixed_Goto_Classifier_" + dpId + "_" + lportTag + "_" + mac.getValue() + "_" + String.valueOf(attachIp.getValue());
syncFlow(dpId, getAclAntiSpoofingTable(), flowName, AclConstants.PROTO_MATCH_PRIORITY, "ACL", 0, 0, AclConstants.COOKIE_ACL_BASE, matches, gotoInstructions, addOrRemove);
}
}
use of org.opendaylight.genius.mdsalutil.instructions.InstructionGotoTable in project netvirt by opendaylight.
the class IPV6InternetDefaultRouteProgrammer method buildIPv6FallbacktoExternalVpn.
private FlowEntity buildIPv6FallbacktoExternalVpn(BigInteger dpId, long bgpVpnId, long routerId) {
List<MatchInfo> matches = new ArrayList<>();
matches.add(MatchEthernetType.IPV6);
// add match for vrfid
matches.add(new MatchMetadata(MetaDataUtil.getVpnIdMetadata(bgpVpnId), MetaDataUtil.METADATA_MASK_VRFID));
List<InstructionInfo> instructions = new ArrayList<>();
instructions.add(new InstructionGotoTable(NwConstants.EXTERNAL_TUNNEL_TABLE));
String defaultIPv6 = "0:0:0:0:0:0:0:0";
String flowRef = getIPv6FlowRefL3(dpId, NwConstants.L3_FIB_TABLE, defaultIPv6, routerId);
FlowEntity flowEntity = MDSALUtil.buildFlowEntity(dpId, NwConstants.L3_FIB_TABLE, flowRef, NwConstants.TABLE_MISS_PRIORITY, flowRef, /* "L3 ipv6 internet default route",*/
0, 0, NwConstants.COOKIE_VM_FIB_TABLE, matches, instructions);
return flowEntity;
}
Aggregations