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
6e168027
Commit
6e168027
authored
12 years ago
by
Andreas Wundsam
Browse files
Options
Downloads
Patches
Plain Diff
OFSwitch: add caveat about undocumented behavior
parent
e1cb19aa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/net/floodlightcontroller/core/OFSwitchBase.java
+15
-3
15 additions, 3 deletions
...main/java/net/floodlightcontroller/core/OFSwitchBase.java
with
15 additions
and
3 deletions
src/main/java/net/floodlightcontroller/core/OFSwitchBase.java
+
15
−
3
View file @
6e168027
...
...
@@ -547,18 +547,30 @@ public abstract class OFSwitchBase implements IOFSwitch {
}
return
res
;
}
@Override
public
void
flush
()
{
Map
<
IOFSwitch
,
List
<
OFMessage
>>
msg_buffer_map
=
local_msg_buffer
.
get
();
List
<
OFMessage
>
msglist
=
msg_buffer_map
.
get
(
this
);
if
((
msglist
!=
null
)
&&
(
msglist
.
size
()
>
0
))
{
/* ============================ BIG CAVEAT ===============================
* This code currently works, but relies on undocumented behavior of
* netty.
*
* The method org.jboss.netty.channel.Channel.write(Object)
* (invoked from this.write(List<OFMessage> msg) is currently
* documented to be <emph>asynchronous</emph>. If the method /were/ truely
* asynchronous, this would break our code (because we are clearing the
* msglist right after calling write.
*
* For now, Netty actually invokes the conversion pipeline before doing
* anything asynchronous, so we are safe. But we should probably change
* that behavior.
*/
try
{
this
.
write
(
msglist
);
}
catch
(
IOException
e
)
{
// TODO: log exception
e
.
printStackTrace
();
log
.
error
(
"Error flushing local message buffer: "
+
e
.
getMessage
(),
e
);
}
msglist
.
clear
();
}
...
...
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