[dpdk-dev] [PATCH v2] virtio_net: kick guest even when virtio queue is full

Maxime Coquelin maxime.coquelin at redhat.com
Fri Dec 8 17:11:30 CET 2017


Hi Agota, Patrick,

On 12/05/2017 12:30 PM, Agota Benyhe wrote:
> From: Patrik Andersson R<patrik.r.andersson at ericsson.com>
> 
> Changing the vring call file descriptor during virtio device enqueue
> operation may lead to "kick" on a file descriptor that is closed. As
> a consequence the guest might not be notified of new packets in the
> enqueue.
> 
> The suggested change will add some extra load on DPDK and on the
> guest if the queue is frequently full. Any application using DPDK
> should avoid attempting retransmissions when the zero packets are
> enqueued.
> 
> To overcome this problem, the kick operation in virtio_dev_merge_rx()
> was excluded from the pkt_idx > 0 condition. A similar change was
> done in virtio_dev_rx().
> 
> Signed-off-by: Patrik Andersson R<patrik.r.andersson at ericsson.com>
> Signed-off-by: Agota Benyhe<agota.benyhe at ericsson.com>
> ---
>   lib/librte_vhost/virtio_net.c | 23 +++++++++++++----------
>   1 file changed, 13 insertions(+), 10 deletions(-)

We are working on a patch that protects enqueue & dequeue paths from
vhost-user requests handling.
For your case, it would protect call_fd to be changed while vring is
being processed by the PMD thread.

Do you think that would solve the problem you are facing?

Regards,
Maxime


More information about the dev mailing list