Re: [PATCH v3 net-next 3/3] rds: Extend RDS API for IPv6 support
On 7/13/2018 4:27 PM, David Miller wrote: From: Santosh Shilimkar Date: Fri, 13 Jul 2018 15:00:59 -0700 Ofcourse any application built using upstream header and using SO_RDS_TRANSPORT will break but since this particular option was added for special case(application wants to upfront select transport instead letting bind figure it out), our hope its not used by other application(s). We can't let people have different UAPIs from upstream on a whim like this then change the already released upstream UAPI to match. Please take this into consideration when making changes in the future. Will not be repeated in future. I'm not allowing this upstream UAPI break, sorry. Ok Dave !! Regards, Santosh
Re: [PATCH v3 net-next 3/3] rds: Extend RDS API for IPv6 support
From: Santosh Shilimkar Date: Fri, 13 Jul 2018 15:00:59 -0700 > Ofcourse any application built using upstream header and > using SO_RDS_TRANSPORT will break but since this particular > option was added for special case(application wants to > upfront select transport instead letting bind figure it out), > our hope its not used by other application(s). We can't let people have different UAPIs from upstream on a whim like this then change the already released upstream UAPI to match. Please take this into consideration when making changes in the future. I'm not allowing this upstream UAPI break, sorry.
Re: [PATCH v3 net-next 3/3] rds: Extend RDS API for IPv6 support
Hi Dave, On 7/13/2018 2:25 PM, David Miller wrote: From: Ka-Cheong Poon Date: Fri, 13 Jul 2018 04:02:59 -0700 @@ -52,7 +52,7 @@ #define RDS_RECVERR 5 #define RDS_CONG_MONITOR 6 #define RDS_GET_MR_FOR_DEST 7 -#define SO_RDS_TRANSPORT 8 +#define SO_RDS_TRANSPORT 9 There is no way you can change this value without breaking applications. Downstream Oracle shipping application have been built with 9 as a SO_RDS_TRANSPORT from beginning. 8 is used for RDS_CONN_RESET but support for it doesn't exist upstream yet. Ka-cheong was aligning them so that we have same number upstream as well as in shipping products. Ofcourse any application built using upstream header and using SO_RDS_TRANSPORT will break but since this particular option was added for special case(application wants to upfront select transport instead letting bind figure it out), our hope its not used by other application(s). Regards, Santosh
Re: [PATCH v3 net-next 3/3] rds: Extend RDS API for IPv6 support
From: Ka-Cheong Poon Date: Fri, 13 Jul 2018 04:02:59 -0700 > @@ -52,7 +52,7 @@ > #define RDS_RECVERR 5 > #define RDS_CONG_MONITOR 6 > #define RDS_GET_MR_FOR_DEST 7 > -#define SO_RDS_TRANSPORT 8 > +#define SO_RDS_TRANSPORT 9 There is no way you can change this value without breaking applications.
Re: [PATCH v3 net-next 3/3] rds: Extend RDS API for IPv6 support
Hi, 2018-07-13 20:02 GMT+09:00 Ka-Cheong Poon : > 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. This seems to break old applications compiled with old header, no? > > Signed-off-by: Ka-Cheong Poon > --- > include/uapi/linux/rds.h | 71 +++-- > net/rds/connection.c | 101 > +++ > net/rds/ib.c | 52 > net/rds/ib_mr.h | 2 + > net/rds/ib_rdma.c| 11 +- > net/rds/recv.c | 25 > net/rds/tcp.c| 44 + > 7 files changed, 294 insertions(+), 12 deletions(-) > > diff --git a/include/uapi/linux/rds.h b/include/uapi/linux/rds.h > index 20c6bd0..518d40f 100644 > --- a/include/uapi/linux/rds.h > +++ b/include/uapi/linux/rds.h > @@ -1,6 +1,6 @@ > /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR > Linux-OpenIB) */ > /* > - * Copyright (c) 2008 Oracle. All rights reserved. > + * Copyright (c) 2008, 2018 Oracle and/or its affiliates. All rights > reserved. > * > * This software is available to you under a choice of one of two > * licenses. You may choose to be licensed under the terms of the GNU > @@ -52,7 +52,7 @@ > #define RDS_RECVERR5 > #define RDS_CONG_MONITOR 6 > #define RDS_GET_MR_FOR_DEST7 > -#define SO_RDS_TRANSPORT 8 > +#define SO_RDS_TRANSPORT 9
[PATCH v3 net-next 3/3] rds: Extend RDS API for IPv6 support
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. Signed-off-by: Ka-Cheong Poon --- include/uapi/linux/rds.h | 71 +++-- net/rds/connection.c | 101 +++ net/rds/ib.c | 52 net/rds/ib_mr.h | 2 + net/rds/ib_rdma.c| 11 +- net/rds/recv.c | 25 net/rds/tcp.c| 44 + 7 files changed, 294 insertions(+), 12 deletions(-) diff --git a/include/uapi/linux/rds.h b/include/uapi/linux/rds.h index 20c6bd0..518d40f 100644 --- a/include/uapi/linux/rds.h +++ b/include/uapi/linux/rds.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ /* - * Copyright (c) 2008 Oracle. All rights reserved. + * Copyright (c) 2008, 2018 Oracle and/or its affiliates. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -52,7 +52,7 @@ #define RDS_RECVERR5 #define RDS_CONG_MONITOR 6 #define RDS_GET_MR_FOR_DEST7 -#define SO_RDS_TRANSPORT 8 +#define SO_RDS_TRANSPORT 9 /* Socket option to tap receive path latency * SO_RDS: SO_RDS_MSG_RXPATH_LATENCY @@ -118,7 +118,17 @@ #define RDS_INFO_IB_CONNECTIONS10008 #define RDS_INFO_CONNECTION_STATS 10009 #define RDS_INFO_IWARP_CONNECTIONS 10010 -#define RDS_INFO_LAST 10010 + +/* PF_RDS6 options */ +#define RDS6_INFO_CONNECTIONS 10011 +#define RDS6_INFO_SEND_MESSAGES10012 +#define RDS6_INFO_RETRANS_MESSAGES 10013 +#define RDS6_INFO_RECV_MESSAGES10014 +#define RDS6_INFO_SOCKETS 10015 +#define RDS6_INFO_TCP_SOCKETS 10016 +#define RDS6_INFO_IB_CONNECTIONS 10017 + +#define RDS_INFO_LAST 10017 struct rds_info_counter { __u8name[32]; @@ -140,6 +150,15 @@ struct rds_info_connection { __u8flags; } __attribute__((packed)); +struct rds6_info_connection { + __u64 next_tx_seq; + __u64 next_rx_seq; + struct in6_addr laddr; + struct in6_addr faddr; + __u8transport[TRANSNAMSIZ]; /* null term ascii */ + __u8flags; +} __attribute__((packed)); + #define RDS_INFO_MESSAGE_FLAG_ACK 0x01 #define RDS_INFO_MESSAGE_FLAG_FAST_ACK 0x02 @@ -153,6 +172,17 @@ struct rds_info_message { __u8flags; } __attribute__((packed)); +struct rds6_info_message { + __u64 seq; + __u32 len; + struct in6_addr laddr; + struct in6_addr faddr; + __be16 lport; + __be16 fport; + __u8flags; + __u8tos; +} __attribute__((packed)); + struct rds_info_socket { __u32 sndbuf; __be32 bound_addr; @@ -163,6 +193,16 @@ struct rds_info_socket { __u64 inum; } __attribute__((packed)); +struct rds6_info_socket { + __u32 sndbuf; + struct in6_addr bound_addr; + struct in6_addr connected_addr; + __be16 bound_port; + __be16 connected_port; + __u32 rcvbuf; + __u64 inum; +} __attribute__((packed)); + struct rds_info_tcp_socket { __be32 local_addr; __be16 local_port; @@ -175,6 +215,18 @@ struct rds_info_tcp_socket { __u32 last_seen_una; } __attribute__((packed)); +struct rds6_info_tcp_socket { + struct in6_addr local_addr; + __be16 local_port; + struct in6_addr peer_addr; + __be16 peer_port; + __u64 hdr_rem; + __u64 data_rem; + __u32 last_sent_nxt; + __u32 last_expected_una; + __u32 last_seen_una; +} __attribute__((packed)); + #define RDS_IB_GID_LEN 16 struct rds_info_rdma_connection { __be32 src_addr; @@ -189,6 +241,19 @@ struct rds_info_rdma_connection { __u32 rdma_mr_size; }; +struct rds6_info_rdma_connection { + struct in6_addr src_addr; + struct in6_addr dst_addr; + __u8