1. 15 6月, 2018 1 次提交
  2. 13 6月, 2018 2 次提交
  3. 29 5月, 2018 1 次提交
  4. 11 5月, 2018 1 次提交
  5. 19 4月, 2018 2 次提交
  6. 26 3月, 2018 1 次提交
  7. 23 3月, 2018 1 次提交
    • S
      hv_netvsc: common detach logic · 7b2ee50c
      Stephen Hemminger 提交于
      Make common function for detaching internals of device
      during changes to MTU and RSS. Make sure no more packets
      are transmitted and all packets have been received before
      doing device teardown.
      
      Change the wait logic to be common and use usleep_range().
      
      Changes transmit enabling logic so that transmit queues are disabled
      during the period when lower device is being changed. And enabled
      only after sub channels are setup. This avoids issue where it could
      be that a packet was being sent while subchannel was not initialized.
      
      Fixes: 8195b139 ("hv_netvsc: fix deadlock on hotplug")
      Signed-off-by: NStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7b2ee50c
  8. 09 3月, 2018 1 次提交
  9. 14 12月, 2017 7 次提交
  10. 03 12月, 2017 2 次提交
  11. 16 11月, 2017 1 次提交
    • V
      hv_netvsc: preserve hw_features on mtu/channels/ringparam changes · aefd80e8
      Vitaly Kuznetsov 提交于
      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: NVitaly Kuznetsov <vkuznets@redhat.com>
      Reviewed-by: NHaiyang Zhang <haiyangz@microsoft.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      aefd80e8
  12. 15 10月, 2017 2 次提交
  13. 09 10月, 2017 1 次提交
  14. 01 10月, 2017 1 次提交
  15. 22 9月, 2017 1 次提交
    • A
      hv_netvsc: fix send buffer failure on MTU change · 0ab09bef
      Alex Ng 提交于
      If MTU is changed the host would reject the send buffer change.
      This problem is result of recent change to allow changing send
      buffer size.
      
      Every time we change the MTU, we store the previous net_device section
      count before destroying the buffer, but we don’t store the previous
      section size. When we reinitialize the buffer, its size is calculated
      by multiplying the previous count and previous size. Since we
      continuously increase the MTU, the host returns us a decreasing count
      value while the section size is reinitialized to 1728 bytes every
      time.
      
      This eventually leads to a condition where the calculated buf_size is
      so small that the host rejects it.
      
      Fixes: 8b532797 ("netvsc: allow controlling send/recv buffer size")
      Signed-off-by: NAlex Ng <alexng@microsoft.com>
      Signed-off-by: NStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0ab09bef
  16. 12 9月, 2017 1 次提交
    • S
      hv_netvsc: fix deadlock on hotplug · 8195b139
      Stephen Hemminger 提交于
      When a virtual device is added dynamically (via host console), then
      the vmbus sends an offer message for the primary channel. The processing
      of this message for networking causes the network device to then
      initialize the sub channels.
      
      The problem is that setting up the sub channels needs to wait until
      the subsequent subchannel offers have been processed. These offers
      come in on the same ring buffer and work queue as where the primary
      offer is being processed; leading to a deadlock.
      
      This did not happen in older kernels, because the sub channel waiting
      logic was broken (it wasn't really waiting).
      
      The solution is to do the sub channel setup in its own work queue
      context that is scheduled by the primary channel setup; and then
      happens later.
      
      Fixes: 732e4985 ("netvsc: fix race on sub channel creation")
      Reported-by: NDexuan Cui <decui@microsoft.com>
      Signed-off-by: NStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8195b139
  17. 02 9月, 2017 1 次提交
  18. 23 8月, 2017 1 次提交
    • H
      hv_netvsc: Add ethtool handler to set and get UDP hash levels · 4823eb2f
      Haiyang Zhang 提交于
      The patch add the functions to switch UDP hash level between
      L3 and L4 by ethtool command. UDP over IPv4 and v6 can be set
      differently. The default hash level is L4. We currently only
      allow switching TX hash level from within the guests.
      
      On Azure, fragmented UDP packets have high loss rate with L4
      hashing. Using L3 hashing is recommended in this case.
      
      For example, for UDP over IPv4 on eth0:
      To include UDP port numbers in hasing:
      	ethtool -N eth0 rx-flow-hash udp4 sdfn
      To exclude UDP port numbers in hasing:
      	ethtool -N eth0 rx-flow-hash udp4 sd
      To show UDP hash level:
      	ethtool -n eth0 rx-flow-hash udp4
      Signed-off-by: NHaiyang Zhang <haiyangz@microsoft.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4823eb2f
  19. 12 8月, 2017 3 次提交
  20. 09 8月, 2017 1 次提交
  21. 07 8月, 2017 1 次提交
    • S
      netvsc: fix race on sub channel creation · 732e4985
      stephen hemminger 提交于
      The existing sub channel code did not wait for all the sub-channels
      to completely initialize. This could lead to race causing crash
      in napi_netif_del() from bad list. The existing code would send
      an init message, then wait only for the initial response that
      the init message was received. It thought it was waiting for
      sub channels but really the init response did the wakeup.
      
      The new code keeps track of the number of open channels and
      waits until that many are open.
      
      Other issues here were:
        * host might return less sub-channels than was requested.
        * the new init status is not valid until after init was completed.
      
      Fixes: b3e6b82a ("hv_netvsc: Wait for sub-channels to be processed during probe")
      Signed-off-by: NStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      732e4985
  22. 03 8月, 2017 1 次提交
    • S
      netvsc: transparent VF management · 0c195567
      stephen hemminger 提交于
      This patch implements transparent fail over from synthetic NIC to
      SR-IOV virtual function NIC in Hyper-V environment. It is a better
      alternative to using bonding as is done now. Instead, the receive and
      transmit fail over is done internally inside the driver.
      
      Using bonding driver has lots of issues because it depends on the
      script being run early enough in the boot process and with sufficient
      information to make the association. This patch moves all that
      functionality into the kernel.
      Signed-off-by: NStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0c195567
  23. 30 7月, 2017 3 次提交
  24. 25 7月, 2017 1 次提交
  25. 20 7月, 2017 2 次提交