[ovs-dev] [PATCH RFC v4] netdev-dpdk: vhost-user: Fix sending packets to queues not enabled by guest.

Daniele Di Proietto diproiettod at vmware.com
Wed Feb 24 21:54:10 UTC 2016


Thanks Ilya and Flavio, I fixed a clang warning and applied this
to master and branch-2.5

On 24/02/2016 08:17, "Flavio Leitner" <fbl at sysclose.org> wrote:

>On Wed, 24 Feb 2016 17:14:43 +0300
>Ilya Maximets <i.maximets at samsung.com> wrote:
>
>> Currently virtio driver in guest operating system have to be configured
>> to use exactly same number of queues. If number of queues will be less,
>> some packets will get stuck in queues unused by guest and will not be
>> received.
>> 
>> Fix that by using new 'vring_state_changed' callback, which is
>> available for vhost-user since DPDK 2.2.
>> Implementation uses additional mapping from configured tx queues to
>> enabled by virtio driver. This requires mandatory locking of TX queues
>> in __netdev_dpdk_vhost_send(), but this locking was almost always anyway
>> because of calling set_multiq with n_txq = 'ovs_numa_get_n_cores() + 1'.
>> 
>> OVS_VHOST_MAX_QUEUE_NUM = 1024 chosen based on the fact that this is
>> the maximum number of queues supported by QEMU.
>> 
>> Fixes: 4573fbd38fa1 ("netdev-dpdk: Add vhost-user multiqueue support")
>> Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
>> ---
>> 
>> version 4:
>> 	* VHOST_MAX_QUEUE_PAIRS replaced with OVS_VHOST_MAX_QUEUE_NUM
>> 
>> version 3:
>> 	* Fixed size in dpdk_rte_mzalloc() for enabled_queues.
>> 	* Fixed possible segfault because of unallocated tx_q[].
>> 	* Added remap of tx queues after real_n_txq modification
>> 	  in netdev_dpdk_vhost_set_queues().
>> 
>>  lib/netdev-dpdk.c | 114
>>+++++++++++++++++++++++++++++++++++++++++++++++-------
>>  1 file changed, 99 insertions(+), 15 deletions(-)
>> 
>
>Acked-by: Flavio Leitner <fbl at sysclose.org>
>
>It would be great if this gets applied to branch-2.5 as well.
>
>Thanks Ilya!
>-- 
>fbl
>




More information about the dev mailing list