[ovs-git] Open vSwitch: ofproto: Move 'rule->used' to the provider. (master)

dev at openvswitch.org dev at openvswitch.org
Wed Feb 12 21:55:07 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  dc43709014749ed924d4fcff63055320146cd018 (commit)
       via  b90d6ee54a3dea81da58e6e10640fcd165dfb659 (commit)
       via  7614e5d01c3b971c57d825111e412b1182cc04c8 (commit)
      from  fc24d64d27b745593fe9d5a6c73dfc6dd9da5983 (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 dc43709014749ed924d4fcff63055320146cd018
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=dc43709014749ed924d4fcff63055320146cd018
Author: Jarno Rajahalme <jrajahalme at nicira.com>
		
ofproto: Move 'rule->used' to the provider.
		
Rule's 'used' timestamp is updated at the same time with the other
stats.  So far the 'used' has been updated without proper protection,
which may lead to 'tearing' in 32-bit architectures, resulting in an
incorrect 'used' timestamp.  While in practice this is highly
improbable, it is still better to handle this correctly.

This is resolved by moving the 'used' field to the provider's stats,
so that whatever protection is used for updating packet and byte
counts, can be also used for both reading and writing of the 'used'
timestamp.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Signed-off-by: Ben Pfaff <blp at nicira.com>

commit b90d6ee54a3dea81da58e6e10640fcd165dfb659
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=b90d6ee54a3dea81da58e6e10640fcd165dfb659
Author: Jarno Rajahalme <jrajahalme at nicira.com>
		
ofproto: Optimize the case of a repeated learn action execution.
		
When the target flow exists already as intended, only the 'modified'
time needs to be updated.  Allow modification without taking the
'ofproto_mutex' by always using the 'rule->mutex' when accessing the
'modified' time.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Signed-off-by: Ben Pfaff <blp at nicira.com>

commit 7614e5d01c3b971c57d825111e412b1182cc04c8
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=7614e5d01c3b971c57d825111e412b1182cc04c8
Author: Jarno Rajahalme <jrajahalme at nicira.com>
		
ofproto: Lock for vlan splinters only if have them.
		
Reading the hmap count for determining if it is empty or not is thread
safe, so avoid locking when not necessary.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Signed-off-by: Ben Pfaff <blp at nicira.com>

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

Summary of changes:
 lib/hmap.h                   |    6 ++-
 ofproto/ofproto-dpif-xlate.c |   19 ++++----
 ofproto/ofproto-dpif.c       |   78 ++++++++++++++++++++-----------
 ofproto/ofproto-provider.h   |   17 ++++---
 ofproto/ofproto.c            |  106 +++++++++++++++++++++++++++++++-----------
 5 files changed, 156 insertions(+), 70 deletions(-)


hooks/post-receive
-- 
Open vSwitch



More information about the git mailing list