diff mbox series

[1/1] IB/isert: set rdma cm afonly flag

Message ID 20210524085225.29064-1-mgurtovoy@nvidia.com (mailing list archive)
State Accepted
Delegated to: Jason Gunthorpe
Headers show
Series [1/1] IB/isert: set rdma cm afonly flag | expand

Commit Message

Max Gurtovoy May 24, 2021, 8:52 a.m. UTC
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.

Reviewed-by: Alaa Hleihel <alaa@nvidia.com>
Reviewed-by: Israel Rukshin <israelr@nvidia.com>
Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
---
 drivers/infiniband/ulp/isert/ib_isert.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Sagi Grimberg May 25, 2021, 3:52 p.m. UTC | #1
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Jason Gunthorpe May 28, 2021, 11:34 p.m. UTC | #2
On Mon, May 24, 2021 at 11:52:25AM +0300, Max Gurtovoy wrote:
> 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.
> 
> 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>
> ---
>  drivers/infiniband/ulp/isert/ib_isert.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)

Applied to for-next, thanks

Jason
diff mbox series

Patch

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);