2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-28 12:58:00 +00:00

111 Commits

Author SHA1 Message Date
Selvamuthukumar
8c87971ea5 ofp-actions: Fix error code for invalid table id.
Send OFPET_BAD_INSTRUCTION/OFPBIC_BAD_TABLE_ID if table is invalid
in goto table instruction.

Signed-off-by: Selvamuthukumar <smkumar@merunetworks.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-09-24 10:07:38 -07:00
Gurucharan Shetty
355ead6901 Fix remaining "void function returning a value" warning by MSVC.
MSVC complains about a void function returning a value if there is a
statement of the form - 'return foo()' even if foo() has a void return
type.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-09-15 14:55:05 -07:00
Srini Seetharaman
2e34a6a347 ofp-actions: Support "resubmit" actions in action sets.
Fixing issue where "resubmit" action in a group action set was not
considered sufficient to retain the full action set. This patch allows
a group action set (considered terminal with OF1.4 and earlier spec)
to have the "output" action come from a different table.

Signed-off-by: Srini Seetharaman <srini.seetharaman@gmail.com>
[blp@nicira.com added documentation]
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-09-02 09:04:43 -07:00
Thomas Graf
1b0ee636c4 ofp-actions: Include OFPACT_REG_MOVE in action set
Treating OFPACT_REG_MOVE as a "set" action preserves the order of loads
and moves and allows a load to overwrite a previous move to the same
register.

This makes the following work:

add-group br0 group_id=1234,type=all, \
              bucket=output:10,move:NXM_NX_REG1[]->NXM_OF_IP_SRC[], \
			  bucket=output:11
add-flow br0 ip actions=load:0xffffffff->NXM_NX_REG1[],group:1234

Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-08-15 09:36:51 -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
5ad4b3f8c3 ofp-actions: Avoid logging 64 times as many actions as actually provided.
The following commit adds a test.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2014-08-11 14:14:06 -07:00
Ben Pfaff
73178f20fc ofp-actions: Add support for OpenFlow 1.5 (draft) Copy-Field action.
ONF-JIRA: EXT-320
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2014-08-11 13:10:19 -07:00
Ben Pfaff
c2d936a44f ofp-actions: Centralize all OpenFlow action code for maintainability.
Until now, knowledge about OpenFlow has been somewhat scattered around the
tree.  Some of it is in ofp-actions, some of it is in ofp-util, some in
separate files for individual actions, and most of the wire format
declarations are in include/openflow.  This commit centralizes all of that
in ofp-actions.

Encoding and decoding OpenFlow actions was previously broken up by OpenFlow
version.  This was OK with only OpenFlow 1.0 and 1.1, but each additional
version added a new wrapper around the existing ones, which started to
become hard to understand.  This commit merges all of the processing for
the different versions, to the extent that they are similar, making the
version differences clearer.

Previously, ofp-actions contained OpenFlow encoding and decoding, plus
ofpact formatting, but OpenFlow parsing was separated into ofp-parse, which
seems an odd division.  This commit moves the parsing code into ofp-actions
with the rest of the code.

Before this commit, the four main bits of code associated with a particular
ofpact--OpenFlow encoding and decoding, ofpact formatting and parsing--were
all found far away from each other.  This often made it hard to see what
was going on for a particular ofpact, since you had to search around to
many different pieces of code.  This commit reorganizes so that all of the
code for a given ofpact is in a single place.

As a code refactoring, this commit has little visible behavioral change.
The update to ofproto-dpif.at illustrates one minor bug fix as a side
effect: a flow that was added with the action "dec_ttl" (a standard
OpenFlow action) was previously formatted as "dec_ttl(0)" (using a Nicira
extension to specifically direct packets bounced to the controller because
of too-low TTL), but after this commit it is correctly formatted as
"dec_ttl".

The other visible effect is to drop support for the Nicira extension
dec_ttl action in OpenFlow 1.1 and later in favor of the equivalent
standard action.  It seems unlikely that anyone was really using the
Nicira extension in OF1.1 or later.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2014-08-11 12:57:17 -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
Ben Pfaff
8e97815ea7 ofp-actions: Add instructions bitmaps and fix related bug.
This will allow, later, to centralize all of the knowledge of instruction
encoding inside ofp-actions.

OFPIT11_ALL and OFPIT13_ALL are no longer used, so this commit removes
them.  Their definitions were wrong (they did not shift each bit into
position correctly), so this commit is also a small bug fix.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2014-08-11 11:07:53 -07:00
Ben Pfaff
08d1e23456 ofp-actions: Add action bitmap abstraction.
Until now, sets of actions have been abstracted separately outside
ofp-actions, as enum ofputil_action_bitmap.  Drawing sets of actions into
ofp-actions, as done in this commit, makes for a better overall
abstraction of actions, with better consistency.

A big part of this commit is shifting from using ofp12_table_stats as if
it were an abstraction for OpenFlow table stats, toward using a new
struct ofputil_table_stats, which is what we generally do with other
OpenFlow structures and fits better with the rest of the code.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2014-08-11 10:57:03 -07:00
Ben Pfaff
a3358085b8 Drop assignments whose values are never used.
Found by clang-analyzer.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2014-07-15 09:39:21 -07:00
Simon Horman
717c48fe35 ofp-actions: Allow pop_mpls on MPLS packets
With recirculation in place this should be safe.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-06-25 14:15:06 -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
9d84066c6d meta-flow: Encode OXM version information into struct mf_field.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-05-14 10:31:45 -07:00
Jarno Rajahalme
66ce9f09aa lib/ofp-actions: Silently discard set ip ecn/ttl actions on OpenFlow10.
It is better to not abort().

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-04-09 11:13:57 -07:00
Jarno Rajahalme
cf3b753866 ofpbuf: Abstract 'l2' pointer and document usage conventions.
Rename 'l2' to 'frame' and add new ofpbuf_set_frame() and ofpbuf_l2().
ofpbuf_set_frame() alse resets all the layer offsets.  ofpbuf_l2()
returns NULL if the packet has no Ethernet header, as indicated either
by unset l3 offset or NULL frame pointer.  Callers of ofpbuf_l2() are
supposed to check the return value, unless they can otherwise be sure
that the packet has a valid Ethernet header.

The recent commit 437d0d22 made some assumptions that were not valid
regarding the use of the 'l2' pointer in rconn module and by
compose_rarp().  This is now fixed as follows: rconn now relies on the
fact that once OpenFlow messages are given to rconn for transport, the
frame pointer is no longer needed to refer to the OpenFlow header; and
compose_rarp() now sets the frame pointer and offsets as expected.

In addition to storing network frames, ofpbufs are also used for
handling OpenFlow messages and action lists.  lib/ofpbuf.h now has a
comment documenting the current usage conventions and invariants.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-04-03 11:51:59 -07:00
Pravin Shelar
1f317cb5c2 ofpbuf: Introduce access api for base, data and size.
These functions will be used by later patches.  Following patch
does not change functionality.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
2014-03-30 06:18:43 -07:00
Jarno Rajahalme
437d0d22ab lib/ofpbuf: Compact
This patch shrinks the struct ofpbuf from 104 to 48 bytes on 64-bit
systems, or from 52 to 36 bytes on 32-bit systems (counting in the
'l7' removal from an earlier patch).  This may help contribute to
cache efficiency, and will speed up initializing, copying and
manipulating ofpbufs.  This is potentially important for the DPDK
datapath, but the rest of the code base may also see a little benefit.

Changes are:

- Remove 'l7' pointer (previous patch).
- Use offsets instead of layer pointers for l2_5, l3, and l4 using
  'l2' as basis.  Usually 'data' is the same as 'l2', but this is not
  always the case (e.g., when parsing or constructing a packet), so it
  can not be easily used as the offset basis.  Also, packet parsing is
  faster if we do not need to maintain the offsets each time we pull
  data from the ofpbuf.
- Use uint32_t for 'allocated' and 'size', as 2^32 is enough even for
  largest possible messages/packets.
- Use packed enum for 'source'.
- Rearrange to avoid unnecessary padding.
- Remove 'private_p', which was used only in two cases, both of which
  had the invariant ('l2' == 'data'), so we can temporarily use 'l2'
  as a private pointer.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-03-29 17:22:19 -07:00
Alexander Wu
9c4dbc1caa ofp-actions: Complete ofp13_action_type.
Signed-off-by: Alexander Wu <alexander.wu@huawei.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-03-23 22:58:55 -07:00
Alexander Wu
c0621c394f ofp-actions: New function ovs_instruction_type_from_inst_type().
Signed-off-by: Alexander Wu <alexander.wu@huawei.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-03-23 22:58:51 -07:00
Ben Pfaff
f6e984d794 util: New macro PAD_SIZE.
PAD_SIZE(x,y) is a little shorter and may have a more obvious meaning
than ROUND_UP(x,y) - x.

I intend to add more users in an upcoming comment.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
2014-03-13 12:45:12 -07:00
Simon Horman
b3f2fc93e3 ofp-actions: Correct pop MPLS ethtype as consistency test
Correct pop MPLS ethtype consistency check to verify that
the packet has an MPLS ethtype before the pop action rather than after:
an MPLS ethtype is a pre-condition but not a post-condition of pop MPLS.

With this change the consistency check in ofpact_check__()
becomes consistent with that in ofpact_from_nxast().

This was found using Ryu tests via the new make check-ryu target.
It allows all of the "POP_MPLS"[1] tests to pass where they previously
failed.

[1] http://osrg.github.io/ryu-certification/switch/ovs

Cc: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-02-19 13:33:17 -08:00
Ben Pfaff
269dc90a0a Always insert MPLS labels after VLAN tags.
OpenFlow 1.1 and 1.2 always inserted MPLS labels after VLAN tags.
OpenFlow 1.3 and 1.4 insert MPLS labels before VLAN tags.
OpenFlow 1.3.4 and 1.5, both in preparation, recognize that the change in
1.3 was an error and revert it.  This commit implements that reversion
in Open vSwitch.

EXT-457.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Simon Horman <horms@verge.net.au>
2014-02-06 17:13:46 -08:00
Harold Lim
428b2eddc9 Rename NOT_REACHED to OVS_NOT_REACHED
This allows other libraries to use util.h that has already
defined NOT_REACHED.

Signed-off-by: Harold Lim <haroldl@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-12-17 13:16:39 -08:00
Alin Serdean
34582733d9 Avoid printf type modifiers not supported by MSVC C runtime library.
The MSVC C library printf() implementation does not support the 'z', 't',
'j', or 'hh' format specifiers.  This commit changes the Open vSwitch code
to avoid those format specifiers, switching to standard macros from
<inttypes.h> where available and inventing new macros resembling them
where necessary.  It also updates CodingStyle to specify the macros' use
and adds a Makefile rule to report violations.

Signed-off-by: Alin Serdean <aserdean@cloudbasesolutions.com>
Co-authored-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-25 23:38:59 -08:00
Ben Pfaff
ba2fe8e9f1 ofp-actions: Make ofpacts_check() report consistency for all protocols.
Until now ofpacts_check() has been told either to enforce consistency or
not, but that means that the caller has to know exactly what protocol is
going to be in use (because some protocols require consistency to be
enforced and others don't).  This commit changes ofpacts_check() to just
rule out protocols that require enforcement when it detects
inconsistencies.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2013-11-20 09:37:16 -08:00
Simon Horman
94baabf754 ofp-actions: Consider L4 actions after mpls_push as inconsistent
After an mpls_push action the resulting packet is MPLS and
the MPLS payload is opaque. Thus nothing can be assumed
about the packets network protocol and it is inconsistent
to apply L4 actions.

With regards to actions that affect the packet at other layers
of the protocol stack:

* L3: The consistency of L3 actions should already be handled correctly
  by virtue of the dl_type of the flow being temporarily altered
  during consistency checking by both push_mpls and pop_mpls actions.

* MPLS: The consistency checking of MPLS actions appear to already be
  handled correctly.

* VLAN: At this time Open vSwitch on mpls_push an MPLS LSE is always
  added after any VLAN tags that follow the ethernet header.
  That is the tag ordering defined prior to OpenFlow1.3. As such
  VLAN actions should sill be equally valid before and after mpls_push
  and mpls_pop actions.

* L2 actions are equally valid before and after mpls_push and mpls_pop actions.

Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-15 09:39:53 -08:00
Marco Diego Aurélio Mesquita
f5e414cfb1 ofp-actions: Remove unneeded redeclaration of vlog_rate_limit rl.
Signed-off-by: Marco Diego Aurélio Mesquita <marcodiegomesquita@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-14 09:00:57 -08:00
Ben Pfaff
b55f2f799b ofp-actions: Switch away from odd use of "q" in "enqueue" action format.
The formatting of the "enqueue" action uses a "q" to separate the port
number from the queue number, as in "enqueue:123q456".  This is different
from every other action.  This commit improves the situation by:

    * Switching the formatting to use a colon (e.g. "enqueue:123:456"),
      which is a little less odd-looking but still accepted by older
      versions of Open vSwitch.

    * Improving the parser to accept "enqueue(123,456)" also.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-11 10:58:10 -08:00
Ben Pfaff
b2a27ddc46 ofp-actions: Allow meter actions in ofpacts_verify().
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2013-11-05 09:46:32 -08:00
Jarno Rajahalme
097d493945 Add OF11 SET MPLS LABEL and SET MPLS TC actions.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Reviewed-by: Simon Horman <horms@verge.net.au>
2013-11-01 22:36:16 -07:00
Jarno Rajahalme
6cc17de80f lib/ofp-actions: Warn on deprecated actions.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-01 22:29:18 -07:00
Ben Pfaff
7e9f8266a4 ofproto: Centralize action checking, doing it at decode time.
Jarno pointed out that modify_flows__() didn't really need to check every
instance of the flow separately.  After some further investigation I
decided that this was even more of an improvement.

CC: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2013-11-01 22:23:23 -07:00
Ben Pfaff
57ad4e9ed5 ofp-util: Move ofputil_check_output_port() to ofp-actions, rename.
This function is related to actions to ofp-actions seems like a logical
place for it.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2013-11-01 22:18:38 -07:00
Jarno Rajahalme
1e7db67406 ofp-actions: Send deprecated actions as set fields.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-01 16:14:50 -07:00
Jarno Rajahalme
e3f8f88748 ofp-actions: Simplify interface and internal structure.
This makes later changes simpler.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-01 16:07:08 -07:00
Jarno Rajahalme
a6fd70bb89 ofp-actions: Set-Field OF 1.0/1.1 compatibility.
Output set field actions as standard OF1.0/1.1 set actions or to
reg_load instructions, when a compatible set action(s) do not exist.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-01 16:02:57 -07:00
Jarno Rajahalme
b2dd70be13 Native Set-Field action.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-01 15:43:59 -07:00
Jarno Rajahalme
64fcc07313 OF 1.1 pop vlan compatibility.
Store the original action code with the strip vlan action,
so that it can be printed back properly.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-01 14:09:54 -07:00
Jarno Rajahalme
ca287d2062 OF 1.1 set vlan vid/pcp compatibility.
OpenFlow 1.1 set vlan actions only modify existing vlan
headers, while OF 1.0 actions push a new vlan header if one
does not exist already.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-01 14:07:40 -07:00
Jarno Rajahalme
8621547cc9 lib/ofp-actions: Enforce action consistency.
OpenFlow 1.1+ specs encourage switches to verify action consistency
at flow setup time.  Implement this for OpenFlow 1.1+ only to not
break any current OF 1.0 based use.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-23 13:52:24 -07:00
Ben Pfaff
dba70df0cb ofp-actions: Make union ofp_action more generic.
Make union ofp_action more generic by allowing it to be used for
all actions.  OFP_ACTION_ALIGN (which is 8, as the sizeof(union
ofp_action) used to be) is now used where sizeof union ofp_action
was used before.  On the same note, variable name 'n_actions' is
changed to 'max_actions' as the number of actions cannot be simply
divided when actions have various sizes.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-23 13:47:04 -07:00
Jarno Rajahalme
0c20dbe410 Add OF11 SET IP TTL action.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-23 10:24:31 -07:00
Jarno Rajahalme
ff14eb7ac9 Add OF11 set IPv4 ECN action.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-23 10:05:14 -07:00
Ben Pfaff
04f01c24b5 Allow OFPACT_SET_IP_DSCP to act on both IPv4 and IPv6 packets.
This removes semantic differences between different OpenFlow
versions, making it easier to translate between them.
Also, rename OFPACT_SET_IPV4_DSCP to OFPACT_SET_IP_DSCP.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-23 09:58:44 -07:00
Joe Stringer
a7a2d006ba ofp-actions: Distinguish OF1.1/1.2 push_mpls from OF1.3+.
In OpenFlow 1.1 and 1.2, the push_mpls action pushes the MPLS label after
any existing VLAN tag.  In OpenFlow 1.3, it pushes the label before any
existing VLAN tag.  Until now, the action parser didn't distinguish these
cases.  This commit adds support.  Nothing yet actually changes the
behavior of push_mpls.

enum ofpact_mpls_position contributed by Ben Pfaff.

Signed-off-by: Joe Stringer <joe@wand.net.nz>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-21 13:12:37 -07:00
Jarno Rajahalme
e45e72f1de include/openflow: Move union ofp_action away from headers.
union ofp_action cannot remain in the OF 1.0 header as it is expanded
to include actions from later versions.  Also, it is not part of the
protocol interface and will be easier to update where it is actually
used.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-17 11:47:52 -07:00
YAMAMOTO Takashi
3d7e1e9432 ofp-actions: Consistently use helper function.
No functional changes.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-17 09:55:00 -07:00
YAMAMOTO Takashi
2b11907b15 ofp-actions: Fix some ofpbuf usage problems in write-actions code.
This code kept a pointer to data that might have been reallocated.

For longer term, "nested" variants of some ofpact functions
which using ofpbuf->l3 might be desirable.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-17 08:53:51 -07:00