All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 net-next 0/3] rds: IPv6 support
@ 2018-07-23 14:16 Ka-Cheong Poon
  2018-07-23 14:16 ` [PATCH v4 net-next 1/3] rds: Changing IP address internal representation to struct in6_addr Ka-Cheong Poon
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Ka-Cheong Poon @ 2018-07-23 14:16 UTC (permalink / raw)
  To: netdev; +Cc: santosh.shilimkar, davem, rds-devel, sowmini.varadhan

This patch set adds IPv6 support to the kernel RDS and related
modules.  Existing RDS apps using IPv4 address continue to run without
any problem.  New RDS apps which want to use IPv6 address can do so by
passing the address in struct sockaddr_in6 to bind(), connect() or
sendmsg().  And those apps also need to use the new IPv6 equivalents
of some of the existing socket options as the existing options use a
32 bit integer to store IP address.

All RDS code now use struct in6_addr to store IP address.  IPv4
address is stored as an IPv4 mapped address.

Header file changes

There are many data structures (RDS socket options) used by RDS apps
which use a 32 bit integer to store IP address. To support IPv6,
struct in6_addr needs to be used. To ensure backward compatibility, a
new data structure is introduced for each of those data structures
which use a 32 bit integer to represent an IP address. And new socket
options are introduced to use those new structures. This means that
existing apps should work without a problem with the new RDS module.
For apps which want to use IPv6, those new data structures and socket
options can be used. IPv4 mapped address is used to represent IPv4
address in the new data structures.

Internally, all RDS data structures which contain an IP address are
changed to use struct in6_addr to store the address. IPv4 address is
stored as an IPv4 mapped address. All the functions which take an IP
address as argument are also changed to use struct in6_addr.

RDS/RDMA/IB uses a private data (struct rds_ib_connect_private)
exchange between endpoints at RDS connection establishment time to
support RDMA. This private data exchange uses a 32 bit integer to
represent an IP address. This needs to be changed in order to support
IPv6. A new private data struct rds6_ib_connect_private is introduced
to handle this. To ensure backward compatibility, an IPv6 capable RDS
stack uses another RDMA listener port (RDS_CM_PORT) to accept IPv6
connection. And it continues to use the original RDS_PORT for IPv4 RDS
connections. When it needs to communicate with an IPv6 peer, it uses
the RDS_TCP_PORT to send the connection set up request.

RDS/TCP changes

TCP related code is changed to support IPv6.  Note that only an IPv6
TCP listener on port RDS_TCP_PORT is created as it can accept both
IPv4 and IPv6 connection requests.

IB/RDMA changes

The initial private data exchange between IB endpoints using RDMA is
changed to support IPv6 address instead, if the peer address is IPv6.
To ensure backward compatibility, annother RDMA listener port
(RDS_CM_PORT) is used to accept IPv6 connection. An IPv6 capable RDS
module continues to use the original RDS_PORT for IPv4 RDS
connections. When it needs to communicate with an IPv6 peer, it uses
the RDS_CM_PORT to send the connection set up request.

Ka-Cheong Poon (3):
  rds: Changing IP address internal representation to struct in6_addr
  rds: Enable RDS IPv6 support
  rds: Extend RDS API for IPv6 support

 include/uapi/linux/rds.h |  69 ++++++++++-
 net/rds/af_rds.c         | 201 ++++++++++++++++++++++++------
 net/rds/bind.c           | 136 ++++++++++++++++-----
 net/rds/cong.c           |  23 ++--
 net/rds/connection.c     | 259 ++++++++++++++++++++++++++++++---------
 net/rds/ib.c             | 114 +++++++++++++++--
 net/rds/ib.h             |  51 ++++++--
 net/rds/ib_cm.c          | 309 +++++++++++++++++++++++++++++++++++------------
 net/rds/ib_mr.h          |   2 +
 net/rds/ib_rdma.c        |  24 ++--
 net/rds/ib_recv.c        |  18 +--
 net/rds/ib_send.c        |  10 +-
 net/rds/loop.c           |   7 +-
 net/rds/rdma.c           |   6 +-
 net/rds/rdma_transport.c |  84 ++++++++++---
 net/rds/rdma_transport.h |   5 +
 net/rds/rds.h            |  88 +++++++++-----
 net/rds/recv.c           |  76 +++++++++---
 net/rds/send.c           | 114 ++++++++++++++---
 net/rds/tcp.c            | 128 ++++++++++++++++----
 net/rds/tcp.h            |   2 +-
 net/rds/tcp_connect.c    |  68 ++++++++---
 net/rds/tcp_listen.c     |  74 +++++++++---
 net/rds/tcp_recv.c       |   9 +-
 net/rds/tcp_send.c       |   4 +-
 net/rds/threads.c        |  69 +++++++++--
 net/rds/transport.c      |  15 ++-
 27 files changed, 1543 insertions(+), 422 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-07-24  4:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-23 14:16 [PATCH v4 net-next 0/3] rds: IPv6 support Ka-Cheong Poon
2018-07-23 14:16 ` [PATCH v4 net-next 1/3] rds: Changing IP address internal representation to struct in6_addr Ka-Cheong Poon
2018-07-23 16:54   ` Santosh Shilimkar
2018-07-23 14:16 ` [PATCH v4 net-next 2/3] rds: Enable RDS IPv6 support Ka-Cheong Poon
2018-07-23 16:55   ` Santosh Shilimkar
2018-07-23 18:15   ` David Miller
2018-07-24  3:18     ` Ka-Cheong Poon
2018-07-24  3:20       ` David Miller
2018-07-24  3:37         ` Ka-Cheong Poon
2018-07-23 14:16 ` [PATCH v4 net-next 3/3] rds: Extend RDS API for " Ka-Cheong Poon
2018-07-23 16:55   ` Santosh Shilimkar

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.