use of org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit in project netvirt by opendaylight.
the class ElanNodeListener method createArpResponseMatchFlows.
private void createArpResponseMatchFlows(BigInteger dpId, WriteTransaction writeFlowTx) {
FlowEntity arpRepArpCheckTbl = ArpResponderUtil.createArpDefaultFlow(dpId, NwConstants.ARP_CHECK_TABLE, NwConstants.ARP_REPLY, () -> Arrays.asList(MatchEthernetType.ARP, MatchArpOp.REPLY), () -> Arrays.asList(new ActionPuntToController(), new ActionNxResubmit(NwConstants.ELAN_BASE_TABLE)));
LOG.trace("Invoking MDSAL to install Arp Reply Match Flow for Table {} ", NwConstants.ARP_CHECK_TABLE);
mdsalManager.addFlowToTx(arpRepArpCheckTbl, writeFlowTx);
}
use of org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit in project netvirt by opendaylight.
the class ElanNodeListener method addSmacBaseTableFlow.
private void addSmacBaseTableFlow(BigInteger dpId) {
// T48 - resubmit to T49 & T50
List<ActionInfo> actionsInfo = new ArrayList<>();
actionsInfo.add(new ActionNxResubmit(NwConstants.ELAN_SMAC_LEARNED_TABLE));
actionsInfo.add(new ActionNxResubmit(NwConstants.ELAN_SMAC_TABLE));
List<InstructionInfo> mkInstruct = new ArrayList<>();
mkInstruct.add(new InstructionApplyActions(actionsInfo));
List<MatchInfo> mkMatch = new ArrayList<>();
FlowEntity doubleResubmitTable = MDSALUtil.buildFlowEntity(dpId, NwConstants.ELAN_BASE_TABLE, getTableMissFlowRef(NwConstants.ELAN_BASE_TABLE), 0, "Elan sMac resubmit table", 0, 0, ElanConstants.COOKIE_ELAN_BASE_SMAC, mkMatch, mkInstruct);
mdsalManager.installFlow(doubleResubmitTable);
}
use of org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit in project netvirt by opendaylight.
the class CountersServiceUtils method getDispatcherTableResubmitInstructions.
public static List<InstructionInfo> getDispatcherTableResubmitInstructions(List<ActionInfo> actionsInfos, ElementCountersDirection direction) {
short dispatcherTableId = NwConstants.LPORT_DISPATCHER_TABLE;
if (ElementCountersDirection.EGRESS.equals(direction)) {
dispatcherTableId = NwConstants.EGRESS_LPORT_DISPATCHER_TABLE;
}
List<InstructionInfo> instructions = new ArrayList<>();
actionsInfos.add(new ActionNxResubmit(dispatcherTableId));
instructions.add(new InstructionApplyActions(actionsInfos));
return instructions;
}
use of org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit in project netvirt by opendaylight.
the class ExternalRoutersListener method buildNaptPfibFlowEntity.
public FlowEntity buildNaptPfibFlowEntity(BigInteger dpId, long segmentId) {
LOG.debug("buildNaptPfibFlowEntity : called for dpId {}, segmentId {}", dpId, segmentId);
List<MatchInfo> matches = new ArrayList<>();
matches.add(MatchEthernetType.IPV4);
matches.add(new MatchMetadata(MetaDataUtil.getVpnIdMetadata(segmentId), MetaDataUtil.METADATA_MASK_VRFID));
ArrayList<ActionInfo> listActionInfo = new ArrayList<>();
ArrayList<InstructionInfo> instructionInfo = new ArrayList<>();
listActionInfo.add(new ActionNxLoadInPort(BigInteger.ZERO));
listActionInfo.add(new ActionNxResubmit(NwConstants.L3_FIB_TABLE));
instructionInfo.add(new InstructionApplyActions(listActionInfo));
String flowRef = getFlowRefTs(dpId, NwConstants.NAPT_PFIB_TABLE, segmentId);
FlowEntity flowEntity = MDSALUtil.buildFlowEntity(dpId, NwConstants.NAPT_PFIB_TABLE, flowRef, NatConstants.DEFAULT_PSNAT_FLOW_PRIORITY, flowRef, 0, 0, NwConstants.COOKIE_SNAT_TABLE, matches, instructionInfo);
LOG.debug("buildNaptPfibFlowEntity : Returning NaptPFib Flow Entity {}", flowEntity);
return flowEntity;
}
use of org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit in project netvirt by opendaylight.
the class ExternalRoutersListener method buildNaptPfibFlowEntityWithUpdatedVpnId.
public FlowEntity buildNaptPfibFlowEntityWithUpdatedVpnId(BigInteger dpId, long segmentId, long changedVpnId) {
LOG.debug("buildNaptPfibFlowEntityWithUpdatedVpnId : called for dpId {}, " + "segmentId {}, BGP VPN ID {}", dpId, segmentId, changedVpnId);
List<MatchInfo> matches = new ArrayList<>();
matches.add(MatchEthernetType.IPV4);
matches.add(new MatchMetadata(MetaDataUtil.getVpnIdMetadata(changedVpnId), MetaDataUtil.METADATA_MASK_VRFID));
ArrayList<ActionInfo> listActionInfo = new ArrayList<>();
ArrayList<InstructionInfo> instructionInfo = new ArrayList<>();
listActionInfo.add(new ActionNxLoadInPort(BigInteger.ZERO));
listActionInfo.add(new ActionNxResubmit(NwConstants.L3_FIB_TABLE));
instructionInfo.add(new InstructionApplyActions(listActionInfo));
String flowRef = getFlowRefTs(dpId, NwConstants.NAPT_PFIB_TABLE, segmentId);
FlowEntity flowEntity = MDSALUtil.buildFlowEntity(dpId, NwConstants.NAPT_PFIB_TABLE, flowRef, NatConstants.DEFAULT_PSNAT_FLOW_PRIORITY, flowRef, 0, 0, NwConstants.COOKIE_SNAT_TABLE, matches, instructionInfo);
LOG.debug("buildNaptPfibFlowEntityWithUpdatedVpnId : Returning NaptPFib Flow Entity {}", flowEntity);
return flowEntity;
}
Aggregations