On Tue, Feb 15, 2011 at 06:54:09PM +0500, Hassan Khan wrote:
> The Open vSwitch version number that I am using is 'ovs-vswitchd (Open
> vSwitch) 1.1.0pre2' 
> This GIT commit was made on Sun, 6 Feb 2011 04:58:12 (as I am using the web
> interface so I cannot tell the exact git commit number).
> No local patches or changes were applied. I have also tested this thing on
> new NICs. 
> The cond.db file is attached. 

OK, thanks.  This is a very simple setup and a recent version of OVS, so
it should work properly.

The userspace version of the datapath only rarely gets tested, so I ran
it under valgrind and immediately reproduced the segfault.  I pushed the
following commit that fixes it.

I imagine that you will find other bugs in the userspace datapath as you
continue to work with it.  Please pass them along as you do, so that we
can fix them.

Thanks,

Ben.

--8<--------------------------cut here-------------------------->8--

>From ed4031e4676affcb39962942ff437382d8f30c27 Mon Sep 17 00:00:00 2001
From: Ben Pfaff <[email protected]>
Date: Tue, 15 Feb 2011 10:07:20 -0800
Subject: [PATCH] dpif-netdev: Fix segfault handling packets.

Reported-by: Hassan Khan <[email protected]>
---
 AUTHORS           |    1 +
 lib/dpif-netdev.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index c48479f..4116ada 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -50,6 +50,7 @@ Derek Cormier           [email protected]
 DK Moon                 [email protected]
 Gaetano Catalli         [email protected]
 Ghanem Bahri            [email protected]
+Hassan Khan             [email protected]
 Hector Oron             [email protected]
 Henrik Amren            [email protected]
 Jad Naous               [email protected]
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 93dd1cd..035ceae 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -1315,7 +1315,7 @@ dp_netdev_output_control(struct dp_netdev *dp, const 
struct ofpbuf *packet,
     upcall->key_len = key_len;
     upcall->userdata = arg;
 
-    q->upcalls[++q->head & QUEUE_MASK] = upcall;
+    q->upcalls[q->head++ & QUEUE_MASK] = upcall;
 
     return 0;
 }
-- 
1.7.1


_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss_openvswitch.org

Reply via email to