[ovs-dev] [PATCH] vlandev: Fix an obvious predicate logic bug.

2014-04-10 Thread ZhengLingyun
Signed-off-by: ZhengLingyun --- lib/vlandev.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vlandev.c b/lib/vlandev.c index 382487c..d2f5a37 100644 --- a/lib/vlandev.c +++ b/lib/vlandev.c @@ -374,7 +374,7 @@ static int vlandev_del__(const char *vlan_dev

Re: [ovs-dev] [PATCH 2/4] connmgr: Use 'ofproto_mutex' to protect ofconns from being destroyed.

2013-11-21 Thread ZhengLingyun
'ovs_datapath' does not exist. The Open vSwitch kernel module is probably not loaded. 2013-11-22T03:40:26Z|5|bridge|INFO|bridge br0: using datapath ID c644fe67d34d 2013-11-22T03:40:26Z|6|connmgr|INFO|br0: added service controller "punix:/home/zhenglingyun/var/run/openv

Re: [ovs-dev] [PATCH 2/4] connmgr: Use 'ofproto_mutex' to protect ofconns from being destroyed.

2013-11-21 Thread ZhengLingyun
I set OVS connect to a non-existent controller 10.1.1.1, the controller will fall into fail-open mode. Then I delete the controller, the OVS will abort: 2013-11-22T01:25:40Z|00010|connmgr|INFO|br0: added primary controller "tcp:10.1.1.1:6632" 2013-11-22T01:25:40Z|00011|rconn|INFO|br0<->tcp:1

[ovs-dev] [PATCH] ovs-controller: Avoid dereferencing NULL pointer when the switch acts as a hub

2013-10-08 Thread ZhengLingyun
Starting ovs-controller with '-H' option will lead to a segment fault problem. Add a check, and adjust the indentation of the following code. Signed-off-by: ZhengLingyun --- lib/learning-switch.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) di

[ovs-dev] [netdev]Internal interface 'br0' can't be created

2013-08-11 Thread ZhengLingyun
Hi, all I'm using a userspace OVS. I find that there is PROBABILITY the 'br0' opened as type 'internal' before it is opened as type 'tap'. This will cause the 'br0' inserted into 'netdev_shash' as internal class. When it is created as type 'tap' later, error occurs. 'br0' then can't be created in

Re: [ovs-dev] [netdev-linux]Deadlock is fixed; netdev_open() has a bug

2013-08-10 Thread ZhengLingyun
It is ok now. Another problem: netdev_open does shash_add() but no shash_delete() when error occurs, such as device not exists. It will cause a SIGSEGV signal. At 2013-08-10 21:49:30,"Ben Pfaff" wrote: >On Sat, Aug 10, 2013 at 06:33:35PM +0800, ZhengLingyun wrote: >> I j

[ovs-dev] [netdev-linux]Deadlock

2013-08-10 Thread ZhengLingyun
Hi, Ben I just update the code. It can't run (just in userspace?). There is a recursive dead lock in netdev_linux_set_etheraddr and netdev_linux_update_flags. #0 0xb7fdd424 in __kernel_vsyscall () #1 0xb7dbe5a2 in __lll_lock_wait () from /lib/i386-linux-gnu/libpthread.so.0 #2 0xb7db9ead in _L

[ovs-dev] [PATCH] netdev-linux: avoid negative value cast to non-negative in comparison

2013-07-18 Thread ZhengLingyun
ot; greater than the "size". Change the sequence of comparison to avoid negative return value cast to a positive and become greater then a non-negative value. Signed-off-by: ZhengLingyun --- lib/netdev-linux.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --

Re: [ovs-dev] [PATCH] Fix hindex iteration incomplete bug

2013-07-17 Thread ZhengLingyun
It seems I don't get the purpose of introducing hindex into lib. Now I get it. Thanks. At 2013-07-17 01:08:16,"Ben Pfaff" wrote: >On Tue, Jul 16, 2013 at 06:46:22PM +0800, ZhengLingyun wrote: >> As you have said in hindex.h, hindex need a high-quality hash function to &

Re: [ovs-dev] [PATCH] Fix hindex iteration incomplete bug

2013-07-16 Thread ZhengLingyun
these two functions seems confusing. Thank you. ZhengLingyun At 2013-07-16 08:16:09,"Ben Pfaff" wrote: >On Mon, Jul 15, 2013 at 08:21:04AM +0800, ZhengLingyun wrote: >> hindex_next() shouldn't jump over different hashs in the same bucket. >> tests/test-hindex

[ovs-dev] [PATCH] Fix hindex iteration incomplete bug

2013-07-14 Thread ZhengLingyun
hindex_next() shouldn't jump over different hashs in the same bucket. tests/test-hindex did not detect it, add a multipart_hash() method to detect it. Signed-off-by: ZhengLingyun --- lib/hindex.c| 21 ++--- tests/test-hindex.c |7 +++ 2 files change

[ovs-dev] [PATCH] bitmap_allocate1() last unit set bug

2013-06-29 Thread ZhengLingyun
In function bitmap_allocate1(), the last "unsigned long" in bitmap will be set to all 0-bits when (n_bits % BITMAP_ULONG_BITS == 0), it actually should be set to all 1-bits. Signed-off-by: ZhengLingyun --- lib/bitmap.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff -

[ovs-dev] bitmap_allocate1(size_t n_bits) will fail when (n_bits % BITMAP_ULONG_BITS == 0)

2013-06-28 Thread ZhengLingyun
/* Ensure that the last "unsigned long" in the bitmap only has as many * 1-bits as there actually should be. */ bitmap[n_longs - 1] = (1UL << (n_bits % BITMAP_ULONG_BITS)) - 1; from bitmap_allocate1(), It will fail when n_bits % BITMAP_ULONG_BITS == 0, does it matter? unsigned long * bitmap_a