Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
floodlight
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
croft1
floodlight
Commits
b7399912
Commit
b7399912
authored
12 years ago
by
Kanzhe Jiang
Browse files
Options
Downloads
Patches
Plain Diff
clean up blocking algorithm for all APs when topo changes
parent
6a8e984f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/net/floodlightcontroller/devicemanager/internal/DeviceManagerImpl.java
+15
-6
15 additions, 6 deletions
...tcontroller/devicemanager/internal/DeviceManagerImpl.java
with
15 additions
and
6 deletions
src/main/java/net/floodlightcontroller/devicemanager/internal/DeviceManagerImpl.java
+
15
−
6
View file @
b7399912
...
...
@@ -1660,15 +1660,16 @@ public class DeviceManagerImpl implements IDeviceManagerService, IOFMessageListe
if
(
topology
.
isAllowed
(
swid
,
port
)
==
false
)
continue
;
if
(
tempAPMap
.
containsKey
(
clusterId
))
{
DeviceAttachmentPoint
existingDap
=
tempAPMap
.
get
(
clusterId
);
if
(
existingDap
!=
null
)
{
// We compare to see which one is newer, move attachment
// point to "old" list.
// They are removed after deleting from storage.
DeviceAttachmentPoint
existingDap
=
tempAPMap
.
get
(
clusterId
);
if
(
isNewer
(
dap
,
existingDap
))
{
tempAPMap
.
put
(
clusterId
,
dap
);
tempOldAPMap
.
put
(
clusterId
,
existingDap
);
}
else
{
tempOldAPMap
.
put
(
clusterId
,
dap
);
}
}
else
{
tempAPMap
.
put
(
clusterId
,
dap
);
...
...
@@ -1684,17 +1685,25 @@ public class DeviceManagerImpl implements IDeviceManagerService, IOFMessageListe
* Also make sure the attachmentPoints are in non-blocked state
*/
for
(
DeviceAttachmentPoint
dap:
tempAPMap
.
values
())
{
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"Reset AP {} for device {}"
,
dap
,
d
);
}
//dap.setBlocked(false);
dap
.
resetConflictState
();
dap
.
resetConflictState
();
}
d
.
setAttachmentPoints
(
tempAPMap
.
values
());
for
(
DeviceAttachmentPoint
dap
:
tempOldAPMap
.
values
())
{
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"Reset Old AP {} for device {}"
,
dap
,
d
);
}
//dap.setBlocked(false);
dap
.
resetConflictState
();
dap
.
resetConflictState
();
d
.
addOldAttachmentPoint
(
dap
);
}
log
.
debug
(
"After cleanup, device {}"
,
d
);
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"After cleanup, device {}"
,
d
);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment