[PATCH 2/2] nvme-rdma: Add handling for connecting to IPv6 targets
Roland Dreier
roland at kernel.org
Mon Aug 1 09:06:07 PDT 2016
On Mon, Aug 1, 2016 at 8:50 AM, Christoph Hellwig <hch at lst.de> wrote:
> It'd still need all the scope ID handling similar to what Roland did,
> and that's a fair chunk of code. We have a few options to handle the
> different allowed addresses:
>
> (1) v4/v6 only flags
> (2) having low-level v4/v6 handlers and one that tries these both
> (3) using the try both handler and rejecting the wrong one after
> parsing.
>
> (3) seems easiest, but (2) sounds fine to me. But I'd really like to
> hear from folks on the netdev list what they think of that idea first.
I think adding a new helper that parses both v4 and v6 addresses +
scope ID seems like the best thing for now. I did a grep for in6_pton
and it looks like at least fs/cifs/netmisc.c and net/sunrpc/addr.c
could use the helper.
What do you think of adding inet_pton_with_scope() to
net/core/utils.c? I'm open to better ideas on the name. But I can
code that up and use it in nvme, as well as convert over the two
places I mentioned above. The first parameter of the function can be
an af, and the caller can pass in AF_UNSPEC, AF_INET, or AF_INET6 to
restrict the parsing to one type of address (or not).
- R.
More information about the Linux-nvme
mailing list