Search in sources :

Example 1 with ActionNxResubmit

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);
}
Also used : ActionPuntToController(org.opendaylight.genius.mdsalutil.actions.ActionPuntToController) ActionNxResubmit(org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit) FlowEntity(org.opendaylight.genius.mdsalutil.FlowEntity)

Example 2 with ActionNxResubmit

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);
}
Also used : InstructionInfo(org.opendaylight.genius.mdsalutil.InstructionInfo) MatchInfo(org.opendaylight.genius.mdsalutil.MatchInfo) ArrayList(java.util.ArrayList) ActionNxResubmit(org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit) ActionInfo(org.opendaylight.genius.mdsalutil.ActionInfo) InstructionApplyActions(org.opendaylight.genius.mdsalutil.instructions.InstructionApplyActions) FlowEntity(org.opendaylight.genius.mdsalutil.FlowEntity)

Example 3 with ActionNxResubmit

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;
}
Also used : InstructionInfo(org.opendaylight.genius.mdsalutil.InstructionInfo) ArrayList(java.util.ArrayList) ActionNxResubmit(org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit) InstructionApplyActions(org.opendaylight.genius.mdsalutil.instructions.InstructionApplyActions)

Example 4 with ActionNxResubmit

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;
}
Also used : MatchMetadata(org.opendaylight.genius.mdsalutil.matches.MatchMetadata) ArrayList(java.util.ArrayList) ActionInfo(org.opendaylight.genius.mdsalutil.ActionInfo) FlowEntity(org.opendaylight.genius.mdsalutil.FlowEntity) ActionNxLoadInPort(org.opendaylight.genius.mdsalutil.actions.ActionNxLoadInPort) MatchInfo(org.opendaylight.genius.mdsalutil.MatchInfo) InstructionInfo(org.opendaylight.genius.mdsalutil.InstructionInfo) ActionNxResubmit(org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit) InstructionApplyActions(org.opendaylight.genius.mdsalutil.instructions.InstructionApplyActions)

Example 5 with ActionNxResubmit

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;
}
Also used : MatchMetadata(org.opendaylight.genius.mdsalutil.matches.MatchMetadata) ArrayList(java.util.ArrayList) ActionInfo(org.opendaylight.genius.mdsalutil.ActionInfo) FlowEntity(org.opendaylight.genius.mdsalutil.FlowEntity) ActionNxLoadInPort(org.opendaylight.genius.mdsalutil.actions.ActionNxLoadInPort) MatchInfo(org.opendaylight.genius.mdsalutil.MatchInfo) InstructionInfo(org.opendaylight.genius.mdsalutil.InstructionInfo) ActionNxResubmit(org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit) InstructionApplyActions(org.opendaylight.genius.mdsalutil.instructions.InstructionApplyActions)

Aggregations

ActionNxResubmit (org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit)35 ArrayList (java.util.ArrayList)32 ActionInfo (org.opendaylight.genius.mdsalutil.ActionInfo)30 InstructionApplyActions (org.opendaylight.genius.mdsalutil.instructions.InstructionApplyActions)28 InstructionInfo (org.opendaylight.genius.mdsalutil.InstructionInfo)26 MatchInfo (org.opendaylight.genius.mdsalutil.MatchInfo)19 FlowEntity (org.opendaylight.genius.mdsalutil.FlowEntity)17 MatchMetadata (org.opendaylight.genius.mdsalutil.matches.MatchMetadata)14 ActionNxLoadInPort (org.opendaylight.genius.mdsalutil.actions.ActionNxLoadInPort)7 BigInteger (java.math.BigInteger)5 MatchInfoBase (org.opendaylight.genius.mdsalutil.MatchInfoBase)5 MacAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress)5 CopyOnWriteArrayList (java.util.concurrent.CopyOnWriteArrayList)4 WriteTransaction (org.opendaylight.controller.md.sal.binding.api.WriteTransaction)4 ActionSetFieldEthernetSource (org.opendaylight.genius.mdsalutil.actions.ActionSetFieldEthernetSource)4 NxMatchCtState (org.opendaylight.genius.mdsalutil.nxmatches.NxMatchCtState)4 RpcResult (org.opendaylight.yangtools.yang.common.RpcResult)4 ActionRegLoad (org.opendaylight.genius.mdsalutil.actions.ActionRegLoad)3 MatchIpv4Destination (org.opendaylight.genius.mdsalutil.matches.MatchIpv4Destination)3 List (java.util.List)2