IB/cma: Fix broken AF_IB UD support
authorMatthew Finlay <Matt@Mellanox.com>
Tue, 19 May 2015 07:11:48 +0000 (00:11 -0700)
committerDoug Ledford <dledford@redhat.com>
Wed, 20 May 2015 20:15:56 +0000 (16:15 -0400)
commitc07678bb01374c510b0f6d4a3832c28ba33e9613
tree213bcd1de0eb4cf96fabbd15b95d6c2b662a2da4
parentc29ed5a4566fc7e0c5d06324d62974c6163d1e06
IB/cma: Fix broken AF_IB UD support

Support for using UD and AF_IB is currently broken.  The
IB_CM_SIDR_REQ_RECEIVED message is not handled properly in
cma_save_net_info() and we end up falling into code that will try and
process the request as ipv4/ipv6, which will end up failing.

The resolution is to add a check for the SIDR_REQ and call
cma_save_ib_info() with a NULL path record.  Change cma_save_ib_info()
to copy the src sib info from the listen_id when the path record is NULL.

Reported-by: Hari Shankar <Hari.Shankar@netapp.com>
Signed-off-by: Matt Finlay <matt@mellanox.com>
Acked-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/cma.c