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

17 Commits

Author SHA1 Message Date
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
27527aa09c Introduce ofputil_protocol, to abstract the protocol in use on a connection.
Open vSwitch already handles a few different protocol variations, but it
does so in a nonuniform manner:

  - OpenFlow 1.0 and NXM flow formats are distinguished using the NXFF_*
    constant values from nicira-ext.h.

  - The "flow_mod_table_id" feature setting is maintained in ofproto as
    part of an OpenFlow connection's (ofconn's) state.

There's no way to easily communicate this state among components.  It's
not much of a problem yet, but as more protocol support is added it seems
better to have an abstract, uniform way to represent protocol versions and
variants.  This commit implements that by introducing a new type
"enum ofputil_protocol".  Each ofputil_protocol value represents a variant
of a protocol version.  Each value is a separate bit, so a single enum
can also represent a set of protocols, which is often useful as well.

Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-03-07 13:59:02 -08:00
Simon Horman
a7fc17440c Make the string parameters const for do_flow_mod__()
Make the string parameter of parse_ofp_flow_stats_request_str() and
parse_ofp_flow_mod_str() const

* Both parse_ofp_flow_stats_request_str() and parse_ofp_flow_mod_str()
  only pass their string parameter to it to parse_ofp_str() which treats
  the parameter as const.
* do_flow_mod__() may pass a const string as the string argument to
  parse_ofp_flow_stats_request_str() and parse_ofp_flow_mod_str()

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-02-27 10:14:08 -08:00
Ben Pfaff
0c3d5fc89a ovs-ofctl: Add "packet-out" command.
I don't expect this to be widely useful.  An upcoming commit will add a
use in unit tests.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-02-09 13:23:37 -08:00
Ben Pfaff
81d1ea9414 ofp-util: Rename struct flow_stats_request with ofputil_ prefix.
Most of the structs in ofp-util.h have the ofputil_ prefix.  Rename this
one for consistency.
2011-08-09 13:53:21 -07:00
Ben Pfaff
a9a2da3894 ofp-util: Rename struct flow_mod to struct ofputil_flow_mod.
Most of the structs in ofp-util.h have the ofputil_ prefix.  Rename this
one for consistency.
2011-08-09 13:53:21 -07:00
Ben Pfaff
c821124b25 ovs-ofctl: Accept only valid flow_mod and flow_stats_request fields.
OpenFlow commands have several idiosyncratic fields that are used in some
cases and ignored in others.  Until now, ovs-ofctl has been lax about
allowing some of them in places where they are ignored.  This commit
tightens the checks to exactly what is allowed.

Bug #5979.
Reported-by: Reid Price <reid@nicira.com>
2011-06-23 12:21:13 -07:00
Andrew Evans
ec610b7bf4 ovs-ofctl: Print the offending flow on parse error when reading from a file.
When an error is encountered while parsing flows from a file, ovs-ofctl doesn't
print the erroneous flow, so it's not always obvious which flow is causing
the error. Print the flow before the error message to make it clear.
2011-06-17 12:25:42 -07:00
Ben Pfaff
6c1491fbd7 Implement basic multiple table support.
This implements basic multiple table support in ofproto and supporting
libraries and utilities. The design is the same as the one that has been
on the Open vSwitch "wdp" branch for a long time.  There is no support for
multiple tables in the software switch implementation (ofproto-dpif), only
a set of hooks for other switch implementations to use.

To allow controllers to add flows in a particular table, Open vSwitch adds
an OpenFlow 1.0 extension called NXT_FLOW_MOD_TABLE_ID.
2011-05-12 09:58:01 -07:00
Ben Pfaff
02c5617b60 ofp-parse: Generalize parse_ofp_add_flow_file() to parse_ofp_flow_mod_file().
An upcoming commit will want to pass a different command.
2011-03-18 14:41:36 -07:00
Ben Pfaff
0199c526f1 ovs-ofctl: New commands "replace-flows" and "diff-flows".
Requested-by: Paul Ingram <paul@nicira.com>
2011-03-18 14:41:35 -07:00
Ben Pfaff
88ca35eed0 ovs-ofctl: Add NXM support. 2010-12-07 13:32:01 -08:00
Ben Pfaff
8050b31d63 ofp-parse: Refactor flow parsing. 2010-11-11 11:01:50 -08:00
Ben Pfaff
049c8dc212 ofp-parse: Generalize parse_ofp_add_flow_str() as parse_ofp_flow_mod_str().
This generalization allows us to delete several lines of code from
ovs-ofctl.c.
2010-11-11 11:01:09 -08:00
Ben Pfaff
15f1f1b63a ofp-parse: Factor out duplicated code into new functions. 2010-10-01 13:08:33 -07:00
Joe Perches
d295e8e97a treewide: Remove trailing whitespace
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Jesse Gross <jesse@nicira.com>
2010-08-30 13:23:08 -07:00
Justin Pettit
f22716dcca ofp-parse: Break string-to-openflow parsing into library functions
An upcoming commit will add the ability to load OpenFlow rules into
ovs-controller.  Break out string-to-openflow parsing so that
ovs-ofctl and ovs-controller can use the same code.
2010-07-30 00:05:33 -07:00