[ovs-dev] [PATCH] autopath: Create the autopath action.

2011-04-08 Thread Ethan Jackson
The newly created autopath action will be the way OpenFlow interacts with the existing bonding infrastructure. --- include/openflow/nicira-ext.h | 47 +- lib/automake.mk |2 + lib/autopath.c| 110 + lib/au

[ovs-dev] [PATCH] netdev-linux: Avoid "cleverness" in swap_uint64().

2011-04-08 Thread Ben Pfaff
Obviously correct code is easier on everyone. As the C FAQ says: 20.15c: How can I swap two values without using a temporary? A: The standard hoary old assembly language programmer's trick is: a ^= b; b ^= a; a ^= b; But this sort of

[ovs-dev] [uswitch 2/4] netdev-linux: Fix netdev_send() to tap device.

2011-04-08 Thread Ben Pfaff
Commit 76c308b50d3 "netdev-linux: Support 'send' for netdevs opened with NETDEV_ETH_TYPE_NONE" broke sending packets to tap devices. Sending a packet to a tap device with an AF_PACKET socket causes that packet to be looped back to be received on the tap device again, which obviously isn't useful.

[ovs-dev] [uswitch 3/4] dpif-linux: Avoid segfault on netdev_get_stats() without kernel module.

2011-04-08 Thread Ben Pfaff
netdev_linux_get_stats() calls into netdev_vport_get_stats(), which in turn attempts a transactino on genl_sock. If the kernel module isn't loaded, then genl_sock won't be there, and in any case there's nothing that guarantees that it's been initialized yet. This fixes the problem by ensuring tha

[ovs-dev] [uswitch 0/4] Fixes for userspace switch

2011-04-08 Thread Ben Pfaff
This series fixes some bugs that I discovered while attempting to use the userspace switch implementation. Thanks to Aaron Rosen for bringing the userspace switch to my attention. Ben Pfaff (4): netdev-linux: Fix blocking while sending packets. netdev-linux: Fix netdev_send() to tap device.

[ovs-dev] [uswitch 1/4] netdev-linux: Fix blocking while sending packets.

2011-04-08 Thread Ben Pfaff
The AF_PACKET socket needs to be in nonblocking mode or trying to send a packet can take a long time. --- lib/netdev-linux.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index eecaaa5..aacc48b 100644 --- a/lib/netdev-linux.c +++ b

[ovs-dev] [uswitch 4/4] dpif-linux: Avoid logging error on ENOENT in dpif_linux_is_internal_device().

2011-04-08 Thread Ben Pfaff
ENOENT can be returned if the kernel module isn't loaded. If that's the case then we've already logged that and there's no point in logging it again. --- lib/dpif-linux.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c index a7823b8..f

Re: [ovs-dev] [idl 1/2] ovsdb-idl: Fix atomicity of writes that don't change a column's value.

2011-04-08 Thread Ben Pfaff
On Fri, Apr 08, 2011 at 10:52:38AM -0700, Andrew Evans wrote: > On 4/8/11 10:27 AM, Ben Pfaff wrote: > > On Fri, Apr 08, 2011 at 10:25:26AM -0700, Andrew Evans wrote: > >> What prevents another client from writing a different value since we > >> last read the row? > > > > A write-only column is on

Re: [ovs-dev] [idl 1/2] ovsdb-idl: Fix atomicity of writes that don't change a column's value.

2011-04-08 Thread Andrew Evans
On 4/8/11 10:27 AM, Ben Pfaff wrote: > On Fri, Apr 08, 2011 at 10:25:26AM -0700, Andrew Evans wrote: >> What prevents another client from writing a different value since we >> last read the row? > > A write-only column is only suitable for a client that owns a > particular column. This is documen

Re: [ovs-dev] [idl 2/2] bridge: Monitor fewer OVSDB columns.

2011-04-08 Thread Andrew Evans
On Fri, Apr 1, 2011 at 10:51 AM, Ben Pfaff wrote: > By omitting columns that ovs-vswitchd does not use at all, and omitting > alerts for columns that ovs-vswitchd writes to but does not read, we can > save CPU time and bandwidth. Thanks, looks reasonable to me. ___

Re: [ovs-dev] [idl 1/2] ovsdb-idl: Fix atomicity of writes that don't change a column's value.

2011-04-08 Thread Ben Pfaff
On Fri, Apr 08, 2011 at 10:25:26AM -0700, Andrew Evans wrote: > On 4/5/11 12:24 PM, Ben Pfaff wrote: > > +/* If this is a write-only column and the datum being written is the > > same > > + * as the one already there, just skip the update entirely. This is > > worth > > + * optimizin

Re: [ovs-dev] [idl 1/2] ovsdb-idl: Fix atomicity of writes that don't change a column's value.

2011-04-08 Thread Andrew Evans
On 4/5/11 12:24 PM, Ben Pfaff wrote: > +/* If this is a write-only column and the datum being written is the same > + * as the one already there, just skip the update entirely. This is > worth > + * optimizing because we have a lot of columns that get periodically > + * refreshed