detection handler for table maintanance
Add a CHECK_OVERLAP flag to flow mods which requires the switch to do
the (potentially more costly) check that there doesn't already exist a
conflicting flow with the same priority. If there is one, the mod
fails and an error code is returned.
Flow expiry: Record OFPFF_SEND_FLOW_EXP flag in user data path
Remove monolithic OpenFlow switch.
Add userspace datapath.
Fix BUG#13: Revise check wildcards for in_port != out_port output
validation.
Fix BUG#30: Made use of get_jiffies_64 instead of jiffies.
Fix BUG#31: Fix NetFPGA crash in case of test_delete test harness run.
Fix BUG#32: Add stack depth limitation to avoid inifinite loop in
log_backtrace.
Fix BUG#33: Improve NetFPGA kernel extension and NetFPGA image to
support MAC address rewrite features (two actions) on NetFPGA enabled
OpenFlow switch.
Fix BUG#34: Add NetFPGA kernel extension source codes to create
distribution package with NetFPGA correctly.
Fix BUG#38: Improve regression test for FLOW_MOD ACTION SET_DL_SRC and
SET_DL_DST.
Fix BUG#39: Correct misunderstanding of byte order ops for OFPAT_XXX.
To support this, an "out_port" field has been added to the "ofp_flow_mod",
"ofp_flow_stats_request", and "ofp_aggregate_stats_request" messages. If an
"out_port" contains a value other than "OFPP_NONE", it introduces a constraint
when matching. This constraint is that the rule must contain an output action
directed at that port. Other constraints such as ofp_match structs and
priorities are still used; this is purely an *additional* constraint. Note
that to get previous behavior, though, "out_port" must be set to "OFPP_NONE",
since "0" is a valid port id. This only applies to the delete and
delete_strict flow mod commands; the field is ignored by add, modify, and
modify_strict.
Allow vendors to define their own actions. Actions were originally fixed-
length, which was a bit constraining. Actions now contain a length field,
which gives them more flexibility.
This cleans up the handling of modifying existing flows. There now exists
OFPFC_MODIFY and OFPFC_MODIFY_STRICT commands, which have the same matching
characteristics to their OFPFC_DELETE* counterparts. When adding a flow that
already exists, the counters and timers are now reset (ie, its treated as a
new flow). This commit also adds the "--strict" option to dpctl to allow
strict matching for "mod-flows" and "del-flows".
Older versions of OpenFlow pre-defined a few different types of tables and the
Features Reply message would indicate how many of those entries existed. This
was very inflexible, so now the Features Reply just indicates how many tables
there are. The controller now sends a Table Stats request to find out how
many entries are supported and the fields that can be wildcarded.
This change also removes the "buffer_mb" field from the Features Reply, since
it was not being used and seemed to be of limited value.
Now the number of actions is limited, as a practical matter, to the size
of the buffer that the kernel provides for Netlink dumps, which is usually
4096 bytes. A flow statistics entry must fit in a single one of these
buffers. Actions are 8 bytes each, so this is about 500 actions
considering overhead.
This changes the kernel switch implementation to use the kernel Netlink
"dump" interface to allow flow stats that don't fit in the socket buffer
to be dumped gradually as the caller drains the socket buffer.
One of the changes here is a bug fix for nla_unreserve. Because Netlink
attributes' lengths are rounded up to a multiple of 4 bytes, reducing
the length of the payload by N bytes doesn't necessarily reduce the
length of the skb by N bytes. Instead, we need to know the original
length and final length of the attribute. This means that using 'len'
as a difference in bytes doesn't really make sense, so this changes
'len' to be the new length of the attribute payload and renames the
function to nla_shrink to (IMO) better reflect what it is now doing.
Since we have to release the RCU read lock between calls to the dump
function, we need table iterators that persist across RCU epochs. One
way to do this would be to add new "iterator_save" and "iterator_restore"
functions, but this seemed like overkill since there would then be a
total of 5 iterator functions that have only one user (flow stats dumping).
Instead, this patch refactors table iteration into a single "iterate"
function that takes a callback. This simplifies the table iteration code
significantly.
This change also modifies dpctl to understand the new format of flow
stats.