Re: [PATCH 2/2] nvme-rdma: Add handling for connecting to IPv6 targets
From: Sagi Grimberg <hidden>
Date: 2016-08-02 06:43:56
Also in:
linux-nvme
quoted
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.
The iscsi target code can use it too.
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).
Sounds good Roland. -- 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