1. 23 9月, 2018 1 次提交
  2. 17 9月, 2018 1 次提交
  3. 19 7月, 2018 1 次提交
  4. 30 6月, 2018 1 次提交
  5. 28 4月, 2018 1 次提交
  6. 19 4月, 2018 2 次提交
  7. 06 4月, 2018 4 次提交
    • M
      hv_netvsc: Pass net_device parameter to revoke and teardown functions · 3f076eff
      Mohammed Gamal 提交于
      The callers to netvsc_revoke_*_buf() and netvsc_teardown_*_gpadl()
      already have their net_device instances. Pass them as a paramaeter to
      the function instead of obtaining them from netvsc_device struct
      everytime
      Signed-off-by: NMohammed Gamal <mgamal@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3f076eff
    • M
      hv_netvsc: Ensure correct teardown message sequence order · a56d99d7
      Mohammed Gamal 提交于
      Prior to commit 0cf73780 ("hv_netvsc: netvsc_teardown_gpadl() split")
      the call sequence in netvsc_device_remove() was as follows (as
      implemented in netvsc_destroy_buf()):
      1- Send NVSP_MSG1_TYPE_REVOKE_RECV_BUF message
      2- Teardown receive buffer GPADL
      3- Send NVSP_MSG1_TYPE_REVOKE_SEND_BUF message
      4- Teardown send buffer GPADL
      5- Close vmbus
      
      This didn't work for WS2016 hosts. Commit 0cf73780
      ("hv_netvsc: netvsc_teardown_gpadl() split") rearranged the
      teardown sequence as follows:
      1- Send NVSP_MSG1_TYPE_REVOKE_RECV_BUF message
      2- Send NVSP_MSG1_TYPE_REVOKE_SEND_BUF message
      3- Close vmbus
      4- Teardown receive buffer GPADL
      5- Teardown send buffer GPADL
      
      That worked well for WS2016 hosts, but it prevented guests on older hosts from
      shutting down after changing network settings. Commit 0ef58b0a
      ("hv_netvsc: change GPAD teardown order on older versions") ensured the
      following message sequence for older hosts
      1- Send NVSP_MSG1_TYPE_REVOKE_RECV_BUF message
      2- Send NVSP_MSG1_TYPE_REVOKE_SEND_BUF message
      3- Teardown receive buffer GPADL
      4- Teardown send buffer GPADL
      5- Close vmbus
      
      However, with this sequence calling `ip link set eth0 mtu 1000` hangs and the
      process becomes uninterruptible. On futher analysis it turns out that on tearing
      down the receive buffer GPADL the kernel is waiting indefinitely
      in vmbus_teardown_gpadl() for a completion to be signaled.
      
      Here is a snippet of where this occurs:
      int vmbus_teardown_gpadl(struct vmbus_channel *channel, u32 gpadl_handle)
      {
              struct vmbus_channel_gpadl_teardown *msg;
              struct vmbus_channel_msginfo *info;
              unsigned long flags;
              int ret;
      
              info = kmalloc(sizeof(*info) +
                             sizeof(struct vmbus_channel_gpadl_teardown), GFP_KERNEL);
              if (!info)
                      return -ENOMEM;
      
              init_completion(&info->waitevent);
              info->waiting_channel = channel;
      [....]
              ret = vmbus_post_msg(msg, sizeof(struct vmbus_channel_gpadl_teardown),
                                   true);
      
              if (ret)
                      goto post_msg_err;
      
              wait_for_completion(&info->waitevent);
      [....]
      }
      
      The completion is signaled from vmbus_ongpadl_torndown(), which gets called when
      the corresponding message is received from the host, which apparently never happens
      in that case.
      This patch works around the issue by restoring the first mentioned message sequence
      for older hosts
      
      Fixes: 0ef58b0a ("hv_netvsc: change GPAD teardown order on older versions")
      Signed-off-by: NMohammed Gamal <mgamal@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a56d99d7
    • M
      hv_netvsc: Split netvsc_revoke_buf() and netvsc_teardown_gpadl() · 7992894c
      Mohammed Gamal 提交于
      Split each of the functions into two for each of send/recv buffers.
      This will be needed in order to implement a fine-grained messaging
      sequence to the host so that we accommodate the requirements of
      different Windows versions
      
      Fixes: 0ef58b0a ("hv_netvsc: change GPAD teardown order on older versions")
      Signed-off-by: NMohammed Gamal <mgamal@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7992894c
    • M
      hv_netvsc: Use Windows version instead of NVSP version on GPAD teardown · 2afc5d61
      Mohammed Gamal 提交于
      When changing network interface settings, Windows guests
      older than WS2016 can no longer shutdown. This was addressed
      by commit 0ef58b0a ("hv_netvsc: change GPAD teardown order
      on older versions"), however the issue also occurs on WS2012
      guests that share NVSP protocol versions with WS2016 guests.
      Hence we use Windows version directly to differentiate them.
      
      Fixes: 0ef58b0a ("hv_netvsc: change GPAD teardown order on older versions")
      Signed-off-by: NMohammed Gamal <mgamal@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2afc5d61
  8. 26 3月, 2018 2 次提交
  9. 23 3月, 2018 4 次提交
  10. 18 3月, 2018 1 次提交
  11. 05 3月, 2018 4 次提交
  12. 14 12月, 2017 5 次提交
  13. 03 12月, 2017 3 次提交
  14. 08 11月, 2017 1 次提交
  15. 15 10月, 2017 2 次提交
  16. 01 10月, 2017 1 次提交
  17. 26 9月, 2017 1 次提交
  18. 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
  19. 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
  20. 17 8月, 2017 2 次提交
  21. 12 8月, 2017 1 次提交