[dpdk-dev] [PATCH v2 3/3] net/vhost: fix interrupt mode

Maxime Coquelin maxime.coquelin at redhat.com
Wed Jul 29 09:52:51 CEST 2020



On 7/28/20 9:03 PM, Matan Azrad wrote:
> 
> 
> From: Maxime Coquelin:
>> At .new_device() time, only the first vring pair is now ready, other vrings are
>> consfigured later.
>>
>> Problem is that when application will setup and enable interrupts, only the
>> first queue pair Rx interrupt will be enabled.
>>
>> This patches fixes the issue by setting the number of max interrupts to the
>> number of Rx queues that will be later initialized. Then, as soon as a Rx vring
>> is ready, it removes the corresponding uninitialized epoll event, and install a
>> new one with the valid FD.
> 
> Doesn't it race condition to the application decision?
> App may change the configuration per queue in any time by the app control thread.
> The vhost PMD may change it usynchronically from the vhost control thread in the vring state callback.

Yes you are right there could be a race here,I'm looking into getting it
done in a safe way. Yet it is good to get the confirmation from Intel
that it does fix the problem on their side.

Based on David suggestion, it might be made safe by relying on
eth_rxq_intr_enable()/eth_rxq_intr_disable().

If we cannot solve it in a safe way, then we'll have no other choice
than reverting partially your patch.

Maxime

> I already mentioned it in other thread on this topic but didn't get reply.
> 
>> Fixes: 604052ae5395 ("net/vhost: support queue update")
>>
>> Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
> 



More information about the dev mailing list