[dpdk-stable] [PATCH v3 1/8] vhost: fix virtio ready flag check

Ferruh Yigit ferruh.yigit at intel.com
Wed Jul 8 16:22:44 CEST 2020


On 7/7/2020 4:21 AM, Xia, Chenbo wrote:
> 
>> -----Original Message-----
>> From: Adrian Moreno <amorenoz at redhat.com>
>> Sent: Monday, July 6, 2020 7:25 PM
>> To: dev at dpdk.org; Xia, Chenbo <chenbo.xia at intel.com>; Ye, Xiaolong
>> <xiaolong.ye at intel.com>; shahafs at mellanox.com; matan at mellanox.com;
>> maxime.coquelin at redhat.com; Wang, Xiao W <xiao.w.wang at intel.com>;
>> viacheslavo at mellanox.com
>> Cc: jasowang at redhat.com; lulu at redhat.com; stable at dpdk.org
>> Subject: [PATCH v3 1/8] vhost: fix virtio ready flag check
>>
>> From: Maxime Coquelin <maxime.coquelin at redhat.com>
>>
>> Before checking whether the device is ready is done a check on whether the
>> RUNNING flag is set. Then the READY flag is set if virtio_is_ready() returns true.
>>
>> While it seems to not cause any issue, it makes more sense to check whether the
>> READY flag is set and not the RUNNING one.
>>
>> Fixes: c0674b1bc898 ("vhost: move the device ready check at proper place")
>> Cc: stable at dpdk.org
>>
>> Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
>> ---
>>  lib/librte_vhost/vhost_user.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index
>> 6039a8fdb..5750dde6d 100644
>> --- a/lib/librte_vhost/vhost_user.c
>> +++ b/lib/librte_vhost/vhost_user.c
>> @@ -2825,7 +2825,7 @@ vhost_user_msg_handler(int vid, int fd)
>>  	}
>>
>>
>> -	if (!(dev->flags & VIRTIO_DEV_RUNNING) && virtio_is_ready(dev)) {
>> +	if (!(dev->flags & VIRTIO_DEV_READY) && virtio_is_ready(dev)) {
>>  		dev->flags |= VIRTIO_DEV_READY;
>>
>>  		if (!(dev->flags & VIRTIO_DEV_RUNNING)) {
>> --
>> 2.26.2
> 
> Reviewed-by: Chenbo Xia <chenbo.xia at intel.com>
> 

Series applied to dpdk-next-net/master, thanks.


More information about the stable mailing list