On Fri, Aug 07, 2015 at 08:43:23AM -0400, Thomas F Herbert wrote: > On 8/6/15 5:29 PM, Flavio Leitner wrote: > >On Thu, Aug 06, 2015 at 03:24:29PM -0400, Thomas F Herbert wrote: > >>On 8/6/15 1:40 PM, Flavio Leitner wrote: > >>>On Thu, Aug 06, 2015 at 12:39:29PM -0400, Thomas F Herbert wrote: > >>>>On 7/31/15 6:30 PM, Flavio Leitner wrote: > >>>>>This RFC is based on the vhost multiple queues work on > >>>>>dpdk-dev: http://dpdk.org/ml/archives/dev/2015-June/019345.html > >>>>> > >>>>>Signed-off-by: Flavio Leitner <f...@redhat.com> > >>>>>--- > >>>>> lib/netdev-dpdk.c | 61 > >>>>> ++++++++++++++++++++++++++++++++++++------------------- > >>>>> 1 file changed, 40 insertions(+), 21 deletions(-) > >>>>> > >>>>>diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c > >>>>>index 5ae805e..493172c 100644 > >>>>>--- a/lib/netdev-dpdk.c > >>>>>+++ b/lib/netdev-dpdk.c > >>>>>@@ -215,12 +215,9 @@ struct netdev_dpdk { > >>>>> * If the numbers match, 'txq_needs_locking' is false, otherwise > >>>>> it is > >>>>> * true and we will take a spinlock on transmission */ > >>>>> int real_n_txq; > >>>>>+ int real_n_rxq; > >>>>> bool txq_needs_locking; > >>>>> > >>>>>- /* Spinlock for vhost transmission. Other DPDK devices use > >>>>>spinlocks in > >>>>>- * dpdk_tx_queue */ > >>>>>- rte_spinlock_t vhost_tx_lock; > >>>>>- > >>>>> /* virtio-net structure for vhost device */ > >>>>> OVSRCU_TYPE(struct virtio_net *) virtio_dev; > >>>>> > >>>>>@@ -602,13 +599,10 @@ dpdk_dev_parse_name(const char dev_name[], const > >>>>>char prefix[], > >>>>> static int > >>>>> vhost_construct_helper(struct netdev *netdev_) OVS_REQUIRES(dpdk_mutex) > >>>>> { > >>>>>- struct netdev_dpdk *netdev = netdev_dpdk_cast(netdev_); > >>>>>- > >>>>> if (rte_eal_init_ret) { > >>>>> return rte_eal_init_ret; > >>>>> } > >>>>> > >>>>>- rte_spinlock_init(&netdev->vhost_tx_lock); > >>>>> return netdev_dpdk_init(netdev_, -1, DPDK_DEV_VHOST); > >>>>> } > >>>>> > >>>>>@@ -791,9 +785,16 @@ netdev_dpdk_vhost_set_multiq(struct netdev > >>>>>*netdev_, unsigned int n_txq, > >>>>> ovs_mutex_lock(&dpdk_mutex); > >>>>> ovs_mutex_lock(&netdev->mutex); > >>>>> > >>>>>+ rte_free(netdev->tx_q); > >>>>>+ /* FIXME: the number of vqueues needs to match */ > >>Do you still need this "FIXME?" Isn't the code you added below freeing and > >>re-allocating the correct number of tx queues? > > > >Yes, because that is about virtual queues provided by qemu. > >Thanks, > >fbl > I understand this is an RFC but I think your patch is in the right > direction. I know the merging is complex and requires upstream changes to > DPDK and Qemu. I ack this patch is an important step that moves the ball > forward toward vhost user performance of DPDK accelerated OVS.
Thanks for your review fbl _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev