ofproto-dpif-xlate: Avoid recursive acquisition of xlate_rwlock.
Currently xlate_rwlock is recursively acquired.
(xlate_send_packet -> ofproto_dpif_execute_actions -> xlate_actions)
Due to writer-preference in rwlock implementations, this causes
deadlock if another thread tries to acquire the lock exclusively
behind us.
This change avoids the problem by making xlate_send_packet drop
the lock before calling ofproto_dpif_execute_actions. This is the
simplest fix but opens a race window against port reconfigurations.
Given the way xlate_send_packet is currently used, the race does not
seem a big problem. An alternative would be passing down the
"xlate_rwlock is held" info to ofproto_dpif_execute_actions.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>