]> git.karo-electronics.de Git - linux-beck.git/commit
RDMA/cma: Do not modify sa_family when setting loopback address
authorSean Hefty <sean.hefty@intel.com>
Wed, 29 May 2013 17:09:13 +0000 (10:09 -0700)
committerRoland Dreier <roland@purestorage.com>
Thu, 20 Jun 2013 20:08:03 +0000 (13:08 -0700)
commit6a3e362d3ce60d6a9f634572486c2c21a4ccfe69
tree0f8e6287d59ae0a25b4b3d03d6467ef6355a72a6
parent680f920a2e24725e694d9958a08226384750217b
RDMA/cma: Do not modify sa_family when setting loopback address

cma_resolve_loopback is called after an rdma_cm_id has been
bound to a specific sa_family and port.  Once the
source sa_family for the id has been set, do not modify it.
Only the actual IP address portion of the source address
needs to be set.

As part of this fix, we can simplify setting the source address
by moving the loopback address assignment from cma_resolve_loopback
to cma_bind_loopback.  cma_bind_loopback is only invoked when
the source address is the loopback address.

Finally, add loopback support for AF_IB as part of the change.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/core/cma.c