Class 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.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void init​(org.onosproject.net.DeviceId deviceId, org.onosproject.net.behaviour.PipelinerContext context)  
      protected void initDriverId()  
      protected void initGroupHander​(org.onosproject.net.behaviour.PipelinerContext context)  
      protected void initializePipeline()  
      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 void processFilter​(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 boolean requireEthType()
      Determines whether this pipeline requires one additional flow matching on ethType 0x86dd in ACL table.
      protected boolean requireVlanExtensions()
      Determines whether this pipeline requires OFDPA match and set VLAN extensions.
      protected org.onosproject.net.flow.TrafficTreatment.Builder versatileTreatmentBuilder​(org.onosproject.net.flowobjective.ForwardingObjective fwd)
      Helper function to create traffic treatment builder for versatile forwarding objectives.
      • Methods inherited from class org.onosproject.net.driver.AbstractHandlerBehaviour

        handler, setHandler
      • Methods inherited from class org.onosproject.net.driver.AbstractBehaviour

        data, setData
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.onosproject.net.driver.Behaviour

        data, setData
      • Methods inherited from interface org.onosproject.net.driver.HandlerBehaviour

        handler, setHandler
    • Constructor Detail

      • OvsOfdpaPipeline

        public OvsOfdpaPipeline()
    • Method Detail

      • requireVlanExtensions

        protected boolean requireVlanExtensions()
        Description copied from class: Ofdpa2Pipeline
        Determines whether this pipeline requires OFDPA match and set VLAN extensions.
        Overrides:
        requireVlanExtensions in class Ofdpa2Pipeline
        Returns:
        true to use the extensions
      • requireEthType

        protected boolean requireEthType()
        Description copied from class: Ofdpa2Pipeline
        Determines whether this pipeline requires one additional flow matching on ethType 0x86dd in ACL table.
        Overrides:
        requireEthType in class Ofdpa2Pipeline
        Returns:
        true to create one additional flow matching on ethType 0x86dd in ACL table
      • initGroupHander

        protected void initGroupHander​(org.onosproject.net.behaviour.PipelinerContext context)
        Overrides:
        initGroupHander in class Ofdpa2Pipeline
      • init

        public void init​(org.onosproject.net.DeviceId deviceId,
                         org.onosproject.net.behaviour.PipelinerContext context)
        Specified by:
        init in interface org.onosproject.net.behaviour.Pipeliner
        Overrides:
        init in class Ofdpa2Pipeline
      • processFilter

        protected void processFilter​(org.onosproject.net.flowobjective.FilteringObjective filteringObjective,
                                     boolean install,
                                     org.onosproject.core.ApplicationId applicationId)
        Description copied from class: Ofdpa2Pipeline
        As per OFDPA 2.0 TTP, filtering of VLAN ids and MAC addresses (for routing) configured on switch ports happen in different tables.
        Overrides:
        processFilter in class Ofdpa2Pipeline
        Parameters:
        filteringObjective - the filtering objective
        install - indicates whether to add or remove the objective
        applicationId - 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:
        processEgress in class Ofdpa2Pipeline
        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: Ofdpa2Pipeline
        Internal 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:
        processVlanIdFilter in class Ofdpa2Pipeline
        Parameters:
        portCriterion - port on device for which this filter is programmed
        vidCriterion - vlan assigned to port, or NONE for untagged
        assignedVlan - assigned vlan-id for untagged packets
        applicationId - for application programming this filter
        install - 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: Ofdpa2Pipeline
        Allows routed packets with correct destination MAC to be directed to unicast routing table, multicast routing table or MPLS forwarding table.
        Overrides:
        processEthDstFilter in class Ofdpa2Pipeline
        Parameters:
        portCriterion - port on device for which this filter is programmed
        ethCriterion - dstMac of device for which is filter is programmed
        vidCriterion - vlan assigned to port, or NONE for untagged
        assignedVlan - assigned vlan-id for untagged packets
        unicastMac - 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:
        processEthDstOnlyFilter in class Ofdpa2Pipeline
      • processEthTypeSpecific

        protected java.util.Collection<org.onosproject.net.flow.FlowRule> processEthTypeSpecific​(org.onosproject.net.flowobjective.ForwardingObjective fwd)
        Description copied from class: Ofdpa2Pipeline
        Handles forwarding rules to the IP and MPLS tables.
        Overrides:
        processEthTypeSpecific in class Ofdpa2Pipeline
        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: Ofdpa2Pipeline
        Handles 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:
        processEthDstSpecific in class Ofdpa2Pipeline
        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: Ofdpa2Pipeline
        Helper function to create traffic treatment builder for versatile forwarding objectives.
        Overrides:
        versatileTreatmentBuilder in class Ofdpa2Pipeline
        Parameters:
        fwd - original forwarding objective
        Returns:
        treatment builder for the flow rule, or null if there is an error.