[ovs-git] Open vSwitch: datapath: Minimize ovs_flow_cmd_new|set critical sections. (master)

dev at openvswitch.org dev at openvswitch.org
Wed Apr 2 18:10:31 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  6740b72141c6e76c6793c4429f1fdeecd4f41ec3 (commit)
       via  0c9fd022759a5273a2720663e2422cfc0a74c1e1 (commit)
       via  cde7f3ba24da6d9405afcdadc6b7f15bd3de7ad0 (commit)
       via  f71db6b17852d7e0d2ade9f60b7aec63cd584a82 (commit)
       via  4bb90bea0c4e725c4522f7de470a3b2f8251413a (commit)
       via  87e6ccfba9ba8c94a09de1205da4a9f064ac7bd6 (commit)
      from  dbdcf9ec3cf1e4de1a7dfb5e8926ba84ed929e89 (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 6740b72141c6e76c6793c4429f1fdeecd4f41ec3
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=6740b72141c6e76c6793c4429f1fdeecd4f41ec3
Author: Jarno Rajahalme <jrajahalme at nicira.com>
		
datapath: Minimize ovs_flow_cmd_new|set critical sections.
		
Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Signed-off-by: Pravin B Shelar <pshelar at nicira.com>


commit 0c9fd022759a5273a2720663e2422cfc0a74c1e1
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=0c9fd022759a5273a2720663e2422cfc0a74c1e1
Author: Jarno Rajahalme <jrajahalme at nicira.com>
		
datapath: Split ovs_flow_cmd_new_or_set().
		
Following patch will be easier to reason about with separate
ovs_flow_cmd_new() and ovs_flow_cmd_set() functions.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Signed-off-by: Pravin B Shelar <pshelar at nicira.com>


commit cde7f3ba24da6d9405afcdadc6b7f15bd3de7ad0
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=cde7f3ba24da6d9405afcdadc6b7f15bd3de7ad0
Author: Jarno Rajahalme <jrajahalme at nicira.com>
		
datapath: Minimize ovs_flow_cmd_del critical section.
		
ovs_flow_cmd_del() now allocates reply (if needed) after the flow has
already been removed from the flow table.  If the reply allocation
fails, a netlink error is signaled with netlink_set_err(), as is
already done in ovs_flow_cmd_new_or_set() in the similar situation.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Signed-off-by: Pravin B Shelar <pshelar at nicira.com>


commit f71db6b17852d7e0d2ade9f60b7aec63cd584a82
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=f71db6b17852d7e0d2ade9f60b7aec63cd584a82
Author: Jarno Rajahalme <jrajahalme at nicira.com>
		
datapath: Reduce locking requirements.
		
Reduce and clarify locking requirements for ovs_flow_cmd_alloc_info(),
ovs_flow_cmd_fill_info() and ovs_flow_cmd_build_info().

A datapath pointer is available only when holding a lock.  Change
ovs_flow_cmd_fill_info() and ovs_flow_cmd_build_info() to take a
dp_ifindex directly, rather than a datapath pointer that is then
(only) used to get the dp_ifindex.  This is useful, since the
dp_ifindex is available even when the datapath pointer is not, both
before and after taking a lock, which makes further critical section
reduction possible.

Make ovs_flow_cmd_alloc_info() take an 'acts' argument instead a
'flow' pointer.  This allows some future patches to do the allocation
before acquiring the flow pointer.

The locking requirements after this patch are:

ovs_flow_cmd_alloc_info(): May be called without locking, must not be
  called while holding the RCU read lock (due to memory allocation).
  If 'acts' belong to a flow in the flow table, however, then the
  caller must hold ovs_mutex.

ovs_flow_cmd_fill_info(): Either ovs_mutex or RCU read lock must be held.

ovs_flow_cmd_build_info(): This calls both of the above, so the caller
  must hold ovs_mutex.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Signed-off-by: Pravin B Shelar <pshelar at nicira.com>


commit 4bb90bea0c4e725c4522f7de470a3b2f8251413a
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=4bb90bea0c4e725c4522f7de470a3b2f8251413a
Author: Jarno Rajahalme <jrajahalme at nicira.com>
		
datapath/flow: Fix ovs_flow_stats_get/clear RCU dereference.
		
For ovs_flow_stats_get() using ovsl_dereference() was wrong, since
flow dumps call this with RCU read lock.

ovs_flow_stats_clear() is always called with ovs_mutex, so can use
ovsl_dereference().

Also, make the ovs_flow_stats_get() 'flow' argument const to make
later patches cleaner.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Signed-off-by: Pravin B Shelar <pshelar at nicira.com>


commit 87e6ccfba9ba8c94a09de1205da4a9f064ac7bd6
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=87e6ccfba9ba8c94a09de1205da4a9f064ac7bd6
Author: Jarno Rajahalme <jrajahalme at nicira.com>
		
datapath: Fix typo.
		
Incorrect struct name was confusing, even though otherwise
inconsequental.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Signed-off-by: Pravin B Shelar <pshelar at nicira.com>


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

Summary of changes:
 datapath/datapath.c   |  357 ++++++++++++++++++++++++++++++++-----------------
 datapath/flow.c       |   10 +-
 datapath/flow.h       |    6 +-
 datapath/flow_table.c |    2 +-
 4 files changed, 247 insertions(+), 128 deletions(-)


hooks/post-receive
-- 
Open vSwitch



More information about the git mailing list