History

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. v4: Revert changes to SO_RDS_TRANSPORT

Ka-Cheong Poon committed 8 years ago

Commit b7ff8b11 parent 1e2b44e7 files · +293 −11Browse files

Showing the changes to include/uapi/linux (1 of 7 files). Show all

Unified · Split

include/uapi/linux/rds.h+67−2
@@ -1,6 +1,6 @@
11 /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */
22 /*
3− * Copyright (c) 2008 Oracle. All rights reserved.
3+ * Copyright (c) 2008, 2018 Oracle and/or its affiliates. All rights reserved.
44 *
55 * This software is available to you under a choice of one of two
66 * licenses. You may choose to be licensed under the terms of the GNU
@@ -118,7 +118,17 @@ · 111 unmodified lines
118118 #define RDS_INFO_IB_CONNECTIONS 10008
119119 #define RDS_INFO_CONNECTION_STATS 10009
120120 #define RDS_INFO_IWARP_CONNECTIONS 10010
121−#define RDS_INFO_LAST 10010
121+
122+/* PF_RDS6 options */
123+#define RDS6_INFO_CONNECTIONS 10011
124+#define RDS6_INFO_SEND_MESSAGES 10012
125+#define RDS6_INFO_RETRANS_MESSAGES 10013
126+#define RDS6_INFO_RECV_MESSAGES 10014
127+#define RDS6_INFO_SOCKETS 10015
128+#define RDS6_INFO_TCP_SOCKETS 10016
129+#define RDS6_INFO_IB_CONNECTIONS 10017
130+
131+#define RDS_INFO_LAST 10017
122132
123133 struct rds_info_counter {
124134 __u8 name[32];
@@ -140,6 +150,15 @@ struct rds_info_connection { · 15 unmodified lines
140150 __u8 flags;
141151 } __attribute__((packed));
142152
153+struct rds6_info_connection {
154+ __u64 next_tx_seq;
155+ __u64 next_rx_seq;
156+ struct in6_addr laddr;
157+ struct in6_addr faddr;
158+ __u8 transport[TRANSNAMSIZ]; /* null term ascii */
159+ __u8 flags;
160+} __attribute__((packed));
161+
143162 #define RDS_INFO_MESSAGE_FLAG_ACK 0x01
144163 #define RDS_INFO_MESSAGE_FLAG_FAST_ACK 0x02
145164
@@ -153,6 +172,17 @@ struct rds_info_message { · 7 unmodified lines
153172 __u8 flags;
154173 } __attribute__((packed));
155174
175+struct rds6_info_message {
176+ __u64 seq;
177+ __u32 len;
178+ struct in6_addr laddr;
179+ struct in6_addr faddr;
180+ __be16 lport;
181+ __be16 fport;
182+ __u8 flags;
183+ __u8 tos;
184+} __attribute__((packed));
185+
156186 struct rds_info_socket {
157187 __u32 sndbuf;
158188 __be32 bound_addr;
@@ -163,6 +193,16 @@ struct rds_info_socket { · 4 unmodified lines
163193 __u64 inum;
164194 } __attribute__((packed));
165195
196+struct rds6_info_socket {
197+ __u32 sndbuf;
198+ struct in6_addr bound_addr;
199+ struct in6_addr connected_addr;
200+ __be16 bound_port;
201+ __be16 connected_port;
202+ __u32 rcvbuf;
203+ __u64 inum;
204+} __attribute__((packed));
205+
166206 struct rds_info_tcp_socket {
167207 __be32 local_addr;
168208 __be16 local_port;
@@ -175,6 +215,18 @@ struct rds_info_tcp_socket { · 6 unmodified lines
175215 __u32 last_seen_una;
176216 } __attribute__((packed));
177217
218+struct rds6_info_tcp_socket {
219+ struct in6_addr local_addr;
220+ __be16 local_port;
221+ struct in6_addr peer_addr;
222+ __be16 peer_port;
223+ __u64 hdr_rem;
224+ __u64 data_rem;
225+ __u32 last_sent_nxt;
226+ __u32 last_expected_una;
227+ __u32 last_seen_una;
228+} __attribute__((packed));
229+
178230 #define RDS_IB_GID_LEN 16
179231 struct rds_info_rdma_connection {
180232 __be32 src_addr;
@@ -189,6 +241,19 @@ struct rds_info_rdma_connection { · 8 unmodified lines
189241 __u32 rdma_mr_size;
190242 };
191243
244+struct rds6_info_rdma_connection {
245+ struct in6_addr src_addr;
246+ struct in6_addr dst_addr;
247+ __u8 src_gid[RDS_IB_GID_LEN];
248+ __u8 dst_gid[RDS_IB_GID_LEN];
249+
250+ __u32 max_send_wr;
251+ __u32 max_recv_wr;
252+ __u32 max_send_sge;
253+ __u32 rdma_mr_max;
254+ __u32 rdma_mr_size;
255+};
256+
192257 /* RDS message Receive Path Latency points */
193258 enum rds_message_rxpath_latency {
194259 RDS_MSG_RX_HDR_TO_DGRAM_START = 0,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t