public class Ofdpa2Pipeline
extends org.onosproject.net.driver.AbstractHandlerBehaviour
implements org.onosproject.net.behaviour.Pipeliner
| Modifier and Type | Class and Description |
|---|---|
class |
Ofdpa2Pipeline.RetryFlows
Utility class that retries sending flows a fixed number of times, even if
some of the attempts are successful.
|
| Modifier and Type | Field and Description |
|---|---|
protected static int |
ACL_TABLE |
protected static short |
ALLOW_VLAN_TRANSLATION |
protected static org.onlab.util.KryoNamespace |
appKryo |
protected static int |
BRIDGING_TABLE |
protected static int |
COPY_FIELD_NBITS |
protected static int |
COPY_FIELD_OFFSET |
protected org.onosproject.core.CoreService |
coreService |
protected static int |
DEFAULT_PRIORITY |
protected org.onosproject.net.DeviceId |
deviceId |
protected org.onosproject.net.device.DeviceService |
deviceService |
protected org.onosproject.core.ApplicationId |
driverId |
protected static int |
EGRESS_DSCP_PCP_REMARK_FLOW_TABLE |
protected static int |
EGRESS_TPID_FLOW_TABLE |
protected static int |
EGRESS_VLAN_FLOW_TABLE |
protected org.onosproject.net.flowobjective.FlowObjectiveStore |
flowObjectiveStore |
protected org.onosproject.net.flow.FlowRuleService |
flowRuleService |
protected Ofdpa2GroupHandler |
groupHandler |
protected org.onosproject.net.group.GroupService |
groupService |
protected static int |
HIGHEST_PRIORITY |
protected static int |
LOWEST_PRIORITY |
protected static int |
MAC_LEARNING_TABLE |
protected static int |
MPLS_L2_PORT_FLOW_TABLE |
protected static int |
MPLS_L2_PORT_PCP_TRUST_FLOW_TABLE |
protected static int |
MPLS_L2_PORT_PRIORITY |
protected static int |
MPLS_L3_TYPE_TABLE |
protected static int |
MPLS_NNI_PORT_BASE |
protected static int |
MPLS_NNI_PORT_MAX |
protected static int |
MPLS_TABLE_0 |
protected static int |
MPLS_TABLE_1 |
protected static int |
MPLS_TUNNEL_ID_BASE |
protected static int |
MPLS_TUNNEL_ID_MAX |
protected static int |
MPLS_TYPE_TABLE |
protected static int |
MPLS_UNI_PORT_MAX |
protected static int |
MULTICAST_ROUTING_TABLE |
protected static long |
OFPP_MAX |
protected static int |
PORT_TABLE |
protected org.onlab.osgi.ServiceDirectory |
serviceDirectory |
protected static int |
TMAC_TABLE |
protected static int |
UNICAST_ROUTING_TABLE |
protected static int |
VLAN_1_TABLE |
protected static int |
VLAN_TABLE |
| Constructor and Description |
|---|
Ofdpa2Pipeline() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
fail(org.onosproject.net.flowobjective.Objective obj,
org.onosproject.net.flowobjective.ObjectiveError error) |
void |
filter(org.onosproject.net.flowobjective.FilteringObjective filteringObjective) |
void |
forward(org.onosproject.net.flowobjective.ForwardingObjective fwd) |
List<String> |
getNextMappings(org.onosproject.net.behaviour.NextGroup nextGroup) |
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() |
boolean |
isAccumulatorEnabled() |
protected boolean |
matchInPortTmacTable()
Determines whether in-port should be matched on in TMAC table rules.
|
void |
next(org.onosproject.net.flowobjective.NextObjective nextObjective) |
protected static void |
pass(org.onosproject.net.flowobjective.Objective obj) |
protected 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 List<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 List<List<org.onosproject.net.flow.FlowRule>> |
processEthDstOnlyFilter(org.onosproject.net.flow.criteria.EthCriterion ethCriterion,
org.onosproject.core.ApplicationId applicationId) |
protected Collection<org.onosproject.net.flow.FlowRule> |
processEthDstSpecific(org.onosproject.net.flowobjective.ForwardingObjective fwd)
Handles forwarding rules to the L2 bridging table.
|
protected Collection<org.onosproject.net.flow.FlowRule> |
processEthTypeSpecific(org.onosproject.net.flowobjective.ForwardingObjective fwd)
Handles forwarding rules to the IP and MPLS tables.
|
protected Collection<org.onosproject.net.flow.FlowRule> |
processEthTypeSpecificInternal(org.onosproject.net.flowobjective.ForwardingObjective fwd,
boolean allowDefaultRoute,
int mplsNextTable)
Internal implementation of processEthTypeSpecific.
|
protected void |
processFilter(org.onosproject.net.flowobjective.FilteringObjective filt,
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 Collection<org.onosproject.net.flow.FlowRule> |
processVersatile(org.onosproject.net.flowobjective.ForwardingObjective fwd)
In the OF-DPA 2.0 pipeline, versatile forwarding objectives go to the
ACL table.
|
protected List<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)
Internal implementation of processVlanIdFilter.
|
protected static org.onlab.packet.MacAddress |
readEthDstFromTreatment(org.onosproject.net.flow.TrafficTreatment treatment) |
boolean |
requireMplsBosMatch()
Determines whether this pipeline requires MPLS BOS match.
|
boolean |
requireMplsPop()
Determines whether this pipeline requires MPLS POP instruction.
|
boolean |
requireMplsTtlModification()
Determines whether this pipeline requires MPLS TTL decrement and copy.
|
protected boolean |
requirePuntTable() |
protected boolean |
requireUnicastBeforeMulticast()
Determines whether this driver requires unicast flow to be installed before multicast flow
in TMAC table.
|
protected boolean |
requireVlanExtensions()
Determines whether this pipeline requires OFDPA match and set VLAN extensions.
|
protected boolean |
shouldRetry()
Determines whether this driver should continue to retry flows that point
to empty groups.
|
protected boolean |
supportIpv6L4Dst()
Determines whether matching L4 destination port on IPv6 packets is supported in ACL table.
|
protected boolean |
supportsUnicastBlackHole()
Determines whether this driver supports installing a clearDeferred action on table 30.
|
protected org.onosproject.net.flow.TrafficSelector.Builder |
versatileSelectorBuilder(org.onosproject.net.flowobjective.ForwardingObjective fwd)
Helper function to create traffic selector builder for versatile forwarding objectives.
|
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.
|
handler, setHandlerprotected static final int PORT_TABLE
protected static final int VLAN_TABLE
protected static final int VLAN_1_TABLE
protected static final int MPLS_L2_PORT_FLOW_TABLE
protected static final int MPLS_L2_PORT_PCP_TRUST_FLOW_TABLE
protected static final int TMAC_TABLE
protected static final int UNICAST_ROUTING_TABLE
protected static final int MULTICAST_ROUTING_TABLE
protected static final int MPLS_TABLE_0
protected static final int MPLS_TABLE_1
protected static final int MPLS_L3_TYPE_TABLE
protected static final int MPLS_TYPE_TABLE
protected static final int BRIDGING_TABLE
protected static final int ACL_TABLE
protected static final int EGRESS_VLAN_FLOW_TABLE
protected static final int EGRESS_DSCP_PCP_REMARK_FLOW_TABLE
protected static final int EGRESS_TPID_FLOW_TABLE
protected static final int MAC_LEARNING_TABLE
protected static final long OFPP_MAX
protected static final int HIGHEST_PRIORITY
protected static final int DEFAULT_PRIORITY
protected static final int LOWEST_PRIORITY
protected static final int MPLS_L2_PORT_PRIORITY
protected static final int MPLS_TUNNEL_ID_BASE
protected static final int MPLS_TUNNEL_ID_MAX
protected static final int MPLS_UNI_PORT_MAX
protected static final int MPLS_NNI_PORT_BASE
protected static final int MPLS_NNI_PORT_MAX
protected static final short ALLOW_VLAN_TRANSLATION
protected static final int COPY_FIELD_NBITS
protected static final int COPY_FIELD_OFFSET
protected org.onlab.osgi.ServiceDirectory serviceDirectory
protected org.onosproject.net.flow.FlowRuleService flowRuleService
protected org.onosproject.core.CoreService coreService
protected org.onosproject.net.group.GroupService groupService
protected org.onosproject.net.flowobjective.FlowObjectiveStore flowObjectiveStore
protected org.onosproject.net.DeviceId deviceId
protected org.onosproject.core.ApplicationId driverId
protected org.onosproject.net.device.DeviceService deviceService
protected static org.onlab.util.KryoNamespace appKryo
protected Ofdpa2GroupHandler groupHandler
public void init(org.onosproject.net.DeviceId deviceId,
org.onosproject.net.behaviour.PipelinerContext context)
init in interface org.onosproject.net.behaviour.Pipelinerprotected void initDriverId()
protected void initGroupHander(org.onosproject.net.behaviour.PipelinerContext context)
protected void initializePipeline()
public boolean isAccumulatorEnabled()
public boolean requireMplsPop()
public boolean requireMplsBosMatch()
public boolean requireMplsTtlModification()
protected boolean requireVlanExtensions()
protected boolean matchInPortTmacTable()
protected boolean supportIpv6L4Dst()
protected boolean shouldRetry()
protected boolean requireUnicastBeforeMulticast()
protected boolean supportsUnicastBlackHole()
protected boolean requirePuntTable()
public void filter(org.onosproject.net.flowobjective.FilteringObjective filteringObjective)
filter in interface org.onosproject.net.behaviour.Pipelinerpublic void forward(org.onosproject.net.flowobjective.ForwardingObjective fwd)
forward in interface org.onosproject.net.behaviour.Pipelinerpublic void next(org.onosproject.net.flowobjective.NextObjective nextObjective)
next in interface org.onosproject.net.behaviour.Pipelinerprotected void processFilter(org.onosproject.net.flowobjective.FilteringObjective filt,
boolean install,
org.onosproject.core.ApplicationId applicationId)
filt - the filtering objectiveinstall - indicates whether to add or remove the objectiveapplicationId - the application that sent this objectiveprotected List<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)
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.
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 filterprotected List<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)
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 filterprotected List<List<org.onosproject.net.flow.FlowRule>> processEthDstOnlyFilter(org.onosproject.net.flow.criteria.EthCriterion ethCriterion, org.onosproject.core.ApplicationId applicationId)
protected Collection<org.onosproject.net.flow.FlowRule> processEgress(org.onosproject.net.flowobjective.ForwardingObjective fwd)
fwd - the forwarding objective of type 'egress'protected Collection<org.onosproject.net.flow.FlowRule> processVersatile(org.onosproject.net.flowobjective.ForwardingObjective fwd)
fwd - the forwarding objective of type 'versatile'protected org.onosproject.net.flow.TrafficSelector.Builder versatileSelectorBuilder(org.onosproject.net.flowobjective.ForwardingObjective fwd)
fwd - original forwarding objectiveprotected org.onosproject.net.flow.TrafficTreatment.Builder versatileTreatmentBuilder(org.onosproject.net.flowobjective.ForwardingObjective fwd)
fwd - original forwarding objectiveprotected Collection<org.onosproject.net.flow.FlowRule> processEthTypeSpecific(org.onosproject.net.flowobjective.ForwardingObjective fwd)
fwd - the forwarding objectiveprotected Collection<org.onosproject.net.flow.FlowRule> processEthTypeSpecificInternal(org.onosproject.net.flowobjective.ForwardingObjective fwd, boolean allowDefaultRoute, int mplsNextTable)
Wildcarded IPv4_DST is not supported in OFDPA i12. Therefore, we break the rule into 0.0.0.0/1 and 128.0.0.0/1. The allowDefaultRoute must be set to false for OFDPA i12.
fwd - the forwarding objectiveallowDefaultRoute - allow wildcarded IPv4_DST or notmplsNextTable - next MPLS tableprotected Collection<org.onosproject.net.flow.FlowRule> processEthDstSpecific(org.onosproject.net.flowobjective.ForwardingObjective fwd)
fwd - the forwarding objectiveprotected static void pass(org.onosproject.net.flowobjective.Objective obj)
protected static void fail(org.onosproject.net.flowobjective.Objective obj,
org.onosproject.net.flowobjective.ObjectiveError error)
public List<String> getNextMappings(org.onosproject.net.behaviour.NextGroup nextGroup)
getNextMappings in interface org.onosproject.net.behaviour.Pipelinerprotected static org.onlab.packet.MacAddress readEthDstFromTreatment(org.onosproject.net.flow.TrafficTreatment treatment)