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

Patrik Andersson R patrik.r.andersson at ericsson.com
Fri Dec 15 12:29:22 CET 2017


Hi Maxime,

apologies for the late answer.

Yes I would think that it would solve the problem that we had. But
there is a slight risk that a driver in a VM (not within our area of 
influence) was partly responsible for the severity of the fault and 
that we might again experience some difficulties even with your
change. Though the risk is likely to be very low.

However, if your patch protects the file descriptors when in use I 
would consider that a better solution than doing the extra writes
on the full queue.

I would recommend going with your solution rather than the one
suggested by us.

Regards,

Patrik



Från: Maxime Coquelin <maxime.coquelin at redhat.com>
Skickat: den 8 december 2017 17:11
Till: Ágota Benyhe; dev at dpdk.org
Kopia: Patrik Andersson R; Yuanhan Liu; Jianfeng Tan
Ämne: Re: [dpdk-dev] [PATCH v2] virtio_net: kick guest even when virtio queue is full
  

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