[dpdk-dev] [PATCH] pmd_virtio: Unchecked return value from library

Tan, Jianfeng jianfeng.tan at intel.com
Mon Oct 16 16:51:36 CEST 2017


Hi Sebastian,

Sorry for the late response. I missed the previous emails.

On 10/16/2017 4:32 PM, Basierski, SebastianX wrote:
>>   			flags = fcntl(dev->vhostfd, F_GETFL);
>> -			fcntl(dev->vhostfd, F_SETFL, flags | O_NONBLOCK);
>> +			if (fcntl(dev->vhostfd, F_SETFL,
>> +					flags | O_NONBLOCK) == -1)
>> +				return;
> Actually, even it fails, I still prefer to continue instead of "return" here. Maybe, we can report an error message here.
>
> Thanks,
> Jianfeng
>
>
>
> Hi Jianfeng,
>
> I'like to continue with the task.
> So please let me know if You are certain with Your option:
> continue instead of return (and add error report), despite possibility of returning error from fcntl.

Even "return" directly, please add an error message here so that users 
can notice such error.

Besides, the subject can be changed to:
   "net/virtio: fix unchecked return value"

Thanks,
Jianfeng


More information about the dev mailing list