2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-25 15:07:05 +00:00
Commit Graph

5791 Commits

Author SHA1 Message Date
Simon Horman
e8c16d8366 packet: packet_get_tcp_flags: use flow's innermost dl_type
Use the innermost dl_type when decoding L3 and L4 data from a packet.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-02-06 09:20:04 -08:00
Simon Horman
3779fc82d4 odp-util: commit_set_nw_action: use flow's innermost dl_type
Use the innermost dl_type when decoding L3 and L4 data from a packet.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-02-06 09:19:10 -08:00
Simon Horman
2555b1db93 packet: Correctly set ethertype in pop_mpls()
The ethertype should be set before resetting l2_5 in order
for the packet to be updated correctly.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-02-06 09:18:24 -08:00
Ben Pfaff
acaaa4b4ba FAQ: Fix typo (doubled "later").
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-02-06 09:16:32 -08:00
Ben Pfaff
241241f55a FAQ: Expand on how one would implement VLAN handling via flows.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-02-06 09:15:18 -08:00
Ethan Jackson
1bda9b9e1a nicira-ext: Remove the autopath action.
The autopath action was attempting to achieve functionality similar
to the bundle action, but was significantly clunkier, more
difficult to understand, more difficult to use, and less reliable.
This patch removes it.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2013-02-05 12:50:17 -08:00
Ethan Jackson
df53d41c6d bond: Remove stable bond mode.
Stable bond mode, along with autopath, were trying to implement
functionality close to what we get from the bundle action.
Unfortunately, they are quite clunky, and generally less useful
than bundle, so they're being removed.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2013-02-05 12:50:15 -08:00
Simon Horman
b02475c53b User-Space MPLS actions and matches
This patch implements use-space datapath and non-datapath code
to match and use the datapath API set out in Leo Alterman's patch
"user-space datapath: Add basic MPLS support to kernel".

The resulting MPLS implementation supports:
* Pushing a single MPLS label
* Poping a single MPLS label
* Modifying an MPLS lable using set-field or load actions
  that act on the label value, tc and bos bit.
* There is no support for manipulating the TTL
  this is considered future work.

The single-level push pop limitation is implemented by processing
push, pop and set-field/load actions in order and discarding information
that would require multiple levels of push/pop to be supported.

e.g.
   push,push -> the first push is discarded
   pop,pop -> the first pop is discarded

This patch is based heavily on work by Ravi K.

Cc: Ravi K <rkerur@gmail.com>
Reviewed-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-02-05 09:17:45 -08:00
Justin Pettit
d224e35014 Prepare for post-1.10.0 (1.10.90).
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2013-02-04 23:51:57 -08:00
Justin Pettit
4191f4350b Prepare for 1.10.0.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2013-02-04 23:51:57 -08:00
Justin Pettit
3c23e92088 NEWS: Rearrange announcements related to 1.10 and 1.9.
Suggested-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2013-02-04 23:51:56 -08:00
Justin Pettit
d6123831ed NEWS: Mention experimental support for newer versions of OpenFlow.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2013-02-04 15:59:10 -08:00
Justin Pettit
e60240571a NEWS: Correct some items incorrectly stating they arrived in 1.9.0.
A few items were listed as arriving in 1.9.0, but they actually were new
to 1.10.0.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
2013-02-04 15:59:09 -08:00
Justin Pettit
a70fc0cfe3 FAQ: Add an entry describing the different ways to dump flows.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2013-02-04 13:58:31 -08:00
Ben Pfaff
7c1c7699e1 python/ovs/db/types: Fix English grammar for enums with one member.
Before this change, enums that have one member were formatted as, e.g.:
    "one of xyzzy, , or "
This changes them to be formatted as:
    "must be xyzzy"
which makes much more sense.

(An enum with one member may make some sense if you are trying to leave
the possibility for future expansion.)

Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-02-04 08:11:26 -08:00
Ben Pfaff
8748ec7b97 FAQ: Add question and answer about PPP.
We've had this question a few times lately.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-02-04 08:08:26 -08:00
Jesse Gross
498e128555 tunneling: Don't send ICMP messages if no tunnel port is found.
Some tunnel code in OVS (for example, CAPWAP) uses the skb->cb to
store information while processing packets.  However, if we don't
find an appropriate tunnel port on receive, then we send an ICMP
port unreachable message, which calls back into the IP stack.  The
stack assumes that skb->cb will still contain valid information
about from the IP layer, including any IP options.  As a result,
icmp_echo_options() can read the garbage values from OVS and
overwrite data on the stack, panicing the machine.

This simply stops sending ICMP messages when ports are not found.
Many people find them confusing and flow based tunneling will
never send them (since it always finds a port) so it solves both
problems at once.

Bug #14880

Reported-by: Deepesh Govindan <dgovindan@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
2013-02-01 17:07:10 -08:00
Ben Pfaff
cc2862a932 Use is_pow2() function, where possible, instead of IS_POW2 macro.
The IS_POW2 macro is meant for use in contexts where a function call is not
allowed.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-02-01 14:55:14 -08:00
Ben Pfaff
b36db11489 socket-util: Use set_nonblocking() helper function.
There's no reason to inline this when we have a helper for it.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-02-01 14:54:15 -08:00
Ben Pfaff
75b0b752d8 timeval: Avoid unnecessary integer overflow in time_alarm().
Durations longer than 4294967 seconds would unnecessarily overflow in the
multiplication here.

Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-02-01 14:27:20 -08:00
Ben Pfaff
3b9ed5937a worker: Use ovs_retval_to_string() where EOF is a possible return value.
Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-02-01 14:27:17 -08:00
Ben Pfaff
2bf1d3cc12 unixctl: Use ovs_retval_to_string() where EOF is a possible value.
jsonrpc_transact_block() might return EOF so passing its return value to
strerror() isn't general enough.

It might be better to change jsonrpc_transact{_block}() to never return
EOF, since a closed connection seems like it is always an error in that
context.

Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-02-01 14:27:13 -08:00
Ben Pfaff
8450059ee8 netdev-linux: Check return value of set_nonblocking().
It's unlikely to fail but checking it can't hurt.

Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-02-01 14:27:03 -08:00
Ben Pfaff
e93af6a479 process: Check return value of set_nonblocking().
It's unlikely to fail but checking it can't hurt.

Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-02-01 14:26:59 -08:00
Ben Pfaff
0d7bb1b4f4 bridge: Rename iface_create() variable to avoid hiding parameter.
This function has a parameter 'ofp_port' and a local variable 'ofp_port',
so rename the local variable to reduce confusion.

Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-02-01 14:26:54 -08:00
Ben Pfaff
a6b112a8b3 ofp-util: Rename ofputil_port_from_string() variable to avoid hiding param.
This function has a parameter 's' and a local variable 's', so rename the
local variable to reduce confusion.

Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-02-01 14:26:51 -08:00
Ben Pfaff
316bd0f822 vlog: New function vlog_set_levels_from_string_assert().
Two of the users of vlog_set_levels_from_string() in the tests could have
silently failed, if their arguments were invalid.  This avoids that problem
(and a memory leak).

Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-02-01 14:26:46 -08:00
Justin Pettit
146356e958 ofp-parse: Ignore "idle_age" and "hard_age" when parsing a flow string.
It should be possible to feed to output of "ovs-ofctl dump-flows" to
"ovs-ofctl add-flows".  However, some of the metadata needs to be
ignored.  "idle_age" and "hard_age" was recently added to the output of
"ovs-ofctl dump-flows", but they were not ignored like the other
metadata.  This commit ignores them.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
2013-02-01 13:53:26 -08:00
Ben Pfaff
80af5ee5a5 netlink-socket: Don't bother logging SO_RCVBUFFORCE failure as non-root.
Some Open vSwitch utilities can do useful work when they are not run as
root.  Without this commit, these utilities will log a warning on failure
to use the SO_RCVBUFFORCE socket option if they open any Netlink sockets.
This will always happen, it does not report anything unexpected or
fixable as non-root, and sometimes it makes users wonder if something is
wrong, so there is no benefit to logging it.  This commit drops it in that
case.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-02-01 10:33:50 -08:00
Ben Pfaff
da78d43d75 ofproto-dpif: Fix memory leak in port_dump_next().
The caller of port_query_by_name() is responsible for freeing the
ofproto_port that it returns on success, but ofproto-dpif did not do this.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-01-31 15:53:23 -08:00
Ben Pfaff
12b7916089 ovs-ctl: Update comment.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
2013-01-31 15:48:35 -08:00
Ben Pfaff
f728af2ed6 ofproto-dpif: Clear revalidation flags only once, not per-ofproto.
Found by inspection.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-01-31 15:47:24 -08:00
Ben Pfaff
a15fce8efc ovsdb-tool: Fix memory leak on error path in "show-log" implementation.
Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-01-31 14:13:37 -08:00
Ben Pfaff
9582c4f577 ovsdb-idl: Fix memory leak on error path.
Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-01-31 14:13:17 -08:00
Ben Pfaff
801d2b2a1d meta-flow: Add missing "break" to mf_set_wild().
Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-01-31 14:13:13 -08:00
Ben Pfaff
8f75dea3e4 meta-flow: Avoid null pointer dereference in mf_format_frag_string().
The 'maskp' parameter to this function can be NULL, but the function
always dereferenced it.  This commit fixes the problem.

This commit also fixes the order in which the value and mask were adjusted
to correctly discard 1-bits outside of FLOW_NW_FRAG_MASK.

Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-01-31 14:12:57 -08:00
Gurucharan Shetty
b47e6df6be ovs-ctl: Fix a couple of typos.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
2013-01-30 08:19:35 -08:00
Ethan Jackson
c060c4cf83 netdev-vport: Build on all platforms.
This patch removes the final bit of linux specific code which
prevents building netdev-vport everywhere.  With this, other
platforms automatically get access to patch ports, and (if their
datapath supports it), flow based tunneling.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2013-01-28 19:09:58 -08:00
Ethan Jackson
0f5383787d tests: Add tunnel unit tests.
This commit adds unit tests which exercise the flow based
tunneling code added in previous patches.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2013-01-28 19:09:58 -08:00
Ethan Jackson
b9ad7294a5 lib: Switch to flow based tunneling.
With this patch, ovs-vswitchd uses flow based tunneling
exclusively.  I.E. each kind of tunnel shares a single tunnel
backer in the datapath.  Tunnel headers are set by userspace using
the ipv4_tunnel datapath action.  And, the configuration of
individual tunnels is now a userspace responsibility, so
netdev-vport no longer marshals and unmarshals Netlink attributes
for tunnel configuration, instead only storing the configuration
internally.  There are still some significant pieces of work to do,
but the basic building blocks are there to begin testing.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Co-authored-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
2013-01-28 19:09:58 -08:00
Jesse Gross
7d1a8e7a7b tunnel: Userspace implementation of tunnel manipulation.
The kernel tunneling code currently needs to handle a large number
of operations when tunnel packets are encapsulated and
decapsulated.  Some examples of this are: finding the correct
tunnel port on receive, TTL and ToS inheritance, ECN handling, etc.
All of these can be done on a per-flow basis in userspace now that
we have both the inner and outer header information, which allows
us to both simplify the kernel and take advantage of userspace's
information.  Once tunnel packets are redirected into this code,
the redundant pieces can be removed from other places.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
2013-01-28 19:09:58 -08:00
Ethan Jackson
de28115365 netdev: New function netdev_get_dpif_port().
In future patches, a netdev's datapath port name may not
necessarily be the same as its device name. This patch prepares for
this by making the distinction in the netdev and dpif layers.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2013-01-28 19:09:58 -08:00
Ethan Jackson
48cecbdc39 packets: Create global helper is_ip_any().
Used outside of meta-flow in future patches.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2013-01-28 19:09:58 -08:00
Ethan Jackson
add90f6f20 dpif-netdev: Allow stub interfaces on the dummy datapath.
Future patches will need to add netdevs to the dummy datapath which
can't actually send or receive packets.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2013-01-28 19:09:58 -08:00
Ethan Jackson
8f73d5377d ofproto-dpif: Install drops for flows from invalid in_ports.
Before this patch, if a packet came in on a port which userspace
doesn't know about, it would be silently dropped without installing
a drop flow.  Historically, this has been fine because this
situation could only occur during transient reconfiguration
periods.  However, in future, this could occur when the tunneling
code decides to reject a packet due to invalid headers.  In this
case, it's preferable to drop the packet in the kernel to avoid a
high bandwidth stream of invalid packets DoSing the switch.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2013-01-28 19:09:58 -08:00
Ethan Jackson
72d64e3322 ofproto-dpif: Require an in_port when tracing datapath flows.
All datapath flows should have an in_port, so it doesn't make a lot
of sense to allow omitting it when tracing.  If a user wants to
trace a flow which has no in_port, they can use the OpenFlow syntax
which doesn't go through ofproto_receive().

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2013-01-28 13:15:46 -08:00
Ethan Jackson
58c6adda89 ofproto-dpif: Use ofproto_receive() in update_stats().
This removes a bit of duplicate code, and will be necessary to
support future patches.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2013-01-28 13:15:46 -08:00
Ethan Jackson
11e2610620 route-table: Add route_table_wait() to the stub implementation.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
2013-01-28 13:15:46 -08:00
Jesse Gross
f18a39b73a datapath: Remove kernel patch ports.
Now that userspace implements patch ports completely internally,
it's possible to remove the kernel implementation of them.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
2013-01-28 10:26:32 -08:00
Jesse Gross
953753fa4d datapath: Remove compatibility GRE identifier.
We want to move the GRE vport ID into the upstream range but in
order to ease the transition kept the old ID around for one release.
This removes the old value.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
2013-01-28 10:26:32 -08:00