On 6/26/20 12:30 PM, Adrian Moreno wrote:
>>      for (i = 0; i < MAX_VHOST_DEVICE; ++i) {
>> @@ -100,7 +100,7 @@ rte_vdpa_find_device_id(struct rte_vdpa_dev_addr *addr)
>>              if (dev->ops == NULL)
>>                      continue;
>>  
>> -            if (is_same_vdpa_device(&dev->addr, addr))
>> +            if (strcmp(dev->device->name, name) == 0)
>>                      return i;
>>      }
> Considering this function is exposed to the API, I'd consider using
> strncmp(dev->device->name, name, RTE_DEV_NAME_MAX_LEN)
> 
> 

Right, I'll do that in v3.

Thanks,
Maxime

Reply via email to