Search in sources :

Example 81 with GroupBucket

use of org.onosproject.net.group.GroupBucket in project onos by opennetworkinglab.

the class Ofdpa2GroupHandler method prepareL2UnfilteredGroup.

private List<GroupInfo> prepareL2UnfilteredGroup(NextObjective nextObj) {
    ImmutableList.Builder<GroupInfo> groupInfoBuilder = ImmutableList.builder();
    // break up broadcast next objective to multiple groups
    Collection<TrafficTreatment> treatments = nextObj.nextTreatments().stream().filter(nt -> nt.type() == NextTreatment.Type.TREATMENT).map(nt -> ((DefaultNextTreatment) nt).treatment()).collect(Collectors.toSet());
    Collection<Integer> nextIds = nextObj.nextTreatments().stream().filter(nt -> nt.type() == NextTreatment.Type.ID).map(nt -> ((IdNextTreatment) nt).nextId()).collect(Collectors.toSet());
    // Each treatment is converted to an L2 unfiltered group
    treatments.forEach(treatment -> {
        TrafficTreatment.Builder tBuilder = DefaultTrafficTreatment.builder();
        // Extract port information
        PortNumber port = treatment.allInstructions().stream().map(instr -> (Instructions.OutputInstruction) instr).map(instr -> instr.port()).findFirst().orElse(null);
        if (port == null) {
            log.debug("Skip bucket without output instruction");
            return;
        }
        tBuilder.setOutput(port);
        if (requireAllowVlanTransition()) {
            tBuilder.extension(new OfdpaSetAllowVlanTranslation(Ofdpa3AllowVlanTranslationType.ALLOW), deviceId);
        }
        // Build L2UG
        int l2ugk = l2UnfilteredGroupKey(deviceId, port.toLong());
        final GroupKey l2UnfilterGroupKey = new DefaultGroupKey(appKryo.serialize(l2ugk));
        int l2UnfilteredGroupId = L2_UNFILTERED_TYPE | ((int) port.toLong() & FOUR_NIBBLE_MASK);
        GroupBucket l2UnfilteredGroupBucket = DefaultGroupBucket.createIndirectGroupBucket(tBuilder.build());
        GroupDescription l2UnfilteredGroupDesc = new DefaultGroupDescription(deviceId, GroupDescription.Type.INDIRECT, new GroupBuckets(Collections.singletonList(l2UnfilteredGroupBucket)), l2UnfilterGroupKey, l2UnfilteredGroupId, nextObj.appId());
        log.debug("Trying L2-Unfiltered: device:{} gid:{} gkey:{} nextid:{}", deviceId, Integer.toHexString(l2UnfilteredGroupId), l2UnfilterGroupKey, nextObj.id());
        groupInfoBuilder.add(new GroupInfo(l2UnfilteredGroupDesc, l2UnfilteredGroupDesc));
    });
    // Save the current count
    int counts = groupInfoBuilder.build().size();
    // Lookup each nextId in the store and obtain the group information
    nextIds.forEach(nextId -> {
        NextGroup nextGroup = flowObjectiveStore.getNextGroup(nextId);
        if (nextGroup != null) {
            List<Deque<GroupKey>> allActiveKeys = appKryo.deserialize(nextGroup.data());
            GroupKey topGroupKey = allActiveKeys.get(0).getFirst();
            GroupDescription groupDesc = groupService.getGroup(deviceId, topGroupKey);
            if (groupDesc != null) {
                log.debug("Trying L2-Hash device:{} gid:{}, gkey:{}, nextid:{}", deviceId, Integer.toHexString(((Group) groupDesc).id().id()), topGroupKey, nextId);
                groupInfoBuilder.add(new GroupInfo(groupDesc, groupDesc));
            } else {
                log.error("Not found L2-Hash device:{}, gkey:{}, nextid:{}", deviceId, topGroupKey, nextId);
            }
        } else {
            log.error("Not found NextGroup device:{}, nextid:{}", deviceId, nextId);
        }
    });
    // Compare the size before and after to detect problems during the creation
    ImmutableList<GroupInfo> groupInfos = groupInfoBuilder.build();
    return (counts + nextIds.size()) == groupInfos.size() ? groupInfos : ImmutableList.of();
}
Also used : Arrays(java.util.Arrays) TUNNEL_ID(org.onosproject.net.flow.criteria.Criterion.Type.TUNNEL_ID) AtomicCounter(org.onosproject.store.service.AtomicCounter) OfdpaPipelineUtility(org.onosproject.driver.pipeline.ofdpa.OfdpaPipelineUtility) PortNumber(org.onosproject.net.PortNumber) Tools.groupedThreads(org.onlab.util.Tools.groupedThreads) Operation(org.onosproject.net.flowobjective.Objective.Operation) DefaultNextObjective(org.onosproject.net.flowobjective.DefaultNextObjective) PortCriterion(org.onosproject.net.flow.criteria.PortCriterion) ServiceDirectory(org.onlab.osgi.ServiceDirectory) DefaultTrafficTreatment(org.onosproject.net.flow.DefaultTrafficTreatment) ObjectiveError(org.onosproject.net.flowobjective.ObjectiveError) INDIRECT(org.onosproject.net.group.GroupDescription.Type.INDIRECT) StorageService(org.onosproject.store.service.StorageService) GroupListener(org.onosproject.net.group.GroupListener) ApplicationId(org.onosproject.core.ApplicationId) NextObjective(org.onosproject.net.flowobjective.NextObjective) L2ModificationInstruction(org.onosproject.net.flow.instructions.L2ModificationInstruction) IN_PORT(org.onosproject.net.flow.criteria.Criterion.Type.IN_PORT) SELECT(org.onosproject.net.group.GroupDescription.Type.SELECT) ALL(org.onosproject.net.group.GroupDescription.Type.ALL) PipelinerContext(org.onosproject.net.behaviour.PipelinerContext) VLAN_VID(org.onosproject.net.flow.criteria.Criterion.Type.VLAN_VID) Collection(java.util.Collection) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Set(java.util.Set) FlowObjectiveStore(org.onosproject.net.flowobjective.FlowObjectiveStore) GroupEvent(org.onosproject.net.group.GroupEvent) Collectors(java.util.stream.Collectors) Sets(com.google.common.collect.Sets) Executors(java.util.concurrent.Executors) Objects(java.util.Objects) L2_MULTICAST_TYPE(org.onosproject.driver.pipeline.ofdpa.OfdpaGroupHandlerUtility.L2_MULTICAST_TYPE) List(java.util.List) ObjectiveContext(org.onosproject.net.flowobjective.ObjectiveContext) GroupBuckets(org.onosproject.net.group.GroupBuckets) Optional(java.util.Optional) CacheBuilder(com.google.common.cache.CacheBuilder) DeviceId(org.onosproject.net.DeviceId) Ofdpa2Pipeline(org.onosproject.driver.pipeline.ofdpa.Ofdpa2Pipeline) TunnelIdCriterion(org.onosproject.net.flow.criteria.TunnelIdCriterion) DefaultGroupDescription(org.onosproject.net.group.DefaultGroupDescription) GroupDescription(org.onosproject.net.group.GroupDescription) IpPrefix(org.onlab.packet.IpPrefix) CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList) OfdpaSetAllowVlanTranslation(org.onosproject.driver.extensions.OfdpaSetAllowVlanTranslation) NextTreatment(org.onosproject.net.flowobjective.NextTreatment) OfdpaSetVlanVid(org.onosproject.driver.extensions.OfdpaSetVlanVid) DefaultNextTreatment(org.onosproject.net.flowobjective.DefaultNextTreatment) GroupBucket(org.onosproject.net.group.GroupBucket) NextGroup(org.onosproject.net.behaviour.NextGroup) GroupKey(org.onosproject.net.group.GroupKey) Deque(java.util.Deque) Group(org.onosproject.net.group.Group) ArrayList(java.util.ArrayList) Lists(com.google.common.collect.Lists) TrafficSelector(org.onosproject.net.flow.TrafficSelector) ImmutableList(com.google.common.collect.ImmutableList) DefaultGroupKey(org.onosproject.net.group.DefaultGroupKey) OfdpaGroupHandlerUtility.l2MulticastGroupKey(org.onosproject.driver.pipeline.ofdpa.OfdpaGroupHandlerUtility.l2MulticastGroupKey) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) OfdpaGroupHandlerUtility(org.onosproject.driver.pipeline.ofdpa.OfdpaGroupHandlerUtility) Criterion(org.onosproject.net.flow.criteria.Criterion) TrafficTreatment(org.onosproject.net.flow.TrafficTreatment) RemovalNotification(com.google.common.cache.RemovalNotification) Ofdpa3AllowVlanTranslationType(org.onosproject.driver.extensions.Ofdpa3AllowVlanTranslationType) Instructions(org.onosproject.net.flow.instructions.Instructions) Logger(org.slf4j.Logger) MplsLabel(org.onlab.packet.MplsLabel) Instruction(org.onosproject.net.flow.instructions.Instruction) VlanId(org.onlab.packet.VlanId) GroupService(org.onosproject.net.group.GroupService) GroupInstruction(org.onosproject.net.flow.instructions.Instructions.GroupInstruction) DefaultGroupBucket(org.onosproject.net.group.DefaultGroupBucket) IdNextTreatment(org.onosproject.net.flowobjective.IdNextTreatment) TimeUnit(java.util.concurrent.TimeUnit) RemovalCause(com.google.common.cache.RemovalCause) GroupId(org.onosproject.core.GroupId) VlanIdCriterion(org.onosproject.net.flow.criteria.VlanIdCriterion) LoggerFactory.getLogger(org.slf4j.LoggerFactory.getLogger) MacAddress(org.onlab.packet.MacAddress) Cache(com.google.common.cache.Cache) ArrayDeque(java.util.ArrayDeque) Collections(java.util.Collections) NextGroup(org.onosproject.net.behaviour.NextGroup) ImmutableList(com.google.common.collect.ImmutableList) GroupKey(org.onosproject.net.group.GroupKey) DefaultGroupKey(org.onosproject.net.group.DefaultGroupKey) OfdpaGroupHandlerUtility.l2MulticastGroupKey(org.onosproject.driver.pipeline.ofdpa.OfdpaGroupHandlerUtility.l2MulticastGroupKey) GroupBuckets(org.onosproject.net.group.GroupBuckets) DefaultGroupDescription(org.onosproject.net.group.DefaultGroupDescription) GroupDescription(org.onosproject.net.group.GroupDescription) IdNextTreatment(org.onosproject.net.flowobjective.IdNextTreatment) GroupBucket(org.onosproject.net.group.GroupBucket) DefaultGroupBucket(org.onosproject.net.group.DefaultGroupBucket) DefaultGroupDescription(org.onosproject.net.group.DefaultGroupDescription) OfdpaSetAllowVlanTranslation(org.onosproject.driver.extensions.OfdpaSetAllowVlanTranslation) DefaultTrafficTreatment(org.onosproject.net.flow.DefaultTrafficTreatment) TrafficTreatment(org.onosproject.net.flow.TrafficTreatment) Deque(java.util.Deque) ArrayDeque(java.util.ArrayDeque) DefaultNextTreatment(org.onosproject.net.flowobjective.DefaultNextTreatment) DefaultGroupKey(org.onosproject.net.group.DefaultGroupKey) PortNumber(org.onosproject.net.PortNumber)

Example 82 with GroupBucket

use of org.onosproject.net.group.GroupBucket in project onos by opennetworkinglab.

the class Ofdpa2GroupHandler method addBucketToL3MulticastGroup.

private void addBucketToL3MulticastGroup(NextObjective nextObj, List<Deque<GroupKey>> allActiveKeys, List<GroupInfo> groupInfos, VlanId assignedVlan) {
    // Create the buckets to add to the outermost L3 Multicast group
    List<GroupBucket> newBuckets = createL3MulticastBucket(groupInfos);
    // get the group being edited
    Group l3mcastGroup = retrieveTopLevelGroup(allActiveKeys, deviceId, groupService, nextObj.id());
    if (l3mcastGroup == null) {
        fail(nextObj, ObjectiveError.GROUPMISSING);
        return;
    }
    GroupKey l3mcastGroupKey = l3mcastGroup.appCookie();
    int l3mcastGroupId = l3mcastGroup.id().id();
    // ensure assignedVlan applies to the chosen group
    VlanId expectedVlan = extractVlanIdFromGroupId(l3mcastGroupId);
    if (!expectedVlan.equals(assignedVlan)) {
        log.warn("VLAN ID {} does not match L3 Mcast group {} to which bucket is " + "being added, for next:{} in dev:{}. Abort.", assignedVlan, Integer.toHexString(l3mcastGroupId), nextObj.id(), deviceId);
        fail(nextObj, ObjectiveError.BADPARAMS);
    }
    GroupDescription l3mcastGroupDescription = new DefaultGroupDescription(deviceId, ALL, new GroupBuckets(newBuckets), l3mcastGroupKey, l3mcastGroupId, nextObj.appId());
    GroupChainElem l3mcastGce = new GroupChainElem(l3mcastGroupDescription, groupInfos.size(), true, deviceId);
    List<Deque<GroupKey>> addedKeys = new ArrayList<>();
    groupInfos.forEach(groupInfo -> {
        // update original NextGroup with new bucket-chain
        Deque<GroupKey> newBucketChain = new ArrayDeque<>();
        newBucketChain.addFirst(groupInfo.innerMostGroupDesc().appCookie());
        // Add L3 interface group to the chain if there is one.
        if (!groupInfo.nextGroupDesc().equals(groupInfo.innerMostGroupDesc())) {
            newBucketChain.addFirst(groupInfo.nextGroupDesc().appCookie());
        }
        newBucketChain.addFirst(l3mcastGroupKey);
        addedKeys.add(newBucketChain);
        updatePendingGroups(groupInfo.nextGroupDesc().appCookie(), l3mcastGce);
        // Point next group to inner-most group, if any
        if (!groupInfo.nextGroupDesc().equals(groupInfo.innerMostGroupDesc())) {
            GroupChainElem innerGce = new GroupChainElem(groupInfo.nextGroupDesc(), 1, false, deviceId);
            updatePendingGroups(groupInfo.innerMostGroupDesc().appCookie(), innerGce);
        }
        log.debug("Adding to L3MCAST: device:{} gid:{} group key:{} nextId:{}", deviceId, Integer.toHexString(l3mcastGroupId), l3mcastGroupKey, nextObj.id());
        // send the innermost group
        log.debug("Sending innermost group {} in group chain on device {} ", Integer.toHexString(groupInfo.innerMostGroupDesc().givenGroupId()), deviceId);
        groupService.addGroup(groupInfo.innerMostGroupDesc());
    });
    updatePendingNextObjective(l3mcastGroupKey, new OfdpaNextGroup(addedKeys, nextObj));
}
Also used : NextGroup(org.onosproject.net.behaviour.NextGroup) Group(org.onosproject.net.group.Group) GroupKey(org.onosproject.net.group.GroupKey) DefaultGroupKey(org.onosproject.net.group.DefaultGroupKey) OfdpaGroupHandlerUtility.l2MulticastGroupKey(org.onosproject.driver.pipeline.ofdpa.OfdpaGroupHandlerUtility.l2MulticastGroupKey) CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList) ArrayList(java.util.ArrayList) GroupBuckets(org.onosproject.net.group.GroupBuckets) Deque(java.util.Deque) ArrayDeque(java.util.ArrayDeque) ArrayDeque(java.util.ArrayDeque) DefaultGroupDescription(org.onosproject.net.group.DefaultGroupDescription) GroupDescription(org.onosproject.net.group.GroupDescription) GroupBucket(org.onosproject.net.group.GroupBucket) DefaultGroupBucket(org.onosproject.net.group.DefaultGroupBucket) DefaultGroupDescription(org.onosproject.net.group.DefaultGroupDescription) VlanId(org.onlab.packet.VlanId)

Example 83 with GroupBucket

use of org.onosproject.net.group.GroupBucket in project onos by opennetworkinglab.

the class Ofdpa2GroupHandler method processL2HashedNextObjective.

/**
 * Create L2 hash group.
 *
 * @param nextObj next objective
 */
private void processL2HashedNextObjective(NextObjective nextObj) {
    int l2LbIndex = Optional.ofNullable(nextObj.meta().getCriterion(IN_PORT)).map(c -> (PortCriterion) c).map(PortCriterion::port).map(PortNumber::toLong).map(Long::intValue).orElse(-1);
    if (l2LbIndex == -1) {
        log.warn("l2LbIndex is not found in the meta of L2 hash objective. Abort");
        return;
    }
    // Storage for all group keys in the chain of groups created
    List<Deque<GroupKey>> allGroupKeys = new ArrayList<>();
    List<GroupInfo> unsentGroups = new ArrayList<>();
    createL2HashBuckets(nextObj, allGroupKeys, unsentGroups);
    // Create L2 load balancing group
    List<GroupBucket> l2LbGroupBuckets = new ArrayList<>();
    for (GroupInfo gi : unsentGroups) {
        // create load balancing bucket to point to the outer group
        TrafficTreatment.Builder ttb = DefaultTrafficTreatment.builder();
        ttb.group(new GroupId(gi.nextGroupDesc().givenGroupId()));
        GroupBucket sbucket = DefaultGroupBucket.createSelectGroupBucket(ttb.build());
        l2LbGroupBuckets.add(sbucket);
    }
    int l2LbGroupId = L2_LB_TYPE | (TYPE_MASK & l2LbIndex);
    int l2lbgk = l2HashGroupKey(deviceId, l2LbIndex);
    GroupKey l2LbGroupKey = new DefaultGroupKey(appKryo.serialize(l2lbgk));
    GroupDescription l2LbGroupDesc = new DefaultGroupDescription(deviceId, SELECT, new GroupBuckets(l2LbGroupBuckets), l2LbGroupKey, l2LbGroupId, nextObj.appId());
    GroupChainElem l2LbGce = new GroupChainElem(l2LbGroupDesc, l2LbGroupBuckets.size(), false, deviceId);
    // Create objects for local and distributed storage
    allGroupKeys.forEach(gKeyChain -> gKeyChain.addFirst(l2LbGroupKey));
    OfdpaNextGroup ofdpaGrp = new OfdpaNextGroup(allGroupKeys, nextObj);
    // Store l2LbGroupKey with the ofdpaGroupChain for the nextObjective that depends on it
    updatePendingNextObjective(l2LbGroupKey, ofdpaGrp);
    log.debug("Trying L2-LB: device:{} gid:{} gkey:{} nextId:{}", deviceId, Integer.toHexString(l2LbGroupId), l2LbGroupKey, nextObj.id());
    // finally we are ready to send the innermost groups
    for (GroupInfo gi : unsentGroups) {
        log.debug("Sending innermost group {} in group chain on device {} ", Integer.toHexString(gi.innerMostGroupDesc().givenGroupId()), deviceId);
        updatePendingGroups(gi.nextGroupDesc().appCookie(), l2LbGce);
        groupService.addGroup(gi.innerMostGroupDesc());
    }
}
Also used : CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList) ArrayList(java.util.ArrayList) GroupKey(org.onosproject.net.group.GroupKey) DefaultGroupKey(org.onosproject.net.group.DefaultGroupKey) OfdpaGroupHandlerUtility.l2MulticastGroupKey(org.onosproject.driver.pipeline.ofdpa.OfdpaGroupHandlerUtility.l2MulticastGroupKey) DefaultTrafficTreatment(org.onosproject.net.flow.DefaultTrafficTreatment) TrafficTreatment(org.onosproject.net.flow.TrafficTreatment) GroupBuckets(org.onosproject.net.group.GroupBuckets) Deque(java.util.Deque) ArrayDeque(java.util.ArrayDeque) GroupId(org.onosproject.core.GroupId) DefaultGroupDescription(org.onosproject.net.group.DefaultGroupDescription) GroupDescription(org.onosproject.net.group.GroupDescription) DefaultGroupKey(org.onosproject.net.group.DefaultGroupKey) GroupBucket(org.onosproject.net.group.GroupBucket) DefaultGroupBucket(org.onosproject.net.group.DefaultGroupBucket) PortNumber(org.onosproject.net.PortNumber) DefaultGroupDescription(org.onosproject.net.group.DefaultGroupDescription)

Example 84 with GroupBucket

use of org.onosproject.net.group.GroupBucket in project onos by opennetworkinglab.

the class Ofdpa2GroupHandler method createMplsSwap.

/**
 * Creates an Mpls group of type swap.
 *
 * @param nextGroupId the next group in the chain
 * @param subtype the mpls swap label group subtype
 * @param index the index of the group
 * @param mplsLabel the mpls label to swap
 * @param applicationId the application id
 * @return the group description
 */
protected GroupDescription createMplsSwap(int nextGroupId, OfdpaMplsGroupSubType subtype, int index, MplsLabel mplsLabel, ApplicationId applicationId) {
    TrafficTreatment.Builder treatment = DefaultTrafficTreatment.builder();
    treatment.setMpls(mplsLabel);
    // We point the group to the next group.
    treatment.group(new GroupId(nextGroupId));
    GroupBucket groupBucket = DefaultGroupBucket.createIndirectGroupBucket(treatment.build());
    // Finally we build the group description.
    int groupId = makeMplsLabelGroupId(subtype, index);
    GroupKey groupKey = new DefaultGroupKey(Ofdpa2Pipeline.appKryo.serialize(index));
    return new DefaultGroupDescription(deviceId, INDIRECT, new GroupBuckets(Collections.singletonList(groupBucket)), groupKey, groupId, applicationId);
}
Also used : GroupKey(org.onosproject.net.group.GroupKey) DefaultGroupKey(org.onosproject.net.group.DefaultGroupKey) OfdpaGroupHandlerUtility.l2MulticastGroupKey(org.onosproject.driver.pipeline.ofdpa.OfdpaGroupHandlerUtility.l2MulticastGroupKey) DefaultGroupKey(org.onosproject.net.group.DefaultGroupKey) GroupBucket(org.onosproject.net.group.GroupBucket) DefaultGroupBucket(org.onosproject.net.group.DefaultGroupBucket) DefaultTrafficTreatment(org.onosproject.net.flow.DefaultTrafficTreatment) TrafficTreatment(org.onosproject.net.flow.TrafficTreatment) GroupBuckets(org.onosproject.net.group.GroupBuckets) DefaultGroupDescription(org.onosproject.net.group.DefaultGroupDescription) GroupId(org.onosproject.core.GroupId)

Example 85 with GroupBucket

use of org.onosproject.net.group.GroupBucket in project onos by opennetworkinglab.

the class Ofdpa2GroupHandler method createL2MulticastGroup.

private void createL2MulticastGroup(NextObjective nextObj, VlanId vlanId, List<GroupInfo> groupInfos) {
    // Realize & represent L2 multicast group in OFDPA driver layer
    // TODO : Need to identify significance of OfdpaNextGroup.
    Integer l2MulticastGroupId = L2_MULTICAST_TYPE | (vlanId.toShort() << 16);
    final GroupKey l2MulticastGroupKey = l2MulticastGroupKey(vlanId, deviceId);
    List<Deque<GroupKey>> l2MulticastAllGroup = Lists.newArrayList();
    groupInfos.forEach(groupInfo -> {
        Deque<GroupKey> groupKeyChain = new ArrayDeque<>();
        groupKeyChain.addFirst(groupInfo.innerMostGroupDesc().appCookie());
        groupKeyChain.addFirst(l2MulticastGroupKey);
        l2MulticastAllGroup.add(groupKeyChain);
    });
    OfdpaNextGroup ofdpaL2MulticastGroup = new OfdpaNextGroup(l2MulticastAllGroup, nextObj);
    updatePendingNextObjective(l2MulticastGroupKey, ofdpaL2MulticastGroup);
    // Group Chain Hierarchy creation using group service and thus in device level
    List<GroupBucket> l2McastBuckets = new ArrayList<>();
    groupInfos.forEach(groupInfo -> {
        // Points to L2 interface group directly.
        TrafficTreatment.Builder trafficTreatment = DefaultTrafficTreatment.builder();
        trafficTreatment.group(new GroupId(groupInfo.innerMostGroupDesc().givenGroupId()));
        GroupBucket bucket = DefaultGroupBucket.createAllGroupBucket(trafficTreatment.build());
        l2McastBuckets.add(bucket);
    });
    GroupDescription l2MulticastGroupDescription = new DefaultGroupDescription(deviceId, ALL, new GroupBuckets(l2McastBuckets), l2MulticastGroupKey, l2MulticastGroupId, nextObj.appId());
    GroupChainElem l2MulticastGce = new GroupChainElem(l2MulticastGroupDescription, groupInfos.size(), false, deviceId);
    groupInfos.forEach(groupInfo -> {
        updatePendingGroups(groupInfo.innerMostGroupDesc().appCookie(), l2MulticastGce);
        groupService.addGroup(groupInfo.innerMostGroupDesc());
    });
}
Also used : GroupKey(org.onosproject.net.group.GroupKey) DefaultGroupKey(org.onosproject.net.group.DefaultGroupKey) OfdpaGroupHandlerUtility.l2MulticastGroupKey(org.onosproject.driver.pipeline.ofdpa.OfdpaGroupHandlerUtility.l2MulticastGroupKey) CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList) ArrayList(java.util.ArrayList) DefaultTrafficTreatment(org.onosproject.net.flow.DefaultTrafficTreatment) TrafficTreatment(org.onosproject.net.flow.TrafficTreatment) GroupBuckets(org.onosproject.net.group.GroupBuckets) Deque(java.util.Deque) ArrayDeque(java.util.ArrayDeque) ArrayDeque(java.util.ArrayDeque) GroupId(org.onosproject.core.GroupId) DefaultGroupDescription(org.onosproject.net.group.DefaultGroupDescription) GroupDescription(org.onosproject.net.group.GroupDescription) GroupBucket(org.onosproject.net.group.GroupBucket) DefaultGroupBucket(org.onosproject.net.group.DefaultGroupBucket) DefaultGroupDescription(org.onosproject.net.group.DefaultGroupDescription)

Aggregations

GroupBucket (org.onosproject.net.group.GroupBucket)108 GroupBuckets (org.onosproject.net.group.GroupBuckets)87 DefaultGroupBucket (org.onosproject.net.group.DefaultGroupBucket)75 DefaultTrafficTreatment (org.onosproject.net.flow.DefaultTrafficTreatment)66 TrafficTreatment (org.onosproject.net.flow.TrafficTreatment)66 DefaultGroupDescription (org.onosproject.net.group.DefaultGroupDescription)62 GroupKey (org.onosproject.net.group.GroupKey)62 DefaultGroupKey (org.onosproject.net.group.DefaultGroupKey)56 GroupDescription (org.onosproject.net.group.GroupDescription)55 ArrayList (java.util.ArrayList)42 Group (org.onosproject.net.group.Group)40 GroupId (org.onosproject.core.GroupId)35 PortNumber (org.onosproject.net.PortNumber)32 DefaultGroup (org.onosproject.net.group.DefaultGroup)26 List (java.util.List)21 DeviceId (org.onosproject.net.DeviceId)20 TrafficSelector (org.onosproject.net.flow.TrafficSelector)20 OfdpaGroupHandlerUtility.l2MulticastGroupKey (org.onosproject.driver.pipeline.ofdpa.OfdpaGroupHandlerUtility.l2MulticastGroupKey)17 DefaultTrafficSelector (org.onosproject.net.flow.DefaultTrafficSelector)16 ArrayDeque (java.util.ArrayDeque)15