From: Leon Romanovsky <leon@leon.nu>
To: Shirley Ma <shirley.ma@oracle.com>
Cc: Anna Schumaker <Anna.Schumaker@netapp.com>,
Chuck Lever <Chuck.Lever@oracle.com>,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
linux-rdma <linux-rdma@vger.kernel.org>
Subject: Re: [PATCH v2] svcrdma: add IPv6 support
Date: Thu, 17 Mar 2016 10:42:10 +0200 [thread overview]
Message-ID: <20160317084210.GE25216@leon.nu> (raw)
In-Reply-To: <56E9A8DD.8030308@oracle.com>
On Wed, Mar 16, 2016 at 11:41:33AM -0700, Shirley Ma wrote:
> 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)
Looks good to me.
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Thanks.
>
> Signed-off-by: Shirley Ma <shirley.ma@oracle.com>
> ---
>
> diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
> --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
> +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
> @@ -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);
WARNING: multiple messages have this Message-ID (diff)
From: Leon Romanovsky <leon-2ukJVAZIZ/Y@public.gmane.org>
To: Shirley Ma <shirley.ma-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: Anna Schumaker
<Anna.Schumaker-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org>,
Chuck Lever <Chuck.Lever-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
Linux NFS Mailing List
<linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v2] svcrdma: add IPv6 support
Date: Thu, 17 Mar 2016 10:42:10 +0200 [thread overview]
Message-ID: <20160317084210.GE25216@leon.nu> (raw)
In-Reply-To: <56E9A8DD.8030308-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
On Wed, Mar 16, 2016 at 11:41:33AM -0700, Shirley Ma wrote:
> 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)
Looks good to me.
Acked-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Thanks.
>
> Signed-off-by: Shirley Ma <shirley.ma-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> ---
>
> diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
> --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
> +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
> @@ -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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-03-17 8:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-16 18:41 [PATCH v2] svcrdma: add IPv6 support Shirley Ma
2016-03-16 18:41 ` Shirley Ma
2016-03-17 8:42 ` Leon Romanovsky [this message]
2016-03-17 8:42 ` Leon Romanovsky
2016-03-17 14:01 ` Chuck Lever
2016-03-17 14:01 ` Chuck Lever
2016-04-04 18:09 ` [PATCH v3] " Shirley Ma
2016-04-04 18:09 ` Shirley Ma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160317084210.GE25216@leon.nu \
--to=leon@leon.nu \
--cc=Anna.Schumaker@netapp.com \
--cc=Chuck.Lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=shirley.ma@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.