Thread (1 message) 1 message, 1 author, 2017-11-15

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

From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: 2017-11-15 09:43:31
Also in: lkml

Haiyang Zhang [off-list ref] writes:
quoted
-----Original Message-----
From: Vitaly Kuznetsov [mailto:vkuznets@redhat.com]
Sent: Tuesday, November 14, 2017 11:58 AM
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org;
devel@linuxdriverproject.org; KY Srinivasan [off-list ref]; Haiyang
Zhang [off-list ref]; Stephen Hemminger
[off-list ref]; Mohammed Gamal [off-list ref]
Subject: Re: [PATCH net] hv_netvsc: preserve hw_features on
mtu/channels/ringparam changes

Stephen Hemminger [off-list ref] writes:
quoted
On Tue, 14 Nov 2017 16:22:05 +0100
Vitaly Kuznetsov [off-list ref] wrote:

Yes, this looks like a real issue.
quoted
+	/* 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help