Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
alshabib
2014-10-20 17:17:31 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9eab22f09d74bcac177991f4e1004a060e49db94
9eab22f0
1 parent
e0ec3294
possible fix for link discovery
Change-Id: Id52dce21e93f0ca4665b15d3b169dc6a8dba76b4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
7 deletions
openflow/ctl/src/main/java/org/onlab/onos/openflow/controller/impl/Controller.java
openflow/ctl/src/main/java/org/onlab/onos/openflow/controller/impl/OFChannelHandler.java
openflow/ctl/src/main/java/org/onlab/onos/openflow/controller/impl/OpenFlowControllerImpl.java
openflow/ctl/src/main/java/org/onlab/onos/openflow/controller/impl/Controller.java
View file @
9eab22f
...
...
@@ -48,13 +48,10 @@ import org.slf4j.LoggerFactory;
public
class
Controller
{
protected
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
Controller
.
class
);
static
final
String
ERROR_DATABASE
=
"The controller could not communicate with the system database."
;
protected
static
final
OFFactory
FACTORY13
=
OFFactories
.
getFactory
(
OFVersion
.
OF_13
);
protected
static
final
OFFactory
FACTORY10
=
OFFactories
.
getFactory
(
OFVersion
.
OF_10
);
// The controllerNodeIPsCache maps Controller IDs to their IP address.
// It's only used by handleControllerNodeIPsChanged
protected
HashMap
<
String
,
String
>
controllerNodeIPsCache
;
private
ChannelGroup
cg
;
...
...
openflow/ctl/src/main/java/org/onlab/onos/openflow/controller/impl/OFChannelHandler.java
View file @
9eab22f
...
...
@@ -41,6 +41,7 @@ import org.projectfloodlight.openflow.protocol.OFHello;
import
org.projectfloodlight.openflow.protocol.OFHelloElem
;
import
org.projectfloodlight.openflow.protocol.OFMessage
;
import
org.projectfloodlight.openflow.protocol.OFPacketIn
;
import
org.projectfloodlight.openflow.protocol.OFPacketOut
;
import
org.projectfloodlight.openflow.protocol.OFPortDescStatsReply
;
import
org.projectfloodlight.openflow.protocol.OFPortDescStatsRequest
;
import
org.projectfloodlight.openflow.protocol.OFPortStatus
;
...
...
@@ -418,7 +419,14 @@ class OFChannelHandler extends IdleStateAwareChannelHandler {
//h.setSwitchRole(RoleState.EQUAL);
h
.
sw
.
startDriverHandshake
();
h
.
setState
(
WAIT_SWITCH_DRIVER_SUB_HANDSHAKE
);
if
(
h
.
sw
.
isDriverHandshakeComplete
())
{
if
(!
h
.
sw
.
connectSwitch
())
{
disconnectDuplicate
(
h
);
}
h
.
setState
(
ACTIVE
);
}
else
{
h
.
setState
(
WAIT_SWITCH_DRIVER_SUB_HANDSHAKE
);
}
}
...
...
@@ -465,6 +473,8 @@ class OFChannelHandler extends IdleStateAwareChannelHandler {
if
(
h
.
sw
.
isDriverHandshakeComplete
())
{
moveToActive
(
h
);
h
.
state
.
processOFMessage
(
h
,
m
);
return
;
}
...
...
@@ -479,7 +489,6 @@ class OFChannelHandler extends IdleStateAwareChannelHandler {
h
.
sw
.
processDriverHandshakeMessage
(
m
);
if
(
h
.
sw
.
isDriverHandshakeComplete
())
{
moveToActive
(
h
);
h
.
setState
(
ACTIVE
);
}
}
}
else
{
...
...
@@ -507,7 +516,6 @@ class OFChannelHandler extends IdleStateAwareChannelHandler {
h
.
setState
(
ACTIVE
);
if
(!
success
)
{
disconnectDuplicate
(
h
);
return
;
}
}
...
...
@@ -581,6 +589,11 @@ class OFChannelHandler extends IdleStateAwareChannelHandler {
@Override
void
processOFPacketIn
(
OFChannelHandler
h
,
OFPacketIn
m
)
{
// OFPacketOut out =
// h.sw.factory().buildPacketOut()
// .setXid(m.getXid())
// .setBufferId(m.getBufferId()).build();
// h.sw.sendMsg(out);
h
.
dispatchMessage
(
m
);
}
...
...
openflow/ctl/src/main/java/org/onlab/onos/openflow/controller/impl/OpenFlowControllerImpl.java
View file @
9eab22f
...
...
@@ -188,6 +188,7 @@ public class OpenFlowControllerImpl implements OpenFlowController {
@Override
public
boolean
addConnectedSwitch
(
Dpid
dpid
,
OpenFlowSwitch
sw
)
{
if
(
connectedSwitches
.
get
(
dpid
)
!=
null
)
{
log
.
error
(
"Trying to add connectedSwitch but found a previous "
+
"value for dpid: {}"
,
dpid
);
...
...
Please
register
or
login
to post a comment