[ovs-dev] [STP 9/9] ovs-vswitchd: Add support for 802.1D STP.

2011-10-17 Thread Justin Pettit
Add 802.1D spanning tree protocol support to ovs-vswitchd. Still needs improvements in the following areas: * Does not work over bonds. * Does not expire entries generated by the learning action when STP state changes occur. * Needs more interoperability testing. Only tested ag

[ovs-dev] [STP 8/9] ofproto: Add function to set OpenFlow state and update controller.

2011-10-17 Thread Justin Pettit
This will be used in an upcoming commit. --- ofproto/ofproto.c | 13 + ofproto/ofproto.h |2 ++ 2 files changed, 15 insertions(+), 0 deletions(-) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index bbda478..ea54df5 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -

[ovs-dev] [STP 7/9] ofproto: Mark 'ofproto' arg in is_mirror_output_bundle() as const.

2011-10-17 Thread Justin Pettit
No changes are made to 'ofproto', so it's safe to mark the argument as const. This will be useful in a later commit. --- ofproto/ofproto-dpif.c |2 +- ofproto/ofproto-provider.h |2 +- ofproto/ofproto.c |2 +- ofproto/ofproto.h |2 +- 4 files changed, 4 inser

[ovs-dev] [STP 6/9] Various bug fixes and cleanups to STP library.

2011-10-17 Thread Justin Pettit
- Don't apply endian conversions to flags, which are 8 bits. - Use #defines for default times for use outside library. - Clarify our behavior when in STP_DISABLED state. - Add "aux" member to STP port struct to be able to refer back to the owning port. - Define macros to p

[ovs-dev] [STP 4/9] packets.h: Fix STP destination MAC address.

2011-10-17 Thread Justin Pettit
--- lib/packets.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/packets.h b/lib/packets.h index e727cc9..f5f473c 100644 --- a/lib/packets.h +++ b/lib/packets.h @@ -38,7 +38,7 @@ static const uint8_t eth_addr_broadcast[ETH_ADDR_LEN] OVS_UNUSED = { 0xff, 0xff, 0

[ovs-dev] [STP 3/9] ofproto: Fix comment describing ofport_modified().

2011-10-17 Thread Justin Pettit
--- ofproto/ofproto.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 1cc1e4e..92800cb 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -1258,7 +1258,7 @@ ofport_remove_with_name(struct ofproto *ofproto, const char *na

[ovs-dev] [STP 2/9] ovs-vsctl: Fix small formatting error in man page.

2011-10-17 Thread Justin Pettit
--- utilities/ovs-vsctl.8.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/utilities/ovs-vsctl.8.in b/utilities/ovs-vsctl.8.in index ef862df..f246128 100644 --- a/utilities/ovs-vsctl.8.in +++ b/utilities/ovs-vsctl.8.in @@ -825,7 +825,7 @@ with specific sampling paramete

[ovs-dev] [STP 0/9] 802.1D STP Support for ovs-vswitchd.

2011-10-17 Thread Justin Pettit
This series adds 802.1D spanning tree protocol support to OVS. Justin Pettit (9): ofproto-dpif: Update bundle when OFPPC_NO_FLOOD changed. ovs-vsctl: Fix small formatting error in man page. ofproto: Fix comment describing ofport_modified(). packets.h: Fix STP destination MAC address. Ad

[ovs-dev] [STP 1/9] ofproto-dpif: Update bundle when OFPPC_NO_FLOOD changed.

2011-10-17 Thread Justin Pettit
When the OFPPC_NO_FLOOD flag is toggled on the port, the "floodable" member of the bundle was not updated. This would cause OFPP_NORMAL to not include the proper ports when flooding. With this commit, OFPPC_NO_FLOOD changes will cause the floodable members to be recalculated. Found by inspection

[ovs-dev] [PATCH 2/2] datapath: Assert IFF_TX_SKB_SHARING on internal devices.

2011-10-17 Thread Jesse Gross
Linux 3.1 adds a flag to check whether it's OK for shared skbs to be transmitted on devices. This generally isn't a problem for hardware devices but software devices such as OVS that hold state in the skb need to clear the flag, which is enabled by default. Signed-off-by: Jesse Gross --- datapa

[ovs-dev] [PATCH 0/2] Partial Linux 3.1 support

2011-10-17 Thread Jesse Gross
Although Linux 3.1 isn't actually released yet, it's in enough of an advanced state that I think it is unlikely to change in a way that affects us. I wrote a few patches a while ago to move in the right direction but they don't provide complete support yet. The one remaining piece that I'm aware

[ovs-dev] [PATCH 1/2] datapath: Add version check for struct netdev_ops.

2011-10-17 Thread Jesse Gross
Linux 3.1 drops the symbol HAVE_NET_DEVICE_OPS that lets us know whether struct netdev_ops is present. As a result, we need to replace it with an explicit version check. Signed-off-by: Jesse Gross --- datapath/vport-internal_dev.c |4 1 files changed, 4 insertions(+), 0 deletions(-) d

Re: [ovs-dev] [PATCH] Implement new fragment handling policy.

2011-10-17 Thread Jesse Gross
On Tue, Oct 11, 2011 at 4:33 PM, Ben Pfaff wrote: > diff --git a/datapath/flow.c b/datapath/flow.c > index 7322295..9a9b0aa 100644 > --- a/datapath/flow.c > +++ b/datapath/flow.c > + * Correct behavior when there's more than one fragment header is anybody's > + * guess.  This version reports wheth

Re: [ovs-dev] [PATCH] Implement draft VXLAN L2-over-L3 tunneling protocol.

2011-10-17 Thread Jesse Gross
On Mon, Oct 17, 2011 at 4:15 PM, Ben Pfaff wrote: > Here's the full revised patch: [...] Thanks, these changes all look good to me. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH] Implement draft VXLAN L2-over-L3 tunneling protocol.

2011-10-17 Thread Ben Pfaff
On Mon, Oct 17, 2011 at 02:21:17PM -0700, Jesse Gross wrote: > On Wed, Oct 12, 2011 at 4:01 PM, Ben Pfaff wrote: > > diff --git a/datapath/vport-vxlan.c b/datapath/vport-vxlan.c > > new file mode 100644 > > index 000..a6e5439 > > --- /dev/null > > +++ b/datapath/vport-vxlan.c > > +#define VXLA

[ovs-dev] [tunnels2 5/5] datapath: Add 'link' option to tunnels.

2011-10-17 Thread Ben Pfaff
This option allows some control over the output interface for tunnels. It is similar to the 'link' option for Linux network-device based GRE tunnels. I didn't, however, make 'link' part of the tunnel key as with those tunnels, which means that two tunnels cannot be distinguished on the basis of 'l

[ovs-dev] [tunnels2 4/5] datapath: Add multicast tunnel support.

2011-10-17 Thread Ben Pfaff
Something like this, on two separate vswitches, works to try it out: route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0 ovs-vsctl \ -- add-port br0 gre0 \ -- set interface gre0 type=gre options:remote_ip=224.0.0.1 Runtime tested on Linux 3.0, build tested on Linux 2.6.18,

[ovs-dev] [tunnels2 3/5] ovs-dpctl: Add new "set-if" command.

2011-10-17 Thread Ben Pfaff
I have found this useful for testing tunnel configuration. --- NEWS |2 + utilities/ovs-dpctl.8.in | 13 +- utilities/ovs-dpctl.c| 101 +- 3 files changed, 112 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS ind

[ovs-dev] [tunnels2 2/5] datapath: Fix tunnel reconfiguration that does not change key data.

2011-10-17 Thread Ben Pfaff
Without this commit, a pair of commands like ovs-dpctl add-if br0 gre0,type=gre,remote_ip=192.168.5.2,csum=true ovs-dpctl set-if br0 gre0,csum=false would result in a csum of "true" for gre0, that is, the second command would silently have no effect. This could also happen when the key dat

[ovs-dev] [tunnels2 1/5] datapath: Reject attempts to change vport type with OVS_VPORT_CMD_SET.

2011-10-17 Thread Ben Pfaff
Until now this has just silently failed, but it seems to me like we should actively reject it. Signed-off-by: Ben Pfaff --- datapath/datapath.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/datapath/datapath.c b/datapath/datapath.c index b3e2442..cd29482 100644 ---

[ovs-dev] [tunnels2 0/5] Implement multicast tunnels; fix tunnel bugs

2011-10-17 Thread Ben Pfaff
The first two patches fix one arguable bug and one that is definitely a bug. The third patch adds a new ovs-dpctl command that I used to verify the bug fixed by the second patch. The fourth patch implements multicast tunnels. The fifth patch adds a new tunnel option for directing output. I'm no

Re: [ovs-dev] [link_resets 7/7] vswitchd: New column "link_resets".

2011-10-17 Thread Ben Pfaff
On Mon, Oct 17, 2011 at 02:52:50PM -0700, Ethan Jackson wrote: > > Adding a column shouldn't necessitate incrementing the schema major > > version. > > Middle version number then? Thanks for the review, I'll merge this soon. Yes, middle, thanks. ___ de

Re: [ovs-dev] [link_resets 7/7] vswitchd: New column "link_resets".

2011-10-17 Thread Ethan Jackson
> Adding a column shouldn't necessitate incrementing the schema major > version. Middle version number then? Thanks for the review, I'll merge this soon. Ethan ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [link_resets 6/7] netdev-linux: Maintain carrier flag constantly.

2011-10-17 Thread Ben Pfaff
On Mon, Oct 17, 2011 at 02:39:52PM -0700, Ethan Jackson wrote: > > I believe that the following may be simplified to "dev->carrier = > > change->running": > > Yes, I agree. However, in a future patch of the series, I need to > update the carrier_resets sequence number in these if blocks. If you

Re: [ovs-dev] [link_resets 7/7] vswitchd: New column "link_resets".

2011-10-17 Thread Ben Pfaff
On Mon, Oct 17, 2011 at 12:10:24PM -0700, Ethan Jackson wrote: > An interface's 'link_resets' column represents the number of times > Open vSwitch has observed its link_state change. ... > if (dev->carrier != change->running) { > dev->carrier = change->running

Re: [ovs-dev] [link_resets 6/7] netdev-linux: Maintain carrier flag constantly.

2011-10-17 Thread Ethan Jackson
> I believe that the following may be simplified to "dev->carrier = > change->running": Yes, I agree. However, in a future patch of the series, I need to update the carrier_resets sequence number in these if blocks. If you like I can change it in this patch, but the final code is going to end up

Re: [ovs-dev] [link_resets 6/7] netdev-linux: Maintain carrier flag constantly.

2011-10-17 Thread Ben Pfaff
On Mon, Oct 17, 2011 at 12:10:23PM -0700, Ethan Jackson wrote: > Before this patch, the carrier of a linux device was only updated > if requested by a caller. This patch updates it whenever it > changes. I believe that the following may be simplified to "dev->carrier = change->running": > +

Re: [ovs-dev] [link_resets 5/7] vswitchd: Update link_state instantly.

2011-10-17 Thread Ethan Jackson
> Please make the new "link_state" variable const. Changed, thanks for the review. Ethan > > Otherwise, looks good, thank you. > ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [link_resets 5/7] vswitchd: Update link_state instantly.

2011-10-17 Thread Ben Pfaff
On Mon, Oct 17, 2011 at 12:10:22PM -0700, Ethan Jackson wrote: > With this patch, instead of updating an interface's link_state once > every 5 seconds, it's updated immediately when changed. To avoid > stressing the database, these updates are rate limited to once per > second. Please make the ne

Re: [ovs-dev] [PATCH] Implement draft VXLAN L2-over-L3 tunneling protocol.

2011-10-17 Thread Jesse Gross
On Wed, Oct 12, 2011 at 4:01 PM, Ben Pfaff wrote: > diff --git a/datapath/vport-vxlan.c b/datapath/vport-vxlan.c > new file mode 100644 > index 000..a6e5439 > --- /dev/null > +++ b/datapath/vport-vxlan.c > +#define VXLAN_DST_PORT 49170 > +#define VXLAN_IPSEC_SRC_PORT 49171 I think ideally the

Re: [ovs-dev] [link_resets 4/7] vswitchd: Cleanup rate limited DB writes.

2011-10-17 Thread Ben Pfaff
On Mon, Oct 17, 2011 at 12:10:21PM -0700, Ethan Jackson wrote: > The code to write the 'lacp_current' flag to the database was > unnecessarily complicated. Future patches will directly benefit > from this refactoring. It looks good to me. ___ dev mailin

Re: [ovs-dev] [link_resets 3/7] vswitchd: Remove iface_get_carrier().

2011-10-17 Thread Ben Pfaff
On Mon, Oct 17, 2011 at 01:15:00PM -0700, Ethan Jackson wrote: > On Mon, Oct 17, 2011 at 13:10, Ben Pfaff wrote: > > On Mon, Oct 17, 2011 at 12:10:20PM -0700, Ethan Jackson wrote: > >> It has only one caller, and doesn't improve the code's readability. > > > > Looks OK to me. ?Might be better with

Re: [ovs-dev] [link_resets 3/7] vswitchd: Remove iface_get_carrier().

2011-10-17 Thread Ethan Jackson
On Mon, Oct 17, 2011 at 13:10, Ben Pfaff wrote: > On Mon, Oct 17, 2011 at 12:10:20PM -0700, Ethan Jackson wrote: >> It has only one caller, and doesn't improve the code's readability. > > Looks OK to me.  Might be better with a variable instead of with lots > of line wrapping. One of the next pat

Re: [ovs-dev] [link_resets 3/7] vswitchd: Remove iface_get_carrier().

2011-10-17 Thread Ben Pfaff
On Mon, Oct 17, 2011 at 12:10:20PM -0700, Ethan Jackson wrote: > It has only one caller, and doesn't improve the code's readability. Looks OK to me. Might be better with a variable instead of with lots of line wrapping. ___ dev mailing list dev@openvswi

Re: [ovs-dev] [link_resets 2/7] rtnetlink-link: Expose carrier changes.

2011-10-17 Thread Ben Pfaff
On Mon, Oct 17, 2011 at 12:10:19PM -0700, Ethan Jackson wrote: > This will be used in a future commit. Looks good, thank you. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [link_resets 1/7] gitignore: Add idltest.py.

2011-10-17 Thread Ethan Jackson
Sounds good. I'll drop this patch. Ethan On Mon, Oct 17, 2011 at 12:32, Ben Pfaff wrote: > On Mon, Oct 17, 2011 at 12:10:18PM -0700, Ethan Jackson wrote: >> --- a/tests/.gitignore >> +++ b/tests/.gitignore >> @@ -5,6 +5,7 @@ >>  /atlocal >>  /idltest.c >>  /idltest.h >> +/idltest.py >>  /idltes

Re: [ovs-dev] [link_resets 1/7] gitignore: Add idltest.py.

2011-10-17 Thread Ben Pfaff
On Mon, Oct 17, 2011 at 12:10:18PM -0700, Ethan Jackson wrote: > --- a/tests/.gitignore > +++ b/tests/.gitignore > @@ -5,6 +5,7 @@ > /atlocal > /idltest.c > /idltest.h > +/idltest.py > /idltest.ovsidl I think that this is wrong. idltest.py isn't used anywhere, so it'd be better to delete it e

Re: [ovs-dev] [PATCH] bond: Demote active-backup WARN to DBG.

2011-10-17 Thread Ben Pfaff
Thanks, I pushed this. On Mon, Oct 17, 2011 at 11:50:10AM -0700, Ethan Jackson wrote: > Looks good. > > Ethan > > On Mon, Oct 17, 2011 at 11:43, Ben Pfaff wrote: > > This log message comes up for packets that are flooded through the network. > > If the upstream switch doesn't realize that an ac

[ovs-dev] [link_resets 7/7] vswitchd: New column "link_resets".

2011-10-17 Thread Ethan Jackson
An interface's 'link_resets' column represents the number of times Open vSwitch has observed its link_state change. --- lib/netdev-dummy.c |1 + lib/netdev-linux.c | 10 ++ lib/netdev-provider.h |6 ++ lib/netdev-vport.c |1 + lib/netdev.c

[ovs-dev] [link_resets 6/7] netdev-linux: Maintain carrier flag constantly.

2011-10-17 Thread Ethan Jackson
Before this patch, the carrier of a linux device was only updated if requested by a caller. This patch updates it whenever it changes. --- lib/netdev-linux.c | 128 +-- 1 files changed, 73 insertions(+), 55 deletions(-) diff --git a/lib/netdev-lin

[ovs-dev] [link_resets 5/7] vswitchd: Update link_state instantly.

2011-10-17 Thread Ethan Jackson
With this patch, instead of updating an interface's link_state once every 5 seconds, it's updated immediately when changed. To avoid stressing the database, these updates are rate limited to once per second. --- vswitchd/bridge.c |9 - 1 files changed, 4 insertions(+), 5 deletions(-)

[ovs-dev] [link_resets 4/7] vswitchd: Cleanup rate limited DB writes.

2011-10-17 Thread Ethan Jackson
The code to write the 'lacp_current' flag to the database was unnecessarily complicated. Future patches will directly benefit from this refactoring. --- vswitchd/bridge.c | 41 +++-- 1 files changed, 15 insertions(+), 26 deletions(-) diff --git a/vswitchd/br

[ovs-dev] [link_resets 2/7] rtnetlink-link: Expose carrier changes.

2011-10-17 Thread Ethan Jackson
This will be used in a future commit. --- lib/rtnetlink-link.c |1 + lib/rtnetlink-link.h |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/lib/rtnetlink-link.c b/lib/rtnetlink-link.c index 0a40cea..7d26d86 100644 --- a/lib/rtnetlink-link.c +++ b/lib/rtnetlink-link.c @@

[ovs-dev] [link_resets 3/7] vswitchd: Remove iface_get_carrier().

2011-10-17 Thread Ethan Jackson
It has only one caller, and doesn't improve the code's readability. --- vswitchd/bridge.c | 16 +++- 1 files changed, 3 insertions(+), 13 deletions(-) diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 186f250..d6a437f 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@

[ovs-dev] [link_resets 1/7] gitignore: Add idltest.py.

2011-10-17 Thread Ethan Jackson
--- tests/.gitignore |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/tests/.gitignore b/tests/.gitignore index 1454dac..ca9e388 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -5,6 +5,7 @@ /atlocal /idltest.c /idltest.h +/idltest.py /idltest.ovsidl /ovs-pki.lo

Re: [ovs-dev] [PATCH] bond: Demote active-backup WARN to DBG.

2011-10-17 Thread Ethan Jackson
Looks good. Ethan On Mon, Oct 17, 2011 at 11:43, Ben Pfaff wrote: > This log message comes up for packets that are flooded through the network. > If the upstream switch doesn't realize that an active-backup bond is in > use, and there is significant packet flooding in the network, then we will >

[ovs-dev] [PATCH] bond: Demote active-backup WARN to DBG.

2011-10-17 Thread Ben Pfaff
This log message comes up for packets that are flooded through the network. If the upstream switch doesn't realize that an active-backup bond is in use, and there is significant packet flooding in the network, then we will get a lot of these messages. (This message doesn't get logged for multicast

Re: [ovs-dev] [PATCH] bridge: Forbid '/' in bridge names to prevent arbitrary directory access.

2011-10-17 Thread Ben Pfaff
Thanks, pushed to master, branch-1.3, and branch-1.2. On Sat, Oct 15, 2011 at 12:58:41AM -0700, Justin Pettit wrote: > What about '\' for when we're ported to Hyper-V? j/k > > Looks good. > > --Justin > > > On Oct 14, 2011, at 10:20 AM, Ben Pfaff wrote: > > > --- > > vswitchd/bridge.c | 11

Re: [ovs-dev] [tunnels 0/3] datapath tunnel bug fixes and cleanups

2011-10-17 Thread Ben Pfaff
On Fri, Oct 14, 2011 at 05:33:06PM -0700, Jesse Gross wrote: > On Fri, Oct 14, 2011 at 3:42 PM, Ben Pfaff wrote: > > The first patch prepares for the bug fix in the second patch, > > and the third patch just cleans up a bit. > > > > Ben Pfaff (3): > > ??datapath: Factor out repeated tnl_vport_to_v