Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Nicira (OpenVSwitch) exit, resubmit, and resubmit_table actions. #503

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions java_gen/java_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,9 @@ def gen_fixed_length_string_jtype(length):
# the same OFPort, but with a default value of ZERO, only for OF10 match
of_port_match_v1 = JType("OFPort") \
.op(version=1, read="OFPort.read2Bytes(bb)", write="$name.write2Bytes(bb)", default="OFPort.ZERO")
# the same as OFPort, but always 2-bytes and defaults to IN_PORT
of_port_nicira = JType("OFPort") \
.op(version=ANY, read="OFPort.read2Bytes(bb)", write="$name.write2Bytes(bb)", default="OFPort.IN_PORT")
actions_list = gen_list_jtype("OFAction")
instructions_list = gen_list_jtype("OFInstruction")
buckets_list = gen_list_jtype("OFBucket")
Expand Down Expand Up @@ -813,6 +816,9 @@ def gen_fixed_length_string_jtype(length):
'of_bsn_gentable_entry_add' : { 'table_id' : gen_table_id },
'of_bsn_log': { 'data': var_string },

'of_action_nicira_resubmit': { 'port': of_port_nicira },
'of_action_nicira_resubmit_table': { 'port': of_port_nicira },

'of_features_reply' : { 'auxiliary_id' : of_aux_id},

'of_bundle_add_msg' : { 'data' : of_message },
Expand Down
16 changes: 16 additions & 0 deletions openflow_input/nicira_exit
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#version any
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rsharo sorry for the delay on this pull request. Do these apply to all OpenFlow versions? Everything looks good to me except for this (in each input file).


// Nicira (OpenVSwitch) Exit action.
//
// Causes the datapath to immediately halt execution of further apply-actions.
//
// See ovs-ofctl man page for details:
// http://openvswitch.org/support/dist-docs/ovs-ofctl.8.txt
struct of_action_nicira_exit : of_action_nicira {
uint16_t type == 65535;
uint16_t len;
uint32_t experimenter == 0x2320;
uint16_t subtype == 0x11;
pad(2);
pad(4);
};
19 changes: 19 additions & 0 deletions openflow_input/nicira_resubmit
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#version any
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


// Nicira (OpenVSwitch) Resubmit action.
//
// Re-searches this OpenFlow flow table with the in_port field
// replaced by port (if port is not OFPP_IN_PORT) and executes the
// actions found, if any, in addition to any other actions in this
// flow entry.
//
// See ovs-ofctl man page for details:
// http://openvswitch.org/support/dist-docs/ovs-ofctl.8.txt
struct of_action_nicira_resubmit : of_action_nicira {
uint16_t type == 65535;
uint16_t len;
uint32_t experimenter == 0x2320;
uint16_t subtype == 0x1;
uint16_t port; // 16-bit port number for all OF versions, default should be OFPP_IN_PORT
pad(4);
};
20 changes: 20 additions & 0 deletions openflow_input/nicira_resubmit_table
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#version any
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


// Nicira (OpenVSwitch) Resubmit action with table id.
//
// Searches the specified OpenFlow flow table with the in_port field
// replaced by port (if port is not OFPP_IN_PORT) and executes the
// actions found, if any, in addition to any other actions in this
// flow entry.
//
// See ovs-ofctl man page for details:
// http://openvswitch.org/support/dist-docs/ovs-ofctl.8.txt
struct of_action_nicira_resubmit_table : of_action_nicira {
uint16_t type == 65535;
uint16_t len;
uint32_t experimenter == 0x2320;
uint16_t subtype == 0xe;
uint16_t port; // 16-bit port number for all OF versions, default should be OFPP_IN_PORT
uint8_t table_id; // OFPTT_ALL means "same table as this flow"
pad(3);
};