Acked-by: Daniele Di Proietto <ddiproie...@vmware.com>
On 9/15/14, 2:18 PM, "Alex Wang" <al...@nicira.com> wrote: >dpdk_eth_dev_init() must be called with dpdk_mutex. However, >netdev_dpdk_set_multiq() fails to follow this rule. This commit >fixes this breach. > >Found by clang. > >Signed-off-by: Alex Wang <al...@nicira.com> > >--- >- Move dpdk_mutex after the if statement. > >--- > lib/netdev-dpdk.c | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c >index e66eb6e..1e12e8b 100644 >--- a/lib/netdev-dpdk.c >+++ b/lib/netdev-dpdk.c >@@ -622,6 +622,7 @@ netdev_dpdk_set_multiq(struct netdev *netdev_, >unsigned int n_txq, > return err; > } > >+ ovs_mutex_lock(&dpdk_mutex); > ovs_mutex_lock(&netdev->mutex); > rte_eth_dev_stop(netdev->port_id); > netdev->up.n_txq = n_txq; >@@ -632,6 +633,7 @@ netdev_dpdk_set_multiq(struct netdev *netdev_, >unsigned int n_txq, > netdev_dpdk_set_txq(netdev, n_txq); > } > ovs_mutex_unlock(&netdev->mutex); >+ ovs_mutex_unlock(&dpdk_mutex); > > return err; > } >-- >1.7.9.5 > >_______________________________________________ >dev mailing list >dev@openvswitch.org >https://urldefense.proofpoint.com/v1/url?u=http://openvswitch.org/mailman/ >listinfo/dev&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=MV9BdLjtFIdhBDBaw5z%2BU >6SSA2gAfY4L%2F1HCy3VjlKU%3D%0A&m=DTlvidGdBTIq%2B92%2FjC2WfORnP0m4U2ECLfjWI >dx0fxg%3D%0A&s=b51d3bc415af138877394bfadf8e445acb0cb6488b8256acc2660513884 >1d88f _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev