[PATCH net-next] hv_netvsc: fix vf serial matching with pci slot info

Vitaly Kuznetsov vkuznets at redhat.com
Fri Oct 12 06:27:45 UTC 2018


Haiyang Zhang <haiyangz at microsoft.com> writes:

>> -----Original Message-----
>> From: Haiyang Zhang <haiyangz at linuxonhyperv.com>
>> Sent: Thursday, October 11, 2018 4:15 PM
>> To: davem at davemloft.net; netdev at vger.kernel.org
>> Cc: Haiyang Zhang <haiyangz at microsoft.com>; KY Srinivasan
>> <kys at microsoft.com>; Stephen Hemminger <sthemmin at microsoft.com>;
>> olaf at aepfle.de; vkuznets <vkuznets at redhat.com>;
>> devel at linuxdriverproject.org; linux-kernel at vger.kernel.org
>> Subject: [PATCH net-next] hv_netvsc: fix vf serial matching with pci slot info
>> 
>> From: Haiyang Zhang <haiyangz at microsoft.com>
>> 
>> The VF device's serial number is saved as a string in PCI slot's kobj name, not
>> the slot->number. This patch corrects the netvsc driver, so the VF device can be
>> successfully paired with synthetic NIC.
>> 
>> Fixes: 00d7ddba1143 ("hv_netvsc: pair VF based on serial number")
>> Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com>
>
> Thanks Stephen for the reminder -- I added the "reported-by" here:
>
> Reported-by: Vitaly Kuznetsov <vkuznets at redhat.com>

Thanks) 

The difference in the hack I sent to Stephen was that instead of using
kstrtou32() and checking the return value I opted for snprintf() and
doing strncmp().

-- 
Vitaly


More information about the devel mailing list