1. 22 1月, 2014 2 次提交
  2. 13 1月, 2014 2 次提交
  3. 11 1月, 2014 1 次提交
    • J
      net: core: explicitly select a txq before doing l2 forwarding · f663dd9a
      Jason Wang 提交于
      Currently, the tx queue were selected implicitly in ndo_dfwd_start_xmit(). The
      will cause several issues:
      
      - NETIF_F_LLTX were removed for macvlan, so txq lock were done for macvlan
        instead of lower device which misses the necessary txq synchronization for
        lower device such as txq stopping or frozen required by dev watchdog or
        control path.
      - dev_hard_start_xmit() was called with NULL txq which bypasses the net device
        watchdog.
      - dev_hard_start_xmit() does not check txq everywhere which will lead a crash
        when tso is disabled for lower device.
      
      Fix this by explicitly introducing a new param for .ndo_select_queue() for just
      selecting queues in the case of l2 forwarding offload. netdev_pick_tx() was also
      extended to accept this parameter and dev_queue_xmit_accel() was used to do l2
      forwarding transmission.
      
      With this fixes, NETIF_F_LLTX could be preserved for macvlan and there's no need
      to check txq against NULL in dev_hard_start_xmit(). Also there's no need to keep
      a dedicated ndo_dfwd_start_xmit() and we can just reuse the code of
      dev_queue_xmit() to do the transmission.
      
      In the future, it was also required for macvtap l2 forwarding support since it
      provides a necessary synchronization method.
      
      Cc: John Fastabend <john.r.fastabend@intel.com>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Cc: e1000-devel@lists.sourceforge.net
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Acked-by: NNeil Horman <nhorman@tuxdriver.com>
      Acked-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f663dd9a
  4. 08 1月, 2014 1 次提交
  5. 03 1月, 2014 1 次提交
    • W
      ipv4: fix tunneled VM traffic over hw VXLAN/GRE GSO NIC · 7a7ffbab
      Wei-Chun Chao 提交于
      VM to VM GSO traffic is broken if it goes through VXLAN or GRE
      tunnel and the physical NIC on the host supports hardware VXLAN/GRE
      GSO offload (e.g. bnx2x and next-gen mlx4).
      
      Two issues -
      (VXLAN) VM traffic has SKB_GSO_DODGY and SKB_GSO_UDP_TUNNEL with
      SKB_GSO_TCP/UDP set depending on the inner protocol. GSO header
      integrity check fails in udp4_ufo_fragment if inner protocol is
      TCP. Also gso_segs is calculated incorrectly using skb->len that
      includes tunnel header. Fix: robust check should only be applied
      to the inner packet.
      
      (VXLAN & GRE) Once GSO header integrity check passes, NULL segs
      is returned and the original skb is sent to hardware. However the
      tunnel header is already pulled. Fix: tunnel header needs to be
      restored so that hardware can perform GSO properly on the original
      packet.
      Signed-off-by: NWei-Chun Chao <weichunc@plumgrid.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7a7ffbab
  6. 01 1月, 2014 1 次提交
    • D
      vlan: Fix header ops passthru when doing TX VLAN offload. · 2205369a
      David S. Miller 提交于
      When the vlan code detects that the real device can do TX VLAN offloads
      in hardware, it tries to arrange for the real device's header_ops to
      be invoked directly.
      
      But it does so illegally, by simply hooking the real device's
      header_ops up to the VLAN device.
      
      This doesn't work because we will end up invoking a set of header_ops
      routines which expect a device type which matches the real device, but
      will see a VLAN device instead.
      
      Fix this by providing a pass-thru set of header_ops which will arrange
      to pass the proper real device instead.
      
      To facilitate this add a dev_rebuild_header().  There are
      implementations which provide a ->cache and ->create but not a
      ->rebuild (f.e. PLIP).  So we need a helper function just like
      dev_hard_header() to avoid crashes.
      
      Use this helper in the one existing place where the
      header_ops->rebuild was being invoked, the neighbour code.
      
      With lots of help from Florian Westphal.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2205369a
  7. 30 12月, 2013 1 次提交
  8. 28 12月, 2013 1 次提交
  9. 25 12月, 2013 1 次提交
  10. 22 12月, 2013 1 次提交
    • B
      aio/migratepages: make aio migrate pages sane · 8e321fef
      Benjamin LaHaise 提交于
      The arbitrary restriction on page counts offered by the core
      migrate_page_move_mapping() code results in rather suspicious looking
      fiddling with page reference counts in the aio_migratepage() operation.
      To fix this, make migrate_page_move_mapping() take an extra_count parameter
      that allows aio to tell the code about its own reference count on the page
      being migrated.
      
      While cleaning up aio_migratepage(), make it validate that the old page
      being passed in is actually what aio_migratepage() expects to prevent
      misbehaviour in the case of races.
      Signed-off-by: NBenjamin LaHaise <bcrl@kvack.org>
      8e321fef
  11. 21 12月, 2013 2 次提交
  12. 19 12月, 2013 5 次提交
  13. 18 12月, 2013 1 次提交
  14. 17 12月, 2013 2 次提交
  15. 13 12月, 2013 5 次提交
  16. 12 12月, 2013 1 次提交
  17. 11 12月, 2013 5 次提交
  18. 08 12月, 2013 2 次提交
  19. 06 12月, 2013 2 次提交
    • P
      xen-netback: fix fragment detection in checksum setup · 1431fb31
      Paul Durrant 提交于
      The code to detect fragments in checksum_setup() was missing for IPv4 and
      too eager for IPv6. (It transpires that Windows seems to send IPv6 packets
      with a fragment header even if they are not a fragment - i.e. offset is zero,
      and M bit is not set).
      
      This patch also incorporates a fix to callers of maybe_pull_tail() where
      skb->network_header was being erroneously added to the length argument.
      Signed-off-by: NPaul Durrant <paul.durrant@citrix.com>
      Signed-off-by: NZoltan Kiss <zoltan.kiss@citrix.com>
      Cc: Wei Liu <wei.liu2@citrix.com>
      Cc: Ian Campbell <ian.campbell@citrix.com>
      Cc: David Vrabel <david.vrabel@citrix.com>
      cc: David Miller <davem@davemloft.net>
      Acked-by: NWei Liu <wei.liu2@citrix.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1431fb31
    • T
      percpu: fix spurious sparse warnings from DEFINE_PER_CPU() · b1a0fbfd
      Tejun Heo 提交于
      When CONFIG_DEBUG_FORCE_WEAK_PER_CPU or CONFIG_ARCH_NEEDS_WEAK_PER_CPU
      is set, DEFINE_PER_CPU() explodes into cryptic series of definitions
      to still allow using "static" for percpu variables while keeping all
      per-cpu symbols unique in the kernel image which is required for weak
      symbols.  This ultimately converts the actual symbol to global whether
      DEFINE_PER_CPU() is prefixed with static or not.
      
      Unfortunately, the macro forgot to add explicit extern declartion of
      the actual symbol ending up defining global symbol without preceding
      declaration for static definitions which naturally don't have matching
      DECLARE_PER_CPU().  The only ill effect is triggering of the following
      warnings.
      
       fs/inode.c:74:8: warning: symbol 'nr_inodes' was not declared. Should it be static?
       fs/inode.c:75:8: warning: symbol 'nr_unused' was not declared. Should it be static?
      
      Fix it by adding extern declaration in the DEFINE_PER_CPU() macro.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: NWanlong Gao <gaowanlong@cn.fujitsu.com>
      Tested-by: NWanlong Gao <gaowanlong@cn.fujitsu.com>
      b1a0fbfd
  20. 03 12月, 2013 3 次提交