An error occurred fetching the project authors.
  1. 07 May, 2007 2 commits
    • Roland Dreier's avatar
      IB: Return "maybe missed event" hint from ib_req_notify_cq() · ed23a727
      Roland Dreier authored
      The semantics defined by the InfiniBand specification say that
      completion events are only generated when a completions is added to a
      completion queue (CQ) after completion notification is requested.  In
      other words, this means that the following race is possible:
      
      	while (CQ is not empty)
      		ib_poll_cq(CQ);
      	// new completion is added after while loop is exited
      	ib_req_notify_cq(CQ);
      	// no event is generated for the existing completion
      
      To close this race, the IB spec recommends doing another poll of the
      CQ after requesting notification.
      
      However, it is not always possible to arrange code this way (for
      example, we have found that NAPI for IPoIB cannot poll after
      requesting notification).  Also, some hardware (eg Mellanox HCAs)
      actually will generate an event for completions added before the call
      to ib_req_notify_cq() -- which is allowed by the spec, since there's
      no way for any upper-layer consumer to know exactly when a completion
      was really added -- so the extra poll of the CQ is just a waste.
      
      Motivated by this, we add a new flag "IB_CQ_REPORT_MISSED_EVENTS" for
      ib_req_notify_cq() so that it can return a hint about whether the a
      completion may have been added before the request for notification.
      The return value of ib_req_notify_cq() is extended so:
      
      	 < 0	means an error occurred while requesting notification
      	== 0	means notification was requested successfully, and if
      		IB_CQ_REPORT_MISSED_EVENTS was passed in, then no
      		events were missed and it is safe to wait for another
      		event.
      	 > 0	is only returned if IB_CQ_REPORT_MISSED_EVENTS was
      		passed in.  It means that the consumer must poll the
      		CQ again to make sure it is empty to avoid the race
      		described above.
      
      We add a flag to enable this behavior rather than turning it on
      unconditionally, because checking for missed events may incur
      significant overhead for some low-level drivers, and consumers that
      don't care about the results of this test shouldn't be forced to pay
      for the test.
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      ed23a727
    • Michael S. Tsirkin's avatar
      IB: Add CQ comp_vector support · f4fd0b22
      Michael S. Tsirkin authored
      Add a num_comp_vectors member to struct ib_device and extend
      ib_create_cq() to pass in a comp_vector parameter -- this parallels
      the userspace libibverbs API.  Update all hardware drivers to set
      num_comp_vectors to 1 and have all ULPs pass 0 for the comp_vector
      value.  Pass the value of num_comp_vectors to userspace rather than
      hard-coding a value of 1.
      
      We want multiple CQ event vector support (via MSI-X or similar for
      adapters that can generate multiple interrupts), but it's not clear
      how many vectors we want, or how we want to deal with policy issues
      such as how to decide which vector to use or how to set up interrupt
      affinity.  This patch is useful for experimenting, since no core
      changes will be necessary when updating a driver to support multiple
      vectors, and we know that we want to make at least these changes
      anyway.
      Signed-off-by: default avatarMichael S. Tsirkin <mst@dev.mellanox.co.il>
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      f4fd0b22
  2. 04 Feb, 2007 1 commit
  3. 09 Jan, 2007 1 commit
    • Hoang-Nam Nguyen's avatar
      IB/ehca: Use proper GFP_ flags for get_zeroed_page() · f2d91361
      Hoang-Nam Nguyen authored
      Here is a patch for ehca to use proper flag, ie. GFP_ATOMIC
      resp. GFP_KERNEL, when calling get_zeroed_page() to prevent "Bug:
      scheduling while atomic...". This error does not cause a kernel panic
      but makes ipoib un-usable afterwards.  It is reproducible on
      2.6.20-rc4 if one does ifconfig down during a flood ping test.  I have
      not observed this error in earlier releases incl. 2.6.20-rc1.
      
      This error occurs when a qp event/irq is received and ehca event
      handler allocates a control block/page to obtain HCA error data block.
      Use of GFP_ATOMIC when in interrupt context prevents this issue.
      
      Signed-off-by Hoang-Nam Nguyen <hnguyen@de.ibm.com>
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      f2d91361
  4. 09 Nov, 2006 1 commit
  5. 22 Sep, 2006 2 commits