[ovs-dev] [PATCH] ofproto-dpif: Correct indentation of rule_dpif_{release, credit_stats}

2013-09-04 Thread Simon Horman
Correct indentation of rule_dpif_{release,credit_stats} prototypes. This corrects a cosmetic problem introduced by 70742c7f54e7f147 ("ofproto-dpif: Hide struct rule_dpif internally."). Cc: Ethan Jackson Signed-off-by: Simon Horman --- Compile tested only --- ofproto/ofproto-dpif.h | 6 +++---

Re: [ovs-dev] [PATCH v2.38 0/6] MPLS actions and matches

2013-09-04 Thread Simon Horman
On Wed, Aug 28, 2013 at 04:14:32PM +0900, Simon Horman wrote: > On Fri, Aug 23, 2013 at 01:16:50PM +1000, Simon Horman wrote: > > Hi, > > > > This series implements MPLS actions and matches based on work by > > Ravi K, Leo Alterman, Yamahata-san and Joe Stringer. > > > > This series provides two

[ovs-dev] [PATCH v3 0/5] Write-Actions and Groups

2013-09-04 Thread Simon Horman
Hi, This series is comprised of three components. A. Enhance existing ofproto group code [PATCH v2 1/5] Use enum ofp11_group_type in struct ofgroup [PATCH v2 2/5] ovs-ofctl: Handle any number of buckets in group statistics B. Support write actions. With this in place it is possible to

[ovs-dev] [PATCH v3 5/5] Translation of indirect and all groups

2013-09-04 Thread Simon Horman
Allow translation of indirect and all groups. Also allow insertion of indirect and all groups by changing the maximum permitted number in the groups table from 0 to OFPG_MAX. Implementation note: After translating the actions for each bucket ctx->base_flow is reset to its state prior to translati

[ovs-dev] [PATCH v3 2/5] ovs-ofctl: Handle any number of buckets in group statistics

2013-09-04 Thread Simon Horman
struct ofputil_group_stats has an arbitrary limit of 16 buckets for which it can record statistics. However the code does not appear to enforce this limit and it seems to me that the code could overflow. This patch aims to remove the arbitrary limit by changing the 'bucket_stats' field of struct o

[ovs-dev] [PATCH v3 1/5] Use enum ofp11_group_type in struct ofgroup

2013-09-04 Thread Simon Horman
Use enum ofp11_group_type for the 'type' field of struct ofgroup as the enum exactly covers all the valid values of the field. Signed-off-by: Simon Horman --- v3 * No change v2 * First post --- ofproto/ofproto-provider.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ofpro

[ovs-dev] [PATCH v3 4/5] ofproto-dpif: Implement group callbacks

2013-09-04 Thread Simon Horman
This is a first step towards implementing the dpif side of groups. In order to be useful the action translation code needs to be taught about groups. Compile tested only. Signed-off-by: Simon Horman --- v3 * Rebase for "ofproto-dpif: Hide struct rule_dpif internally" * Hide group_dpif in a sim

[ovs-dev] [PATCH v3 3/5] Add support for write-actions

2013-09-04 Thread Simon Horman
Implementation note: All actions which modify a field are added to the action set at the point where "set" actions should be added. In general modifying a field many times is the same as only modifying it the last time so the implementation simply adds all set actions to the action set in the orde

Re: [ovs-dev] [PATCH] ovs-ofctl: Handle any number of buckets in group statistics

2013-09-04 Thread Ben Pfaff
On Thu, Sep 05, 2013 at 09:13:42AM +0900, Simon Horman wrote: > On Wed, Sep 04, 2013 at 04:31:35PM -0700, Ben Pfaff wrote: > > On Mon, Sep 02, 2013 at 11:28:10AM +0900, Simon Horman wrote: > > > struct ofputil_group_stats has an arbitrary limit > > > of 16 buckets for which it can record statistics

Re: [ovs-dev] [PATCH] ovs-ofctl: Handle any number of buckets in group statistics

2013-09-04 Thread Simon Horman
On Wed, Sep 04, 2013 at 04:31:35PM -0700, Ben Pfaff wrote: > On Mon, Sep 02, 2013 at 11:28:10AM +0900, Simon Horman wrote: > > struct ofputil_group_stats has an arbitrary limit > > of 16 buckets for which it can record statistics. > > However the code does not appear to enforce this > > limit and i

[ovs-dev] hackathon plans--another update

2013-09-04 Thread Ben Pfaff
This email is an update for the initial hackathon plan that I sent out earlier this month. Everything in that email is still accurate. You can read the earlier email at: http://openvswitch.org/pipermail/announce/2013-August/53.html The main purpose of this email is to answer questions I

Re: [ovs-dev] [PATCH] ovs-ofctl: Handle any number of buckets in group statistics

2013-09-04 Thread Ben Pfaff
On Mon, Sep 02, 2013 at 11:28:10AM +0900, Simon Horman wrote: > struct ofputil_group_stats has an arbitrary limit > of 16 buckets for which it can record statistics. > However the code does not appear to enforce this > limit and it seems to me that the code could overflow. > > This patch aims to r

Re: [ovs-dev] [ovs-announce] Task List for Open vSwitch Hackathon Sep. 6 and 7

2013-09-04 Thread Ben Pfaff
On Wed, Sep 04, 2013 at 11:52:26AM +0300, Daniel Baluta wrote: > > > Unclaimed Tasks (Small, Required) > > > - > > > > > > The following tasks could use volunteers. These tasks are all > > > required for OpenFlow compliance. My guess is that an average > > > develo

Re: [ovs-dev] [PATCH] ovs-ofctl: Correct formating of instructions in manpage

2013-09-04 Thread Ben Pfaff
On Mon, Sep 02, 2013 at 11:23:16AM +0900, Simon Horman wrote: > Adjust formatting in ovs-ofctl so that apply_actions, clear_actions > write_metadata and goto_table appear at the same level > of indentation as actions rather being indented as if > they are arguments to the learn action. > > Signed-

Re: [ovs-dev] [PATCH] Release Open vSwitch 1.10.2.

2013-09-04 Thread Ben Pfaff
On Wed, Sep 04, 2013 at 04:10:00PM -0700, Justin Pettit wrote: > On Sep 4, 2013, at 3:58 PM, Ben Pfaff wrote: > > > On Wed, Sep 04, 2013 at 03:57:31PM -0700, Justin Pettit wrote: > >> Signed-off-by: Justin Pettit > > > > Acked-by: Ben Pfaff > > > D'oh. Forgot the Acked-by again. > > Thanks

Re: [ovs-dev] [PATCH] Release Open vSwitch 1.10.2.

2013-09-04 Thread Justin Pettit
On Sep 4, 2013, at 3:58 PM, Ben Pfaff wrote: > On Wed, Sep 04, 2013 at 03:57:31PM -0700, Justin Pettit wrote: >> Signed-off-by: Justin Pettit > > Acked-by: Ben Pfaff D'oh. Forgot the Acked-by again. Thanks for the review. I pushed the change and will release 1.10.2 and 1.9.3 shortly. --

[ovs-dev] [PATCH] ofproto-dpif-upcall: reduce number of wakeup

2013-09-04 Thread YAMAMOTO Takashi
if a queue length is long (ie. non-0), the consumer thread should already be busy working on the queue. there's no need to wake it up repeatedly. Signed-off-by: YAMAMOTO Takashi --- ofproto/ofproto-dpif-upcall.c | 32 +--- 1 file changed, 21 insertions(+), 11 deletio

Re: [ovs-dev] [PATCH 3/3] ofproto: Rename struct rule's evict lock and use it more widely.

2013-09-04 Thread Ethan Jackson
Thanks for the reviews, I've merged and backported this. Ethan On Wed, Sep 4, 2013 at 3:54 PM, Ben Pfaff wrote: > On Wed, Sep 04, 2013 at 03:47:26PM -0700, Ethan Jackson wrote: >> > I wonder whether it makes sense to speak of 'cr' as being "guarded" by >> > anything. Most of the data that its u

Re: [ovs-dev] [PATCH] Release Open vSwitch 1.10.2.

2013-09-04 Thread Ben Pfaff
On Wed, Sep 04, 2013 at 03:57:31PM -0700, Justin Pettit wrote: > Signed-off-by: Justin Pettit Acked-by: Ben Pfaff ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

[ovs-dev] [PATCH] Release Open vSwitch 1.10.2.

2013-09-04 Thread Justin Pettit
Signed-off-by: Justin Pettit --- NEWS |5 + configure.ac |2 +- debian/changelog |7 +++ 3 files changed, 13 insertions(+), 1 deletions(-) diff --git a/NEWS b/NEWS index b9805e6..896b8cc 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +v1.10.2 - 04 Sep 2013 +

Re: [ovs-dev] [PATCH 3/3] ofproto: Rename struct rule's evict lock and use it more widely.

2013-09-04 Thread Ben Pfaff
On Wed, Sep 04, 2013 at 03:47:26PM -0700, Ethan Jackson wrote: > > I wonder whether it makes sense to speak of 'cr' as being "guarded" by > > anything. Most of the data that its users really look at, notably > > 'priority' and 'match', is immutable. It is inserted into a > > classifier at constru

Re: [ovs-dev] [PATCH] ofproto-dpif: Do not dpif_port_del() patch ports in port_del().

2013-09-04 Thread Ben Pfaff
Thanks, I applied this to master and I'm working on backports. On Tue, Sep 03, 2013 at 11:54:12AM +0900, YAMAMOTO Takashi wrote: > this patch looks fine and works for me. thanks. > > YAMAMOTO Takashi > > > Patch ports don't have datapath ports so it doesn't make sense to try to > > call dpif_po

Re: [ovs-dev] [PATCH 3/3] ofproto: Rename struct rule's evict lock and use it more widely.

2013-09-04 Thread Ethan Jackson
> I wonder whether it makes sense to speak of 'cr' as being "guarded" by > anything. Most of the data that its users really look at, notably > 'priority' and 'match', is immutable. It is inserted into a > classifier at construction time, and removed at destruction time, and > other changes to the

Re: [ovs-dev] [PATCH] OPENFLOW-1.1+: Remove completed tasks.

2013-09-04 Thread Ben Pfaff
On Sat, Aug 31, 2013 at 01:43:43PM +0900, Simon Horman wrote: > On Thu, Aug 29, 2013 at 09:52:07PM -0700, Ben Pfaff wrote: > > It appears to me that OFPST_TABLE is correct for OF1.1+, so I'm removing > > that. > > > > DESIGN describes OF1.2 flow_mod, so I'm removing that. > > > > Port and queue s

Re: [ovs-dev] [PATCH V2] stp: Fix a bug.

2013-09-04 Thread Ben Pfaff
Thanks for reminding me. I backported it. On Wed, Sep 04, 2013 at 03:43:13PM -0700, Alex Wang wrote: > Thanks, Ben, > > This patch needs back port to branch 2.0 as well. > > > On Wed, Sep 4, 2013 at 3:21 PM, Ben Pfaff wrote: > > > On Wed, Sep 04, 2013 at 03:21:15PM -0700, Alex Wang wrote: >

Re: [ovs-dev] [PATCH V2] stp: Fix a bug.

2013-09-04 Thread Alex Wang
Thanks, Ben, This patch needs back port to branch 2.0 as well. On Wed, Sep 4, 2013 at 3:21 PM, Ben Pfaff wrote: > On Wed, Sep 04, 2013 at 03:21:15PM -0700, Alex Wang wrote: > > Commit 9d189a50e (ofproto-dpif-xlate: Pull STP xlation into > > ofproto-dpif-xlate.) introduced the bug that consider

Re: [ovs-dev] [PATCH v2] Fix a bug in conversion between flow/mask and flow key

2013-09-04 Thread Ben Pfaff
The code that this changes checks for two values in icmpv6_type. The new version of the code checks for one value in tp_src or a different value in tp_dst. Should it check for two values in tp_src (or in tp_dst?), or is the new code correct as-is? Thanks, Ben. On Fri, Aug 30, 2013 at 03:06:12P

Re: [ovs-dev] [PATCH 3/3] ofproto: Rename struct rule's evict lock and use it more widely.

2013-09-04 Thread Ethan Jackson
>> +ovs_rwlock_wrlock(&rule->rwlock); >> rule->flow_cookie = new_cookie; >> +ovs_rwlock_unlock(&rule->rwlock); >> Why wouldn't it be? You're saying that we don't need strict thread safety here? Ethan ___ dev mailing list dev@open

[ovs-dev] [PATCH V2] timeval: Remove CACHE_TIME scheme.

2013-09-04 Thread Alex Wang
This commit removes the CACHE_TIME scheme from timeval module. This is for eliminating the lock contention over the read/write lock of the cached time. To get the time, the thread now will directly do the system call 'clock_gettime()'. As a side effect, timer can only be warpped after timer is s

Re: [ovs-dev] [PATCH 2/3] ofproto-dpif: Don't manage eviction groups from threads.

2013-09-04 Thread Ethan Jackson
Good point, I went ahead and ditched he comment. If we need to improve this in future, we'll do it. Ethan On Wed, Sep 4, 2013 at 2:40 PM, Ben Pfaff wrote: > On Wed, Sep 04, 2013 at 12:37:35PM -0700, Ethan Jackson wrote: >> Managing eviction groups from threads was going to be difficult to do >>

Re: [ovs-dev] [PATCH V2] stp: Fix a bug.

2013-09-04 Thread Ben Pfaff
On Wed, Sep 04, 2013 at 03:21:15PM -0700, Alex Wang wrote: > Commit 9d189a50e (ofproto-dpif-xlate: Pull STP xlation into > ofproto-dpif-xlate.) introduced the bug that considers 'stp_port_no' > of 0 as stp disabled on the port. However 'stp_port_no' is > actually the index of the stp struct's port

Re: [ovs-dev] [PATCH 1/3] ofproto-dpif: Hide struct rule_dpif internally.

2013-09-04 Thread Ethan Jackson
I made that change, thanks for the review. Ethan On Wed, Sep 4, 2013 at 2:31 PM, Ben Pfaff wrote: > On Wed, Sep 04, 2013 at 12:37:34PM -0700, Ethan Jackson wrote: >> By hiding struct rule_dpif inside ofproto-dpif, it becomes very clear >> which attributes are accessed by multiple threads and nee

Re: [ovs-dev] [PATCH] timeval: Remove CACHE_TIME scheme.

2013-09-04 Thread Alex Wang
Thanks Ethan, I'll adjust accordingly. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

[ovs-dev] [PATCH V2] stp: Fix a bug.

2013-09-04 Thread Alex Wang
Commit 9d189a50e (ofproto-dpif-xlate: Pull STP xlation into ofproto-dpif-xlate.) introduced the bug that considers 'stp_port_no' of 0 as stp disabled on the port. However 'stp_port_no' is actually the index of the stp struct's port array and ranges between [0, STP_MAX_PORTS). So the bug allows th

Re: [ovs-dev] [PATCH 3/3] ofproto: Rename struct rule's evict lock and use it more widely.

2013-09-04 Thread Ben Pfaff
On Wed, Sep 04, 2013 at 12:37:36PM -0700, Ethan Jackson wrote: > There are a few fields in struct rule which are accessible by > functions in ofproto-dpif and therefore need to accessed in a thread > safe manner. This patch achieves this by generalizing the rules evict > rwlock and requiring a wri

Re: [ovs-dev] [PATCH 3/3] ofproto: Rename struct rule's evict lock and use it more widely.

2013-09-04 Thread Jarno Rajahalme
On Sep 4, 2013, at 12:37 PM, Ethan Jackson wrote: … > @@ -240,15 +242,18 @@ struct rule { > struct heap_node evg_node; /* In eviction_group's "rules" heap. */ > struct eviction_group *eviction_group; /* NULL if not in any group. */ > > -/* The evict lock is used to prevent rules fr

Re: [ovs-dev] [PATCH 2/3] ofproto-dpif: Don't manage eviction groups from threads.

2013-09-04 Thread Ben Pfaff
On Wed, Sep 04, 2013 at 12:37:35PM -0700, Ethan Jackson wrote: > Managing eviction groups from threads was going to be difficult to do > in a performant thread-safe manner, so this patch punts the problem to > the main thread. > > Signed-off-by: Ethan Jackson I think that the comment is slightly

Re: [ovs-dev] [PATCH 1/3] ofproto-dpif: Hide struct rule_dpif internally.

2013-09-04 Thread Ben Pfaff
On Wed, Sep 04, 2013 at 12:37:34PM -0700, Ethan Jackson wrote: > By hiding struct rule_dpif inside ofproto-dpif, it becomes very clear > which attributes are accessed by multiple threads and need to be > protected by locks. > > Signed-off-by: Ethan Jackson I'd prefer for the rule_dpif function n

Re: [ovs-dev] [PATCH] dpif: fix segfault in CONTROLLER action with sflow or ipfix setup

2013-09-04 Thread Ben Pfaff
On Tue, Sep 03, 2013 at 06:58:37PM -0700, Romain Lenglet wrote: > Signed-off-by: Romain Lenglet Thanks, applied to master and branch-2.0. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH] stp: Fix a bug.

2013-09-04 Thread Alex Wang
Sorry, I found error in the log message. I'll send a V2 later. On Wed, Sep 4, 2013 at 11:56 AM, Alex Wang wrote: > Sorry for the typo. I mean backport to branch2.0. > > > On Wed, Sep 4, 2013 at 11:44 AM, Alex Wang wrote: > >> Also, this requires a backport to sr87 branch. >> >> >> On Tue, Sep

Re: [ovs-dev] [PATCH v3 09/13] datapath: Cleanup netlink compat code.

2013-09-04 Thread Jesse Gross
On Wed, Sep 4, 2013 at 12:56 PM, Pravin B Shelar wrote: > diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c > index 9562d38..7763169 100644 > --- a/lib/netlink-socket.c > +++ b/lib/netlink-socket.c > @@ -945,10 +943,6 @@ nl_lookup_genl_mcgroup(const char *family_name, const > char *group_n

Re: [ovs-dev] [PATCH v3 12/13] datapath: Remove reciprocal_div compat code.

2013-09-04 Thread Jesse Gross
On Wed, Sep 4, 2013 at 12:56 PM, Pravin B Shelar wrote: > Signed-off-by: Pravin B Shelar > --- > datapath/linux/Modules.mk |1 - > .../linux/compat/include/linux/reciprocal_div.h| 40 > > datapath/linux/compat/reciprocal_div.c

Re: [ovs-dev] [PATCH v4 09/13] datapath: Cleanup netlink compat code.

2013-09-04 Thread Jesse Gross
On Wed, Sep 4, 2013 at 1:53 PM, Pravin B Shelar wrote: > Patch removes genl, netlink, rtnl compat code and dpif-linux > fallback-id compat code. > > Signed-off-by: Pravin B Shelar Acked-by: Jesse Gross ___ dev mailing list dev@openvswitch.org http://o

Re: [ovs-dev] [PATCH] timeval: Remove CACHE_TIME scheme.

2013-09-04 Thread Ethan Jackson
LGTM, just some minor comments. I don't think we need the postfork() function anymore. It's just calling time_init() which will get called later anyway. In the comment to time_alarm we say it refreshes the current time as a side effect. I'd just remove that entirely, doesn't make sense anymore.

Re: [ovs-dev] [PATCH v3 07/13] datapath: Remove checksum compat support

2013-09-04 Thread Jesse Gross
On Wed, Sep 4, 2013 at 12:56 PM, Pravin B Shelar wrote: > Signed-off-by: Pravin B Shelar Acked-by: Jesse Gross ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

[ovs-dev] [PATCH v4 09/13] datapath: Cleanup netlink compat code.

2013-09-04 Thread Pravin B Shelar
Patch removes genl, netlink, rtnl compat code and dpif-linux fallback-id compat code. Signed-off-by: Pravin B Shelar --- datapath/compat.h |8 -- datapath/datapath.c | 12 +- datapath/dp_notify.c|2 +-

Re: [ovs-dev] [PATCH v3 09/13] datapath: Cleanup netlink compat code.

2013-09-04 Thread Pravin Shelar
On Wed, Sep 4, 2013 at 1:46 PM, Jesse Gross wrote: > On Wed, Sep 4, 2013 at 12:56 PM, Pravin B Shelar wrote: >> diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c >> index 9562d38..7763169 100644 >> --- a/lib/netlink-socket.c >> +++ b/lib/netlink-socket.c >> @@ -945,10 +943,6 @@ nl_lookup_g

Re: [ovs-dev] [bugfixes 6/6] flow: Fix hypothetical memory leak in miniflow_move().

2013-09-04 Thread Ben Pfaff
Thanks for the reviews. I pushed to master and branch-2.0. None of these seem to apply to branch-1.11. On Wed, Sep 04, 2013 at 12:57:01PM -0700, Ethan Jackson wrote: > Acked-by: Ethan Jackson > > > On Wed, Sep 4, 2013 at 12:39 PM, Ben Pfaff wrote: > > Ordinarily a miniflow will use its inlin

Re: [ovs-dev] [PATCH] FAQ: Explain the two kinds of "promiscuous mode" and how to configure them.

2013-09-04 Thread Ben Pfaff
Thank you, applied. On Fri, Aug 30, 2013 at 05:17:53PM +, Pritesh Kothari (pritkoth) wrote: > ack, looks good to me. > -pritesh > > On Aug 30, 2013, at 10:02 AM, Ben Pfaff wrote: > > > Signed-off-by: Ben Pfaff > > --- > > FAQ | 34 ++ > > 1 file changed, 34

Re: [ovs-dev] [PATCH v3 02/13] datapath: Move kernel version check to configure.

2013-09-04 Thread Jesse Gross
On Wed, Sep 4, 2013 at 12:56 PM, Pravin B Shelar wrote: > Rather than having compile time check in datapath.c, its better > to check kernel version at configuration step. > > Signed-off-by: Pravin B Shelar Acked-by: Jesse Gross ___ dev mailing list de

Re: [ovs-dev] [PATCH] ofproto-dpif: Removed unused struct facet 'hmap_node' member.

2013-09-04 Thread Ben Pfaff
Thanks, applied to master. I skipped branch-2.0 since this doesn't fix a bug. On Tue, Sep 03, 2013 at 03:40:54PM -0700, Ethan Jackson wrote: > Acked-by: Ethan Jackson > > > On Tue, Sep 3, 2013 at 3:39 PM, Ben Pfaff wrote: > > This member is not used anywhere for anything. > > > > Signed-off-b

Re: [ovs-dev] [bugfixes 6/6] flow: Fix hypothetical memory leak in miniflow_move().

2013-09-04 Thread Ethan Jackson
Sounds good, thanks. Ethan On Wed, Sep 4, 2013 at 1:28 PM, Ben Pfaff wrote: > Thanks for the reviews. I pushed to master and branch-2.0. None of > these seem to apply to branch-1.11. > > On Wed, Sep 04, 2013 at 12:57:01PM -0700, Ethan Jackson wrote: >> Acked-by: Ethan Jackson >> >> >> On Wed,

Re: [ovs-dev] [bugfixes 2/6] ofproto-dpif: Fix use-after-free deleting a bridge with active traffic.

2013-09-04 Thread Ethan Jackson
Acked-by: Ethan Jackson On Wed, Sep 4, 2013 at 12:39 PM, Ben Pfaff wrote: > When a bridge that has active traffic is deleted, the bridge's ofproto can > be referenced by in-flight "flow_miss"es. This commit fixes the problem > by destroying "flow_miss"es that reference the ofproto that is bein

Re: [ovs-dev] [PATCH v2 02/13] datapath: Move kernel version check to configure.

2013-09-04 Thread Pravin Shelar
On Tue, Sep 3, 2013 at 3:48 PM, Jesse Gross wrote: > On Tue, Sep 3, 2013 at 1:59 PM, Pravin B Shelar wrote: >> diff --git a/acinclude.m4 b/acinclude.m4 >> index 73ee5ce..e754cfa 100644 >> --- a/acinclude.m4 >> +++ b/acinclude.m4 >> @@ -134,9 +134,17 @@ AC_DEFUN([OVS_CHECK_LINUX], [ >> AC_MSG

Re: [ovs-dev] [PATCH] ofproto-dpif: Destroy facets on ofproto removal.

2013-09-04 Thread Ben Pfaff
On Wed, Sep 04, 2013 at 12:20:26PM -0700, Ethan Jackson wrote: > > I'm pretty sure that the above will self-deadlock on > > ofproto->facets.rwlock, because facet_remove() write-locks it. > > > > My understanding is that the locking on this classifier is superfluous > > anyway since only a single th

Re: [ovs-dev] [PATCH v2 07/13] datapath: Remove checksum compat support

2013-09-04 Thread Pravin Shelar
On Tue, Sep 3, 2013 at 4:20 PM, Jesse Gross wrote: > On Tue, Sep 3, 2013 at 2:00 PM, Pravin B Shelar wrote: >> diff --git a/datapath/linux/compat/include/net/checksum.h >> b/datapath/linux/compat/include/net/checksum.h >> index 502d02d..2bead4b 100644 >> --- a/datapath/linux/compat/include/net/c

Re: [ovs-dev] [PATCH] Fix a memory corruption in CFM

2013-09-04 Thread Ben Pfaff
Thanks a lot for the updated patch. I was really only expecting a "yes or no" answer so that I could update the patch description myself, but your quick v2 saved me the trouble so thanks again. On Wed, Sep 04, 2013 at 09:01:43AM -0700, Guolin Yang, VMware wrote: > You are right, I send anew patc

Re: [ovs-dev] [bugfixes 1/6] ofproto-dpif: Destroy facets on ofproto removal.

2013-09-04 Thread Ethan Jackson
Acked-by: Ethan Jackson On Wed, Sep 4, 2013 at 12:39 PM, Ben Pfaff wrote: > From: Ethan Jackson > > Facets maintain a pointer to their owning ofproto-dpif, and therefore > when an ofproto-dpif is destroyed all of their child facets should be > destroyed along with it. If they aren't, it's pos

Re: [ovs-dev] [PATCH v2 09/13] datapath: Cleanup netlink compat code.

2013-09-04 Thread Pravin Shelar
On Tue, Sep 3, 2013 at 4:32 PM, Jesse Gross wrote: > On Tue, Sep 3, 2013 at 2:00 PM, Pravin B Shelar wrote: >> diff --git a/datapath/linux/compat/genetlink-openvswitch.c >> b/datapath/linux/compat/genetlink-openvswitch.c >> index 810223b..359f916 100644 >> --- a/datapath/linux/compat/genetlink-o

[ovs-dev] [PATCH v3 02/13] datapath: Move kernel version check to configure.

2013-09-04 Thread Pravin B Shelar
Rather than having compile time check in datapath.c, its better to check kernel version at configuration step. Signed-off-by: Pravin B Shelar --- acinclude.m4| 14 -- datapath/datapath.c |5 - 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/acinclude

Re: [ovs-dev] [PATCH v2 08/13] datapath: Remove vlan compat support

2013-09-04 Thread Pravin Shelar
On Tue, Sep 3, 2013 at 4:26 PM, Jesse Gross wrote: > On Tue, Sep 3, 2013 at 2:00 PM, Pravin B Shelar wrote: >> diff --git a/datapath/vlan.h b/datapath/vlan.h >> index 1356aed..e930e97 100644 >> --- a/datapath/vlan.h >> +++ b/datapath/vlan.h >> @@ -46,13 +46,6 @@ >> * equivalent to those on 2.6.

Re: [ovs-dev] [bugfixes 5/6] ofproto: Fix memory leak in add_flow().

2013-09-04 Thread Ethan Jackson
Acked-by: Ethan Jackson On Wed, Sep 4, 2013 at 12:39 PM, Ben Pfaff wrote: > Found by inspection. > > Signed-off-by: Ben Pfaff > --- > ofproto/ofproto.c |1 + > 1 file changed, 1 insertion(+) > > diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c > index 21155dc..97f26ae 100644 > --- a/ofp

[ovs-dev] [PATCH v3 12/13] datapath: Remove reciprocal_div compat code.

2013-09-04 Thread Pravin B Shelar
Signed-off-by: Pravin B Shelar --- datapath/linux/Modules.mk |1 - .../linux/compat/include/linux/reciprocal_div.h| 40 datapath/linux/compat/reciprocal_div.c |4 ++ 3 files changed, 4 insertions(+), 41 deletions(-) delete m

Re: [ovs-dev] [PATCH v2] Fix a memory allocation bug in CFM

2013-09-04 Thread Ben Pfaff
On Wed, Sep 04, 2013 at 09:00:12AM -0700, gy...@nicira.com wrote: > From: Guolin Yang > > In cfm, when allocating the rmp array, the size is not calculated correctly > which cause the remote MPID not correctly updated in ovsdb. > > Signed-off-by: Guolin Yang > --- > v1->v2 > Change descript

Re: [ovs-dev] [bugfixes 4/6] ofproto-dpif-mirror: Fix memory leak in mbridge_unref().

2013-09-04 Thread Ethan Jackson
Acked-by: Ethan Jackson On Wed, Sep 4, 2013 at 12:39 PM, Ben Pfaff wrote: > Found by valgrind. > > Signed-off-by: Ben Pfaff > --- > ofproto/ofproto-dpif-mirror.c |1 + > 1 file changed, 1 insertion(+) > > diff --git a/ofproto/ofproto-dpif-mirror.c b/ofproto/ofproto-dpif-mirror.c > index 9

Re: [ovs-dev] [bugfixes 3/6] flow: Fix memory leak in minimask_move().

2013-09-04 Thread Ethan Jackson
Acked-by: Ethan Jackson On Wed, Sep 4, 2013 at 12:39 PM, Ben Pfaff wrote: > Found by valgrind. > > Signed-off-by: Ben Pfaff > --- > lib/flow.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/flow.c b/lib/flow.c > index 8263672..0e7c493 100644 > --- a/lib/flow.c

Re: [ovs-dev] [PATCH v2 12/13] datapath: Remove reciprocal_div compat code.

2013-09-04 Thread Pravin Shelar
On Tue, Sep 3, 2013 at 4:39 PM, Jesse Gross wrote: > On Tue, Sep 3, 2013 at 2:01 PM, Pravin B Shelar wrote: >> diff --git a/datapath/linux/compat/reciprocal_div.c >> b/datapath/linux/compat/reciprocal_div.c >> index 6a3bd48..d1495bf 100644 >> --- a/datapath/linux/compat/reciprocal_div.c >> +++ b

Re: [ovs-dev] [bugfixes 6/6] flow: Fix hypothetical memory leak in miniflow_move().

2013-09-04 Thread Ethan Jackson
Acked-by: Ethan Jackson On Wed, Sep 4, 2013 at 12:39 PM, Ben Pfaff wrote: > Ordinarily a miniflow will use its inline_values if its values can fit, but > there is nothing to prevent a small number of values from being stored > in malloc()'d memory. If this happened, then miniflow_move() would

[ovs-dev] [PATCH v3 09/13] datapath: Cleanup netlink compat code.

2013-09-04 Thread Pravin B Shelar
Patch removes genl, netlink, rtnl compat code and dpif-linux fallback-id compat code. Signed-off-by: Pravin B Shelar --- datapath/compat.h |8 -- datapath/datapath.c | 12 +- datapath/dp_notify.c|2 +-

[ovs-dev] [PATCH v3 07/13] datapath: Remove checksum compat support

2013-09-04 Thread Pravin B Shelar
Signed-off-by: Pravin B Shelar --- datapath/Modules.mk |2 - datapath/actions.c| 21 +- datapath/checksum.c | 271 - datapath/checksum.h | 173

[ovs-dev] [bugfixes 5/6] ofproto: Fix memory leak in add_flow().

2013-09-04 Thread Ben Pfaff
Found by inspection. Signed-off-by: Ben Pfaff --- ofproto/ofproto.c |1 + 1 file changed, 1 insertion(+) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 21155dc..97f26ae 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -3477,6 +3477,7 @@ add_flow(struct ofproto *ofproto, s

[ovs-dev] [bugfixes 4/6] ofproto-dpif-mirror: Fix memory leak in mbridge_unref().

2013-09-04 Thread Ben Pfaff
Found by valgrind. Signed-off-by: Ben Pfaff --- ofproto/ofproto-dpif-mirror.c |1 + 1 file changed, 1 insertion(+) diff --git a/ofproto/ofproto-dpif-mirror.c b/ofproto/ofproto-dpif-mirror.c index 9734718..0819b72 100644 --- a/ofproto/ofproto-dpif-mirror.c +++ b/ofproto/ofproto-dpif-mirror.c

[ovs-dev] [bugfixes 6/6] flow: Fix hypothetical memory leak in miniflow_move().

2013-09-04 Thread Ben Pfaff
Ordinarily a miniflow will use its inline_values if its values can fit, but there is nothing to prevent a small number of values from being stored in malloc()'d memory. If this happened, then miniflow_move() would leak memory. This commit fixes the problem. This is a hypothetical problem. I hav

[ovs-dev] [bugfixes 1/6] ofproto-dpif: Destroy facets on ofproto removal.

2013-09-04 Thread Ben Pfaff
From: Ethan Jackson Facets maintain a pointer to their owning ofproto-dpif, and therefore when an ofproto-dpif is destroyed all of their child facets should be destroyed along with it. If they aren't, it's possible a subfacet looked up in the dpif-backer could access it's parent facet and theref

[ovs-dev] [bugfixes 2/6] ofproto-dpif: Fix use-after-free deleting a bridge with active traffic.

2013-09-04 Thread Ben Pfaff
When a bridge that has active traffic is deleted, the bridge's ofproto can be referenced by in-flight "flow_miss"es. This commit fixes the problem by destroying "flow_miss"es that reference the ofproto that is being deleted. I found the problem by adding and removing a bridge that had active traf

[ovs-dev] [bugfixes 3/6] flow: Fix memory leak in minimask_move().

2013-09-04 Thread Ben Pfaff
Found by valgrind. Signed-off-by: Ben Pfaff --- lib/flow.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/flow.c b/lib/flow.c index 8263672..0e7c493 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -1373,7 +1373,7 @@ minimask_clone(struct minimask *dst, const struct minim

[ovs-dev] [PATCH 3/3] ofproto: Rename struct rule's evict lock and use it more widely.

2013-09-04 Thread Ethan Jackson
There are a few fields in struct rule which are accessible by functions in ofproto-dpif and therefore need to accessed in a thread safe manner. This patch achieves this by generalizing the rules evict rwlock and requiring a writelock to be held to edit them. Signed-off-by: Ethan Jackson --- ofp

[ovs-dev] [PATCH 2/3] ofproto-dpif: Don't manage eviction groups from threads.

2013-09-04 Thread Ethan Jackson
Managing eviction groups from threads was going to be difficult to do in a performant thread-safe manner, so this patch punts the problem to the main thread. Signed-off-by: Ethan Jackson --- ofproto/ofproto-dpif.c |2 +- ofproto/ofproto-provider.h |2 +- ofproto/ofproto.c |

[ovs-dev] [PATCH 1/3] ofproto-dpif: Hide struct rule_dpif internally.

2013-09-04 Thread Ethan Jackson
By hiding struct rule_dpif inside ofproto-dpif, it becomes very clear which attributes are accessed by multiple threads and need to be protected by locks. Signed-off-by: Ethan Jackson --- ofproto/ofproto-dpif-upcall.c |2 +- ofproto/ofproto-dpif-xlate.c | 23 +++--- ofproto/ofprot

Re: [ovs-dev] [PATCH] ofproto-dpif: Destroy facets on ofproto removal.

2013-09-04 Thread Ethan Jackson
> I'm pretty sure that the above will self-deadlock on > ofproto->facets.rwlock, because facet_remove() write-locks it. > > My understanding is that the locking on this classifier is superfluous > anyway since only a single thread accesses it--it's only there to > suppress Clang lock warnings--so I

Re: [ovs-dev] [PATCH] stp: Fix a bug.

2013-09-04 Thread Alex Wang
Sorry for the typo. I mean backport to branch2.0. On Wed, Sep 4, 2013 at 11:44 AM, Alex Wang wrote: > Also, this requires a backport to sr87 branch. > > > On Tue, Sep 3, 2013 at 8:32 PM, Alex Wang wrote: > >> Commit 9d189a50e (ofproto-dpif-xlate: Pull STP xlation into >> ofproto-dpif-xlate.)

Re: [ovs-dev] [PATCH] stp: Fix a bug.

2013-09-04 Thread Alex Wang
Also, this requires a backport to sr87 branch. On Tue, Sep 3, 2013 at 8:32 PM, Alex Wang wrote: > Commit 9d189a50e (ofproto-dpif-xlate: Pull STP xlation into > ofproto-dpif-xlate.) introduced the bug that sets the port's > stp port number even if stp is not in use. This commit > fixes this bug

Re: [ovs-dev] [-next] openvswitch BUILD_BUG_ON failed

2013-09-04 Thread Jesse Gross
On Tue, Sep 3, 2013 at 11:55 PM, Geert Uytterhoeven wrote: > On Tue, Sep 3, 2013 at 11:44 PM, Jesse Gross wrote: >> On Sat, Aug 31, 2013 at 5:11 AM, Geert Uytterhoeven >> wrote: >>> On Fri, Aug 30, 2013 at 3:11 AM, Jesse Gross wrote: On Thu, Aug 29, 2013 at 3:10 PM, David Miller wrote: >>

Re: [ovs-dev] [PATCH] ofproto-dpif: Destroy facets on ofproto removal.

2013-09-04 Thread Ben Pfaff
On Wed, Sep 04, 2013 at 09:27:31AM -0700, Ethan Jackson wrote: > Facets maintain a pointer to their owning ofproto-dpif, and therefore > when an ofproto-dpif is destroyed all of their child facets should be > destroyed along with it. If they aren't, it's possible a subfacet > looked up in the dpif

[ovs-dev] [PATCH] ofproto-dpif: Destroy facets on ofproto removal.

2013-09-04 Thread Ethan Jackson
Facets maintain a pointer to their owning ofproto-dpif, and therefore when an ofproto-dpif is destroyed all of their child facets should be destroyed along with it. If they aren't, it's possible a subfacet looked up in the dpif-backer could access it's parent facet and therefore a defunct parent o

[ovs-dev] [PATCH v2] Fix a memory allocation bug in CFM

2013-09-04 Thread gyang
From: Guolin Yang In cfm, when allocating the rmp array, the size is not calculated correctly which cause the remote MPID not correctly updated in ovsdb. Signed-off-by: Guolin Yang --- v1->v2 Change description of the fix based on Ben's comments --- lib/cfm.c |2 +- 1 file changed, 1 i

Re: [ovs-dev] [PATCH] Fix a memory corruption in CFM

2013-09-04 Thread Guolin Yang, VMware
You are right, I send anew patch with proper description On Wed, Sep 4, 2013 at 8:00 AM, Ben Pfaff wrote: > On Wed, Sep 04, 2013 at 12:36:50AM -0700, gy...@nicira.com wrote: > > From: Guolin Yang > > > > In cfm, when allocating the rmp array, the size is not calculated > correctly > > which wi

Re: [ovs-dev] dpif: fix segfault in CONTROLLER action with sflow or ipfix

2013-09-04 Thread Glenn McGuire
This patch makes sense, and appears to have fixed the problem in my test system. Thank you. On Tue, Sep 3, 2013 at 9:58 PM, Romain Lenglet wrote: > This patch fixes a segfault in the CONTROLLER action when the flow > contains a SAMPLE action, which occurs e.g. when sFlow or per-bridge > IPFIX

Re: [ovs-dev] [PATCH] Fix a memory corruption in CFM

2013-09-04 Thread Ben Pfaff
On Wed, Sep 04, 2013 at 12:36:50AM -0700, gy...@nicira.com wrote: > From: Guolin Yang > > In cfm, when allocating the rmp array, the size is not calculated correctly > which will cause memory corruption. > > Signed-off-by: Guolin Yang Thanks for the patch. It is obviously correct. But I am n

Re: [ovs-dev] [ovs-announce] Task List for Open vSwitch Hackathon Sep. 6 and 7

2013-09-04 Thread Daniel Baluta
> > Unclaimed Tasks (Small, Required) > > - > > > > The following tasks could use volunteers. These tasks are all > > required for OpenFlow compliance. My guess is that an average > > developer could build any of these within the two days of the > > hackathon or le

[ovs-dev] [PATCH] Fix a memory corruption in CFM

2013-09-04 Thread gyang
From: Guolin Yang In cfm, when allocating the rmp array, the size is not calculated correctly which will cause memory corruption. Signed-off-by: Guolin Yang --- lib/cfm.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cfm.c b/lib/cfm.c index 297894e..d5eca0f 100644