RDMA/cma: Consider net namespace while leaving multicast group
authorParav Pandit <parav@mellanox.com>
Thu, 21 Jun 2018 12:31:24 +0000 (15:31 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 22 Jun 2018 15:02:59 +0000 (09:02 -0600)
commit88145678924891bdb959010de20b1bb4f27542d5
treef8fd9bc17f2466f8fb7a305254592a9eee6cbe06
parent321d7863acf7b1cf921ac18cd5ad5483b3cbb7ec
RDMA/cma: Consider net namespace while leaving multicast group

When sending multicast leave request, consider the net ns in which this
cm_id is created.

Code was duplicated in cma_leave_mc_groups() and rdma_leave_multicast(),
which is now done using a helper function cma_leave_roce_mc_group().

Fixes: bee3c3c91865 ("IB/cma: Join and leave multicast groups with IGMP")
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/cma.c