aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/isert
diff options
context:
space:
mode:
authorMax Gurtovoy <mgurtovoy@nvidia.com>2021-05-24 11:52:25 +0300
committerJason Gunthorpe <jgg@nvidia.com>2021-05-28 20:24:52 -0300
commit221442ea0f60ae345a33df8b6d22201404f5a987 (patch)
treeded0c23b7ec153fc2363437e0beaa49fefb52464 /drivers/infiniband/ulp/isert
parentRDMA/srp: Make struct scsi_cmnd and struct srp_request adjacent (diff)
downloadlinux-dev-221442ea0f60ae345a33df8b6d22201404f5a987.tar.xz
linux-dev-221442ea0f60ae345a33df8b6d22201404f5a987.zip
IB/isert: set rdma cm afonly flag
This will allow both IPv4 and IPv6 sockets to bind a single port at the same time. Same behaviour is implemented in NVMe/RDMA target. Link: https://lore.kernel.org/r/20210524085225.29064-1-mgurtovoy@nvidia.com Reviewed-by: Alaa Hleihel <alaa@nvidia.com> Reviewed-by: Israel Rukshin <israelr@nvidia.com> Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/ulp/isert')
-rw-r--r--drivers/infiniband/ulp/isert/ib_isert.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index 18266f07c58d..160efef66031 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -2231,6 +2231,16 @@ isert_setup_id(struct isert_np *isert_np)
}
isert_dbg("id %p context %p\n", id, id->context);
+ /*
+ * Allow both IPv4 and IPv6 sockets to bind a single port
+ * at the same time.
+ */
+ ret = rdma_set_afonly(id, 1);
+ if (ret) {
+ isert_err("rdma_set_afonly() failed: %d\n", ret);
+ goto out_id;
+ }
+
ret = rdma_bind_addr(id, sa);
if (ret) {
isert_err("rdma_bind_addr() failed: %d\n", ret);