svcrdma: add IPv6 support
Subsystems (4)
PATCH v2 1/1 svcrdma: add IPv6 support
Add rdma6 option to support NFS/RDMA IPv6.
Allow both IPv4 and IPv6 to bind same port at the same time, restricts use of the IPv6 socket to IPv6 communication.
Changes from v1:
- Check rdma_set_afonly return value (suggested by Leon Romanovsky)
---
net/sunrpc/xprtrdma/svc_rdma_transport.c +11 -1
@@ -869,7 +869,7 @@ static struct svc_xprt *svc_rdma_create(struct svc_serv *serv,int ret;dprintk ("svcrdma: Creating RDMA socket\n" ); -if (sa->sa_family !=AF_INET ) { +if ((sa->sa_family !=AF_INET ) && (sa->sa_family !=AF_INET6 )) {dprintk ("svcrdma: Address family %d is not supported.\n" , sa->sa_family);return ERR_PTR (-EAFNOSUPPORT ); }
@@ -885,6 +885,16 @@ static struct svc_xprt *svc_rdma_create(struct svc_serv *serv, goto err0; } +/* Allow both IPv4 and IPv6 sockets to bind a single port +* at the same time. +*/ +#if IS_ENABLED (CONFIG_IPV6 ) + ret =rdma_set_afonly (listen_id,1 ); +if (ret) { +dprintk ("svcrdma: rdma_set_afonly failed = %d\n" , ret); + goto err1; + } +#endif ret =rdma_bind_addr (listen_id, sa);if (ret) {dprintk ("svcrdma: rdma_bind_addr failed = %d\n" , ret);
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 6 lines · Shirley Ma
Add rdma6 option to support NFS/RDMA IPv6.
Allow both IPv4 and IPv6 to bind same port at the same time, restricts use of the IPv6 socket to IPv6 communication.Changes from v1:
- Checkrdma_set_afonlyreturn value (suggested by Leon Romanovsky)
Looks good to me.
Thanks.
Quoted 24 lines
Signed-off-by Shirley Ma <[email protected]>---
net/sunrpc/xprtrdma/svc_rdma_transport.c +1
-1@@ -869,7 +869,7 @@ static struct svc_xprt *svc_rdma_create(struct svc_serv *serv,int ret;dprintk ("svcrdma: Creating RDMA socket\n" ); -if (sa->sa_family !=AF_INET ) { +if ((sa->sa_family !=AF_INET ) && (sa->sa_family !=AF_INET6 )) {dprintk ("svcrdma: Address family %d is not supported.\n" , sa->sa_family);return ERR_PTR (-EAFNOSUPPORT );net/sunrpc/xprtrdma/svc_rdma_transport.c +3
-0}@@ -885,6 +885,16 @@ static struct svc_xprt *svc_rdma_create(struct svc_serv *serv, goto err0; } +/* Allow both IPv4 and IPv6 sockets to bind a single port +* at the same time. +*/
net/sunrpc/xprtrdma/svc_rdma_transport.c static struct svc_xprt *svc_rdma_create(struct svc_serv *serv, · line 900
Quoted 10 lines
net/sunrpc/xprtrdma/svc_rdma_transport.c +7
-0+#if IS_ENABLED (CONFIG_IPV6 ) + ret =rdma_set_afonly (listen_id,1 ); +if (ret) { +dprintk ("svcrdma: rdma_set_afonly failed = %d\n" , ret); + goto err1; + } +#endif ret =rdma_bind_addr (listen_id, sa);if (ret) {dprintk ("svcrdma: rdma_bind_addr failed = %d\n" , ret);
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Server-side patch; cc-ing Bruce.
Quoted 45 lines · Leon Romanovsky
Quoted 6 lines · Shirley Ma
Add rdma6 option to support NFS/RDMA IPv6.
Allow both IPv4 and IPv6 to bind same port at the same time, restricts use of the IPv6 socket to IPv6 communication.Changes from v1:
- Checkrdma_set_afonlyreturn value (suggested by Leon Romanovsky)Looks good to me.
Thanks.
Quoted 30 lines
Signed-off-by Shirley Ma <[email protected]>---
net/sunrpc/xprtrdma/svc_rdma_transport.c +1
-1@@ -869,7 +869,7 @@ static struct svc_xprt *svc_rdma_create(struct svc_serv *serv,int ret;dprintk ("svcrdma: Creating RDMA socket\n" ); -if (sa->sa_family !=AF_INET ) { +if ((sa->sa_family !=AF_INET ) && (sa->sa_family !=AF_INET6 )) {dprintk ("svcrdma: Address family %d is not supported.\n" , sa->sa_family);return ERR_PTR (-EAFNOSUPPORT );}net/sunrpc/xprtrdma/svc_rdma_transport.c +9
-0@@ -885,6 +885,16 @@ static struct svc_xprt *svc_rdma_create(struct svc_serv *serv, goto err0; } +/* Allow both IPv4 and IPv6 sockets to bind a single port +* at the same time. +*/ +#if IS_ENABLED (CONFIG_IPV6 ) + ret =rdma_set_afonly (listen_id,1 ); +if (ret) { +dprintk ("svcrdma: rdma_set_afonly failed = %d\n" , ret); + goto err1; + }
Quoted 8 lines
net/sunrpc/xprtrdma/svc_rdma_transport.c static struct svc_xprt *svc_rdma_create(struct svc_serv *serv, · line 900
Quoted 4 lines
net/sunrpc/xprtrdma/svc_rdma_transport.c +1
-0+#endif ret =rdma_bind_addr (listen_id, sa);if (ret) {dprintk ("svcrdma: rdma_bind_addr failed = %d\n" , ret);--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Chuck Lever
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v3 1/1 svcrdma: add IPv6 support
Add rdma6 option to support NFS/RDMA IPv6 addressing. Allow both IPv4 and IPv6 to bind same port at the same time, restricts use of the IPv6 socket to IPv6 communication.
Changes from v1:
- Check rdma_set_afonly return value (suggested by Leon Romanovsky)
Changes from v2:
- Acked-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>
---
net/sunrpc/xprtrdma/svc_rdma_transport.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
net/sunrpc/xprtrdma/svc_rdma_transport.c +11 -1
@@ -789,7 +789,7 @@ static struct svc_xprt *svc_rdma_create(struct svc_serv *serv,int ret;dprintk ("svcrdma: Creating RDMA socket\n" ); -if (sa->sa_family !=AF_INET ) { +if ((sa->sa_family !=AF_INET ) && (sa->sa_family !=AF_INET6 )) {dprintk ("svcrdma: Address family %d is not supported.\n" , sa->sa_family);return ERR_PTR (-EAFNOSUPPORT ); }
@@ -805,6 +805,16 @@ static struct svc_xprt *svc_rdma_create(struct svc_serv *serv, goto err0; } +/* Allow both IPv4 and IPv6 sockets to bind a single port +* at the same time. +*/ +#if IS_ENABLED (CONFIG_IPV6 ) + ret =rdma_set_afonly (listen_id,1 ); +if (ret) { +dprintk ("svcrdma: rdma_set_afonly failed = %d\n" , ret); + goto err1; + } +#endif ret =rdma_bind_addr (listen_id, sa);if (ret) {dprintk ("svcrdma: rdma_bind_addr failed = %d\n" , ret);
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html