<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/infiniband/core/cm.c, branch linux-4.3.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.3.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.3.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2015-10-21T19:43:12Z</updated>
<entry>
<title>IB/cm: Fix rb-tree duplicate free and use-after-free</title>
<updated>2015-10-21T19:43:12Z</updated>
<author>
<name>Doron Tsur</name>
</author>
<published>2015-10-11T12:58:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0ca81a2840f77855bbad1b9f172c545c4dc9e6a4'/>
<id>urn:sha1:0ca81a2840f77855bbad1b9f172c545c4dc9e6a4</id>
<content type='text'>
ib_send_cm_sidr_rep could sometimes erase the node from the sidr
(depending on errors in the process). Since ib_send_cm_sidr_rep is
called both from cm_sidr_req_handler and cm_destroy_id, cm_id_priv
could be either erased from the rb_tree twice or not erased at all.
Fixing that by making sure it's erased only once before freeing
cm_id_priv.

Fixes: a977049dacde ('[PATCH] IB: Add the kernel CM implementation')
Signed-off-by: Doron Tsur &lt;doront@mellanox.com&gt;
Signed-off-by: Matan Barak &lt;matanb@mellanox.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>IB/cm: Remove compare_data checks</title>
<updated>2015-08-30T19:48:24Z</updated>
<author>
<name>Haggai Eran</name>
</author>
<published>2015-07-30T14:50:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=73fec7fd04a2ad6c879c93881cba9a40d551b3fd'/>
<id>urn:sha1:73fec7fd04a2ad6c879c93881cba9a40d551b3fd</id>
<content type='text'>
Now that there are no ib_cm clients using the compare_data feature for
matching IB CM requests' private data, remove the compare_data parameter of
ib_cm_listen and remove the code implementing the feature.

Signed-off-by: Haggai Eran &lt;haggaie@mellanox.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>IB/cm: Expose BTH P_Key in CM and SIDR request events</title>
<updated>2015-08-30T19:48:23Z</updated>
<author>
<name>Haggai Eran</name>
</author>
<published>2015-07-30T14:50:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=24cad9a7e8bfd4cf1ace7ac2a2b3f696a0e70420'/>
<id>urn:sha1:24cad9a7e8bfd4cf1ace7ac2a2b3f696a0e70420</id>
<content type='text'>
The rdma_cm module will later use the P_Key from the BTH to de-mux
requests.

See discussion at:
  http://www.spinics.net/lists/netdev/msg336067.html

Cc: Jason Gunthorpe &lt;jgunthorpe@obsidianresearch.com&gt;
Cc: Liran Liss &lt;liranl@mellanox.com&gt;
Signed-off-by: Haggai Eran &lt;haggaie@mellanox.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>IB/cm: Share listening CM IDs</title>
<updated>2015-08-30T19:48:22Z</updated>
<author>
<name>Haggai Eran</name>
</author>
<published>2015-07-30T14:50:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=067b171b8679f99e170feae2e1d2eae319736420'/>
<id>urn:sha1:067b171b8679f99e170feae2e1d2eae319736420</id>
<content type='text'>
Enabling network namespaces for RDMA CM will allow processes on different
namespaces to listen on the same port. In order to leave namespace support
out of the CM layer, this requires that multiple RDMA CM IDs will be able
to share a single CM ID.

This patch adds infrastructure to retrieve an existing listening ib_cm_id,
based on its device and service ID, or create a new one if one does not
already exist. It also adds a reference count for such instances
(cm_id_private.listen_sharecount), and prevents cm_destroy_id from
destroying a CM if it is still shared. See the relevant discussion [1].

[1] Re: [PATCH v3 for-next 05/13] IB/cm: Reference count ib_cm_ids
    http://www.spinics.net/lists/netdev/msg328860.html

Reviewed-by: Jason Gunthorpe &lt;jgunthorpe@obsidianresearch.com&gt;
Signed-off-by: Haggai Eran &lt;haggaie@mellanox.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>IB/cm: Expose service ID in request events</title>
<updated>2015-08-30T19:48:22Z</updated>
<author>
<name>Haggai Eran</name>
</author>
<published>2015-07-30T14:50:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=15865e7dab62a58407f1b7decdafd89dd0a8b063'/>
<id>urn:sha1:15865e7dab62a58407f1b7decdafd89dd0a8b063</id>
<content type='text'>
Expose the service ID on an incoming CM or SIDR request to the event
handler. This will allow the RDMA CM module to de-multiplex connection
requests based on the information encoded in the service ID.

Acked-by: Sean Hefty &lt;sean.hefty@intel.com&gt;
Signed-off-by: Haggai Eran &lt;haggaie@mellanox.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>IB/core: lock client data with lists_rwsem</title>
<updated>2015-08-30T19:48:21Z</updated>
<author>
<name>Haggai Eran</name>
</author>
<published>2015-07-30T14:50:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7c1eb45a22d76bb99236e7485958f87ef7c449cf'/>
<id>urn:sha1:7c1eb45a22d76bb99236e7485958f87ef7c449cf</id>
<content type='text'>
An ib_client callback that is called with the lists_rwsem locked only for
read is protected from changes to the IB client lists, but not from
ib_unregister_device() freeing its client data. This is because
ib_unregister_device() will remove the device from the device list with
lists_rwsem locked for write, but perform the rest of the cleanup,
including the call to remove() without that lock.

Mark client data that is undergoing de-registration with a new going_down
flag in the client data context. Lock the client data list with lists_rwsem
for write in addition to using the spinlock, so that functions calling the
callback would be able to lock only lists_rwsem for read and let callbacks
sleep.

Since ib_unregister_client() now marks the client data context, no need for
remove() to search the context again, so pass the client data directly to
remove() callbacks.

Reviewed-by: Jason Gunthorpe &lt;jgunthorpe@obsidianresearch.com&gt;
Signed-off-by: Haggai Eran &lt;haggaie@mellanox.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>IB/cm: Do not queue work to a device that's going away</title>
<updated>2015-07-14T17:20:09Z</updated>
<author>
<name>Erez Shitrit</name>
</author>
<published>2015-06-25T14:13:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=be4b499323bf7291b491c6df51baae62f45b8404'/>
<id>urn:sha1:be4b499323bf7291b491c6df51baae62f45b8404</id>
<content type='text'>
Whenever ib_cm gets remove_one call, like when there is a hot-unplug
event, the driver should mark itself as going_down and confirm that no
new works are going to be queued for that device.
so, the order of the actions are:
1. mark the going_down bit.
2. flush the wq.
3. [make sure no new works for that device.]
4. unregister mad agent.

otherwise, works that are already queued can be scheduled after the mad
agent was freed.

Signed-off-by: Erez Shitrit &lt;erezsh@mellanox.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma</title>
<updated>2015-06-23T22:53:26Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2015-06-23T22:53:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f9d1b5a31ab02208e29631756630739175cdaa02'/>
<id>urn:sha1:f9d1b5a31ab02208e29631756630739175cdaa02</id>
<content type='text'>
Pull rdma updates from Doug Ledford:

 - a large cleanup of how device capabilities are checked for various
   features

 - additional cleanups in the MAD processing

 - update to the srp driver

 - creation and use of centralized log message helpers

 - add const to a number of args to calls and clean up call chain

 - add support for extended cq create verb

 - add support for timestamps on cq completion

 - add support for processing OPA MAD packets

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (92 commits)
  IB/mad: Add final OPA MAD processing
  IB/mad: Add partial Intel OPA MAD support
  IB/mad: Add partial Intel OPA MAD support
  IB/core: Add OPA MAD core capability flag
  IB/mad: Add support for additional MAD info to/from drivers
  IB/mad: Convert allocations from kmem_cache to kzalloc
  IB/core: Add ability for drivers to report an alternate MAD size.
  IB/mad: Support alternate Base Versions when creating MADs
  IB/mad: Create a generic helper for DR forwarding checks
  IB/mad: Create a generic helper for DR SMP Recv processing
  IB/mad: Create a generic helper for DR SMP Send processing
  IB/mad: Split IB SMI handling from MAD Recv handler
  IB/mad cleanup: Generalize processing of MAD data
  IB/mad cleanup: Clean up function params -- find_mad_agent
  IB/mlx4: Add support for CQ time-stamping
  IB/mlx4: Add mmap call to map the hardware clock
  IB/core: Pass hardware specific data in query_device
  IB/core: Add timestamp_mask and hca_core_clock to query_device
  IB/core: Extend ib_uverbs_create_cq
  IB/core: Add CQ creation time-stamping flag
  ...
</content>
</entry>
<entry>
<title>IB/mad: Support alternate Base Versions when creating MADs</title>
<updated>2015-06-12T18:49:17Z</updated>
<author>
<name>Ira Weiny</name>
</author>
<published>2015-06-06T18:38:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=da2dfaa3a35cb5b68fc6ab2e442339de03cacd09'/>
<id>urn:sha1:da2dfaa3a35cb5b68fc6ab2e442339de03cacd09</id>
<content type='text'>
In preparation to support the new OPA MAD Base version, add a base version
parameter to ib_create_send_mad and set it to IB_MGMT_BASE_VERSION for current
users.

Definition of the new base version and it's processing will occur in later
patches.

Signed-off-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>ib/cm: Change reject message type when destroying cm_id</title>
<updated>2015-05-20T16:41:38Z</updated>
<author>
<name>Ted Kim</name>
</author>
<published>2015-05-14T19:49:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c29ed5a4566fc7e0c5d06324d62974c6163d1e06'/>
<id>urn:sha1:c29ed5a4566fc7e0c5d06324d62974c6163d1e06</id>
<content type='text'>
Problem reported by: Ted Kim &lt;ted.h.kim@oracle.com&gt;:

We have a case where a Linux system and a non-Linux system are
trying to interoperate.  The Linux host is the active side and
starts the connection establishment, but later decides to not go
through with the connection setup and does rdma_destroy_id().

The rdma_destroy_id() eventually works its way down to cm_destroy_id()
in core/cm.c, where a REJ is sent. The non-Linux system
has some trouble recognizing the REJ because of:

A. CM states which can't receive the REJ
B. Some issues about REJ formatting (missing comm ID)

ISSUE A: That part of the spec says, a Consumer Reject REJ can be
sent for a connection abort, but it goes further
and says: can send a REJ message with a "Consumer Reject"
Reason code if they are in a CM state (i.e. REP
Rcvd, MRA(REP) Sent, REQ Rcvd, MRA Sent) that allows
a REJ to be sent (lines 35-38).

Of the states listed there in that sentence, it would
seem to limit the active side to using the Consumer Reject
(for the abort case) in just the REP-Rcvd and MRA-REP-Sent
states. That is basically only after the active side
sees a REP (or alternatively goes down the state transitions
to timeout in which case a Timeout REJ is sent).

As a fix, in cm-destroy-id() move the IB-CM-MRA-REQ-RCVD case
to the same as REQ-SENT.  Essentially, make a REJ sent after
getting an MRA on active side a timeout rather than Consumer-
Reject, which is arguably more correct with the CM state
diagrams previous to getting a REP.

Signed-off-by: Ted Kim &lt;ted.h.kim@oracle.com&gt;
Signed-off-by: Sean Hefty &lt;sean.hefty@intel.com&gt;
</content>
</entry>
</feed>
