[ovs-git] Open vSwitch: ofproto-dpif-xlate: Fix a bug. (master)

dev at openvswitch.org dev at openvswitch.org
Thu May 22 04:04:11 UTC 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Open vSwitch".

The branch, master has been updated
       via  9edf6b4828205610f7ea750bfb80fe960e1f01e3 (commit)
       via  b2af328825fdddb90098d985ca277c7ca26c4a6c (commit)
       via  1e684d7d7f533dae8829957e54edc0ee727c5155 (commit)
       via  809c7548e09a0508ff7d579a340cda1a598fcbd3 (commit)
      from  59e6d833b32cb7695738c56a004aa78ab26ec3dc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 9edf6b4828205610f7ea750bfb80fe960e1f01e3
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=9edf6b4828205610f7ea750bfb80fe960e1f01e3
Author: Alex Wang <alexw at nicira.com>
		
ofproto-dpif-xlate: Fix a bug.
		
Commit b256dc525c8 (ofproto-dpif-xlate: Cache xlate_actions() effects.)
caches the variables needed for refreshing mac-learning table in
xlate_normal().  Wherein, the cache entry always records reference to
the original 'ofproto'.

When patch port is used to connect two 'ofproto's, packet goes through the
patch port will have two mac-learning cache entries created for each
'ofproto'.  So, each entry should reference to the corresponding 'ofproto'.
However, due to the bug mentioned above, all cache entries will refer to the
same 'ofproto'.  Subsequently, the mac-learning tables can be corrupted, which
causes connection loss.

This commit fixes the bug by making each cache entry refer to the correct
'ofproto'.

Signed-off-by: Alex Wang <alexw at nicira.com>
Acked-by: Joe Stringer <joestringer at nicira.com>


commit b2af328825fdddb90098d985ca277c7ca26c4a6c
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=b2af328825fdddb90098d985ca277c7ca26c4a6c
Author: Andy Zhou <azhou at nicira.com>
		
tests: Add tests for Openflow group stats
		
Signed-off-by: Andy Zhou <azhou at nicira.com>
Signed-off-by: Ryan Wilson <wryan at nicira.com>
Acked-by: Alex Wang <alexw at nicira.com>
Signed-off-by: Andy Zhou <azhou at nicira.com>


commit 1e684d7d7f533dae8829957e54edc0ee727c5155
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=1e684d7d7f533dae8829957e54edc0ee727c5155
Author: Ryan Wilson <wryan at nicira.com>
		
ofproto: Add support for Openflow group and bucket stats.
		
Signed-off-by: Ryan Wilson <wryan at nicira.com>
Acked-by: Andy Zhou <azhou at nicira.com>
Signed-off-by: Andy Zhou <azhou at nicira.com>


commit 809c7548e09a0508ff7d579a340cda1a598fcbd3
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=809c7548e09a0508ff7d579a340cda1a598fcbd3
Author: Ryan Wilson <wryan at nicira.com>
		
ofproto: Add reference count for Openflow groups.
		
When adding support for OpenFlow group and bucket stats, a group entry is added
to the xlate_cache. If the main thread removes the group from an ofproto, we
need to guarantee that the group remains accessible to users of
xlate_group_actions and the xlate_cache, as the xlate_cache will not be cleaned
up until the corresponding datapath flows are revalidated.

Before, modify_group could change the bucket list for a group. With group
entries in the xlate_cache, this could leave already-freed bucket pointers in
the cache. Modify_group now recreates the group and replaces the old group in
ofproto's ofgroup hash map. Thus, any subsequent group lookup will find the new
group while the old group and buckets will still exist until the xlate_cache
entries unref the group.

Since ofgroup's properties were only written in-place by modify_group and this
is no longer done, this eliminates the need for ofgroup's lock.

Signed-off-by: Ryan Wilson <wryan at nicira.com>
Signed-off-by: Andy Zhou <azhou at nicira.com>


-----------------------------------------------------------------------

Summary of changes:
 lib/ofp-util.h               |   12 +--
 ofproto/ofproto-dpif-xlate.c |   57 ++++++++++---
 ofproto/ofproto-dpif.c       |   85 ++++++++++---------
 ofproto/ofproto-dpif.h       |   21 ++++-
 ofproto/ofproto-provider.h   |   36 +++++----
 ofproto/ofproto.c            |  184 ++++++++++++++++++++++--------------------
 tests/ofproto-dpif.at        |   44 ++++++++++
 7 files changed, 276 insertions(+), 163 deletions(-)


hooks/post-receive
-- 
Open vSwitch



More information about the git mailing list