[ovs-dev] [PATCH] netdev-dpdk: add sflow support for vhost-user ports
Kavanagh, Mark B
mark.b.kavanagh at intel.com
Mon May 9 07:54:35 UTC 2016
>
>On Thu, May 05, 2016 at 12:18:52PM +0000, Kavanagh, Mark B wrote:
>> >+ if ((ret = netdev_dpdk_lookup_vhost_id(dev)) >= 0) {
>> >+ ifindex = VHOST_ID_TO_IFINDEX(ret);
>> >+ } else {
>> >+ ifindex = 0;
>>
>> I don't think that 0 is an appropriate value to return here, since it
>> overlaps with a kernel interface's index.
>
>0 is never a valid ifindex value, at least on a POSIX system, since it
>is the error return value from if_nametoindex(), see:
> http://pubs.opengroup.org/onlinepubs/009695399/functions/if_nametoindex.html
Good to know Ben - thanks for the link!
More information about the dev
mailing list