public class Ofdpa2Pipeline
extends org.onosproject.net.driver.AbstractHandlerBehaviour
implements org.onosproject.net.behaviour.Pipeliner
| Modifier and Type | Class and Description |
|---|---|
protected 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 org.onlab.util.KryoNamespace |
appKryo |
protected static int |
BRIDGING_TABLE |
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 ScheduledExecutorService |
executorService |
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 |
MAX_RETRY_ATTEMPTS |
protected static int |
MPLS_L3_TYPE |
protected static int |
MPLS_TABLE_0 |
protected static int |
MPLS_TABLE_1 |
protected static int |
MULTICAST_ROUTING_TABLE |
protected static long |
OFPP_MAX |
protected static int |
PORT_TABLE |
protected static int |
RETRY_MS |
protected Set<org.onosproject.net.flow.criteria.IPCriterion> |
sentIpFilters |
protected org.onlab.osgi.ServiceDirectory |
serviceDirectory |
protected static int |
TMAC_TABLE |
protected static int |
UNICAST_ROUTING_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) |
protected org.onosproject.net.behaviour.NextGroup |
getGroupForNextObjective(Integer nextId) |
List<String> |
getNextMappings(org.onosproject.net.behaviour.NextGroup nextGroup) |
void |
init(org.onosproject.net.DeviceId deviceId,
org.onosproject.net.behaviour.PipelinerContext context) |
protected void |
initializePipeline() |
void |
next(org.onosproject.net.flowobjective.NextObjective nextObjective) |
protected static void |
pass(org.onosproject.net.flowobjective.Objective obj) |
protected 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.onosproject.core.ApplicationId applicationId)
Allows routed packets with correct destination MAC to be directed
to unicast-IP routing table or MPLS forwarding table.
|
protected 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, MAC addresses (for routing)
and IP addresses configured on switch ports happen in different tables.
|
protected List<org.onosproject.net.flow.FlowRule> |
processMcastEthDstFilter(org.onosproject.net.flow.criteria.EthCriterion ethCriterion,
org.onosproject.core.ApplicationId applicationId) |
protected Collection<org.onosproject.net.flow.FlowRule> |
processSpecific(org.onosproject.net.flowobjective.ForwardingObjective fwd)
In the OF-DPA 2.0 pipeline, specific forwarding refers to the IP table
(unicast or multicast) or the L2 table (mac + vlan) or the MPLS table.
|
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<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)
Allows untagged packets into pipeline by assigning a vlan id.
|
protected List<org.onosproject.net.flow.FlowRule> |
processVlanIdFilterInternal(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 useSetVlanExtension)
Internal implementation of processVlanIdFilter.
|
protected static org.onlab.packet.IpPrefix |
readIpDstFromSelector(org.onosproject.net.flow.TrafficSelector selector) |
protected static org.onlab.packet.VlanId |
readVlanFromSelector(org.onosproject.net.flow.TrafficSelector selector) |
protected void |
sendForward(org.onosproject.net.flowobjective.ForwardingObjective fwd,
Collection<org.onosproject.net.flow.FlowRule> rules) |
handler, setHandlerprotected static final int PORT_TABLE
protected static final int VLAN_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
protected static final int BRIDGING_TABLE
protected static final int ACL_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 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
protected Set<org.onosproject.net.flow.criteria.IPCriterion> sentIpFilters
protected ScheduledExecutorService executorService
protected static final int MAX_RETRY_ATTEMPTS
protected static final int RETRY_MS
public void init(org.onosproject.net.DeviceId deviceId,
org.onosproject.net.behaviour.PipelinerContext context)
init in interface org.onosproject.net.behaviour.Pipelinerprotected void initializePipeline()
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.Pipelinerprotected void sendForward(org.onosproject.net.flowobjective.ForwardingObjective fwd,
Collection<org.onosproject.net.flow.FlowRule> rules)
public 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<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)
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<org.onosproject.net.flow.FlowRule> processVlanIdFilterInternal(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 useSetVlanExtension)
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 useSetVlanExtension must be set to false for OFDPA i12.
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 filteruseSetVlanExtension - use the setVlanVid extension that has is_present bit set to 0.protected 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.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 packetsapplicationId - for application programming this filterprotected List<org.onosproject.net.flow.FlowRule> processEthDstOnlyFilter(org.onosproject.net.flow.criteria.EthCriterion ethCriterion, org.onosproject.core.ApplicationId applicationId)
protected List<org.onosproject.net.flow.FlowRule> processMcastEthDstFilter(org.onosproject.net.flow.criteria.EthCriterion ethCriterion, org.onosproject.core.ApplicationId applicationId)
protected Collection<org.onosproject.net.flow.FlowRule> processVersatile(org.onosproject.net.flowobjective.ForwardingObjective fwd)
fwd - the forwarding objective of type 'versatile'protected Collection<org.onosproject.net.flow.FlowRule> processSpecific(org.onosproject.net.flowobjective.ForwardingObjective fwd)
fwd - the forwarding objective of type 'specific'protected 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 org.onosproject.net.behaviour.NextGroup getGroupForNextObjective(Integer nextId)
protected 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.VlanId readVlanFromSelector(org.onosproject.net.flow.TrafficSelector selector)
protected static org.onlab.packet.IpPrefix readIpDstFromSelector(org.onosproject.net.flow.TrafficSelector selector)