Following is Ethan's reply from a almost same RFC patch I sent just to him earlier,
Repost it here, so that all following comments can be made on this thread. """ In xlate_send_packet() you aren't allow to hold the xlate_rwlock while calling xlate_actions(). There are two options to deal with this. (1) make a new xlate_actions_unsafe() function internal to ofproto-dpif-xlate which doesn't take the xlate_rwlock, and call that. (2) Take the xlate_rwlock, compose the xin, release the xlate_rwlock, and call xlate_actions. The ofproto_dpif_send_packet() function isn't thread safe. You aren't allowed to dereference ofport even to do an ofport->up.ofproto. Furthermore, incrementing the stats.tx_packets isn't thread safe without a mutex. The ++ operation isn't atomic. Ben, how do you feel about ditching ofproto_dpif's stats member? It doesn't seem like a particularly important feature to me, and I think it's going to be annoying to implement in a thread safe manner. """
_______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev