Re: [PATCH net] hv_netvsc: preserve hw_features on mtu/channels/ringparam changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Haiyang Zhang <haiyangz@xxxxxxxxxxxxx> writes:

>> -----Original Message-----
>> From: Vitaly Kuznetsov [mailto:vkuznets@xxxxxxxxxx]
>> Sent: Tuesday, November 14, 2017 11:58 AM
>> To: Stephen Hemminger <stephen@xxxxxxxxxxxxxxxxxx>
>> Cc: netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
>> devel@xxxxxxxxxxxxxxxxxxxxxx; KY Srinivasan <kys@xxxxxxxxxxxxx>; Haiyang
>> Zhang <haiyangz@xxxxxxxxxxxxx>; Stephen Hemminger
>> <sthemmin@xxxxxxxxxxxxx>; Mohammed Gamal <mmorsy@xxxxxxxxxx>
>> Subject: Re: [PATCH net] hv_netvsc: preserve hw_features on
>> mtu/channels/ringparam changes
>> 
>> Stephen Hemminger <stephen@xxxxxxxxxxxxxxxxxx> writes:
>> 
>> > On Tue, 14 Nov 2017 16:22:05 +0100
>> > Vitaly Kuznetsov <vkuznets@xxxxxxxxxx> wrote:
>> >
>> > Yes, this looks like a real issue.
>> >
>> >> +	/* Query hardware capabilities if we're called from netvsc_probe() */
>> >> +	if (!net->hw_features) {
>> >> +		ret = rndis_netdev_set_hwcaps(net_device, rndis_device);
>> >> +		if (ret != 0)
>> >> +			goto err_dev_remv;
>> >> +	}
>> >> +
>> >
>> > Rather than conditional behavior in rndis_filter_device_add, it would
>> > be cleaner to make the call to get hardware capabilities there.
>> >
>> > Please respin and make the query of host a separate function.
>> 
>> You mean call rndis_netdev_set_hwcaps() from netvsc_probe()? Will do.
>> 
>> One question though: in case we'll be avoiding
>> rndis_filter_set_offload_params() call on mtu/channels/ringparam changes -
>> - can we trust the host to preserve what was there before the RNDIS reset?
>> In case not we'll have to untangle what is
>> rndis_netdev_set_hwcaps() in my patch splitting it into two: hw_features
>> setup and rndis_filter_set_offload_params() and leaving the later in
>> rndis_filter_device_add().
>
> After remove/re-add RNDIS dev, you should pass the parameters to the host
> again.
>

Thanks, this changes a lot. I'll prepare v2.

-- 
  Vitaly
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux