public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
Cc: Tom Tucker
	<tom-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>,
	"J. Bruce Fields"
	<bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>,
	Linux NFS Mailing List
	<linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH,RFC] nfsd: Make INET6 transport creation failure an informational message
Date: Fri, 02 Apr 2010 14:03:18 -0400	[thread overview]
Message-ID: <4BB63166.6050703@oracle.com> (raw)
In-Reply-To: <adaljd57os6.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>

Hi Roland-

On 04/02/2010 01:22 PM, Roland Dreier wrote:
>   >  >  The write_ports code will fail both the INET4 and INET6 transport
>   >  >  creation if
>   >  >  the transport returns an error when PF_INET6 is specified. Some transports
>   >  >  that do not support INET6 return an error other than EAFNOSUPPORT.
>   >
>   >  That's the real bug.  Any reason the RDMA RPC transport can't return
>   >  EAFNOSUPPORT in this case?
>
> I think Tom's changelog is misleading.  The problem is that the RDMA
> transport actually does support IPv6, but it doesn't support the
> IPV6ONLY option yet.  So if NFS/RDMA binds to a port for IPv4, then the
> IPv6 bind fails because of the port collision.

IPV6ONLY is a requirement for RPC over IPv6.  If the underlying 
transport does not support IPV6ONLY, then it cannot properly support RPC 
over IPv6.  It's easy enough to catch listener creation calls for IPv6 
on such transports, and simply return EAFNOSUPPORT until support for 
IPV6ONLY can be provided.

The __write_ports() interface is specifically designed to silently fall 
back to IPv4-only when IPv6 transport creation fails with ENOAFSUPPORT. 
  I don't see a good reason to change the generic logic in 
__write_ports() if there is a problem with implementing RPC over IPv6 in 
a specific transport capability.  __write_ports() will do the right 
thing if the transport returns the correct error code.

> Implementing the IPV6ONLY option for RDMA binding is probably not
> feasible for 2.6.34, so the best band-aid for now seems to be Tom's
> patch.

My recent experience with similar changes suggests the specific solution 
Tom proposed will trigger extra bug reports and e-mails, as the change 
appears to affect non-RDMA transports as well.  This printk might fire, 
for example, for INET transports on systems that are built without IPv6 
support, or where ipv6.ko is blacklisted in user space.

In other words, I agree that there's a bug that should be addressed in 
2.6.34, and I don't have any problem with setting up only an IPv4 
listener in this case.  But I think the addition of a printk that fires 
for all transports in this case is problematic.

It would be better to address this in the RPC/RDMA transport capability, 
and not in generic upper level logic.  We already have correct behavior 
in __write_ports, and the RPC/RDMA transport capability should be 
changed to use it.

-- 
chuck[dot]lever[at]oracle[dot]com
--
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

  parent reply	other threads:[~2010-04-02 18:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-01 22:48 [PATCH,RFC] nfsd: Make INET6 transport creation failure an informational message Tom Tucker
     [not found] ` <4BB522CF.60503-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2010-04-02 16:45   ` Chuck Lever
     [not found]     ` <4BB61F19.2000403-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2010-04-02 17:22       ` Roland Dreier
     [not found]         ` <adaljd57os6.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2010-04-02 18:03           ` Chuck Lever [this message]
     [not found]             ` <4BB63166.6050703-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2010-04-02 19:04               ` Tom Tucker
2010-04-02 18:52           ` Tom Tucker
  -- strict thread matches above, loose matches on Subject: below --
2010-04-01 19:12 Tom Tucker
     [not found] ` <4BB4F038.50906-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2010-04-01 19:14   ` Steve Wise

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=4BB63166.6050703@oracle.com \
    --to=chuck.lever-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org \
    --cc=linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
    --cc=tom-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox