Class OvsOfdpaPipeline
- java.lang.Object
-
- org.onosproject.net.driver.AbstractBehaviour
-
- org.onosproject.net.driver.AbstractHandlerBehaviour
-
- org.onosproject.driver.pipeline.ofdpa.Ofdpa2Pipeline
-
- org.onosproject.driver.pipeline.ofdpa.OvsOfdpaPipeline
-
- All Implemented Interfaces:
org.onosproject.net.behaviour.Pipeliner,org.onosproject.net.driver.Behaviour,org.onosproject.net.driver.HandlerBehaviour
public class OvsOfdpaPipeline extends Ofdpa2Pipeline
Driver for Open vSwitch emulation of the OFDPA pipeline.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.onosproject.driver.pipeline.ofdpa.Ofdpa2Pipeline
Ofdpa2Pipeline.RetryFlows
-
-
Field Summary
-
Fields inherited from class org.onosproject.driver.pipeline.ofdpa.Ofdpa2Pipeline
appKryo, coreService, deviceId, deviceService, driverId, flowObjectiveStore, flowRuleService, groupHandler, groupService, serviceDirectory
-
-
Constructor Summary
Constructors Constructor Description OvsOfdpaPipeline()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinit(org.onosproject.net.DeviceId deviceId, org.onosproject.net.behaviour.PipelinerContext context)protected voidinitDriverId()protected voidinitGroupHander(org.onosproject.net.behaviour.PipelinerContext context)protected voidinitializePipeline()protected java.util.Collection<org.onosproject.net.flow.FlowRule>processDoubleTaggedFwd(org.onosproject.net.flowobjective.ForwardingObjective fwd)Handles forwarding rules to the IP Unicast Routing.protected java.util.Collection<org.onosproject.net.flow.FlowRule>processEgress(org.onosproject.net.flowobjective.ForwardingObjective fwd)In the OF-DPA 2.0 pipeline, egress forwarding objectives go to the egress tables.protected java.util.List<java.util.List<org.onosproject.net.flow.FlowRule>>processEthDstFilter(org.onosproject.net.flow.criteria.PortCriterion portCriterion, org.onosproject.net.flow.criteria.EthCriterion ethCriterion, org.onosproject.net.flow.criteria.VlanIdCriterion vidCriterion, org.onlab.packet.VlanId assignedVlan, org.onlab.packet.MacAddress unicastMac, org.onosproject.core.ApplicationId applicationId)Allows routed packets with correct destination MAC to be directed to unicast routing table, multicast routing table or MPLS forwarding table.protected java.util.List<java.util.List<org.onosproject.net.flow.FlowRule>>processEthDstOnlyFilter(org.onosproject.net.flow.criteria.EthCriterion ethCriterion, org.onosproject.core.ApplicationId applicationId)protected java.util.Collection<org.onosproject.net.flow.FlowRule>processEthDstSpecific(org.onosproject.net.flowobjective.ForwardingObjective fwd)Handles forwarding rules to the L2 bridging table.protected java.util.Collection<org.onosproject.net.flow.FlowRule>processEthTypeSpecific(org.onosproject.net.flowobjective.ForwardingObjective fwd)Handles forwarding rules to the IP and MPLS tables.protected voidprocessFilter(org.onosproject.net.flowobjective.FilteringObjective filteringObjective, boolean install, org.onosproject.core.ApplicationId applicationId)As per OFDPA 2.0 TTP, filtering of VLAN ids and MAC addresses (for routing) configured on switch ports happen in different tables.protected java.util.List<java.util.List<org.onosproject.net.flow.FlowRule>>processVlanIdFilter(org.onosproject.net.flow.criteria.PortCriterion portCriterion, org.onosproject.net.flow.criteria.VlanIdCriterion vidCriterion, org.onlab.packet.VlanId assignedVlan, org.onosproject.core.ApplicationId applicationId, boolean install)Internal implementation of processVlanIdFilter.protected booleanrequireEthType()Determines whether this pipeline requires one additional flow matching on ethType 0x86dd in ACL table.protected booleanrequireVlanExtensions()Determines whether this pipeline requires OFDPA match and set VLAN extensions.protected org.onosproject.net.flow.TrafficTreatment.BuilderversatileTreatmentBuilder(org.onosproject.net.flowobjective.ForwardingObjective fwd)Helper function to create traffic treatment builder for versatile forwarding objectives.-
Methods inherited from class org.onosproject.driver.pipeline.ofdpa.Ofdpa2Pipeline
filter, forward, getNextMappings, matchInPortTmacTable, next, processEthTypeSpecificInternal, processVersatile, requireMplsBosMatch, requireMplsPop, requireMplsTtlModification, requirePuntTable, requireUnicastBeforeMulticast, shouldRetry, supportIpv6L4Dst, supportsUnicastBlackHole
-
Methods inherited from class org.onosproject.net.driver.AbstractHandlerBehaviour
handler, setHandler
-
-
-
-
Method Detail
-
requireVlanExtensions
protected boolean requireVlanExtensions()
Description copied from class:Ofdpa2PipelineDetermines whether this pipeline requires OFDPA match and set VLAN extensions.- Overrides:
requireVlanExtensionsin classOfdpa2Pipeline- Returns:
- true to use the extensions
-
requireEthType
protected boolean requireEthType()
Description copied from class:Ofdpa2PipelineDetermines whether this pipeline requires one additional flow matching on ethType 0x86dd in ACL table.- Overrides:
requireEthTypein classOfdpa2Pipeline- Returns:
- true to create one additional flow matching on ethType 0x86dd in ACL table
-
initDriverId
protected void initDriverId()
- Overrides:
initDriverIdin classOfdpa2Pipeline
-
initGroupHander
protected void initGroupHander(org.onosproject.net.behaviour.PipelinerContext context)
- Overrides:
initGroupHanderin classOfdpa2Pipeline
-
init
public void init(org.onosproject.net.DeviceId deviceId, org.onosproject.net.behaviour.PipelinerContext context)- Specified by:
initin interfaceorg.onosproject.net.behaviour.Pipeliner- Overrides:
initin classOfdpa2Pipeline
-
processFilter
protected void processFilter(org.onosproject.net.flowobjective.FilteringObjective filteringObjective, boolean install, org.onosproject.core.ApplicationId applicationId)Description copied from class:Ofdpa2PipelineAs per OFDPA 2.0 TTP, filtering of VLAN ids and MAC addresses (for routing) configured on switch ports happen in different tables.- Overrides:
processFilterin classOfdpa2Pipeline- Parameters:
filteringObjective- the filtering objectiveinstall- indicates whether to add or remove the objectiveapplicationId- the application that sent this objective
-
processEgress
protected java.util.Collection<org.onosproject.net.flow.FlowRule> processEgress(org.onosproject.net.flowobjective.ForwardingObjective fwd)
In the OF-DPA 2.0 pipeline, egress forwarding objectives go to the egress tables.- Overrides:
processEgressin classOfdpa2Pipeline- Parameters:
fwd- the forwarding objective of type 'egress'- Returns:
- a collection of flow rules to be sent to the switch. An empty collection may be returned if there is a problem in processing the flow rule
-
processDoubleTaggedFwd
protected java.util.Collection<org.onosproject.net.flow.FlowRule> processDoubleTaggedFwd(org.onosproject.net.flowobjective.ForwardingObjective fwd)
Handles forwarding rules to the IP Unicast Routing.- Parameters:
fwd- the forwarding objective- Returns:
- A collection of flow rules, or an empty set
-
processVlanIdFilter
protected java.util.List<java.util.List<org.onosproject.net.flow.FlowRule>> processVlanIdFilter(org.onosproject.net.flow.criteria.PortCriterion portCriterion, org.onosproject.net.flow.criteria.VlanIdCriterion vidCriterion, org.onlab.packet.VlanId assignedVlan, org.onosproject.core.ApplicationId applicationId, boolean install)Description copied from class:Ofdpa2PipelineInternal implementation of processVlanIdFilter.The is_present bit in set_vlan_vid action is required to be 0 in OFDPA i12. Since it is non-OF spec, we need an extension treatment for that. The useVlanExtension must be set to false for OFDPA i12.
NOTE: Separate VLAN filtering rules and assignment rules into different stages in order to guarantee that filtering rules always go first, as required by OFDPA.
- Overrides:
processVlanIdFilterin classOfdpa2Pipeline- Parameters:
portCriterion- port on device for which this filter is programmedvidCriterion- vlan assigned to port, or NONE for untaggedassignedVlan- assigned vlan-id for untagged packetsapplicationId- for application programming this filterinstall- indicates whether to add or remove the objective- Returns:
- stages of flow rules for port-vlan filters
-
processEthDstFilter
protected java.util.List<java.util.List<org.onosproject.net.flow.FlowRule>> processEthDstFilter(org.onosproject.net.flow.criteria.PortCriterion portCriterion, org.onosproject.net.flow.criteria.EthCriterion ethCriterion, org.onosproject.net.flow.criteria.VlanIdCriterion vidCriterion, org.onlab.packet.VlanId assignedVlan, org.onlab.packet.MacAddress unicastMac, org.onosproject.core.ApplicationId applicationId)Description copied from class:Ofdpa2PipelineAllows routed packets with correct destination MAC to be directed to unicast routing table, multicast routing table or MPLS forwarding table.- Overrides:
processEthDstFilterin classOfdpa2Pipeline- Parameters:
portCriterion- port on device for which this filter is programmedethCriterion- dstMac of device for which is filter is programmedvidCriterion- vlan assigned to port, or NONE for untaggedassignedVlan- assigned vlan-id for untagged packetsunicastMac- some switches require a unicast TMAC flow to be programmed before multicast TMAC flow. This MAC address will be used for the unicast TMAC flow. This is unused if the filtering objective is a unicast.applicationId- for application programming this filter- Returns:
- stages of flow rules for port-vlan filters
-
processEthDstOnlyFilter
protected java.util.List<java.util.List<org.onosproject.net.flow.FlowRule>> processEthDstOnlyFilter(org.onosproject.net.flow.criteria.EthCriterion ethCriterion, org.onosproject.core.ApplicationId applicationId)- Overrides:
processEthDstOnlyFilterin classOfdpa2Pipeline
-
processEthTypeSpecific
protected java.util.Collection<org.onosproject.net.flow.FlowRule> processEthTypeSpecific(org.onosproject.net.flowobjective.ForwardingObjective fwd)
Description copied from class:Ofdpa2PipelineHandles forwarding rules to the IP and MPLS tables.- Overrides:
processEthTypeSpecificin classOfdpa2Pipeline- Parameters:
fwd- the forwarding objective- Returns:
- A collection of flow rules, or an empty set
-
processEthDstSpecific
protected java.util.Collection<org.onosproject.net.flow.FlowRule> processEthDstSpecific(org.onosproject.net.flowobjective.ForwardingObjective fwd)
Description copied from class:Ofdpa2PipelineHandles forwarding rules to the L2 bridging table. Flow actions are not allowed in the bridging table - instead we use L2 Interface group or L2 flood group- Overrides:
processEthDstSpecificin classOfdpa2Pipeline- Parameters:
fwd- the forwarding objective- Returns:
- A collection of flow rules, or an empty set
-
versatileTreatmentBuilder
protected org.onosproject.net.flow.TrafficTreatment.Builder versatileTreatmentBuilder(org.onosproject.net.flowobjective.ForwardingObjective fwd)
Description copied from class:Ofdpa2PipelineHelper function to create traffic treatment builder for versatile forwarding objectives.- Overrides:
versatileTreatmentBuilderin classOfdpa2Pipeline- Parameters:
fwd- original forwarding objective- Returns:
- treatment builder for the flow rule, or null if there is an error.
-
initializePipeline
protected void initializePipeline()
- Overrides:
initializePipelinein classOfdpa2Pipeline
-
-