2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-23 02:17:42 +00:00

55 Commits

Author SHA1 Message Date
Ben Pfaff
e016fb630d openflow: Implement OF1.4+ OFPMP_QUEUE_DESC multipart message.
OpenFlow 1.0 through 1.3 have a message OFPT_QUEUE_GET_CONFIG_REQUEST and
its corresponding reply, for fetching a description of the queues
configured on a given port.  OpenFlow 1.4 changes this message to a
multipart message OFPMP_QUEUE_DESC, which Open vSwitch has not until now
implemented.  This commit adds an implemntation of that message.  Because
the message is a replacement for the former one, this commit implements it
using the same ofp-util functions as the former message, so that the client
code doesn't have to distinguish a difference between versions.

The ovs-ofctl command queue-get-config was previously undocumented (due
only to an oversight).  This commit corrects that and documents the new
feature available with OpenFlow 1.4.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Jarno Rajahalme <jarno@ovn.org>
2016-01-20 09:28:32 -08:00
Ben Pfaff
3b32bb36a1 ofp-errors: Add extension error codes for OF1.3+ property errors.
Upcoming commits will introduce uses of the "property" message formats,
which are used in OF1.3 and especially in OF1.4+, in Nicira extension
messages for earlier versions of OpenFlow.  Thus, it's best to also
support the appropriate error codes in those versions of OpenFlow, so that
errors can be reported in a useful way.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Jarno Rajahalme <jarno@ovn.org>
2016-01-20 08:25:58 -08:00
Mengke Liu
4e548ad9e6 geneve-map-rename: rename geneve-map to tlv-map.
This patch renames the command name related with geneve-map to a more
generic name as following:
add-geneve-map -> add-tlv-map
del-geneve-map -> del-tlv-map
dump-geneve-map -> dump-tlv-map

It also renames the Geneve_table to tlv_table.

By doing this renaming, the NSH variable context header (the same TLV
format as Geneve) or other protocol can reuse the field tun_metadata<N>
in the future.

Signed-off-by: Mengke Liu <mengke.liu@intel.com>
Signed-off-by: Ricky Li <ricky.li@intel.com>
Signed-off-by: Jesse Gross <jesse@kernel.org>
2015-12-15 13:06:11 -08:00
Ambika Arora
d18cc1eec4 ofproto: Implement OF1.4 error code for set-async-config
This patch adds support for Openflow1.4 error codes for set-async-config.
In this patch, a new error type, OFPET_ASYNC_CONFIG_FAILED is introduced
that enables the switch to properly inform the controller when controller
tries to set invalid mask or unsupported configuration.

Signed-off-by: Ambika Arora <ambika.arora@tcs.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2015-11-30 11:23:09 -08:00
Ben Pfaff
46be713295 ofp-util: Require inner and outer message in bundle add to be same version.
It doesn't make sense for the messages added to a bundle to have a
different OpenFlow version from the outer OpenFlow version.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2015-07-06 20:50:08 -07:00
Jesse Gross
6159c531d0 openflow: Table maintenance commands for Geneve options.
In order to work with Geneve options, we need to maintain a mapping
table between an option (defined by <class, type, length>) and
an NXM field that can be operated on for the purposes of matches,
actions, etc. This mapping must be explicitly specified by the
user.

Conceptually, this table could be communicated using either OpenFlow
or OVSDB. Using OVSDB requires less code and definition of extensions
than OpenFlow but introduces the possibility that mapping table
updates and flow modifications are desynchronized from each other.
This is dangerous because the mapping table signifcantly impacts the
way that flows using Geneve options are installed and processed by
OVS. Therefore, the mapping table is maintained using OpenFlow commands
instead, which opens the possibility of using synchronization between
table changes and flow modifications through barriers, bundles, etc.

There are two primary groups of OpenFlow messages that are introduced
as Nicira extensions: modification commands (add, delete, clear mappings)
and table status request/reply to dump the current table along with switch
information.

Note that mappings should not be changed while they are in active use by
a flow. The result of doing so is undefined.

This only adds the OpenFlow infrastructure but doesn't actually
do anything with the information yet after the messages have been
decoded.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-06-25 11:08:58 -07:00
Ben Pfaff
7a1290cf39 ofp-errors: Add Nicira extension code for OFPBMC_BAD_FIELD.
There are a couple of cases where OpenFlow 1.0 controllers that use
Nicira extensions can get OFPBMC_BAD_FIELD, so we should have an error
code for it in that protocol.

Reported-by: Soner Sevinc <sevincs@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2015-05-29 15:20:03 -07:00
Ben Pfaff
20e4ec1a2b ofp-errors: Use OFPERR_OFPBRC_IS_SLAVE to reject slave controllers.
This error code was just overlooked before.

Reported-by: Anup Khadka <khadka.py@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Thomas Graf <tgraf@noironetworks.com>
2015-01-22 09:08:27 -08:00
Ben Pfaff
4ba1522163 ofp-errors: Explain the whole "expected duplications" thing.
That way I won't have to figure it out again the next time.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Thomas Graf <tgraf@noironetworks.com>
2015-01-22 09:08:15 -08:00
Ben Pfaff
18080541d2 classifier: Add support for conjunctive matches.
A "conjunctive match" allows higher-level matches in the flow table, such
as set membership matches, without causing a cross-product explosion for
multidimensional matches.  Please refer to the documentation that this
commit adds to ovs-ofctl(8) for a better explanation, including an example.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2015-01-11 13:25:24 -08:00
Ben Pfaff
ff111801b5 ofp-errors: Use official extension code for OFPBAC_BAD_SET_MASK.
ONF-JIRA: EXT-425
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2014-11-24 14:41:08 -08:00
Simon Horman
2cc5abd738 ofp-errors: Add (draft) OpenFlow 1.5 group mod errors.
Add OFPERR_OFPGMFC_UNKNOWN_BUCKET and OFPERR_OFPGMFC_BUCKET_EXISTS
which are part of (draft) OpenFlow 1.5 groups.

ONF-JIRA: EXT-350
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-10 20:31:24 -08:00
Ben Pfaff
3947cc76e1 nx-match: Reject bad wildcard combinations.
A log message has warned that this was going to happen for some time, and
newer OpenFlow versions require this behavior.

The test updates fix this behavior in our testsuite.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
2014-09-29 15:00:27 -07:00
Jean Tourrilhes
6b2dfe8e9f ofp-errors: Migrate EXT-444 errors to ONF experimenter ID.
Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com>
[blp@nicira.com removed the definitions of these errors in OF1.1 and OF1.2]
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2014-09-04 12:31:05 -07:00
Ben Pfaff
d12f128a31 ofp-errors: Fix bugs in treatment of OpenFlow experimenter errors.
OpenFlow 1.2 and later have "experimenter errors".  The OVS implementation
was buggy in a few ways.  First, a bug in extract-ofp-errors prevented
OF1.2+ experimenter errors from being properly decoded.  Second,
OF1.2+ experimenter errors have only a type, not a code, whereas all other
types of errors (standard errors, OF1.0/1.1 Nicira extension errors) have
both, but extract-ofp-errors didn't properly enforce that.

This commit fixes both problems and improves existing tests to verify that
encoding and decoding of experimenter errors now works properly.

This commit also fixes the definition of OFPBIC_DUP_INST.  It claimed to
have an OF1.1 experimenter error value although OF1.1 didn't have
experimenter errors.  This commit changes it to use a Nicira extension
error in OF1.1 instead.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2014-09-04 12:31:00 -07:00
Ben Pfaff
52d2957040 ofp-errors: Use EXT-444 extension error codes for properties in OF1.3.
These error codes are proposed in the ONF extensibility working group as an
OpenFlow 1.3 extension.

Error codes are also proposed for the other three "bad property" error
codes, but those already have standardized OpenFlow 1.3 error codes and the
proposal says that implementations should use the standard ones.

ONF-JIRA: EXT-444.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-08-12 13:59:40 -07:00
Ben Pfaff
da4425c78d ofp-actions: Use specific error code for oxm_hasmask=1 in Set-Field.
Based on the OpenFlow 1.5 draft.

ONF-JIRA: EXT-425
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2014-08-11 14:14:09 -07:00
Ben Pfaff
8f2cded496 ofp-actions: Pretend that OpenFlow 1.0 has instructions.
This allows callers to be more uniform, because they don't have to pick
out whether they should parse actions or instructions based on the OpenFlow
version in use.  It also allows the Write-Metadata instruction emulation
in OpenFlow 1.0 to be treated just as in OpenFlow 1.1 in the sense that
it is allowed in contexts where instructions are allowed in OpenFlow 1.1
and not elsewhere.  (The changes in the tests reflect this more accurate
treatment.)

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2014-08-11 12:47:18 -07:00
Simon Horman
04f9f28622 ofp-errors: Add OFPET_FLOW_MONITOR_FAILED
Add OFPET_FLOW_MONITOR_FAILED which is added in OpenFLow1.4.
Map the OFPERR_NXBRC_FM_* errors to the corresponding new OpenFlow errors.

This is a step towards supporting OpenFlow1.4 flow monitors.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-06-13 10:57:28 -07:00
Simon Horman
0ca30f6f9b ofp-errors: Duplicate instruction error
Add OFPERR_OFPBIC_DUP_INST (type = OFPET_BAD_INSTRUCTION, code = 9)
and use it for OpenFlow1.4+.

For OpenFlow1.1 - 1.3 map this error to ONFBIC_DUP_INSTRUCTION
(experimenter = ONF, type = 2600) which is proposed in
OpenFlow enhancement proposal EXT-260 "Add error
code for duplicate instruction.".

Previously ONFBIC_DUP_INSTRUCTION was used for OpenFlow1.3+.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-06-02 10:25:29 -07:00
Ben Pfaff
9a4eddbb6e ofp-util: Generalize functions for parsing OF1.3+ properties.
The main effect is to move these functions a little earlier in the file.

Also, OpenFlow 1.4 changed the table-features specific error codes to new
values that apply to all property sets, so this commit updates the error
code names and adds the appropriate OpenFlow 1.4+ codes.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-05-14 10:31:42 -07:00
Alexandru Copot
777af88d50 Add basic implementation for OpenFlow 1.4 bundles
This is only the communication part of the bundles functionality.
The actual message pre-validation and commits are not implemented.

We also enable OF1.4 for all the tests.

Signed-off-by: Alexandru Copot <alex.mihai.c@gmail.com>
Cc: Daniel Baluta <dbaluta@ixiacom.com>
[blp@nicira.com made ofputil_decode_bundle_add() more obviously correct]
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-05-02 09:41:33 -07:00
Ben Pfaff
0fb88c18fb ofp-util: Abstract flow_mod OFPFF_* flags.
The OFPFF_* flags used in flow_mods are just confusing enough that it
seems worthwhile to try to abstract them out.  In particular:

    * OFPFF_EMERG was introduced in OF1.0, deleted in OF1.1, and then
      its bit was reused for a different purpose in OF1.2.

    * OFPFF_RESET_COUNTS was introduced in OF1.2 but the semantics that it
      specifies are implied by "add" commands in earlier versions, so
      proper translation requires the OpenFlow version number and flow_mod
      command.

This commit does the abstraction.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-08-27 13:23:01 -07:00
Ben Pfaff
9e404d1e1c meta-flow: Use correct OF1.2+ errors for invalid fields in actions.
OFPERR_OFPBAC_BAD_ARGUMENT is not as specific as the errors provided by
OpenFlow 1.2 and later.

Some of these errors needed Nicira extension numbers for use with OpenFlow
1.0 and 1.1, so this commit also adds those.

Some of these errors had poor explanations likely to confuse users, so this
commits improves them.

Some of the errors had the wrong names, so this commit fixes them.

Reported-by: Jean Tourrilhes <jt@hpl.hp.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jean Tourrilhes <jt@hpl.hp.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2013-08-23 11:11:03 -07:00
Ben Pfaff
07f265eb56 ofp-errors: Fix typos in error enumeration names.
OFPGMFC is so nice these constants said it twice.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-06-28 12:53:58 -07:00
Ben Pfaff
f4104c6882 ofp-errors: New error code ONFBIC_DUP_INSTRUCTION.
This is a prototype of OpenFlow enhancement proposal EXT-260 "Add error
code for duplicate instruction."  It uses the error code proposed there.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-06-25 10:52:21 -07:00
Ben Pfaff
514887ee46 ofp-errors: Implement OpenFlow 1.2+ experimenter error codes.
OpenFlow 1.2 standardized experimenter error codes in a way different from
the Nicira extension.  This commit implements the OpenFlow 1.2+ version.

This commit also makes it easy to add error codes for new experimenter IDs
by adding new *_VENDOR_ID definitions to openflow-common.h.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-06-25 10:52:20 -07:00
Ben Pfaff
dfbec087e7 ofp-errors: Make ofperr_decode() static.
It had no users outside of ofp-errors.c.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-06-21 08:33:42 -07:00
Ben Pfaff
4fff3facd3 ofp-errors: Fix typos in comment.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-06-21 08:33:42 -07:00
Ben Pfaff
07c8ec217b ofp-errors: Make every error encodable.
Until now, some values could not be encoded to send over OpenFlow, for a
few possible reasons.  This meant that, when one of these situations came
up, that a controller would not receive any notification that its request
failed.  This is not a good way to behave, so this commit changes the
error encoder so that, if a particular error cannot be encoded, it will
instead encode a fallback error code.

This commit also slightly simplifies ofconn_send_error() because it no
longer has to handle ofperr_encode_error() returning NULL.

Reported-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-12-04 08:25:56 -08:00
Jarno Rajahalme
df30f9b1cd ofp-errors: Remove OFPERR_* values for error categories.
The main use of OFPERR_* is to define specific errors, but OFPERR_* also
existed for each possible category of error, to enable partial decoding of
unknown specific errors within a known category.  However, in practice,
it was very easy to misuse the error categories as if they were particular
errors.  This commit removes the error category values, to make that error
impossible.

(If partial decoding of unknown specific errors turns out to have been a
valuable feature, then we can reintroduce it some other way.)

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-12-04 08:25:56 -08:00
Ben Pfaff
edd70aa771 ofp-errors: Correctly encode errors as extensions or not depending on domain.
When ofp-errors was introduced, each OFPERR_* was either an extension or
not.  However, since then, some Nicira extension error code have been
given official error codes in later OpenFlow versions, so now whether an
OFPERR_* is an extension depends on the OpenFlow versions.  This means
that certain errors were encoded incorrectly as extensions in later
OpenFlow versions.  This commit fixes the problem.

This commit also adds a test that should prevent a regression.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-12-04 08:25:56 -08:00
Jarno Rajahalme
1554987853 Don't use error categories as if they were actually errors.
The OFPERR_* naming scheme is confusing, because it mixes categories with
specific errors.  Categories can't be encoded for sending to controllers,
so this is a problem.  This commit fixes up the cases where categories
were used as errors, replacing them by real errors types.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-12-04 08:25:55 -08:00
Jarno Rajahalme
2e1ae2005e Initial OpenFlow 1.3 support
Initial OpenFlow 1.3 support with new include/openflow/openflow-1.3.h.
Most of the messages that differ from 1.2 are implemented. OFPT_SET_ASYNC
is implemented via NX_SET_ASYNC_CONFIG, other new message types are yet to
be implemented. Stats replies that add duration fields are implemented at
encode/decode level only. Test cases for implemented features are included.
Remaining FIXME:s should not cause runtime aborts. Make check comes out
clean.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-11-27 09:37:50 -08:00
Ben Pfaff
be2b69d146 ofp-errors: Merge OF1.0 "all tables full" with OF1.1+ "table full".
These codes represent essentially the same condition and only one of them
exists in any given version of OpenFlow, so merge them together into a
single OFPERR_* code.

Reported-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-10-13 18:34:55 -07:00
Simon Horman
c22c56bd74 ofp-errors: Use OFPERR_OFPBRC_BAD_TABLE_ID
* In the case of OpenFlow 1.1+ OFPERR_OFPBRC_BAD_TABLE_ID is defined
  in the specification and seems to be the most appropriate error
  to use when an unknown table id is encountered.

* In the case of OpenFlow 1.0 no appropriate error message
  seems to exist. Perhaps because an invalid port is not possible?
  I'm unsure.

  In any case, make use of a non-standard error code (1,512).
  This was formerly known as OFPERR_NXBRC_BAD_TABLE_ID but
  has been rolled into OFPERR_OFPBRC_BAD_TABLE_ID to allow the
  latter to be used without concern for the prevailing Open Flow version.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-09-05 10:19:14 -07:00
Simon Horman
2e1bfcb631 ofp-errors: Use OFPERR_OFPBRC_BAD_PORT
* In the case of OpenFlow 1.2+ OFPERR_OFPBRC_BAD_PORT is defined
  in the specification and seems to be the most appropriate error
  to use when an invalid port is encountered in a Packet Out request.

* In the case of OpenFlow 1.0 and 1.1 no appropriate error message
  seems to exist. Perhaps because an invalid port is not possible?
  I'm unsure.

  In any case, make use of a non-standard error code (1,514).
  This was formerly known as OFPERR_NXBRC_BAD_IN_PORT but
  has been rolled into OFPERR_NXBRC_BAD_IN_PORT to allow the
  latter to be used without concern for the prevailing Open Flow version.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-09-05 10:19:03 -07:00
Simon Horman
4b83c93f19 ofp-errors: Ignore text enclosed in square brackets
Enhance to extract-ofp-errors to omit text enclosed in square brackets from
error description. This allows some commentary other than
the error description to be supplied in ofp-errors.h

As suggested by Ben Pfaff <blp@nicira.com>

Signed-off-by: Simon Horman <horms@verge.net.au>
[blp@nicira.com added the large comment on enum ofperr.]
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-09-05 10:04:48 -07:00
Simon Horman
130b77cd94 ofp-errors: Use standardised code for OFPERR_OFPBMC_BAD_VALUE
Use standardised code for Open Flow 1.1 OFPERR_OFPBMC_BAD_VALUE

OFPERR_OFPBMC_BAD_VALUE is defined in Open Flow 1.1 as (4,7),
so use that code instead of a non-standard one.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-09-04 13:05:09 -07:00
Simon Horman
fb9515e1fd ofp-errors: Remove OFPERR_NXFMFC_GROUPS_NOT_SUPPORTED
OFPERR_NXFMFC_GROUPS_NOT_SUPPORTED is currently only used in paths which
are part of a non-NX extension portions of the Open Flow 1.1+
implementation.

After recent discussion it has been decided to attempt to only use
standardised, albeit lest-specify, errors unless errors arise from use of
an NX extension.

With the above in mind it seems appropriate to:
* Use OFPERR_OFPFMFC_UNKNOWN in place of OFPERR_NXFMFC_GROUPS_NOT_SUPPORTED.
* Remove OFPERR_NXFMFC_GROUPS_NOT_SUPPORTED as it is no longer used.

An unfortunate side-effect of this change is that the error for
the case in question is now less-specific.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-09-04 13:05:08 -07:00
Simon Horman
e38c9de5db ofp-errors: Remove OFPERR_NXBIC_DUP_TYPE
OFPERR_NXBIC_DUP_TYPE is currently only used in
decode_openflow11_instructions() which is part of a non-NX extension
portion of the Open Flow 1.1+ implementation.

After recent discussion it has been decided to attempt to only use
standardised, albeit less-specific, errors unless errors arise from use of
an NX extension.

With the above in mind it seems appropriate to:
* Use OFPERR_OFPIT_BAD_INSTRUCTION in place of OFPERR_NXBIC_DUP_TYPE.
* Remove OFPERR_NXBIC_DUP_TYPE as it is no longer used.

An unfortunate side-effect of this change is that the error for
the case in question is now less-specific.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-09-04 13:04:46 -07:00
Simon Horman
688e86e1d0 ofp-error: Remove ofperr_domain from external API
It seems that ofp_version suffices in all cases.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-08-06 22:46:26 -07:00
Simon Horman
9b7e2112b1 ofp-util: Make ofperr_encode_msg__() use correct Open Flow version
Make ofperr_encode_msg__() use correct Open Flow version in the header
of messages.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-08-06 22:36:25 -07:00
Ben Pfaff
aa319503aa ofp-util: Work on decoding OF1.1 flow_mods.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Tested-by: Simon Horman <horms@verge.net.au>
Reviewed-by: Simon Horman <horms@verge.net.au>
2012-07-30 21:09:25 -07:00
Ben Pfaff
982697a4d2 ofp-msgs: New approach to encoding and decoding OpenFlow headers.
OpenFlow headers are not as uniform as they could be, with size, alignment,
and numbering changes from one version to another and across varieties
(e.g. ordinary messages vs. "stats" messages).  Until now the Open vSwitch
internal APIs haven't done a good job of abstracting those differences in
header formats.  This commit changes that; from this commit forward very
little code actually needs to understand the header format or numbering.
Instead, it can just encode or decode, or pull or put, the header using
a more abstract API using the ofpraw_, ofptype_, and other APIs in the
new ofp-msgs module.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Tested-by: Simon Horman <horms@verge.net.au>
Reviewed-by: Simon Horman <horms@verge.net.au>
2012-07-30 21:09:12 -07:00
Ben Pfaff
2b07c8b182 ofproto: New feature to notify controllers of flow table changes.
OpenFlow switching monitoring and controller coordination can be made more
efficient if the switch can notify a controller of flow table changes as
they occur, rather than periodically polling for changes.  This commit
implements such a feature.

Feature #6633.
CC: Natasha Gude <natasha@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-07-12 14:18:05 -07:00
Ben Pfaff
d01c980ffe ofp-actions: Add decoding and encoding OF1.1 instructions and actions.
So far, only the Apply-Actions instruction is supported, and only
actions that have identical semantics to OpenFlow 1.0 actions.

Co-authored-by: Simon Horman <horms@verge.net.au>
Co-authored-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-07-03 22:21:12 -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
Simon Horman
2e0525bcf5 Add error codes for Open Flow v1.2
* Where Open Flow 1.2 breaks apart error codes defined
  in previous versions, provide all new definitions to
  previous versions and map the numeric error code to
  the first first definition supplied in ofp-errors.h.
  The case handled so far is:
  OFPERR_OFPBIC_BAD_EXP_TYPE -> { OFPERR_OFPBIC_BAD_EXPERIMENTER,
                                  OFPERR_OFPBIC_BAD_EXP_TYPE }

* Where Open Flow 1.2 adds error codes that were previously
  defined as Nicira extension errors define the later in terms
  of the new codes.

Signed-off-by: Simon Horman <horms@verge.net.au>
[blp@nicira.com added better error checking in extract-ofp-errors, added
 unit tests, miscellaneous cleanup]
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Simon Horman <horms@verge.net.au>
2012-03-27 09:17:40 -07:00
Ben Pfaff
4435655128 ofp-errors: Use OF1.1+ in place of OF1.1 throughout.
In general, I guess that the common case is for most error codes to be
retained without change in future versions of OpenFlow, so to me it seems
best to use the "+" version "by default".

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Simon Horman <horms@verge.net.au>
2012-03-27 09:17:17 -07:00