public final class OfdpaGroupHandlerUtility extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
OfdpaGroupHandlerUtility.GroupChainElem
Represents a group element that is part of a chain of groups.
|
static class |
OfdpaGroupHandlerUtility.GroupChecker |
static class |
OfdpaGroupHandlerUtility.GroupInfo
Utility class for moving group information around.
|
static class |
OfdpaGroupHandlerUtility.OfdpaMplsGroupSubType
Helper enum to handle the different MPLS group
types.
|
static class |
OfdpaGroupHandlerUtility.OfdpaNextGroup
Represents an entire group-chain that implements a Next-Objective from
the application.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
createUnfiltered(org.onosproject.net.flow.TrafficTreatment treatment,
org.onosproject.net.flow.TrafficSelector meta)
Helper method to decide whether L2 Interface group or L2 Unfiltered group needs to be created.
|
static int |
doubleVlanL3UnicastGroupId(org.onlab.packet.VlanId vlanId,
long portNum) |
static int |
doubleVlanL3UnicastGroupKey(org.onosproject.net.DeviceId deviceId,
org.onlab.packet.VlanId vlanId,
long portNumber)
Returns a hash as the L3 Unicast Group Key.
|
static List<Integer> |
existingPortAndLabel(List<Deque<org.onosproject.net.group.GroupKey>> allActiveKeys,
org.onosproject.net.group.GroupService groupService,
org.onosproject.net.DeviceId deviceId,
org.onosproject.net.PortNumber portToMatch,
int labelToMatch)
Returns a list of all indices in the allActiveKeys list (that represents
a group) if the list element (a bucket or group-chain) has treatments
that match the given outport and label.
|
static org.onlab.packet.VlanId |
extractVlanIdFromGroupId(int groupId)
Extracts VlanId from given group ID.
|
static Set<org.onosproject.net.PortNumber> |
getExistingOutputPorts(List<Deque<org.onosproject.net.group.GroupKey>> allActiveKeys,
org.onosproject.net.group.GroupService groupService,
org.onosproject.net.DeviceId deviceId)
Returns the set of existing output ports in the group represented by
allActiveKeys.
|
static List<Integer> |
indicesToRemoveFromNextGroup(List<Deque<org.onosproject.net.group.GroupKey>> allActiveKeys,
org.onosproject.net.flowobjective.NextObjective nextObjective,
org.onosproject.net.group.GroupService groupService,
org.onosproject.net.DeviceId deviceId)
Get indices to remove comparing next group with next objective.
|
static org.onosproject.net.group.GroupKey |
l2FloodGroupKey(org.onlab.packet.VlanId vlanId,
org.onosproject.net.DeviceId deviceId) |
static int |
l2GroupId(org.onlab.packet.VlanId vlanId,
long portNum) |
static int |
l2HashGroupKey(org.onosproject.net.DeviceId deviceId,
long portNumber)
Returns a hash as the L2 Hash Group Key.
|
static int |
l2InterfaceGroupKey(org.onosproject.net.DeviceId deviceId,
org.onlab.packet.VlanId vlanId,
long portNumber)
Returns a hash as the L2 Interface Group Key.
|
static org.onosproject.net.group.GroupKey |
l2MulticastGroupKey(org.onlab.packet.VlanId vlanId,
org.onosproject.net.DeviceId deviceId) |
static int |
l2UnfilteredGroupId(long portNum) |
static int |
l2UnfilteredGroupKey(org.onosproject.net.DeviceId deviceId,
long portNumber)
Returns a hash as the L2 Unfiltered Interface Group Key.
|
static Integer |
makeMplsForwardingGroupId(OfdpaGroupHandlerUtility.OfdpaMplsGroupSubType subType,
int index)
Creates MPLS Forwarding group id given a sub type and
the index.
|
static Integer |
makeMplsLabelGroupId(OfdpaGroupHandlerUtility.OfdpaMplsGroupSubType subType,
int index)
Creates MPLS Label group id given a sub type and
the index.
|
static boolean |
verifyHashedNextObjective(org.onosproject.net.flowobjective.NextObjective nextObjective)
The purpose of this function is to verify if the hashed next
objective is supported by the current pipeline.
|
public static Integer makeMplsLabelGroupId(OfdpaGroupHandlerUtility.OfdpaMplsGroupSubType subType, int index)
subType - the MPLS Label group sub typeindex - the index of the grouppublic static Integer makeMplsForwardingGroupId(OfdpaGroupHandlerUtility.OfdpaMplsGroupSubType subType, int index)
subType - the MPLS forwarding group sub typeindex - the index of the grouppublic static Set<org.onosproject.net.PortNumber> getExistingOutputPorts(List<Deque<org.onosproject.net.group.GroupKey>> allActiveKeys, org.onosproject.net.group.GroupService groupService, org.onosproject.net.DeviceId deviceId)
allActiveKeys - list of group key chaingroupService - the group service to get group informationdeviceId - the device id to get grouppublic static List<Integer> existingPortAndLabel(List<Deque<org.onosproject.net.group.GroupKey>> allActiveKeys, org.onosproject.net.group.GroupService groupService, org.onosproject.net.DeviceId deviceId, org.onosproject.net.PortNumber portToMatch, int labelToMatch)
allActiveKeys - the representation of the groupgroupService - groups service for querying group informationdeviceId - the device id for the device that contains the groupportToMatch - the port to match in the group bucketslabelToMatch - the MPLS label-id to match in the group bucketspublic static List<Integer> indicesToRemoveFromNextGroup(List<Deque<org.onosproject.net.group.GroupKey>> allActiveKeys, org.onosproject.net.flowobjective.NextObjective nextObjective, org.onosproject.net.group.GroupService groupService, org.onosproject.net.DeviceId deviceId)
allActiveKeys - the representation of the groupnextObjective - the next objective to verifygroupService - groups service for querying group informationdeviceId - the device id for the device that contains the grouppublic static boolean verifyHashedNextObjective(org.onosproject.net.flowobjective.NextObjective nextObjective)
nextObjective - the hashed objective to verifypublic static org.onlab.packet.VlanId extractVlanIdFromGroupId(int groupId)
groupId - the group IDpublic static org.onosproject.net.group.GroupKey l2FloodGroupKey(org.onlab.packet.VlanId vlanId,
org.onosproject.net.DeviceId deviceId)
public static org.onosproject.net.group.GroupKey l2MulticastGroupKey(org.onlab.packet.VlanId vlanId,
org.onosproject.net.DeviceId deviceId)
public static int l2GroupId(org.onlab.packet.VlanId vlanId,
long portNum)
public static int l2UnfilteredGroupId(long portNum)
public static int l2InterfaceGroupKey(org.onosproject.net.DeviceId deviceId,
org.onlab.packet.VlanId vlanId,
long portNumber)
deviceId - Device IDvlanId - VLAN IDportNumber - Port numberpublic static int l2UnfilteredGroupKey(org.onosproject.net.DeviceId deviceId,
long portNumber)
deviceId - Device IDportNumber - Port numberpublic static int l2HashGroupKey(org.onosproject.net.DeviceId deviceId,
long portNumber)
deviceId - Device IDportNumber - Port numberpublic static boolean createUnfiltered(org.onosproject.net.flow.TrafficTreatment treatment,
org.onosproject.net.flow.TrafficSelector meta)
treatment - treatment passed in by the application as part of the nextObjectivemeta - metadata passed in by the application as part of the nextObjectivepublic static int doubleVlanL3UnicastGroupKey(org.onosproject.net.DeviceId deviceId,
org.onlab.packet.VlanId vlanId,
long portNumber)
deviceId - Device IDvlanId - vlan IDportNumber - Port numberpublic static int doubleVlanL3UnicastGroupId(org.onlab.packet.VlanId vlanId,
long portNum)