[ovs-git] Open vSwitch: ofproto-dpif-xlate: Do initial rule lookup for callers. (branch-2.0)
dev at openvswitch.org
dev at openvswitch.org
Wed Oct 9 23:55:50 UTC 2013
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, branch-2.0 has been updated
via 550701c773b7d3c9a4711d2f9824ad32c5d9ff3f (commit)
from 76fb0c1282b916ef157324f53ec00d738864d806 (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 550701c773b7d3c9a4711d2f9824ad32c5d9ff3f
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=550701c773b7d3c9a4711d2f9824ad32c5d9ff3f
Author: Ethan Jackson <ethan at nicira.com>
ofproto-dpif-xlate: Do initial rule lookup for callers.
None of the functions available in ofproto-dpif.h are thread safe
unless holding the xlate_rwlock because one can't know that an ofproto
or ofport used as argument will survive during the function call. For
this reason, ofproto-dpif-upcall's invocation of rule_dpif_lookup()
is unsafe because the ofproto could be destroyed during the call.
This patch fixes the problem by optionally doing the initial rule
lookup in xlate_actions() so that it can be done while holding the
xlate_rwlock. This has the nice side benefit of removing a bunch of
boilerplate.
Note that this only partially solves the problem, there's still
vsp_realdev_to_vlandev() and ofproto_dpif_send_packet_in() which
aren't thread safe for the same reason.
Signed-off-by: Ethan Jackson <ethan at nicira.com>
-----------------------------------------------------------------------
Summary of changes:
manpages.mk | 8 ++++----
ofproto/ofproto-dpif-upcall.c | 13 +++----------
ofproto/ofproto-dpif-xlate.c | 15 +++++++++++++--
ofproto/ofproto-dpif-xlate.h | 4 +++-
ofproto/ofproto-dpif.c | 12 ++----------
5 files changed, 25 insertions(+), 27 deletions(-)
hooks/post-receive
--
Open vSwitch
More information about the git
mailing list