[dpdk-dev] [PATCH v2] vhost: Fix reset_owner message handling not to clear callfd

Tetsuya Mukawa mukawa at igel.co.jp
Tue Nov 24 05:42:49 CET 2015


On 2015/11/20 20:21, Yuanhan Liu wrote:
> On Thu, Nov 19, 2015 at 06:07:00PM +0900, Tetsuya Mukawa wrote:
>> The patch fixes reset_owner message handling not to clear callfd,
>> because callfd will be valid while connection is establihed.
>>
>> Signed-off-by: Tetsuya Mukawa <mukawa at igel.co.jp>
> ....
>>  
>>  /*
>> @@ -467,6 +486,7 @@ static int
>>  reset_owner(struct vhost_device_ctx ctx)
>>  {
>>  	struct virtio_net *dev;
>> +	uint32_t i;
>>  
>>  	dev = get_device(ctx);
>>  	if (dev == NULL)
>> @@ -475,7 +495,19 @@ reset_owner(struct vhost_device_ctx ctx)
>>  	if (dev->flags & VIRTIO_DEV_RUNNING)
>>  		notify_destroy_device(dev);
>>  
>> -	cleanup_device(dev);
> I would suggest to introduce the destory flag to cleanup_device() as
> well,  so that we don't have to unfold the cleanup_device code here.
>
> (BTW, I should've reviewed this patch this morning, but I was busy).

Thanks, I will submit it again.

Tetsuya



More information about the dev mailing list