use of org.opendaylight.genius.mdsalutil.InstructionInfo in project netvirt by opendaylight.
the class ElanNodeListener method setupExternalL2vniTableMissFlow.
private void setupExternalL2vniTableMissFlow(BigInteger dpnId) {
List<MatchInfo> matches = new ArrayList<>();
List<ActionInfo> actionsInfos = Collections.singletonList(new ActionNxResubmit(NwConstants.LPORT_DISPATCHER_TABLE));
List<InstructionInfo> instructions = Collections.singletonList(new InstructionApplyActions(actionsInfos));
FlowEntity flowEntity = MDSALUtil.buildFlowEntity(dpnId, NwConstants.L2VNI_EXTERNAL_TUNNEL_DEMUX_TABLE, getTableMissFlowRef(NwConstants.L2VNI_EXTERNAL_TUNNEL_DEMUX_TABLE), 0, "External L2VNI Table Miss Flow", 0, 0, ElanConstants.COOKIE_L2VNI_DEMUX, matches, instructions);
mdsalManager.installFlow(flowEntity);
}
use of org.opendaylight.genius.mdsalutil.InstructionInfo in project netvirt by opendaylight.
the class EgressCountersServiceImpl method syncCounterFlows.
@Override
public void syncCounterFlows(ElementCountersRequest ecr, int operation) {
int lportTag = ecr.getLportTag();
List<MatchInfoBase> flowMatches = CountersServiceUtils.getCounterFlowMatch(ecr, lportTag, ElementCountersDirection.EGRESS);
List<ActionInfo> actionsInfos = new ArrayList<>();
List<InstructionInfo> instructions = CountersServiceUtils.getDispatcherTableResubmitInstructions(actionsInfos, ElementCountersDirection.EGRESS);
BigInteger dpn = ecr.getDpn();
String flowName = createFlowName(ecr, lportTag, dpn);
syncFlow(dpn, NwConstants.EGRESS_COUNTERS_TABLE, flowName, CountersServiceUtils.COUNTER_TABLE_COUNTER_FLOW_PRIORITY, CountersServiceUtils.COUNTER_FLOW_NAME, 0, 0, CountersServiceUtils.COOKIE_COUNTERS_BASE, flowMatches, instructions, operation);
}
use of org.opendaylight.genius.mdsalutil.InstructionInfo in project netvirt by opendaylight.
the class EgressCountersServiceImpl method installDefaultCounterRules.
@Override
public void installDefaultCounterRules(String interfaceId) {
BigInteger dpn = interfaceManager.getDpnForInterface(interfaceId);
String defaultFlowName = CountersServiceUtils.DEFAULT_EGRESS_COUNTER_FLOW_PREFIX + dpn + interfaceId;
List<MatchInfoBase> defaultFlowMatches = new ArrayList<>();
List<ActionInfo> actionsInfos = new ArrayList<>();
List<InstructionInfo> instructions = CountersServiceUtils.getDispatcherTableResubmitInstructions(actionsInfos, ElementCountersDirection.EGRESS);
syncFlow(dpn, NwConstants.EGRESS_COUNTERS_TABLE, defaultFlowName, CountersServiceUtils.COUNTER_TABLE_DEFAULT_FLOW_PRIORITY, CountersServiceUtils.COUNTER_FLOW_NAME, 0, 0, CountersServiceUtils.COOKIE_COUNTERS_BASE, defaultFlowMatches, instructions, NwConstants.ADD_FLOW);
}
use of org.opendaylight.genius.mdsalutil.InstructionInfo in project netvirt by opendaylight.
the class IngressCountersServiceImpl method installDefaultCounterRules.
@Override
public void installDefaultCounterRules(String interfaceId) {
BigInteger dpn = interfaceManager.getDpnForInterface(interfaceId);
String defaultFlowName = CountersServiceUtils.DEFAULT_INGRESS_COUNTER_FLOW_PREFIX + dpn + interfaceId;
List<MatchInfoBase> defaultFlowMatches = new ArrayList<>();
List<ActionInfo> actionsInfos = new ArrayList<>();
List<InstructionInfo> instructions = CountersServiceUtils.getDispatcherTableResubmitInstructions(actionsInfos, ElementCountersDirection.INGRESS);
syncFlow(dpn, NwConstants.INGRESS_COUNTERS_TABLE, defaultFlowName, CountersServiceUtils.COUNTER_TABLE_DEFAULT_FLOW_PRIORITY, CountersServiceUtils.COUNTER_FLOW_NAME, 0, 0, CountersServiceUtils.COOKIE_COUNTERS_BASE, defaultFlowMatches, instructions, NwConstants.ADD_FLOW);
}
use of org.opendaylight.genius.mdsalutil.InstructionInfo in project netvirt by opendaylight.
the class VpnServiceChainUtils method buildLportFlowDispForVpnToScf.
/**
* Creates the flow that sends the packet from the VPN to the SCF pipeline.
* This usually happens when there is an ScHop whose ingressPort is a
* VpnPseudoPort.
* <ul>
* <li>Matches: lportTag = vpnPseudoLPortTag, SI = 1
* <li>Actions: setMetadata(scfTag), Go to: UpSubFilter table
* </ul>
*/
public static FlowEntity buildLportFlowDispForVpnToScf(BigInteger dpId, int lportTag, long scfTag, short gotoTableId) {
List<InstructionInfo> instructions = new ArrayList<>();
List<ActionInfo> actionsInfos = new ArrayList<>();
actionsInfos.add(new ActionRegLoad(NxmNxReg2.class, 0, 31, scfTag));
instructions.add(new InstructionApplyActions(actionsInfos));
instructions.add(new InstructionGotoTable(gotoTableId));
String flowRef = getL3VpnToScfLportDispatcherFlowRef(lportTag);
List<MatchInfo> matches = buildMatchOnLportTagAndSI(lportTag, ServiceIndex.getIndex(NwConstants.SCF_SERVICE_NAME, NwConstants.SCF_SERVICE_INDEX));
return MDSALUtil.buildFlowEntity(dpId, NwConstants.LPORT_DISPATCHER_TABLE, flowRef, CloudServiceChainConstants.DEFAULT_SCF_FLOW_PRIORITY, flowRef, 0, 0, getCookieSCHop(scfTag), matches, instructions);
}
Aggregations