2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-29 13:27:59 +00:00

15 Commits

Author SHA1 Message Date
Ben Pfaff
f25d0cf3c3 Introduce ofpacts, an abstraction of OpenFlow actions.
OpenFlow actions have always been somewhat awkward to handle.
Moreover, over time we've started creating actions that require more
complicated parsing.  When we maintain those actions internally in
their wire format, we end up parsing them multiple times, whenever
we have to look at the set of actions.

When we add support for OpenFlow 1.1 or later protocols, the situation
will get worse, because these newer protocols support many of the same
actions but with different representations.  It becomes unrealistic to
handle each protocol in its wire format.

This commit adopts a new strategy, by converting OpenFlow actions into
an internal form from the wire format when they are read, and converting
them back to the wire format when flows are dumped.  I believe that this
will be more maintainable over time.

Thanks to Simon Horman and Pravin Shelar for reviews.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-07-03 22:21:11 -07:00
Raju Subramanian
e0edde6fee Global replace of Nicira Networks.
Replaced all instances of Nicira Networks(, Inc) to Nicira, Inc.

Feature #10593
Signed-off-by: Raju Subramanian <rsubramanian@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-02 17:08:02 -07:00
Ben Pfaff
816fd533f8 meta-flow: New "subfield" data structure.
Until now, parts of a field have been dealt with in a fairly ad-hoc way.
struct mf_subfield and the supporting functions added by this commit make
their use more systematic.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-02-01 14:15:11 -08:00
Ben Pfaff
300c69464c multipath: Correctly calculate number of required destination bits.
The previous calculation was wrong when n_links was a power of 2.

Reported-by: Paul Ingram <paul@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-01-12 16:51:29 -08:00
Ben Pfaff
90bf1e0732 Better abstract OpenFlow error codes.
This commit switches from using the actual protocol values of error codes
internally in Open vSwitch, to using abstract values that are translated to
and from protocol values at message parsing and serialization time.  I
believe that this makes the code easier to read and to write.

This is also one step along the way toward OpenFlow 1.1 support because
OpenFlow 1.1 renumbered a bunch of error codes.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-01-12 15:54:25 -08:00
Ben Pfaff
93996add1c ofp-util: Add type-safe functions for serializing actions. 2011-09-13 11:46:08 -07:00
Ethan Jackson
ce523f65fc nx-match: Update register check functions.
This patch simplifies the API of nxm_dst_check() and adds a new
function nxm_src_check() for checking source fields.
2011-08-12 15:06:53 -07:00
Ethan Jackson
43edca5717 nx-match: New helpers.
This patch creates two new helper functions, nxm_reg_load() and
nxm_dst_check().  The new nxm_dst_check() function may be used to
check the validity of destination fields used by actions.  The new
nxm_reg_load() function may be used by actions which need to write
to NXM fields.

This patch also allows multipath and autopath to write their result
to non-register NXM fields.
2011-07-22 17:46:48 -07:00
Ethan Jackson
520e9a2acd nicira-ext: Generalize nx_mp_fields into nx_hash_fields.
Future patches will use nx_hash_fields for non-multipath related
actions.  This patch renames nx_mp_fields and creates a new
flow_hash_fields() function.
2011-07-19 11:34:26 -07:00
Ben Pfaff
770f1f66bb multipath: Validate multipath actions more thoroughly in multipath_parse().
The stricter validation requires updates to the calls to test-multipath
to supply a valid n_links value.  test-multipath doesn't actually use
that value (it runs over different values in an internal "for" loop), so
this doesn't change any behavior.

Also adds a test to exercise each possible multipath_parse() error message.

Reported-by: Reid Price <reid@nicira.com>
Bug #4462.
2011-02-23 09:42:32 -08:00
Ethan Jackson
ff55ea1f29 lib: Move l4 flow hash to the flow library.
This commit moves hash_symmetric_l4() to the flow library so that
it may be used in future patches.
2011-02-02 11:32:40 -08:00
Ben Pfaff
d7bf2b001f multipath: Fix off-by-one in hash_threshold multipath calculation.
0xffffffff / (0xffffffff / n) can have a value as large as n (consider the
n == 1 case), but we need a value no bigger than n-1.  So add 1 before
dividing to fix the problem.

This caused a test failure on Debian "lenny" amd64 when apparently
unrelated code changed.

Reported-by: Justin Pettit <jpettit@nicira.com>
2011-01-21 17:09:21 -08:00
Ethan Jackson
19f62195a5 multipath: Fix compiler warning.
This commit fixes the following compiler warning:
"cast from function call of type 'uint16_t' to non-matching type
'enum nx_mp_fields'"
2011-01-04 10:30:36 -08:00
Ben Pfaff
7cfb3c26b2 multipath: Zero padding bytes in fields before hashing.
Otherwise the hash includes 3 bytes of trailing indeterminate data.

Reported-by: Pankaj Thakkar <thakkar@nicira.com>
2010-12-28 22:32:13 -08:00
Ben Pfaff
53ddd40ab5 Implement a new Nicira extension action for multipath link selection. 2010-12-17 14:38:50 -08:00