From: Max Gurtovoy Date: Mon, 24 May 2021 08:52:25 +0000 (+0300) Subject: IB/isert: set rdma cm afonly flag X-Git-Tag: v5.15~836^2~164 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=221442ea0f60ae345a33df8b6d22201404f5a987;p=platform%2Fkernel%2Flinux-starfive.git 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 Reviewed-by: Israel Rukshin Signed-off-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe --- diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index 18266f0..160efef 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);