1. 25 1月, 2017 2 次提交
  2. 12 1月, 2017 1 次提交
  3. 09 1月, 2017 1 次提交
  4. 08 12月, 2016 1 次提交
  5. 30 10月, 2016 1 次提交
  6. 27 10月, 2016 1 次提交
    • S
      netvsc: fix incorrect receive checksum offloading · e52fed71
      Stephen Hemminger 提交于
      The Hyper-V netvsc driver was looking at the incorrect status bits
      in the checksum info. It was setting the receive checksum unnecessary
      flag based on the IP header checksum being correct. The checksum
      flag is skb is about TCP and UDP checksum status. Because of this
      bug, any packet received with bad TCP checksum would be passed
      up the stack and to the application causing data corruption.
      The problem is reproducible via netcat and netem.
      
      This had a side effect of not doing receive checksum offload
      on IPv6. The driver was also also always doing checksum offload
      independent of the checksum setting done via ethtool.
      Signed-off-by: NStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e52fed71
  7. 21 10月, 2016 1 次提交
    • J
      net: use core MTU range checking in virt drivers · d0c2c997
      Jarod Wilson 提交于
      hyperv_net:
      - set min/max_mtu, per Haiyang, after rndis_filter_device_add
      
      virtio_net:
      - set min/max_mtu
      - remove virtnet_change_mtu
      
      vmxnet3:
      - set min/max_mtu
      
      xen-netback:
      - min_mtu = 0, max_mtu = 65517
      
      xen-netfront:
      - min_mtu = 0, max_mtu = 65535
      
      unisys/visor:
      - clean up defines a little to not clash with network core or add
        redundat definitions
      
      CC: netdev@vger.kernel.org
      CC: virtualization@lists.linux-foundation.org
      CC: "K. Y. Srinivasan" <kys@microsoft.com>
      CC: Haiyang Zhang <haiyangz@microsoft.com>
      CC: "Michael S. Tsirkin" <mst@redhat.com>
      CC: Shrikrishna Khare <skhare@vmware.com>
      CC: "VMware, Inc." <pv-drivers@vmware.com>
      CC: Wei Liu <wei.liu2@citrix.com>
      CC: Paul Durrant <paul.durrant@citrix.com>
      CC: David Kershner <david.kershner@unisys.com>
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Reviewed-by: NHaiyang Zhang <haiyangz@microsoft.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d0c2c997
  8. 19 10月, 2016 1 次提交
    • A
      net/hyperv: avoid uninitialized variable · 52ccd631
      Arnd Bergmann 提交于
      The hdr_offset variable is only if we deal with a TCP or UDP packet,
      but as the check surrounding its usage tests for skb_is_gso()
      instead, the compiler has no idea if the variable is initialized
      or not at that point:
      
      drivers/net/hyperv/netvsc_drv.c: In function ‘netvsc_start_xmit’:
      drivers/net/hyperv/netvsc_drv.c:494:42: error: ‘hdr_offset’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      This adds an additional check for the transport type, which
      tells the compiler that this path cannot happen. Since the
      get_net_transport_info() function should always be inlined
      here, I don't expect this to result in additional runtime
      checks.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      52ccd631
  9. 13 10月, 2016 2 次提交
  10. 23 9月, 2016 6 次提交
  11. 24 8月, 2016 5 次提交
  12. 16 8月, 2016 5 次提交
  13. 09 8月, 2016 2 次提交
  14. 26 7月, 2016 1 次提交
  15. 06 6月, 2016 3 次提交
  16. 04 6月, 2016 1 次提交
  17. 17 5月, 2016 5 次提交
    • V
      hv_netvsc: synchronize netvsc_change_mtu()/netvsc_set_channels() with netvsc_remove() · 6da7225f
      Vitaly Kuznetsov 提交于
      When netvsc device is removed during mtu change or channels setup we get
      into troubles as both paths are trying to remove the device. Synchronize
      them with start_remove flag and rtnl lock.
      Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6da7225f
    • V
      hv_netvsc: get rid of struct net_device pointer in struct netvsc_device · 0a1275ca
      Vitaly Kuznetsov 提交于
      Simplify netvsvc pointer graph by getting rid of the redundant ndev
      pointer. We can always get a pointer to struct net_device from somewhere
      else.
      Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0a1275ca
    • V
      hv_netvsc: untangle the pointer mess · 3d541ac5
      Vitaly Kuznetsov 提交于
      We have the following structures keeping netvsc adapter state:
      - struct net_device
      - struct net_device_context
      - struct netvsc_device
      - struct rndis_device
      - struct hv_device
      and there are pointers/dependencies between them:
      - struct net_device_context is contained in struct net_device
      - struct hv_device has driver_data pointer which points to
        'struct net_device' OR 'struct netvsc_device' depending on driver's
        state (!).
      - struct net_device_context has a pointer to 'struct hv_device'.
      - struct netvsc_device has pointers to 'struct hv_device' and
        'struct net_device_context'.
      - struct rndis_device has a pointer to 'struct netvsc_device'.
      
      Different functions get different structures as parameters and use these
      pointers for traveling. The problem is (in addition to keeping in mind
      this complex graph) that some of these structures (struct netvsc_device
      and struct rndis_device) are being removed and re-created on mtu change
      (as we implement it as re-creation of hyper-v device) so our travel using
      these pointers is dangerous.
      
      Simplify this to a the following:
      - add struct netvsc_device pointer to struct net_device_context (which is
        a part of struct net_device and thus never disappears)
      - remove struct hv_device and struct net_device_context pointers from
        struct netvsc_device
      - replace pointer to 'struct netvsc_device' with pointer to
        'struct net_device'.
      - always keep 'struct net_device' in hv_device driver_data.
      
      We'll end up with the following 'circular' structure:
      
      net_device:
       [net_device_context] -> netvsc_device -> rndis_device -> net_device
                            -> hv_device -> net_device
      
      On MTU change we'll be removing the 'netvsc_device -> rndis_device'
      branch and re-creating it making the synchronization easier.
      
      There is one additional redundant pointer left, it is struct net_device
      link in struct netvsc_device, it is going to be removed in a separate
      commit.
      Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3d541ac5
    • V
      hv_netvsc: use start_remove flag to protect netvsc_link_change() · 1bdcec8a
      Vitaly Kuznetsov 提交于
      netvsc_link_change() can race with netvsc_change_mtu() or
      netvsc_set_channels() as these functions destroy struct netvsc_device and
      rndis filter. Use start_remove flag for syncronization. As
      netvsc_change_mtu()/netvsc_set_channels() are called with rtnl lock held
      we need to take it before checking start_remove value in
      netvsc_link_change().
      Reported-by: NHaiyang Zhang <haiyangz@microsoft.com>
      Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1bdcec8a
    • V
      hv_netvsc: move start_remove flag to net_device_context · f580aec4
      Vitaly Kuznetsov 提交于
      struct netvsc_device is destroyed on mtu change so keeping the
      protection flag there is not a good idea. Move it to struct
      net_device_context which is preserved.
      Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f580aec4
  18. 25 4月, 2016 1 次提交