[ovs-dev] [PATCH] meta-flow: Fix wrong parentheses.

2015-02-12 Thread Kmindg
Bitwise not operator has higher precedence than Bitwise right shift operator, so the MFF_IP_DSCP_SHIFTED case always returns true currently. Signed-off-by: Kmindg --- lib/meta-flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/meta-flow.c b/lib/meta-flow.c index

[ovs-dev] [PATCH 1/3] bitmap: Add test for bitmap_equal and bitmap_scan

2014-07-30 Thread Kmindg
Suggested-by: Ben Pfaff Signed-off-by: Kmindg --- tests/automake.mk |1 + tests/library.at|5 ++ tests/test-bitmap.c | 160 +++ 3 files changed, 166 insertions(+) create mode 100644 tests/test-bitmap.c diff --git a/tests

[ovs-dev] [PATCH 2/3] util: Add rightmost_1bit_idx_64

2014-07-30 Thread Kmindg
The first user of this will be the bitmap. Signed-off-by: Kmindg --- lib/util.h |8 1 file changed, 8 insertions(+) diff --git a/lib/util.h b/lib/util.h index dc34ee5..7b506bd 100644 --- a/lib/util.h +++ b/lib/util.h @@ -475,6 +475,14 @@ rightmost_1bit_idx(uint32_t x) return

[ovs-dev] [PATCH 3/3] bitmap: Optimize bitmap_equal and bitmap_scan

2014-07-30 Thread Kmindg
ovstest test-bitmap benchmark 10 (without this commit): bitmap equal: 52 ms bitmap scan:758 ms ovstest test-bitmap benchmark 10 (with this commit): bitmap equal: 37 ms bitmap scan: 34 ms Tested on Intel Xeon E5-2620 v2 @ 2.10GHz Signed-off-by: Kmindg --- lib/bitmap.c

Re: [ovs-dev] [PATCH] bitmap: Optimize bitmap_equal and bitmap_scan

2014-07-29 Thread Kmindg G
On Tue, Jul 29, 2014 at 1:01 AM, Ben Pfaff wrote: > Needs a sign-off. > Oh.. I will not forget it in the next version. > > I'm pretty sure that bitmap_equal() is wrong: doesn't it access one > past the end of the bitmap arrays? You are right. I'll fix it. > I think that rightmost_1bit_idx

[ovs-dev] [PATCH] match: Fix match_set_vlan_vid when vid is OFPVID12_NONE

2014-07-26 Thread Kmindg
When vid is OFPVID12_NONE, we should match only packets without vlan tag. Before this commit we set vlan_tci to 0x/0x1fff which is fine because it's only match packets without vlan tag too. But if we add flow using: ovs-ofctl -O OpenFlow10 add-flow br0 dl_vlan=0x,actions=drop ovs-of

[ovs-dev] [PATCH] connmgr: Acquire ofproto_mutex in connmgr_wants_packet_in_on_miss

2014-07-26 Thread Kmindg
connmgr_wants_packet_in_on_miss would be invoked in the handler threads, while ofconn in mgr->all_conns may be destroyed in the main thread. So we should acquire ofproto_mutex to prevent us from using ofconn which has been freed. --- ofproto/connmgr.c | 3 +++ 1 file changed, 3 insertions(+) diff

[ovs-dev] [PATCH] bitmap: Optimize bitmap_equal and bitmap_scan

2014-07-26 Thread Kmindg
--- lib/bitmap.c | 36 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/lib/bitmap.c b/lib/bitmap.c index 7889aa1..b62a8be 100644 --- a/lib/bitmap.c +++ b/lib/bitmap.c @@ -65,16 +65,17 @@ bool bitmap_equal(const unsigned long *a, const unsigned

Re: [ovs-dev] [ovs-discuss] dl_src field didn't function

2014-05-22 Thread Kmindg G
predict which flow will be chosen. It does not mean one flow will not be chosen forever. > > > 2014-05-22 17:46 GMT+08:00 Kmindg G : > >> On Thu, May 22, 2014 at 4:54 PM, chen zhang <3zhangchen9...@gmail.com> >> wrote: >> > but i know that when a ofp_match has

Re: [ovs-dev] [ovs-discuss] dl_src field didn't function

2014-05-22 Thread Kmindg G
ltiple flows, the highest priority of flow will be chosen. > > > 2014-05-22 16:12 GMT+08:00 Kmindg G : > >> On Thu, May 22, 2014 at 3:21 PM, chen zhang <3zhangchen9...@gmail.com> >> wrote: >> > hi, everybody >> > this is my table entry: >> &

[ovs-dev] cmap.c gcc 4.9 compile error

2014-05-20 Thread Kmindg G
ibssp --enable-gnu-unique-object --enable-linker-build-id --enable-cloog-backend=isl --disable-cloog-version-check --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --disable-multilib --disable-werror --enable-checking=release Thread model: posix gcc version 4.9.0 20140507 (prerelease) (GCC) Thanks, Kmindg ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH 09/10] lib/flow: Maintain miniflow offline values explicitly.

2014-04-28 Thread Kmindg G
hat I misunderstood these code before. Sorry for the noise. > Ethan > > On Sat, Apr 19, 2014 at 10:09 PM, Kmindg G wrote: >> On Sat, Apr 19, 2014 at 3:42 AM, Jarno Rajahalme >> wrote: >>> This allows use of miniflows that have all of their values inline. >>&

Re: [ovs-dev] [PATCH 09/10] lib/flow: Maintain miniflow offline values explicitly.

2014-04-19 Thread Kmindg G
On Sat, Apr 19, 2014 at 3:42 AM, Jarno Rajahalme wrote: > This allows use of miniflows that have all of their values inline. > > Signed-off-by: Jarno Rajahalme > --- > lib/classifier.c | 36 +++-- > lib/dpif-netdev.c | 32 ++- > lib/flow.c| 91 > ++

Re: [ovs-dev] [PATCH 10/10] lib/classifier: Support variable sized miniflows.

2014-04-19 Thread Kmindg G
On Sat, Apr 19, 2014 at 3:42 AM, Jarno Rajahalme wrote: > Change the classifier to allocate variable sized miniflows and > minimasks in cls_match and cls_subtable, respectively. Do not > duplicate the mask in cls_rule any more. > > miniflow_clone and miniflow_move can now take variably sized mini

Re: [ovs-dev] [PATCH 4/5] ofproto.at: Fix races in rule eviciton tests

2014-04-01 Thread Kmindg G
t; > These tests were introduced by commit 6d56c1f1. > ("ofproto: Update rule's priority in eviction group.") > > Signed-off-by: YAMAMOTO Takashi > Cc: Kmindg G > Acked-by: Ben Pfaff > > diff --git a/tests/ofproto.at b/tests/ofproto.at &g

Re: [ovs-dev] [PATCH 4/5] ofproto.at: Fix races in rule eviciton tests

2014-04-01 Thread Kmindg G
> Also, use time/stop to avoid relying on how long an add-flow would take. > > These tests were introduced by commit 6d56c1f1. > ("ofproto: Update rule's priority in eviction group.") > > Signed-off-by: YAMAMOTO Takashi > Cc: Kmindg G > A

Re: [ovs-dev] [PATCH 4/5] ofproto.at: Fix races in rule eviciton tests

2014-03-31 Thread Kmindg G
These tests were introduced by commit 6d56c1f1. > ("ofproto: Update rule's priority in eviction group.") > > Signed-off-by: YAMAMOTO Takashi > Cc: Kmindg G > Acked-by: Ben Pfaff > > diff --git a/tests/ofproto.at b/tests/ofproto.at > index e

Re: [ovs-dev] [PATCH 4/5] ofproto.at: Fix races in rule eviciton tests

2014-03-31 Thread Kmindg G
On Mon, Mar 31, 2014 at 2:24 PM, YAMAMOTO Takashi wrote: > Bump timeout differences, because timeouts different by 1s might end up > to have the same position in the heap as rule_eviction_priority() uses > 1024ms as a unit. > > Also, use time/stop to avoid relying on how long an add-flow would tak

Re: [ovs-dev] [ovs-discuss] How to Search in Archives?

2014-03-16 Thread Kmindg G
On Fri, Mar 14, 2014 at 7:13 PM, Rizwan Jamil wrote: > Hi! > > Search is provided in mininet-discuss and openflow-discuss mailing archives. > But why it has not been provided in ovs-dev and ovs-discuss archives? How > can I search my question in ovs-dev and ovs-discuss? google always is your frie

Re: [ovs-dev] [PATCH] stp: Fix bpdu tx problem in listening state

2014-03-16 Thread Kmindg G
On Sun, Mar 16, 2014 at 12:50 AM, Ben Pfaff wrote: > On Wed, Mar 12, 2014 at 03:31:26PM +0800, Kmindg G wrote: >> On Wed, Mar 12, 2014 at 1:41 PM, Ben Pfaff wrote: >> > On Sun, Mar 09, 2014 at 05:48:52PM +0800, kmindg wrote: >> >> The restriction only allows to se

Re: [ovs-dev] [PATCH] stp: Fix bpdu tx problem in listening state

2014-03-12 Thread Kmindg G
On Wed, Mar 12, 2014 at 1:41 PM, Ben Pfaff wrote: > On Sun, Mar 09, 2014 at 05:48:52PM +0800, kmindg wrote: >> The restriction only allows to send bpdu in forwarding state in >> compose_output_action__. But a port could send bpdu in listening >> and learning state accordi

Re: [ovs-dev] [PATCH] ofproto: Update rule's priority in eviction group.

2014-03-11 Thread Kmindg G
On Wed, Mar 12, 2014 at 1:36 PM, Ben Pfaff wrote: > On Sun, Mar 09, 2014 at 05:48:04PM +0800, kmindg wrote: >> We do call heap_rebuild in ofproto_run, but we do not update rule's >> priority with latest hard_timeout and idle_timeout before heap_rebuild. >> >>

[ovs-dev] [PATCH] stp: Fix bpdu tx problem in listening state

2014-03-09 Thread kmindg
The restriction only allows to send bpdu in forwarding state in compose_output_action__. But a port could send bpdu in listening and learning state according to comments in lib/stp.h(State of an STP port). Signed-off-by: kmindg --- lib/stp.c| 9 + lib/stp.h

[ovs-dev] [PATCH] ofproto: Update rule's priority in eviction group.

2014-03-09 Thread kmindg
imeout and idle_timwout. Signed-off-by: kmindg --- lib/heap.h| 1 - ofproto/ofproto.c | 18 -- tests/ofproto.at | 74 +++ 3 files changed, 85 insertions(+), 8 deletions(-) diff --git a/lib/heap.h b/lib/heap.h index 870f582..8829

Re: [ovs-dev] [PATCH] ofproto: Send port status message for port-mods, right away.

2014-02-21 Thread Kmindg G
On Sat, Feb 22, 2014 at 12:42 AM, Ben Pfaff wrote: > On Fri, Feb 21, 2014 at 10:07:14AM +0800, Kmindg G wrote: >> On Fri, Feb 21, 2014 at 5:19 AM, Ben Pfaff wrote: >> > On Thu, Feb 20, 2014 at 12:45:49PM +0800, Kmindg G wrote: >> >> On Thu, Feb 20, 201

Re: [ovs-dev] [PATCH] ofproto: Send port status message for port-mods, right away.

2014-02-20 Thread Kmindg G
On Fri, Feb 21, 2014 at 5:19 AM, Ben Pfaff wrote: > On Thu, Feb 20, 2014 at 12:45:49PM +0800, Kmindg G wrote: >> On Thu, Feb 20, 2014 at 3:20 AM, Ben Pfaff wrote: >> > Until now, when it processes OFPT_PORT_MOD message, Open vSwitch has waited >> > for ports to noti

Re: [ovs-dev] [PATCH] ofproto: Send port status message for port-mods, right away.

2014-02-19 Thread Kmindg G
se to send such port status updates, > and I couldn't quickly find anything in OF1.3 or OF1.4 that said they > shouldn't be sent. > > Signed-off-by: Ben Pfaff > Reported-by: Kmindg G > --- > AUTHORS |1 + > ofproto/ofproto.c | 25 +--

[ovs-dev] [PATCH] ofp-util: Fix a typo in ofputil_decode_ofp11_port

2014-02-19 Thread kmindg
Signed-off-by: kmindg --- lib/ofp-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ofp-util.c b/lib/ofp-util.c index 7de82c6..aa25e67 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -3640,7 +3640,7 @@ ofputil_decode_ofp11_port(struct ofputil_phy_port *pp

Re: [ovs-dev] Question about miniflow_hash in lib/flow.c

2014-02-09 Thread Kmindg G
On Sun, Feb 9, 2014 at 9:56 AM, Jarno Rajahalme wrote: > >> On Feb 8, 2014, at 12:49 AM, Kmindg G wrote: >> >> Hi all, >> I have a little question about miniflow_hash(). >> At the end of miniflow_hash, "p - flow->values" is used as the second >

[ovs-dev] Question about miniflow_hash in lib/flow.c

2014-02-08 Thread Kmindg G
int32_t basis) hash = mhash_add(hash, hash_map); hash = mhash_add(hash, hash_map >> 32); -return mhash_finish(hash, p - flow->values); +return mhash_finish(hash, +sizeof hash_map + count_1bits(hash_map) * sizeof *p); } cheers, kmindg __