openvswitch
15 years agovswitchd: Prevent a single interface from being added to two different ports.
Ben Pfaff [Thu, 1 Jan 2009 00:13:33 +0000 (16:13 -0800)]
vswitchd: Prevent a single interface from being added to two different ports.

15 years agosecchan: Fix cut-and-paste errors in port speed determination.
Ben Pfaff [Wed, 31 Dec 2008 23:59:39 +0000 (15:59 -0800)]
secchan: Fix cut-and-paste errors in port speed determination.

15 years agovswitchd: Drop debug output that was accidentally included.
Ben Pfaff [Wed, 31 Dec 2008 23:38:56 +0000 (15:38 -0800)]
vswitchd: Drop debug output that was accidentally included.

15 years agovswitchd: Implement port mirroring.
Ben Pfaff [Wed, 31 Dec 2008 22:38:43 +0000 (14:38 -0800)]
vswitchd: Implement port mirroring.

15 years agoNew functions for parsing integers.
Ben Pfaff [Wed, 31 Dec 2008 22:34:13 +0000 (14:34 -0800)]
New functions for parsing integers.

15 years agoNew function svec_equal().
Ben Pfaff [Wed, 31 Dec 2008 22:33:47 +0000 (14:33 -0800)]
New function svec_equal().

15 years agoReturn meaningful errors for brctl modification commands.
Justin Pettit [Wed, 31 Dec 2008 18:55:13 +0000 (10:55 -0800)]
Return meaningful errors for brctl modification commands.

When datapaths and interfaces are modified, we now do more thorough
checks to see whether they will succeed or not.  When datapaths are
added, we now block until they are created, so that follow-on ioctl
calls to attach interfaces will immediately work.

15 years agoMake the datapath tolerate kernels that lack NLA_NUL_STRING.
Ben Pfaff [Wed, 31 Dec 2008 18:35:42 +0000 (10:35 -0800)]
Make the datapath tolerate kernels that lack NLA_NUL_STRING.

NLA_NUL_STRING was introduced in 2.6.19.

15 years agovswitchd: Be careful to sort all the svecs that are passed to svec_contains().
Ben Pfaff [Wed, 31 Dec 2008 17:56:20 +0000 (09:56 -0800)]
vswitchd: Be careful to sort all the svecs that are passed to svec_contains().

15 years agoAdd support for "brctl show".
Justin Pettit [Wed, 31 Dec 2008 06:31:38 +0000 (22:31 -0800)]
Add support for "brctl show".

This makes datapaths and their interfaces show up as you'd expect when
"brctl show" is run.  To get this functionality, you must insmod the
brcompat kernel module.

15 years agovswitchd: Fix fd leaks by closing files that we read in read_file().
Ben Pfaff [Wed, 31 Dec 2008 00:06:06 +0000 (16:06 -0800)]
vswitchd: Fix fd leaks by closing files that we read in read_file().

Fixes bug #697.

Thanks to Martin for reporting this bug.

15 years agovswitchd: Add support for remote controller.
Ben Pfaff [Wed, 31 Dec 2008 00:02:17 +0000 (16:02 -0800)]
vswitchd: Add support for remote controller.

15 years agoFix bug in make_add_simple_flow() that busts secchan's in-band control.
Ben Pfaff [Tue, 30 Dec 2008 23:26:33 +0000 (15:26 -0800)]
Fix bug in make_add_simple_flow() that busts secchan's in-band control.

15 years agovswitchd: Don't try to delete local port from datapath.
Ben Pfaff [Tue, 30 Dec 2008 21:53:18 +0000 (13:53 -0800)]
vswitchd: Don't try to delete local port from datapath.

The local port (OFFP_LOCAL) is fixed in place and can't be deleted, so
don't try.

15 years agobrcompat: Remove line-length limitations from brc_modify_config().
Ben Pfaff [Tue, 30 Dec 2008 21:40:10 +0000 (13:40 -0800)]
brcompat: Remove line-length limitations from brc_modify_config().

15 years agobrcompat: Write temporary file to same directory as config file.
Ben Pfaff [Tue, 30 Dec 2008 21:25:35 +0000 (13:25 -0800)]
brcompat: Write temporary file to same directory as config file.

Otherwise, we will write it in the current working directory, which will
be / if we're running as a daemon (see daemonize()).  We shouldn't assume
that we can write to that directory, and it might not be in the same
file system as the output file anyhow.

15 years agoNew function nl_sock_wait(), to improve netlink socket abstraction.
Ben Pfaff [Tue, 30 Dec 2008 21:12:48 +0000 (13:12 -0800)]
New function nl_sock_wait(), to improve netlink socket abstraction.

15 years agoProperly lock dp_mutex around changes to the datapath.
Ben Pfaff [Tue, 30 Dec 2008 21:03:48 +0000 (13:03 -0800)]
Properly lock dp_mutex around changes to the datapath.

We weren't locking dp_mutex() here but it really is necessary.  See the
comment on dp_mutex itself for details.

This actually restores some of the locking removed by commit 47b8652d
"Simplify use of dp_mutex."  That commit is correct that we can take
dp_mutex at a high level in dp_genl_openflow(), but it removes locking
from functions that are not called through dp_genl_openflow(): in
particular any Netlink command other than DP_GENL_C_OPENFLOW does not
go through that function, so those commands need to acquire the mutex
themselves.

15 years agobrcompat: Fix usage message.
Ben Pfaff [Tue, 30 Dec 2008 20:50:02 +0000 (12:50 -0800)]
brcompat: Fix usage message.

--brcompat isn't required and doesn't substitute for --config, so put it
in a different section.

15 years agobrcompat: Add note about required kernel module to vswitchd manpage.
Ben Pfaff [Tue, 30 Dec 2008 20:49:23 +0000 (12:49 -0800)]
brcompat: Add note about required kernel module to vswitchd manpage.

15 years agoSimplify lookup_dp() now that we can assume that dp_name is null-terminated.
Ben Pfaff [Tue, 30 Dec 2008 20:40:11 +0000 (12:40 -0800)]
Simplify lookup_dp() now that we can assume that dp_name is null-terminated.

15 years agoForce DP_GENL_A_DP_NAME and DP_GENL_A_PORTNAME to be null-terminated.
Ben Pfaff [Tue, 30 Dec 2008 20:34:39 +0000 (12:34 -0800)]
Force DP_GENL_A_DP_NAME and DP_GENL_A_PORTNAME to be null-terminated.

The kernel doesn't check for a null terminator on strings in Netlink
attributes unless you force it to do so.

15 years agoFactor datapath common code into new function lookup_dp().
Ben Pfaff [Tue, 30 Dec 2008 20:33:11 +0000 (12:33 -0800)]
Factor datapath common code into new function lookup_dp().

15 years agoFix GNU make warning about overriding commands for a target.
Ben Pfaff [Tue, 30 Dec 2008 19:40:22 +0000 (11:40 -0800)]
Fix GNU make warning about overriding commands for a target.

We would add a target to link a C file into datapath directories each
time that file was mentioned in a list of sources, so when we put a source
file into two different lists of sources it got two such targets.  Fixed
by using the GNU make $(sort) function to eliminate duplicates.

15 years agoUpdate dpif comments and prototypes.
Ben Pfaff [Tue, 30 Dec 2008 19:32:23 +0000 (11:32 -0800)]
Update dpif comments and prototypes.

Some of the comments weren't up-to-date, and the prototypes are easier
to understand if parameter names are included.

15 years agoRestore openflow-netlink.h ABI.
Ben Pfaff [Tue, 30 Dec 2008 19:31:25 +0000 (11:31 -0800)]
Restore openflow-netlink.h ABI.

Inserting DP_GENL_A_DP_NAME above DP_GENL_A_PORTNAME in commit
660f6596ba31, "First cut at bridge compatibility for vswitchd" forces users
not to use any existing builds of userspace utilities, because the
numbering of all the netlink attributes for OpenFlow has changed.  This
change restores the numbering and should make older dpctl, etc. still able
to work.

15 years agoUse rcu_dereference() before we dereference an RCU-protected pointer.
Ben Pfaff [Tue, 30 Dec 2008 19:23:36 +0000 (11:23 -0800)]
Use rcu_dereference() before we dereference an RCU-protected pointer.

The access to dps[i]->netdev->name is a dereference that should be
protected by rcu_dereference().

15 years agoFix off-by-one error in looking up datapaths by index.
Ben Pfaff [Tue, 30 Dec 2008 18:48:59 +0000 (10:48 -0800)]
Fix off-by-one error in looking up datapaths by index.

15 years agoFix missing symbol in brcompat kernel module on older kernels.
Justin Pettit [Tue, 30 Dec 2008 19:23:34 +0000 (11:23 -0800)]
Fix missing symbol in brcompat kernel module on older kernels.

In kernels older than 2.6.23, the genl_register_mc_group function is not
defined, so we fake it.  The original checkin didn't build the C file
that contains the function's definition.

15 years agoIncrease max datapaths to 256 (Bug #561).
Justin Pettit [Tue, 30 Dec 2008 18:55:33 +0000 (10:55 -0800)]
Increase max datapaths to 256 (Bug #561).

Increase the maximum number of datapaths from 32 to 256.  This ought to
be enough for anyone.

15 years agobrcompat: Build brcompat module only under Linux 2.6.
Ben Pfaff [Tue, 30 Dec 2008 18:26:03 +0000 (10:26 -0800)]
brcompat: Build brcompat module only under Linux 2.6.

brcompat fails to compile under Linux 2.4 due to the lack of brioctl_set()
and other symbols, but there's no intention of supporting Linux 2.4 for it
anyhow, so don't build it under Linux 2.4.

15 years agobrcompat: Remove policy from Netlink code.
Ben Pfaff [Tue, 30 Dec 2008 18:25:50 +0000 (10:25 -0800)]
brcompat: Remove policy from Netlink code.

Policies are only useful for data that is received by a Netlink socket.
They do not apply to data that is sent out.  Since this code does not
parse the messages that it receives at all, it does not need any policy.

15 years agobrcompat: Fix typo in user message.
Ben Pfaff [Tue, 30 Dec 2008 18:25:38 +0000 (10:25 -0800)]
brcompat: Fix typo in user message.

15 years agobrcompat: Indentation fixups.
Ben Pfaff [Tue, 30 Dec 2008 18:25:29 +0000 (10:25 -0800)]
brcompat: Indentation fixups.

In a few places four spaces were used in place of one tab. Elsewhere,
function arguments weren't lined up well.

15 years agoMake datapath compile with Xen kernel.
Ben Pfaff [Tue, 30 Dec 2008 18:01:06 +0000 (10:01 -0800)]
Make datapath compile with Xen kernel.

The Xen kernel is based on 2.6.18 but backports many features from later
kernels.  It is not always possible, therefore, to detect whether we need
to use compatibility code based on LINUX_VERSION_CODE.  This commit fixes
the problem by using configure-time tests to check for the need for the
compatibility code.

Build-tested on Linux 2.6.15 through 2.6.28 with the default configuration
(except that some kernels needed preemption turned off) and with Xen
kernel 2.6.18-92.1.10.el5.xs5.0.0.394.644.

Fixes bug #548.

15 years agoFirst cut at bridge compatibility for vswitchd.
Justin Pettit [Tue, 30 Dec 2008 06:53:08 +0000 (22:53 -0800)]
First cut at bridge compatibility for vswitchd.

This set of changes allows the bridge ioctls to be used for adding and
removing datapaths and interfaces.  To enable, one must insmod the
new "brcompat_mod.ko" kernel module.  Then, vswitchd is run with the
"--brcompat" flag.  See the man page for vswitchd for more details.

15 years agovswitchd: Fix SIGHUP behavior for bonded ports.
Ben Pfaff [Tue, 30 Dec 2008 00:17:09 +0000 (16:17 -0800)]
vswitchd: Fix SIGHUP behavior for bonded ports.

15 years agovswitchd: Properly renumber port_ifidx values on iface destruction.
Ben Pfaff [Tue, 30 Dec 2008 00:01:46 +0000 (16:01 -0800)]
vswitchd: Properly renumber port_ifidx values on iface destruction.

15 years agovswitchd: Revalidate all flows upon bridge configuration change.
Ben Pfaff [Tue, 30 Dec 2008 00:01:16 +0000 (16:01 -0800)]
vswitchd: Revalidate all flows upon bridge configuration change.

Otherwise, now-invalid flows can linger, causing trouble.

15 years agoNew function mac_learning_flush().
Ben Pfaff [Mon, 29 Dec 2008 23:55:54 +0000 (15:55 -0800)]
New function mac_learning_flush().

15 years agovswitchd: Fix svec_diff().
Ben Pfaff [Mon, 29 Dec 2008 22:29:26 +0000 (14:29 -0800)]
vswitchd: Fix svec_diff().

The logic bugs here were causing bridge.c to do too much work adding and
deleting interfaces unnecessarily and perhaps in some circumstances getting
the set of interfaces wrong entirely.

15 years agovswitchd: Comment out annoying bonding-related logging, for now.
Ben Pfaff [Mon, 29 Dec 2008 23:59:48 +0000 (15:59 -0800)]
vswitchd: Comment out annoying bonding-related logging, for now.

15 years agovswitchd: Fix svec memory leaks.
Ben Pfaff [Mon, 29 Dec 2008 21:30:48 +0000 (13:30 -0800)]
vswitchd: Fix svec memory leaks.

Pointed out by Justin.

15 years agoMake ds_cstr() always null-terminate the string.
Ben Pfaff [Mon, 29 Dec 2008 21:26:19 +0000 (13:26 -0800)]
Make ds_cstr() always null-terminate the string.

Most of the time the string in "struct ds" is
null-terminated, but there seem to be a few corner cases
where it is not.  Make ds_cstr() always put in the null
terminator, for safety.

Thanks to Justin for pointing out the problem.

15 years agovswitchd: Implement bonding link failure detection & failover.
Ben Pfaff [Mon, 29 Dec 2008 21:07:09 +0000 (13:07 -0800)]
vswitchd: Implement bonding link failure detection & failover.

15 years agoNew functions port_array_destroy(), port_array_clear().
Ben Pfaff [Mon, 29 Dec 2008 21:06:56 +0000 (13:06 -0800)]
New functions port_array_destroy(), port_array_clear().

15 years agoDocument vswitchd.
Ben Pfaff [Sun, 28 Dec 2008 06:45:25 +0000 (22:45 -0800)]
Document vswitchd.

15 years agoFactor out common parts of manpages.
Ben Pfaff [Sat, 27 Dec 2008 23:36:49 +0000 (15:36 -0800)]
Factor out common parts of manpages.

There was a lot of duplication in the sources for the
manpages, because many of the programs have common options.
This factors out some of the duplication into include
files, using the man ".so" directive.  It also uses the
".ds" directive to define strings that should be
customized for each program's manpage.

15 years agovswitchd: Actually tag flows that go out bonded devices.
Ben Pfaff [Sat, 27 Dec 2008 05:26:46 +0000 (21:26 -0800)]
vswitchd: Actually tag flows that go out bonded devices.

The change that introduced rebalancing for bonded devices
set up the infrastructure for revalidating flows that go
out bonded devices, but neglected to actually tag those
flows.  This fixes the problem.

15 years agovswitchd: Basic bonding rebalancing works.
Ben Pfaff [Sat, 27 Dec 2008 00:47:35 +0000 (16:47 -0800)]
vswitchd: Basic bonding rebalancing works.

So far only tested with hping3.  At least, need to make sure that existing
flows get redirected through the new interface as well.

15 years agovswitchd: Work on flow statistics gathering.
Ben Pfaff [Sat, 27 Dec 2008 00:48:27 +0000 (16:48 -0800)]
vswitchd: Work on flow statistics gathering.

15 years agovswitchd: Implement stats request manager.
Ben Pfaff [Wed, 24 Dec 2008 23:09:41 +0000 (15:09 -0800)]
vswitchd: Implement stats request manager.

15 years agoMake tag_set_add() avoid adding tags that are already present.
Ben Pfaff [Wed, 24 Dec 2008 23:11:17 +0000 (15:11 -0800)]
Make tag_set_add() avoid adding tags that are already present.

15 years agoNew functions for iterating through flow stats replies.
Ben Pfaff [Wed, 24 Dec 2008 23:10:48 +0000 (15:10 -0800)]
New functions for iterating through flow stats replies.

15 years agoNew function ofpbuf_clone_data().
Ben Pfaff [Wed, 24 Dec 2008 23:09:57 +0000 (15:09 -0800)]
New function ofpbuf_clone_data().

15 years agovswitchd: Fix treatment of unbuffered packets.
Ben Pfaff [Fri, 26 Dec 2008 19:06:09 +0000 (11:06 -0800)]
vswitchd: Fix treatment of unbuffered packets.

Before, buggy code caused unbuffered packets to be dropped.  This fixes
the problem.

15 years agoDrop message about short Ethernet frames entirely.
Ben Pfaff [Fri, 26 Dec 2008 19:04:15 +0000 (11:04 -0800)]
Drop message about short Ethernet frames entirely.

It's just not useful.

15 years agovswitchd: Automatically restart secchan if it dies.
Ben Pfaff [Wed, 24 Dec 2008 19:01:37 +0000 (11:01 -0800)]
vswitchd: Automatically restart secchan if it dies.

15 years agoImplement revalidation.
Ben Pfaff [Wed, 24 Dec 2008 01:06:17 +0000 (17:06 -0800)]
Implement revalidation.

15 years agoAdd support for tags to mac-learning library, and update client code.
Ben Pfaff [Wed, 24 Dec 2008 00:57:23 +0000 (16:57 -0800)]
Add support for tags to mac-learning library, and update client code.

15 years agoImplement generic tag library.
Ben Pfaff [Wed, 24 Dec 2008 00:57:58 +0000 (16:57 -0800)]
Implement generic tag library.

15 years agoNew functions random_uint8(), random_uint16().
Ben Pfaff [Wed, 24 Dec 2008 01:02:46 +0000 (17:02 -0800)]
New functions random_uint8(), random_uint16().

Also, reimplement random_uint32() to make fewer calls to rand().

15 years agoNew macro IS_POW2().
Ben Pfaff [Wed, 24 Dec 2008 01:02:54 +0000 (17:02 -0800)]
New macro IS_POW2().

15 years agoImplement generic hash table.
Ben Pfaff [Tue, 23 Dec 2008 22:59:48 +0000 (14:59 -0800)]
Implement generic hash table.

15 years agoNew function flow_equal().
Ben Pfaff [Tue, 23 Dec 2008 23:05:45 +0000 (15:05 -0800)]
New function flow_equal().

15 years agoInline flow_compare() and flow_hash(), for performance.
Ben Pfaff [Tue, 23 Dec 2008 23:04:54 +0000 (15:04 -0800)]
Inline flow_compare() and flow_hash(), for performance.

15 years agoMake flow_hash() use hash_lookup3(), for speed and hash quality.
Ben Pfaff [Tue, 23 Dec 2008 23:03:37 +0000 (15:03 -0800)]
Make flow_hash() use hash_lookup3(), for speed and hash quality.

15 years agoAdd faster and better-quality hash function hash_lookup3().
Ben Pfaff [Tue, 23 Dec 2008 23:01:25 +0000 (15:01 -0800)]
Add faster and better-quality hash function hash_lookup3().

15 years agoRemove misplaced comment.
Ben Pfaff [Mon, 22 Dec 2008 06:19:17 +0000 (22:19 -0800)]
Remove misplaced comment.

15 years agovswitch: Implement basic bonding.
Ben Pfaff [Sat, 20 Dec 2008 00:33:31 +0000 (16:33 -0800)]
vswitch: Implement basic bonding.

Rebalancing and link failure detection are missing, but the basics are
there (and work OK in simple testing).

15 years agovswitch: Pass --monitor to secchan processes, to allow monitoring them.
Ben Pfaff [Fri, 19 Dec 2008 23:10:18 +0000 (15:10 -0800)]
vswitch: Pass --monitor to secchan processes, to allow monitoring them.

15 years agoAdd #include <limits.h> to fix build problem with undefined "_POSIX_PIPE_BUF".
Justin Pettit [Sat, 20 Dec 2008 00:06:11 +0000 (16:06 -0800)]
Add #include <limits.h> to fix build problem with undefined "_POSIX_PIPE_BUF".

15 years agovswitchd: Fix stupid thinko.
Ben Pfaff [Thu, 18 Dec 2008 22:26:29 +0000 (14:26 -0800)]
vswitchd: Fix stupid thinko.

15 years agovswitchd: Basic working VLAN support.
Ben Pfaff [Thu, 18 Dec 2008 22:00:59 +0000 (14:00 -0800)]
vswitchd: Basic working VLAN support.

15 years agoNew functions put_openflow() and put_openflow_xid().
Ben Pfaff [Thu, 18 Dec 2008 22:01:35 +0000 (14:01 -0800)]
New functions put_openflow() and put_openflow_xid().

15 years agoAdd support for VLAN tags to the MAC learning library.
Ben Pfaff [Thu, 18 Dec 2008 22:00:23 +0000 (14:00 -0800)]
Add support for VLAN tags to the MAC learning library.

vswitchd needs to keep separate per-VLAN MAC learning tables, so this adds
a VLAN tag to each MAC learning table entry.  The existing users of the
MAC learning table don't care about VLANs, so they always pass in a VLAN
of 0.

There is a very good chance that vswitchd will need additional features in
its MAC learning table that don't fit well into the existing library.  In
that case this commit will probably be reverted and a separate MAC learning
implementation added in the vswitch directory.

15 years agocfg: Fix functions for retrieving keys.
Ben Pfaff [Thu, 18 Dec 2008 20:43:57 +0000 (12:43 -0800)]
cfg: Fix functions for retrieving keys.

They didn't work.  At all.

15 years agoInitial, skeletal implementation of vswitchd.
Ben Pfaff [Wed, 17 Dec 2008 01:19:09 +0000 (17:19 -0800)]
Initial, skeletal implementation of vswitchd.

15 years agoNew function ds_get_line().
Ben Pfaff [Wed, 17 Dec 2008 00:39:20 +0000 (16:39 -0800)]
New function ds_get_line().

15 years agoNew function ds_put_buffer().
Ben Pfaff [Wed, 17 Dec 2008 00:39:01 +0000 (16:39 -0800)]
New function ds_put_buffer().

15 years agoNew functions for verify OpenFlow message types and lengths.
Ben Pfaff [Wed, 17 Dec 2008 00:38:01 +0000 (16:38 -0800)]
New functions for verify OpenFlow message types and lengths.

15 years agoNew function ofp_message_type_to_string().
Ben Pfaff [Wed, 17 Dec 2008 00:36:25 +0000 (16:36 -0800)]
New function ofp_message_type_to_string().

15 years agoMake secchan exit if the connection drops and can never be reconnected.
Ben Pfaff [Wed, 17 Dec 2008 00:28:50 +0000 (16:28 -0800)]
Make secchan exit if the connection drops and can never be reconnected.

In particular this happens if the controller is specified using a fd vconn,
since once disconnected a fd vconn can never be reconnected.

This behavior is useful for vswitchd, which connects to secchan over a
fd vconn.

15 years agoAdd new "fd" vconn, which takes a file descriptor number as argument.
Ben Pfaff [Wed, 17 Dec 2008 00:57:40 +0000 (16:57 -0800)]
Add new "fd" vconn, which takes a file descriptor number as argument.

This requires introducing the concept of a "reconnectable" vconn.  A vconn
is reconnectable if, when it is closed, it is possible to try to reconnect
to it using the name that was originally used.  This is the case for all
existing vconn types, but it is not true for fd vconns, because closing a
fd vconn closes the specified file descriptor, and thus attempting to
reopen it will get an EBADF error.

An rconn is not reliable if it is connected to a vconn that is not
reconnectable.

15 years agoIntroduce x2nrealloc() helper function, and use it.
Ben Pfaff [Wed, 17 Dec 2008 00:19:36 +0000 (16:19 -0800)]
Introduce x2nrealloc() helper function, and use it.

Also fixes a bug in read_cert_file() in vconn-ssl.c: "sizeof *certs"
should have been "sizeof **certs".  In fact the sizes will be identical
in all practical cases since both *certs and **certs are pointer types,
so this is not an important fix.

15 years agoMake datapath interface library more flexible.
Ben Pfaff [Wed, 17 Dec 2008 00:13:36 +0000 (16:13 -0800)]
Make datapath interface library more flexible.

A single netlink socket can address any kernel datapath, but the datapath
interface library was artificially restricting a dpif to address a single
datapath that was selected at dpif creation time.  This commit removes
that restriction.

This is useful for vswitchd, which can create and destroy any number of
datapaths and add and remove ports on them.  It's more convenient to use
a single dpif for that instead of many.

15 years agoMove DP_MAX into public header file.
Ben Pfaff [Wed, 17 Dec 2008 00:10:31 +0000 (16:10 -0800)]
Move DP_MAX into public header file.

vswitchd wants to know the maximum number of datapaths, so DP_MAX needs to
be exported.

(This is not an ideal situation.  Really the kernel should not have an
explicit limit on the number of datapaths, and userspace should be able
to query the current maximum.)

15 years agoImprove formatting of process termination messages in secchan logging.
Ben Pfaff [Wed, 17 Dec 2008 00:35:56 +0000 (16:35 -0800)]
Improve formatting of process termination messages in secchan logging.

My expectation was that strsignal() returns the signal's name, e.g.
SIGTERM.  It actually returns an English explanation, so that the existing
code would log a message like "terminated by signal Terminated".  This
commit changes the message to the more sensible "terminated by signal 15
(Terminated)".

Also, the recently approved POSIX 2008 standardized strsignal() and in
particular says that it may return NULL for unknown signal numbers, so
this commit fixes the behavior on NULL return.

15 years agovlog: Optimize logging disabled, rate-limited messages.
Ben Pfaff [Wed, 17 Dec 2008 00:32:27 +0000 (16:32 -0800)]
vlog: Optimize logging disabled, rate-limited messages.

Previously the arguments of rate-limited messages were always evaluated
and passed to vlog_rate_limit().  This commit short-circuits the case
where the vlog levels would prevent any messages from being logged even
without considering rate limiting.

15 years agoReduce rate limit for short-packet messages even further.
Ben Pfaff [Wed, 17 Dec 2008 00:29:36 +0000 (16:29 -0800)]
Reduce rate limit for short-packet messages even further.

These messages appear a lot in a virtualized environment, and they really
are not meaningful there.

15 years agoFix typo in comment.
Ben Pfaff [Wed, 17 Dec 2008 00:30:19 +0000 (16:30 -0800)]
Fix typo in comment.

15 years agoAdd reminder comment to lib/learning-switch.c.
Ben Pfaff [Wed, 17 Dec 2008 00:07:41 +0000 (16:07 -0800)]
Add reminder comment to lib/learning-switch.c.

(This doesn't change the semantics of the code at all.)

15 years agoFix mangled header guards in ofp-print.h.
Ben Pfaff [Fri, 12 Dec 2008 22:56:57 +0000 (14:56 -0800)]
Fix mangled header guards in ofp-print.h.

15 years agoImprove secchan.8 manpage.
Ben Pfaff [Fri, 12 Dec 2008 01:14:18 +0000 (17:14 -0800)]
Improve secchan.8 manpage.

15 years agoFix typo in error message.
Ben Pfaff [Fri, 12 Dec 2008 01:00:43 +0000 (17:00 -0800)]
Fix typo in error message.

15 years agoStyle fix: f(x) is better than f((x))
Ben Pfaff [Fri, 12 Dec 2008 00:41:25 +0000 (16:41 -0800)]
Style fix: f(x) is better than f((x))

15 years agoAdd userspace datapath to openflow.
Ben Pfaff [Thu, 11 Dec 2008 22:07:08 +0000 (14:07 -0800)]
Add userspace datapath to openflow.

15 years agoUpdate required Autoconf version in INSTALL.
Ben Pfaff [Thu, 11 Dec 2008 22:06:34 +0000 (14:06 -0800)]
Update required Autoconf version in INSTALL.

The AC_PREREQ was updated some time ago but the documentation lagged
behind.

15 years agoMake ds_put_char_multiple() use the provided character instead of a space.
Ben Pfaff [Thu, 11 Dec 2008 17:35:24 +0000 (09:35 -0800)]
Make ds_put_char_multiple() use the provided character instead of a space.

Fortunately this function was only used for formatting log messages, in
a context where spaces were the normal padding character.

Found by Chris Eagle.

15 years agoCleanup some formatting in openflow.h.
Justin Pettit [Wed, 3 Dec 2008 07:55:12 +0000 (23:55 -0800)]
Cleanup some formatting in openflow.h.