Re: [PATCH rfc 0/4] Introduce a new helper for parsing ipv[4|6]:port to socket address

2017-02-16 Thread Sagi Grimberg



Yea, I wanted to get all the rpc_pton/rpc_ntop (which handle both
ipv4 and ipv6 with scopes) converted to use a common helper.


RPC is dealing with universal addresses, which are not quite the
same as IP presentation addresses. The port number is expressed
as:

  hi8.lo8


I noticed that, that's why there will be some processing in
sunrpc to construct a port string to a generic helper (if it chooses to
use it).


And universal IPv6 addresses don't have a mechanism for conveying
scope information.


I do see scope handling in rpc_pton6 code if provided...


Re: [PATCH rfc 0/4] Introduce a new helper for parsing ipv[4|6]:port to socket address

2017-02-16 Thread Chuck Lever

> On Feb 16, 2017, at 12:53 PM, Sagi Grimberg  wrote:
> 
> Hey Chuck,
> 
>>> As a side-effect, this set adds ipv6 support for nvme over fabrics.
>>> I also converted iscsi target and plan to convert nfs/cifs next but
>>> wanted to get some feedback before doing that.
>> 
>> At least NFS/RDMA already supports IPv6. You might not need many
>> changes there, but I'll hold off on further comments.
> 
> Yea, I wanted to get all the rpc_pton/rpc_ntop (which handle both
> ipv4 and ipv6 with scopes) converted to use a common helper.

RPC is dealing with universal addresses, which are not quite the
same as IP presentation addresses. The port number is expressed
as:

  hi8.lo8

And universal IPv6 addresses don't have a mechanism for conveying
scope information.


--
Chuck Lever





Re: [PATCH rfc 0/4] Introduce a new helper for parsing ipv[4|6]:port to socket address

2017-02-16 Thread Sagi Grimberg

Hey Chuck,


As a side-effect, this set adds ipv6 support for nvme over fabrics.
I also converted iscsi target and plan to convert nfs/cifs next but
wanted to get some feedback before doing that.


At least NFS/RDMA already supports IPv6. You might not need many
changes there, but I'll hold off on further comments.


Yea, I wanted to get all the rpc_pton/rpc_ntop (which handle both
ipv4 and ipv6 with scopes) converted to use a common helper.


Re: [PATCH rfc 0/4] Introduce a new helper for parsing ipv[4|6]:port to socket address

2017-02-16 Thread Chuck Lever

> On Feb 16, 2017, at 12:43 PM, Sagi Grimberg  wrote:
> 
> We have some places in the stack that support ipv4 and ipv6. In
> some cases the user configuration does not reveal which
> address family is given and needs to be parsed from the input string.
> 
> Given that the user-input varies between subsystems, some processing
> is required from the call-site to separate address and port strings.
> 
> As a side-effect, this set adds ipv6 support for nvme over fabrics.
> I also converted iscsi target and plan to convert nfs/cifs next but
> wanted to get some feedback before doing that.

At least NFS/RDMA already supports IPv6. You might not need many
changes there, but I'll hold off on further comments.


> patch #1 is based off roland's patch:
> http://lists.infradead.org/pipermail/linux-nvme/2016-August/005600.html
> 
> Sagi Grimberg (4):
>  net/utils: generic inet_pton_with_scope helper
>  nvmet-rdma: use generic inet_pton_with_scope
>  nvme-rdma: use inet_pton_with_scope helper
>  iscsi-target: use generic inet_pton_with_scope
> 
> drivers/nvme/host/rdma.c | 48 ---
> drivers/nvme/target/rdma.c   | 42 +
> drivers/target/iscsi/iscsi_target_configfs.c | 46 --
> include/linux/inet.h |  6 ++
> net/core/utils.c | 91 
> 5 files changed, 151 insertions(+), 82 deletions(-)
> 
> -- 
> 2.7.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
Chuck Lever