On 11/11/20 7:06 AM, Xueming(Steven) Li wrote:
>> @@ -1012,16 +1018,13 @@ vhost_user_set_mem_table(struct virtio_net
>> **pdev, struct VhostUserMsg *msg,
>> if (memory->nregions > VHOST_MEMORY_MAX_NREGIONS) {
>> VHOST_LOG_CONFIG(ERR,
>> "too many memory regions (%u)\n", memory-
>>> nregions);
>> - return RTE_VHOST_MSG_RESULT_ERR;
>> + goto close_msg_fds;
>> }
>>
>> if (dev->mem && !vhost_memory_changed(memory, dev->mem)) {
>> VHOST_LOG_CONFIG(INFO,
>> "(%d) memory regions not changed\n", dev->vid);
>> -
>> - close_msg_fds(msg);
>> -
>> - return RTE_VHOST_MSG_RESULT_OK;
>> + goto close_msg_fds;
> Return code will be changed to RTE_VHOST_MSG_RESULT_ERR, is this ok?
>
Good catch, that is not OK to return RTE_VHOST_MSG_RESULT_ERR here.
Will fix in v3.
Thanks!
Maxime