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
Thomas Vachuska
2014-10-28 13:09:46 -0700
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
92f4361692a50c2cd05ab06559feb6dab799f1ec
92f43616
2 parents
444eda60
d4a8bba6
Merge remote-tracking branch 'origin/master'
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
10 deletions
providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/FlowModBuilderVer13.java
providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/FlowModBuilderVer13.java
View file @
92f4361
...
...
@@ -40,7 +40,6 @@ import org.projectfloodlight.openflow.protocol.OFFlowDelete;
import
org.projectfloodlight.openflow.protocol.OFFlowMod
;
import
org.projectfloodlight.openflow.protocol.OFFlowModFlags
;
import
org.projectfloodlight.openflow.protocol.action.OFAction
;
import
org.projectfloodlight.openflow.protocol.instruction.OFInstruction
;
import
org.projectfloodlight.openflow.protocol.match.Match
;
import
org.projectfloodlight.openflow.protocol.oxm.OFOxm
;
import
org.projectfloodlight.openflow.types.CircuitSignalID
;
...
...
@@ -78,8 +77,15 @@ public class FlowModBuilderVer13 extends FlowModBuilder {
@Override
public
OFFlowAdd
buildFlowAdd
()
{
Match
match
=
buildMatch
();
OFInstruction
writeActions
=
factory
().
instructions
().
writeActions
(
buildActions
());
List
<
OFAction
>
actions
=
buildActions
();
// FIXME had to revert back to using apply-actions instead of
// write-actions because LINC-OE apparently doesn't support
// write-actions. I would prefer to change this back in the future
// because apply-actions is an optional instruction in OF 1.3.
//OFInstruction writeActions =
//factory().instructions().writeActions(actions);
long
cookie
=
flowRule
().
id
().
value
();
...
...
@@ -88,7 +94,8 @@ public class FlowModBuilderVer13 extends FlowModBuilder {
.
setXid
(
cookie
)
.
setCookie
(
U64
.
of
(
cookie
))
.
setBufferId
(
OFBufferId
.
NO_BUFFER
)
.
setInstructions
(
Collections
.
singletonList
(
writeActions
))
.
setActions
(
actions
)
//.setInstructions(Collections.singletonList(writeActions))
.
setMatch
(
match
)
.
setFlags
(
Collections
.
singleton
(
OFFlowModFlags
.
SEND_FLOW_REM
))
.
setPriority
(
flowRule
().
priority
())
...
...
@@ -100,8 +107,9 @@ public class FlowModBuilderVer13 extends FlowModBuilder {
@Override
public
OFFlowMod
buildFlowMod
()
{
Match
match
=
buildMatch
();
OFInstruction
writeActions
=
factory
().
instructions
().
writeActions
(
buildActions
());
List
<
OFAction
>
actions
=
buildActions
();
//OFInstruction writeActions =
//factory().instructions().writeActions(actions);
long
cookie
=
flowRule
().
id
().
value
();
...
...
@@ -110,7 +118,8 @@ public class FlowModBuilderVer13 extends FlowModBuilder {
.
setXid
(
cookie
)
.
setCookie
(
U64
.
of
(
cookie
))
.
setBufferId
(
OFBufferId
.
NO_BUFFER
)
.
setInstructions
(
Collections
.
singletonList
(
writeActions
))
.
setActions
(
actions
)
//.setInstructions(Collections.singletonList(writeActions))
.
setMatch
(
match
)
.
setFlags
(
Collections
.
singleton
(
OFFlowModFlags
.
SEND_FLOW_REM
))
.
setPriority
(
flowRule
().
priority
())
...
...
@@ -122,8 +131,9 @@ public class FlowModBuilderVer13 extends FlowModBuilder {
@Override
public
OFFlowDelete
buildFlowDel
()
{
Match
match
=
buildMatch
();
OFInstruction
writeActions
=
factory
().
instructions
().
writeActions
(
buildActions
());
List
<
OFAction
>
actions
=
buildActions
();
//OFInstruction writeActions =
//factory().instructions().writeActions(actions);
long
cookie
=
flowRule
().
id
().
value
();
...
...
@@ -131,7 +141,8 @@ public class FlowModBuilderVer13 extends FlowModBuilder {
.
setXid
(
cookie
)
.
setCookie
(
U64
.
of
(
cookie
))
.
setBufferId
(
OFBufferId
.
NO_BUFFER
)
.
setInstructions
(
Collections
.
singletonList
(
writeActions
))
.
setActions
(
actions
)
//.setInstructions(Collections.singletonList(writeActions))
.
setMatch
(
match
)
.
setFlags
(
Collections
.
singleton
(
OFFlowModFlags
.
SEND_FLOW_REM
))
.
setPriority
(
flowRule
().
priority
())
...
...
Please
register
or
login
to post a comment