2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-21 14:49:41 +00:00
Commit Graph

1788 Commits

Author SHA1 Message Date
Ben Pfaff
68efcbec41 ofpbuf: Add ofpbuf_new_with_headroom(), ofpbuf_clone_with_headroom().
These new functions simplify an increasingly common usage pattern.

Suggested-by: Jesse Gross <jesse@nicira.com>
2010-09-01 12:55:50 -07:00
Justin Pettit
f79cb67e68 netflow: Send multiple records for byte counts > UINT32_MAX
When a NetFlow record is to be sent for a flow that had more than 2^32
bytes, we used to set the byte count to UINT32_MAX.  With this change,
we will send out multiple records to account for all the traffic.
2010-09-01 09:17:00 -07:00
Justin Pettit
fdf2037829 XenServer builds barf on hyphens in versions. v1.1.0pre1 2010-09-01 02:26:06 -07:00
Justin Pettit
476d56f51d Release Open vSwitch 1.1.0-pre1 2010-08-31 23:22:44 -07:00
Simon Horman
cd8055cce3 datapath: Include net/udp.h in vport-capwap.c
net/udp.h is currently included indirectly via linux/ipv6.h which is
in turn included indirectly via linux/ip.h.  However, this breaks down
if CONFIG_IPV6 is not set, leading to a number of build errors.

Signed-off-by: Simon Horman <horms@verge.net.au>
[Jesse: shortened commit message]
Signed-off-by: Jesse Gross <jesse@nicira.com>
2010-08-30 20:23:00 -07:00
Simon Horman
c259baae45 Debian: Add Joe Perches to debian/copyright
This syncs debian/copyright with the AUTHORS file.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Jesse Gross <jesse@nicira.com>
2010-08-30 18:17:20 -07:00
Simon Horman
33e6617792 datapath: Include linux/version.h in action.h for LINUX_VERSION
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Jesse Gross <jesse@nicira.com>
2010-08-30 13:29:10 -07:00
Jesse Gross
d15365f4ed AUTHORS: Add Joe Perches.
Signed-off-by: Jesse Gross <jesse@nicira.com>
2010-08-30 13:23:09 -07:00
Joe Perches
dfffaef1eb treewide: Use pr_fmt and pr_<level>
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Simon Horman <horms@verge.net.au>
[Jesse: Added missing pr_fmt in vport-gre.c and dp_sysfs_dp.c]
Signed-off-by: Jesse Gross <jesse@nicira.com>
2010-08-30 13:23:08 -07:00
Jesse Gross
717d33b99e datapath: Add compat functions for pr_*.
In the earliest kernels that we support this family of macros
wasn't defined at all.  Later they were defined but did not include
the module name.  Finally, pr_warn was made a synonym for pr_warning.
This harmonizes the behavior across all kernels.

Signed-off-by: Jesse Gross <jesse@nicira.com>
2010-08-30 13:23:08 -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
Ben Pfaff
90a249dc93 INSTALL.Linux: Don't discourage building Debian packages.
For a while the Debian packages were not well maintained or regularly used,
but we at Nicira use them all the time now.  We now aim to have them
accepted into Debian downstream, so we should at least not discourage
users from trying them out.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2010-08-30 11:38:51 -07:00
Ben Pfaff
3d92fe960c Remove openvswitch-switch-config package.
This package was never used by many users, has not worked properly for a
while, and causes lintian warnings, so remove it.

CC: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2010-08-30 11:38:50 -07:00
Simon Horman
c09c9fb21a Debian: openswitch-dbg should depend on the packages it has debugging symbols for
See: http://lintian.debian.org/tags/dbg-package-missing-depends.html

Signed-off-by: Simon Horman <horms@verge.net.au>
2010-08-30 09:41:13 -07:00
Simon Horman
e2e744a852 Debian: Add Homepage
Signed-off-by: Simon Horman <horms@verge.net.au>
2010-08-30 09:39:23 -07:00
Ben Pfaff
3c7b5c2ddc stream-ssl: Use OPENSSL_free() to free memory from X509_NAME_oneline().
Reported-by: Tsvi Slonim <tsvi@toroki.com>
2010-08-27 13:30:31 -07:00
Ben Pfaff
ca78c6b69c datapath: Avoid accesses past the end of skbuff data in actions.
Some of the flow actions that modify skbuff data did not check that the
skbuff was long enough before doing so.  This commit fixes that problem.

Previously, the strategy for avoiding this was to only indicate the layer-3
nw_proto field in the flow if the corresponding layer-4 header was fully
present, so that if, for example, nw_proto was IPPROTO_TCP, this meant
that a TCP header was present.  The original motivation for this patch was
to add corresponding code to only indicate a layer-2 dl_type if the
corresponding layer-3 header was fully present.  But I'm now convinced that
this approach is conceptually wrong, because the meaning of a layer-N
header should not be affected by the meaning of a layer-(N+1) header.

This commit switches to a new approach.  Now, when a header is missing, its
fields in the flow are simply zeroed and have no effect on the "type" field
for the outer header.  Responsibility for ensuring that a header is fully
present is now shifted to the actions that wish to modify that header.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2010-08-27 12:42:39 -07:00
Ben Pfaff
59a18f80dd datapath: Fix default value of skb transport_header.
This commit started out as simply better documenting flow_extract(),
but then I realized that nothing cares about transport_header in the
non-IP case, so don't bother with it at all.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2010-08-27 12:41:00 -07:00
Ben Pfaff
7d0ab001db datapath: Avoid pskb_may_pull() checks where not needed.
These calls to pskb_may_pull() can be reduced to checks on skb->len because
in these contexts those headers will already have been pulled into the
skb linear area if it is there at all.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2010-08-27 12:32:07 -07:00
Ben Pfaff
4c1ad23312 datapath: Report memory allocation errors in flow_extract().
Until now flow_extract() has simply returned a bogus flow when memory
allocation errors occurred.  This fixes the problem by propagating the
error to the caller.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2010-08-27 12:32:05 -07:00
Ben Pfaff
6699af68e6 learning-switch: Ignore "packet_in"s caused by OFPP_CONTROLLER actions.
It seems best to ignore "packet_in"s caused by OFPP_CONTROLLER actions in
learning-switch, since someone might be experimenting and it's best not
to interfere with that.
2010-08-27 10:10:23 -07:00
Ben Pfaff
750638bbef ofproto: Avoid ofpbuf_clone() for OFPAT_CONTROLLER common case.
This additionally optimizes the common case of the first packet of a flow
that consists only of an OFPAT_CONTROLLER action, by avoiding an
ofpbuf_clone() call along that path.
2010-08-27 10:10:23 -07:00
Ben Pfaff
9dbb9d5e94 ofproto: Avoid user->kernel->user round-trip for many controller actions.
When an OpenFlow flow says to send packets to the controller, until now
ofproto has executed that using dpif_execute(), which passes the packet up
to the kernel.  The kernel queues the packet into its "action" queue, and
then later ofproto pulls the packet back down from the kernel and sends it
to the controller.

However, this is unnecessary.  Open vSwitch can just recognize in advance
that it will get the packet back and handle it directly, skipping the round
trip.  This commit implements this optimization.

This generally affects only the first packet in a flow, since generally the
rest come directly down from the kernel.  It only optimizes the "easy" case
where the first action in a flow is to send the packet to the controller,
since this seems to be the common case in the flows that I'm looking at
now.
2010-08-27 10:10:23 -07:00
Ben Pfaff
3a46ca6e46 xenserver: Finish renaming system-level external_ids.
vswitch.xml was updated to describe system-id and xs-system-uuid but the
implementation of this update was incomplete.

CC: Justin Pettit <jpettit@nicira.com>
CC: Jeremy Stribling <strib@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2010-08-26 13:57:11 -07:00
Ben Pfaff
f272ec7373 configure: Enable OpenSSL support by default.
Years ago some users had broken OpenSSL libraries that didn't actually
work, so we disabled OpenSSL by default.  By now, I hope that those users
have fixed their systems.
2010-08-26 13:51:38 -07:00
Ben Pfaff
2105ccc850 dpif-netdev: Expand tabs. 2010-08-26 10:56:20 -07:00
Ben Pfaff
401eeb92d3 Add Nicira extension to OpenFlow for dropping spoofed ARP packets.
"ARP spoofing" is when a host claims an incorrect association between an
IP address and a MAC address for deceptive purposes.  OpenFlow by itself
can prevent a host from sending out ARP replies from an incorrect MAC
address in the Ethernet L2 header, but it cannot control the MAC addresses
inside the ARP L3 packet.  This commit adds a new action that can be used
to drop these spoofed packets.

CC: Paul Ingram <paul@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2010-08-26 10:56:20 -07:00
Ben Pfaff
e5ae7df8c7 vswitchd: Fix 100% CPU usage with bonds and --fake-proc-net.
The current date in milliseconds since the epoch is ~1,282,841,552,000,
which is greater than LONG_MAX of 4,294,967,295 on 32-bit systems, so
no matter what was stored into bond_next_fake_iface_update, it would always
appear to be expired.  It really needs to be a 64-bit number.  (This was
just a typo really.)

Since XenServer 5.5 requires --fake-proc-net, this probably fixes an
important bug there.

Reported-by: Luiz Henrique Ozaki <luiz.ozaki@gmail.com>
2010-08-26 10:54:04 -07:00
Ben Pfaff
3161c659b7 xenserver: Add type-checking to monitor-external-ids script.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2010-08-26 10:29:43 -07:00
Ben Pfaff
d5beca6881 xenserver: Block until change in poll loop to avoid 100% CPU consumption.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2010-08-26 10:29:43 -07:00
Ben Pfaff
7ef6b685ae vswitchd: Fix "updelay" configuration for bonds.
Reported-by: Michael Mao <mmao@nicira.com>
Bug #3521.
2010-08-26 10:06:36 -07:00
Ben Pfaff
769f8ccd5f datapath: Free up flow_extract() return value for reporting errors.
flow_extract() can fail due to memory allocation errors in pskb_may_pull().
Currently it doesn't return those properly, instead just reporting a bogus
flow to the caller.  But its return value is currently in use for reporting
whether the packet was an IPv4 fragment.  This commit switches to reporting
that in the skb itself so that the return value can be reused to report
errors.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2010-08-26 09:15:42 -07:00
Ben Pfaff
a31e0e31c6 datapath: Remove skb->len >= ETH_HLEN check from flow_extract().
The callers ensure that this is already the case.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2010-08-26 09:15:42 -07:00
Ben Pfaff
e819fb4762 datapath: Use 'bool' instead of 'int' where appropriate.
'bool' is better modern kernel style.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2010-08-26 09:15:42 -07:00
Ben Pfaff
d9fce1ca23 datapath: Use min() instead of open-coding it.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2010-08-26 09:15:42 -07:00
Justin Pettit
df09921db5 xenserver: Add monitor-external-ids daemon
The monitor-external-ids daemon monitors the external_ids columns of the
Bridge and Interface OVSDB tables.  Its primary responsibility is to
set the "bridge-id" and "iface-id" keys in the Bridge and Interface
tables, respectively.  It also looks for the use of "network-uuids" in
the Bridge table and duplicates its value to the preferred
"xs-network-uuids".

Signed-off-by: Justin Pettit <jpettit@nicira.com>
2010-08-25 16:48:21 -07:00
Justin Pettit
c76fde78c5 xenserver: Prepend XenServer external ids with "xs-"
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2010-08-25 16:48:21 -07:00
Justin Pettit
bfe62d7a60 xenserver: Report the system type and version as external ids
The configuration schema defines the system-type and system-version
external-ids for the Open_vSwitch table.  This commit adds support for
reporting them on XenServer.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
2010-08-25 16:48:16 -07:00
Justin Pettit
d9af660c05 vswitch: Break out XenServer-specific external ids
As we move to new platforms, not all external identifiers will be
universally unique, but the "-uuid" suffix seemingly prevents their use.
Create new identifiers without the "-uuid" suffix.  Change the existing
XenServer-specific external identifiers to contain a "xs-" prefix.  This
also allows a XenServer integrator to define identifiers different from
the XenServer UUIDs, but still leave them in the config database to be
used by other programs.
2010-08-25 16:24:43 -07:00
Justin Pettit
573c1db99d vswitch: Add port status column to Port table
Add "status" map to provide optional status of ports to Port table.
2010-08-25 15:49:18 -07:00
Ben Pfaff
1900fc2c70 Delete local copy of simplejson.
The previous commit dropped usage of simplejson from the Python
code in the tree, because it did not provide adequate features to
support the JSON-RPC engine.  In particular simplejson is not a
"push parser"--you can't give it a byte or a character at a time
and have it tell you when it has read a whole JSON value.
2010-08-25 14:55:48 -07:00
Ben Pfaff
991559357f Implement initial Python bindings for Open vSwitch database.
These initial bindings pass a few hundred of the corresponding tests
for C implementations of various bits of the Open vSwitch library API.
The poorest part of them is actually the Python IDL interface in
ovs.db.idl, which has not received enough attention yet.  It appears
to work, but it doesn't yet support writes (transactions) and it is
difficult to use.  I hope to improve it as it becomes clear what
semantics Python applications actually want from an IDL.
2010-08-25 14:55:48 -07:00
Ben Pfaff
d1b680c616 reconnect: Refactor tests to use common macro.
This will make it easier to add tests for the Python implemenentation.
2010-08-25 14:55:47 -07:00
Ben Pfaff
d785193ad9 ovsdbmonitor: Fix uninstall.
We install an ovsdbmonitor binary so we should uninstall it too.
2010-08-25 14:55:47 -07:00
Ben Pfaff
d4db8309c5 daemon: Improve comments.
Elsewhere we put the name of command-line options that control global
variables in the comment, so do so here as well.

Also fix a comment typo.
2010-08-25 14:55:47 -07:00
Ben Pfaff
528b8cc4fa reconnect: Fix typo in comment. 2010-08-25 14:55:47 -07:00
Ben Pfaff
20063bd1c8 json: Remove unused return value from json_parser_push().
No point in returning a value that no caller uses.
2010-08-25 14:55:47 -07:00
Ben Pfaff
6d2d2111e1 poll-loop: Fix obsolete comment.
The poll loop used to have support for autonomous subroutines, but it no
longer does.
2010-08-25 14:55:47 -07:00
Ben Pfaff
33ff0dceb4 jsonrpc: Indentation fix. 2010-08-25 14:55:47 -07:00
Ben Pfaff
294e9fc859 stream, vconn: Fix comments.
All streams and all vconns are "active", so there's no point in noting that
requirement in comments.  (A long time ago, active and passive vconns were
conflated instead of having passive vconns broken out as pvconns.  But
active and passive streams have always been distinct.)
2010-08-25 14:55:47 -07:00