Re: [ovs-dev] [tunnel hdr len: 1/1] datapath: compute header length only after options are set

2011-02-24 Thread Valient Gough
Valient Gough (1): datapath: call tnl_ops only after setting options datapath/tunnel.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) >From a141c2cc52c18e170bd48e265719e02b5b47b2a4 Mon Sep 17 00:00:00 2001 From: Valient Gough Date: Thu, 24 Feb 2011 21:45:18 -0800 Subjec

Re: [ovs-dev] [tunnel hdr len: 1/1] datapath: compute header length only after options are set

2011-02-24 Thread Valient Gough
On Thu, Feb 24, 2011 at 8:25 PM, Jesse Gross wrote: > On Thu, Feb 24, 2011 at 7:43 PM, Valient Gough wrote: >> >> The call to tnl_ops->hdr_len should not occur before all options are setup. >>  If the call happens earlier, then tunnels may end up using uninitialized >> options.  This patch moves

Re: [ovs-dev] [tunnel hdr len: 1/1] datapath: compute header length only after options are set

2011-02-24 Thread Jesse Gross
On Thu, Feb 24, 2011 at 7:43 PM, Valient Gough wrote: > > The call to tnl_ops->hdr_len should not occur before all options are setup. >  If the call happens earlier, then tunnels may end up using uninitialized > options.  This patch moves the hdr_len call after the output key setup. Thank you, th

[ovs-dev] [tunnel hdr len: 1/1] datapath: compute header length only after options are set

2011-02-24 Thread Valient Gough
The call to tnl_ops->hdr_len should not occur before all options are setup. If the call happens earlier, then tunnels may end up using uninitialized options. This patch moves the hdr_len call after the output key setup. diff -ur openvswitch/datapath/tunnel.c openvswitch-gre/datapath/tunnel.c --

Re: [ovs-dev] [PATCH 1/2] datapath: Don't free vport until all references are gone.

2011-02-24 Thread Jesse Gross
On Thu, Feb 24, 2011 at 5:07 PM, Ben Pfaff wrote: > On Thu, Feb 24, 2011 at 04:23:06PM -0800, Jesse Gross wrote: >> We currently call vport_free() for internal devices after the >> device is unregistered.  This takes care of callers that use >> either RTNL or RCU but not ones that have only a devi

Re: [ovs-dev] [PATCH] ofproto: Change account_cb to use uint64_t.

2011-02-24 Thread Ethan Jackson
thanks pushed. On Thu, Feb 24, 2011 at 5:10 PM, Ben Pfaff wrote: > On Thu, Feb 24, 2011 at 05:07:36PM -0800, Ethan Jackson wrote: >> This is more consistent with ofproto internals and its users. > > OK, fine with me. > ___ dev mailing list dev@openvsw

Re: [ovs-dev] [PATCH] ofp-print: Don't print priority for flow stats requests.

2011-02-24 Thread Ben Pfaff
Thank you, I pushed this too. On Thu, Feb 24, 2011 at 05:10:30PM -0800, Ethan Jackson wrote: > Looks Good. > > On Thu, Feb 24, 2011 at 4:58 PM, Ben Pfaff wrote: > > A flow stats or aggregate stats request does not have a priority, but we > > were printing one anyway. > > > > Reported-by: Justin

Re: [ovs-dev] [PATCH] ofproto: Log warning if controller requests an invalid table.

2011-02-24 Thread Ben Pfaff
Thank you, I pushed this. On Thu, Feb 24, 2011 at 05:09:11PM -0800, Ethan Jackson wrote: > Looks Good. > > On Thu, Feb 24, 2011 at 5:03 PM, Ben Pfaff wrote: > > This might have saved us some time debugging. > > --- > >  ofproto/ofproto.c |   11 ++- > >  1 files changed, 10 insertions(+),

Re: [ovs-dev] [PATCH] ofproto: Change account_cb to use uint64_t.

2011-02-24 Thread Ben Pfaff
On Thu, Feb 24, 2011 at 05:07:36PM -0800, Ethan Jackson wrote: > This is more consistent with ofproto internals and its users. OK, fine with me. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev_openvswitch.org

Re: [ovs-dev] [PATCH] ofp-print: Don't print priority for flow stats requests.

2011-02-24 Thread Ethan Jackson
Looks Good. On Thu, Feb 24, 2011 at 4:58 PM, Ben Pfaff wrote: > A flow stats or aggregate stats request does not have a priority, but we > were printing one anyway. > > Reported-by: Justin Pettit > --- >  lib/ofp-print.c    |    4 >  tests/ofp-print.at |    8 >  2 files changed, 8

Re: [ovs-dev] [PATCH 2/2] datapath: Destroy internal devices before freeing datapath.

2011-02-24 Thread Ben Pfaff
On Thu, Feb 24, 2011 at 04:23:07PM -0800, Jesse Gross wrote: > When destroying vports we account for two types of synchronization > mechanisms: RTNL and RCU. However, it is possible to call into > network device methods with just a device reference without either > of these. These device methods

Re: [ovs-dev] [PATCH] ofproto: Log warning if controller requests an invalid table.

2011-02-24 Thread Ethan Jackson
Looks Good. On Thu, Feb 24, 2011 at 5:03 PM, Ben Pfaff wrote: > This might have saved us some time debugging. > --- >  ofproto/ofproto.c |   11 ++- >  1 files changed, 10 insertions(+), 1 deletions(-) > > diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c > index 8af1814..b8e633f 100644 >

[ovs-dev] [PATCH] ofproto: Change account_cb to use uint64_t.

2011-02-24 Thread Ethan Jackson
This is more consistent with ofproto internals and its users. --- ofproto/ofproto.h |2 +- vswitchd/bridge.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ofproto/ofproto.h b/ofproto/ofproto.h index 7516068..2828c64 100644 --- a/ofproto/ofproto.h +++ b/ofproto/ofpro

Re: [ovs-dev] [PATCH 1/2] datapath: Don't free vport until all references are gone.

2011-02-24 Thread Ben Pfaff
On Thu, Feb 24, 2011 at 04:23:06PM -0800, Jesse Gross wrote: > We currently call vport_free() for internal devices after the > device is unregistered. This takes care of callers that use > either RTNL or RCU but not ones that have only a device reference. > In particular, if stats are requested wh

[ovs-dev] [PATCH] ofproto: Log warning if controller requests an invalid table.

2011-02-24 Thread Ben Pfaff
This might have saved us some time debugging. --- ofproto/ofproto.c | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 8af1814..b8e633f 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -3537,7 +3537,16 @@ put_ofp

[ovs-dev] [PATCH] ofp-print: Don't print priority for flow stats requests.

2011-02-24 Thread Ben Pfaff
A flow stats or aggregate stats request does not have a priority, but we were printing one anyway. Reported-by: Justin Pettit --- lib/ofp-print.c|4 tests/ofp-print.at |8 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/ofp-print.c b/lib/ofp-print.c i

[ovs-dev] [PATCH 2/2] datapath: Destroy internal devices before freeing datapath.

2011-02-24 Thread Jesse Gross
When destroying vports we account for two types of synchronization mechanisms: RTNL and RCU. However, it is possible to call into network device methods with just a device reference without either of these. These device methods can use the datapath data structures but we don't wait for all of the

[ovs-dev] [PATCH 1/2] datapath: Don't free vport until all references are gone.

2011-02-24 Thread Jesse Gross
We currently call vport_free() for internal devices after the device is unregistered. This takes care of callers that use either RTNL or RCU but not ones that have only a device reference. In particular, if stats are requested while a datapath is being unregistered we can try to use the vport data

Re: [ovs-dev] [PATCH] util: Avoid uninitialized pointer complaints from Coverity.

2011-02-24 Thread Ben Pfaff
On Thu, Feb 24, 2011 at 04:03:23PM -0800, Jesse Gross wrote: > Looks good, thanks. Thank you, I pushed this patch. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev_openvswitch.org

Re: [ovs-dev] [PATCH] util: Avoid uninitialized pointer complaints from Coverity.

2011-02-24 Thread Jesse Gross
Looks good, thanks. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev_openvswitch.org

[ovs-dev] [PATCH] util: Avoid uninitialized pointer complaints from Coverity.

2011-02-24 Thread Ben Pfaff
--- lib/util.h | 18 +- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/lib/util.h b/lib/util.h index 635d331..e533987 100644 --- a/lib/util.h +++ b/lib/util.h @@ -85,6 +85,22 @@ extern const char *program_name; #define OVS_TYPEOF(OBJECT) void * #endif +/* Giv

Re: [ovs-dev] [PATCH 2/2] ofproto: Guarantee uninstalled facets have no dp_packet_count.

2011-02-24 Thread Ben Pfaff
On Thu, Feb 24, 2011 at 02:22:23PM -0800, Ethan Jackson wrote: > facet_push_stats() implicitly assumes that uninstalled facets have > no dp_[packet|byte]_count. This commit guarantees and enforces > this invariant. > > Bug #4732. Looks good, thank you. __

Re: [ovs-dev] [PATCH 1/2] ofproto: Reset facet's rs_used at rule changes.

2011-02-24 Thread Ben Pfaff
On Thu, Feb 24, 2011 at 02:22:22PM -0800, Ethan Jackson wrote: > When a facet changes rules it's 'used' timer is set to the new > rule's created time. This is possibly before the time stored in > 'rs_used' which could cause an assertion failure in > facet_push_stats(). > > Bug #4732. Looks good,

[ovs-dev] [PATCH 1/2] ofproto: Reset facet's rs_used at rule changes.

2011-02-24 Thread Ethan Jackson
When a facet changes rules it's 'used' timer is set to the new rule's created time. This is possibly before the time stored in 'rs_used' which could cause an assertion failure in facet_push_stats(). Bug #4732. --- ofproto/ofproto.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff

[ovs-dev] [PATCH 2/2] ofproto: Guarantee uninstalled facets have no dp_packet_count.

2011-02-24 Thread Ethan Jackson
facet_push_stats() implicitly assumes that uninstalled facets have no dp_[packet|byte]_count. This commit guarantees and enforces this invariant. Bug #4732. --- ofproto/ofproto.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c in

Re: [ovs-dev] switch local port

2011-02-24 Thread Ben Pfaff
On Thu, Feb 24, 2011 at 04:04:43PM +0100, Gaetano Catalli wrote: > >> Why this tap device could be opened more than one time? > > > > Any network device can be opened multiple times with netdev_open(). > > > I apologise for bothering you with all these questions about the same topic. > Can you expl

Re: [ovs-dev] switch local port

2011-02-24 Thread Gaetano Catalli
On Wed, Feb 23, 2011 at 6:39 PM, Ben Pfaff wrote: > On Wed, Feb 23, 2011 at 04:30:12PM +0100, Gaetano Catalli wrote: >> On Fri, Feb 11, 2011 at 6:09 PM, Ben Pfaff wrote: >> > On Fri, Feb 11, 2011 at 06:05:08PM +0100, Gaetano Catalli wrote: >> >> I have some doubts to resolve about switch local po