1. 11 1月, 2011 1 次提交
    • O
      IPoIB: Remove LRO support · 19e364f6
      Or Gerlitz 提交于
      As a first step in moving from LRO to GRO, revert commit af40da89
      ("IPoIB: add LRO support").  Also eliminate the ethtool set_flags
      callback which isn't needed anymore.  Finally, we need to include
      <linux/sched.h> directly to get the declaration of restart_syscall()
      (which used to be included implicitly through <linux/inet_lro.h>).
      
      Cc: Ben Hutchings <bhutchings@solarflare.com>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: Vladimir Sokolovsky <vlad@mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@voltaire.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      19e364f6
  2. 29 9月, 2010 1 次提交
  3. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  4. 12 3月, 2010 1 次提交
  5. 06 9月, 2009 1 次提交
  6. 03 9月, 2009 1 次提交
  7. 21 4月, 2009 1 次提交
  8. 22 1月, 2009 1 次提交
  9. 23 12月, 2008 1 次提交
  10. 11 10月, 2008 1 次提交
  11. 01 10月, 2008 1 次提交
    • R
      IPoIB: Use netif_tx_lock() and get rid of private tx_lock, LLTX · 943c246e
      Roland Dreier 提交于
      Currently, IPoIB is an LLTX driver that uses its own IRQ-disabling
      tx_lock.  Not only do we want to get rid of LLTX, this actually causes
      problems because of the skb_orphan() done with this tx_lock held: some
      skb destructors expect to be run with interrupts enabled.
      
      The simplest fix for this is to get rid of the driver-private tx_lock
      and stop using LLTX.  We kill off priv->tx_lock and use
      netif_tx_lock[_bh]() instead; the patch to do this is a tiny bit
      tricky because we need to update places that take priv->lock inside
      the tx_lock to disable IRQs, rather than relying on tx_lock having
      already disabled IRQs.
      
      Also, there are a couple of places where we need to disable BHs to
      make sure we have a consistent context to call netif_tx_lock() (since
      we no longer can use _irqsave() variants), and we also have to change
      ipoib_send_comp_handler() to call drain_tx_cq() through a timer rather
      than directly, because ipoib_send_comp_handler() runs in interrupt
      context and drain_tx_cq() must run in BH context so it can call
      netif_tx_lock().
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      943c246e
  12. 15 7月, 2008 3 次提交
  13. 01 5月, 2008 1 次提交
    • E
      IB/ipoib: Fix transmit queue stalling forever · 57ce41d1
      Eli Cohen 提交于
      Commit f56bcd80 ("IPoIB: Use separate CQ for UD send completions")
      introduced a bug where the transmit queue could get stopped and never
      woken up.  The problem is that send completions are only polled at the
      end of the xmit function, so if the send queue fills up and the xmit
      path stops the queue, then there is no way for send completions to
      ever get polled, and so the transmit queue stays stopped forever.
      
      Fix this by arming the send CQ just before posting the last send
      request that fills the send queue.  Then, when the completion event
      handler is called, drain the send CQ.  Since it is possible that not
      enough send completions are in the CQ, verify that the the net queue
      has been woken up after draining the send CQ, and if not arm a timer
      and drain again at the timer function.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      57ce41d1
  14. 30 4月, 2008 1 次提交
  15. 24 4月, 2008 1 次提交
  16. 17 4月, 2008 3 次提交
    • R
      IPoIB: Handle case when P_Key is deleted and re-added at same index · 9fdd5e5b
      Roland Dreier 提交于
      If a P_Key is deleted and then re-added at the same index, then IPoIB
      gets confused because __ipoib_ib_dev_flush() only checks whether the
      index is the same without checking whether the P_Key was present, so
      the interface is stopped when the P_Key is deleted, but the event when
      the P_Key is re-added gets ignored and the interface never gets
      restarted.
      
      Also, switch to using ib_find_pkey() instead of ib_find_cached_pkey()
      everywhere in IPoIB, since none of the places that look for P_Keys are
      in a fast path or in non-sleeping context, and in general we want to
      kill off the whole caching infrastructure eventually.  This also fixes
      consistency problems caused because some IPoIB queries were cached and
      some were uncached during the window where the cache was not updated.
      
      Thanks to Venkata Subramonyam <vsubramo@cisco.com> for debugging this
      problem and testing this fix.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      9fdd5e5b
    • E
      IPoIB: Add LSO support · 40ca1988
      Eli Cohen 提交于
      For HCAs that support TCP segmentation offload (IB_DEVICE_UD_TSO), set
      NETIF_F_TSO and use HW LSO to offload TCP segmentation.
      Signed-off-by: NEli Cohen <eli@mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      40ca1988
    • E
      IPoIB: Use checksum offload support if available · 6046136c
      Eli Cohen 提交于
      For HCAs that support checksum offload (ie that set IB_DEVICE_UD_IP_CSUM
      in the device capabilities flags), have IPoIB set NETIF_F_IP_CSUM and
      use the HCA to generate and verify IP checksums.
      Signed-off-by: NEli Cohen <eli@mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      6046136c
  17. 15 2月, 2008 1 次提交
    • J
      IPoIB: On P_Key change event, reset state properly · 167c4265
      Jack Morgenstein 提交于
      In P_Key event handling, if the old P_Key is no longer available, the
      driver must call ipoib_ib_dev_stop() -- just as it does when the P_Key
      is still available (see procedure __ipoib_ib_dev_flush()).
      
      When a P_Key becomes available, the driver will perform ipoib_open(),
      which assumes that the QP is in RESET, the cm_id has been
      destroyed/deleted, etc.  If ipoib_ib_dev_stop() is not called as
      described above, then these assumptions will be false, and the attempt
      to bring the interface up will fail.
      
      Found by Mellanox QA.
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      167c4265
  18. 09 2月, 2008 1 次提交
  19. 26 1月, 2008 1 次提交
  20. 20 10月, 2007 1 次提交
  21. 17 10月, 2007 1 次提交
  22. 11 10月, 2007 2 次提交
    • R
      [IPoIB]: Convert to netdevice internal stats · de903512
      Roland Dreier 提交于
      Use the stats member of struct netdevice in IPoIB, so we can save
      memory by deleting the stats member of struct ipoib_dev_priv, and save
      code by deleting ipoib_get_stats().
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      de903512
    • S
      [NET]: Make NAPI polling independent of struct net_device objects. · bea3348e
      Stephen Hemminger 提交于
      Several devices have multiple independant RX queues per net
      device, and some have a single interrupt doorbell for several
      queues.
      
      In either case, it's easier to support layouts like that if the
      structure representing the poll is independant from the net
      device itself.
      
      The signature of the ->poll() call back goes from:
      
      	int foo_poll(struct net_device *dev, int *budget)
      
      to
      
      	int foo_poll(struct napi_struct *napi, int budget)
      
      The caller is returned the number of RX packets processed (or
      the number of "NAPI credits" consumed if you want to get
      abstract).  The callee no longer messes around bumping
      dev->quota, *budget, etc. because that is all handled in the
      caller upon return.
      
      The napi_struct is to be embedded in the device driver private data
      structures.
      
      Furthermore, it is the driver's responsibility to disable all NAPI
      instances in it's ->stop() device close handler.  Since the
      napi_struct is privatized into the driver's private data structures,
      only the driver knows how to get at all of the napi_struct instances
      it may have per-device.
      
      With lots of help and suggestions from Rusty Russell, Roland Dreier,
      Michael Chan, Jeff Garzik, and Jamal Hadi Salim.
      
      Bug fixes from Thomas Graf, Roland Dreier, Peter Zijlstra,
      Joseph Fannin, Scott Wood, Hans J. Koch, and Michael Chan.
      
      [ Ported to current tree and all drivers converted.  Integrated
        Stephen's follow-on kerneldoc additions, and restored poll_list
        handling to the old style to fix mutual exclusion issues.  -DaveM ]
      Signed-off-by: NStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bea3348e
  23. 10 10月, 2007 1 次提交
  24. 11 7月, 2007 1 次提交
    • R
      IPoIB: Recycle loopback skbs instead of freeing and reallocating · 1b844afe
      Roland Dreier 提交于
      InfiniBand HCAs replicate multicast packets back to the QP that sent
      them if that QP is attached to the destination multicast group.  This
      means that IPoIB multicasts are often replicated back to the receive
      queue of the interface that generated them.  To avoid confusing the
      network stack, we drop these duplicates within the IPoIB driver.
      
      However, there's no reason to free the skb that received the duplicate
      and then immediately allocate a new skb to post to the receive queue.
      We can be more efficient and just repost the same skb.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      1b844afe
  25. 25 5月, 2007 1 次提交
  26. 22 5月, 2007 1 次提交
  27. 19 5月, 2007 1 次提交
  28. 07 5月, 2007 1 次提交
    • R
      IPoIB: Convert to NAPI · 8d1cc86a
      Roland Dreier 提交于
      Convert the IP-over-InfiniBand network device driver over to using
      NAPI to handle completions for the main CQ.  This covers all receives
      as well as datagram mode sends; send completions for connected mode
      connections are still handled from interrupt context.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      8d1cc86a
  29. 26 4月, 2007 1 次提交
  30. 19 4月, 2007 1 次提交
  31. 23 3月, 2007 1 次提交
  32. 11 2月, 2007 1 次提交
    • M
      IPoIB: Connected mode experimental support · 839fcaba
      Michael S. Tsirkin 提交于
      The following patch adds experimental support for IPoIB connected
      mode, as defined by the draft from the IETF ipoib working group.  The
      idea is to increase performance by increasing the MTU from the maximum
      of 2K (theoretically 4K) supported by IPoIB on top of UD.  With this
      code, I'm able to get 800MByte/sec or more with netperf without
      options on a Mellanox 4x back-to-back DDR system.
      
      Some notes on code:
      1. SRQ is used for scalability to large cluster sizes
      2. Only RC connections are used (UC does not support SRQ now)
      3. Retry count is set to 0 since spec draft warns against retries
      4. Each connection is used for data transfers in only 1 direction, so
         each connection is either active(TX) or passive (RX).  2 sides that
         want to communicate create 2 connections.
      5. Each active (TX) connection has a separate CQ for send completions -
         this keeps the code simple without CQ resize and other tricks
      6. To detect stale passive side connections (where the remote side is
         down), we keep an LRU list of passive connections (updated once per
         second per connection) and destroy a connection after it has been
         unused for several seconds. The LRU rule makes it possible to avoid
         scanning connections that have recently been active.
      Signed-off-by: NMichael S. Tsirkin <mst@mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      839fcaba
  33. 13 12月, 2006 1 次提交
  34. 22 11月, 2006 1 次提交
  35. 11 10月, 2006 1 次提交