1. 18 May, 2015 3 commits
  2. 11 Aug, 2014 1 commit
  3. 03 Jun, 2014 1 commit
    • Roland Dreier's avatar
      IB/mad: Fix sparse warning about gfp_t use · 5343c00d
      Roland Dreier authored
      Properly convert gfp_t & result to bool to fix:
          drivers/infiniband/core/sa_query.c:621:33: warning: incorrect type in initializer (different base types)
          drivers/infiniband/core/sa_query.c:621:33:    expected bool [unsigned] [usertype] preload
          drivers/infiniband/core/sa_query.c:621:33:    got restricted gfp_t
      Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
  4. 14 Jan, 2014 1 commit
    • Matan Barak's avatar
      IB/core: Ethernet L2 attributes in verbs/cm structures · dd5f03be
      Matan Barak authored
      This patch add the support for Ethernet L2 attributes in the
      verbs/cm/cma structures.
      When dealing with L2 Ethernet, we should use smac, dmac, vlan ID and priority
      in a similar manner that the IB L2 (and the L4 PKEY) attributes are used.
      Thus, those attributes were added to the following structures:
      * ib_ah_attr - added dmac
      * ib_qp_attr - added smac and vlan_id, (sl remains vlan priority)
      * ib_wc - added smac, vlan_id
      * ib_sa_path_rec - added smac, dmac, vlan_id
      * cm_av - added smac and vlan_id
      For the path record structure, extra care was taken to avoid the new
      fields when packing it into wire format, so we don't break the IB CM
      and SA wire protocol.
      On the active side, the CM fills. its internal structures from the
      path provided by the ULP.  We add there taking the ETH L2 attributes
      and placing them into the CM Address Handle (struct cm_av).
      On the passive side, the CM fills its internal structures from the WC
      associated with the REQ message.  We add there taking the ETH L2
      attributes from the WC.
      When the HW driver provides the required ETH L2 attributes in the WC,
      they set the IB_WC_WITH_SMAC and IB_WC_WITH_VLAN flags. The IB core
      code checks for the presence of these flags, and in their absence does
      address resolution from the ib_init_ah_from_wc() helper function.
      ib_modify_qp_is_ok is also updated to consider the link layer. Some
      parameters are mandatory for Ethernet link layer, while they are
      irrelevant for IB.  Vendor drivers are modified to support the new
      function signature.
      Signed-off-by: default avatarMatan Barak <matanb@mellanox.com>
      Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
  5. 21 Jun, 2013 1 commit
  6. 28 Feb, 2013 1 commit
  7. 09 Jul, 2012 1 commit
  8. 29 Jan, 2011 1 commit
  9. 17 Jan, 2011 1 commit
    • Tejun Heo's avatar
      RDMA: Update workqueue usage · f0626710
      Tejun Heo authored
      * ib_wq is added, which is used as the common workqueue for infiniband
        instead of the system workqueue.  All system workqueue usages
        including flush_scheduled_work() callers are converted to use and
        flush ib_wq.
      * cancel_delayed_work() + flush_scheduled_work() converted to
      * qib_wq is removed and ib_wq is used instead.
      This is to prepare for deprecation of flush_scheduled_work().
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
  10. 13 Oct, 2010 2 commits
  11. 16 Nov, 2009 1 commit
    • Sean Hefty's avatar
      RDMA/ucma: Add option to manually set IB path · a7ca1f00
      Sean Hefty authored
      Export rdma_set_ib_paths to user space to allow applications to
      manually set the IB path used for connections.  This allows
      alternative ways for a user space application or library to obtain
      path record information, including retrieving path information
      from cached data, avoiding direct interaction with the IB SA.
      The IB SA is a single, centralized entity that can limit scaling
      on large clusters running MPI applications.
      Future changes to the rdma cm can expand on this framework to
      support the full range of features allowed by the IB CM, such as
      separate forward and reverse paths and APM.
      Signed-off-by: default avatarSean Hefty <sean.hefty@intel.com>
      Reviewed-By: default avatarJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
  12. 06 Sep, 2009 1 commit
    • Roland Dreier's avatar
      IB: Use DEFINE_SPINLOCK() for static spinlocks · 6276e08a
      Roland Dreier authored
      Rather than just defining static spinlock_t variables and then
      initializing them later in init functions, simply define them with
      DEFINE_SPINLOCK() and remove the calls to spin_lock_init().  This cleans
      up the source a tad and also shrinks the compiled code; eg on x86-64:
      add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-40 (-40)
      function                                     old     new   delta
      ib_uverbs_init                               336     326     -10
      ib_mad_init_module                           147     137     -10
      ib_sa_init                                   123     103     -20
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
  13. 03 Mar, 2009 1 commit
    • Jack Morgenstein's avatar
      IB/sa_query: Fix AH leak due to update_sm_ah() race · 6b708b3d
      Jack Morgenstein authored
      Our testing uncovered a race condition in ib_sa_event():
      	spin_lock_irqsave(&port->ah_lock, flags);
      	if (port->sm_ah)
      		kref_put(&port->sm_ah->ref, free_sm_ah);
      	port->sm_ah = NULL;
      	spin_unlock_irqrestore(&port->ah_lock, flags);
      	schedule_work(&sa_dev->port[event->element.port_num -
      If two events occur back-to-back (e.g., client-reregister and LID
      change), both may pass the spinlock-protected code above before the
      scheduled work updates the port->sm_ah handle.  Then if the scheduled
      work ends up running twice, the second operation will then find a
      non-NULL port->sm_ah, and will simply overwrite it in update_sm_ah --
      resulting in an AH leak.
      Signed-off-by: default avatarJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
  14. 22 Jul, 2008 1 commit
  15. 15 Jul, 2008 2 commits
    • Roland Dreier's avatar
      RDMA: Remove subversion $Id tags · f3781d2e
      Roland Dreier authored
      They don't get updated by git and so they're worse than useless.
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
    • Moni Shoua's avatar
      IB/sa: Fail requests made while creating new SM AH · 164ba089
      Moni Shoua authored
      This patch solves a race that occurs after an event occurs that causes
      the SA query module to flush its SM address handle (AH).  When SM AH
      becomes invalid and needs an update it is handled by the global
      workqueue.  On the other hand this event is also handled in the IPoIB
      driver by queuing work in the ipoib_workqueue that does multicast
      joins.  Although queuing is in the right order, it is done to 2
      different workqueues and so there is no guarantee that the first to be
      queued is the first to be executed.
      This causes a problem because IPoIB may end up sending an request to
      the old SM, which will take a long time to time out (since the old SM
      is gone); this leads to a much longer than necessary interruption in
      multicast traffer.
      The patch sets the SA query module's SM AH to NULL when the event
      occurs, and until update_sm_ah() is done, any request that needs sm_ah
      fails with -EAGAIN return status.
      For consumers, the patch doesn't make things worse.  Before the patch,
      MADs are sent to the wrong SM so the request gets lost.  Consumers can
      be improved if they examine the return code and respond to EAGAIN
      properly but even without an improvement the situation is not getting
      Signed-off-by: default avatarMoni Levy <monil@voltaire.com>
      Signed-off-by: default avatarMoni Shoua <monis@voltaire.com>
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
  16. 10 Oct, 2007 2 commits
  17. 03 Aug, 2007 1 commit
  18. 11 Jul, 2007 1 commit
    • Sean Hefty's avatar
      IB/sa: Make sure SA queries use default P_Key · 2aec5c60
      Sean Hefty authored
      MADs sent to the SA should use the the default P_Key (0x7fff/0xffff).
      There's no requirement that the default P_Key is stored at index 0 in
      the local P_Key table, so add code to the sa_query module to look up
      the index of the default P_Key when creating an address handle for the
      SA (which is done any time the P_Key table might change), and use this
      index for all SA queries.
      Signed-off-by: default avatarSean Hefty <sean.hefty@intel.com>
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
  19. 09 Jul, 2007 1 commit
  20. 03 May, 2007 1 commit
    • Jean Delvare's avatar
      PCI: Cleanup the includes of <linux/pci.h> · 6473d160
      Jean Delvare authored
      I noticed that many source files include <linux/pci.h> while they do
      not appear to need it. Here is an attempt to clean it all up.
      In order to find all possibly affected files, I searched for all
      files including <linux/pci.h> but without any other occurence of "pci"
      or "PCI". I removed the include statement from all of these, then I
      compiled an allmodconfig kernel on both i386 and x86_64 and fixed the
      false positives manually.
      My tests covered 66% of the affected files, so there could be false
      positives remaining. Untested files are:
      I would welcome test reports for these files. I am fine with removing
      the untested files from the patch if the general opinion is that these
      changes aren't safe. The tested part would still be nice to have.
      Note that this patch depends on another header fixup patch I submitted
      to LKML yesterday:
        [PATCH] scatterlist.h needs types.h
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: Badari Pulavarty <pbadari@us.ibm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
  21. 24 Apr, 2007 1 commit
  22. 16 Feb, 2007 2 commits
    • Roland Dreier's avatar
      IB/core: Set static rate in ib_init_ah_from_path() · 7084f842
      Roland Dreier authored
      The static rate from the path record should be put into the address
      vector -- a long time ago the rate in the address attributes needed to
      be a relative rate, which required more munging, but now that the
      conversion from absolute to relative is done in the low-level driver,
      it's easy for ib_init_ah_from_path() to put the absolute rate in.
      Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Cc: Sean Hefty <sean.hefty@intel.com>
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
    • Sean Hefty's avatar
      IB/sa: Track multicast join/leave requests · faec2f7b
      Sean Hefty authored
      The IB SA tracks multicast join/leave requests on a per port basis and
      does not do any reference counting: if two users of the same port join
      the same group, and one leaves that group, then the SA will remove the
      port from the group even though there is one user who wants to stay a
      member left.  Therefore, in order to support multiple users of the
      same multicast group from the same port, we need to perform reference
      counting locally.
      To do this, add an multicast submodule to ib_sa to perform reference
      counting of multicast join/leave operations.  Modify ib_ipoib (the
      only in-kernel user of multicast) to use the new interface.
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
  23. 22 Nov, 2006 1 commit
  24. 22 Sep, 2006 3 commits
  25. 16 Aug, 2006 1 commit
  26. 15 Jul, 2006 1 commit
  27. 18 Jun, 2006 2 commits
  28. 17 Jan, 2006 1 commit
  29. 31 Oct, 2005 1 commit
    • Tim Schmielau's avatar
      [PATCH] fix missing includes · 4e57b681
      Tim Schmielau authored
      I recently picked up my older work to remove unnecessary #includes of
      sched.h, starting from a patch by Dave Jones to not include sched.h
      from module.h. This reduces the number of indirect includes of sched.h
      by ~300. Another ~400 pointless direct includes can be removed after
      this disentangling (patch to follow later).
      However, quite a few indirect includes need to be fixed up for this.
      In order to feed the patches through -mm with as little disturbance as
      possible, I've split out the fixes I accumulated up to now (complete for
      i386 and x86_64, more archs to follow later) and post them before the real
      patch.  This way this large part of the patch is kept simple with only
      adding #includes, and all hunks are independent of each other.  So if any
      hunk rejects or gets in the way of other patches, just drop it.  My scripts
      will pick it up again in the next round.
      Signed-off-by: default avatarTim Schmielau <tim@physik3.uni-rostock.de>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
  30. 25 Oct, 2005 1 commit
    • Sean Hefty's avatar
      [IB] Fix MAD layer DMA mappings to avoid touching data buffer once mapped · 34816ad9
      Sean Hefty authored
      The MAD layer was violating the DMA API by touching data buffers used
      for sends after the DMA mapping was done.  This causes problems on
      non-cache-coherent architectures, because the device doing DMA won't
      see updates to the payload buffers that exist only in the CPU cache.
      Fix this by having all MAD consumers use ib_create_send_mad() to
      allocate their send buffers, and moving the DMA mapping into the MAD
      layer so it can be done just before calling send (and after any
      modifications of the send buffer by the MAD layer).
      Tested on a non-cache-coherent PowerPC 440SPe system.
      Signed-off-by: default avatarSean Hefty <sean.hefty@intel.com>
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
  31. 24 Oct, 2005 1 commit