lkml.org 
[lkml]   [2017]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH net v2] hv_netvsc: preserve hw_features on mtu/channels/ringparam changes
Date


> -----Original Message-----
> From: Vitaly Kuznetsov [mailto:vkuznets@redhat.com]
> Sent: Wednesday, November 15, 2017 9:13 AM
> To: netdev@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org; KY
> Srinivasan <kys@microsoft.com>; Haiyang Zhang
> <haiyangz@microsoft.com>; Stephen Hemminger
> <sthemmin@microsoft.com>; Mohammed Gamal <mmorsy@redhat.com>
> Subject: [PATCH net v2] hv_netvsc: preserve hw_features on
> mtu/channels/ringparam changes
>
> rndis_filter_device_add() is called both from netvsc_probe() when we
> initially create the device and from set channels/mtu/ringparam
> routines where we basically remove the device and add it back.
>
> hw_features is reset in rndis_filter_device_add() and filled with
> host data. However, we lose all additional flags which are set outside
> of the driver, e.g. register_netdevice() adds NETIF_F_SOFT_FEATURES and
> many others.
>
> Unfortunately, calls to rndis_{query_hwcaps(), _set_offload_params()}
> calls cannot be avoided on every RNDIS reset: host expects us to set
> required features explicitly. Moreover, in theory hardware capabilities
> can change and we need to reflect the change in hw_features.
>
> Reset net->hw_features bits according to host data in
> rndis_netdev_set_hwcaps(), clear corresponding feature bits
> from net->features in case some features went missing (will never happen
> in real life I guess but let's be consistent).
>
> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>

Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>

Thank you!

\
 
 \ /
  Last update: 2017-11-15 17:06    [W:0.044 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site