net: implement SMC-R solution
Subsystems (6)
v2 cover net: implement SMC-R solution
From: Ursula Braun <[email protected]>
Eric,
this is V2 of my SMC-R patches, containing especially a new version of the required tcp changes. As you suggested, SMC-specific hooks in the TCP-code are built only for CONFIG_AFSMC. And I come up with helpers in include files to avoid spreading net #ifdef in C files.
V2 changes:
1. activate tcp changes for CONFIG_AFSMC only (as suggested by Eric Dumazet)
2. add additional hook in net/core/sock.c
3. fix bitfield endianness problem
Thanks,
Ursula
In 2013, IBM introduced an optimized communications solution for the IBM zEnterprise EC12 and BC12 (s390 in Linux terminology) that is comprised of the IBM 10GbE RoCE Express feature with Shared Memory Communications-RDMA (SMC-R) protocol [1].
SMC-R is designed for the enterprise data center environment and is an open protocol as specified in the informational RFC [2]. The final draft submitted by IBM has been approved for publication and is in the final editorial stage. Another implementation of this protocol is available since 2013 with IBM z/OS Version 2 Release 1.
SMC-R provides a “sockets over RDMA” solution that leverages industry standard RDMA over Converged Ethernet (RoCE) technology.
IBM has developed a Linux implementation of the SMC-R standard. A new socket protocol family AF_SMC is introduced. A preload library can be used to enable TCP-based applications to use SMC-R without changes.
Key aspects of SMC-R are:
1. Provides optimized performance compared to standard TCP/IP over Ethernet within the data center for both request/response (latency) and streaming workloads (CPU savings) [3].
Initial benchmarks on Linux on x86 processors have shown latency reduction of up to 52% with a throughput gain of 111% using SMC-R vs TCP for request/response message patterns (10 concurrent TCP connections
with 16KB messages) and CPU savings of up to 69% for streaming data
patterns (single TCP connection with 20MB of data in one direction).
[1] is currently updated to contain more detailed information on Linux and performance.
2. In order to preserve the traditional network administrative model the SMC-R protocol ties into the existing IP addresses and uses TCP's handshake to establish connections. This allows existing management tools and security infrastructure to control the creation of SMC connections.
3. The SMC-R protocol logically bonds multiple RoCE adapters together
providing redundancy with transparent fail-over for improved high
availability, increased bandwidth and load balancing across multiple RDMA-capable devices.
4. Due to its handshake protocol, SMC-R is compatible with (transparent to) existing TCP connection load balancers that are commonly used in the enterprise data center environment for multi-tier application workloads.
5. SMC-R's handshake protocol allows for transparent fallback to TCP/IP, should one of the peers not be capable of the protocol.
Additional SMC-R overview and reference materials are available [1].
The SMC-R “rendezvous" protocol eliminates the need for RDMA-CM and the exchange occurs through an initial TCP connection. Building on a TCP connection to establish an SMC-R connection solves many key requirements, including #4 and #5 above.
The rendezvous process occurs in 2 phases:
1. TCP/IP 3-way exchange:
Initiated when both client and server indicate SMC-R capability by including TCP experimental options on the TCP/IP 3-way handshake (syn flows) as described in RFC6994 [4]. The ExID assigned by IANA is 0xE2D4C3D9 [5].
2. SMC-R 3-way exchange:
When both partners indicate SMC-R capability then at the completion of the 3-way TCP handshake the SMC-R layers in each peer take control of the TCP connection and exchange their RDMA credentials. If this 3-way
exchange completes successfully the connection continues using SMC-R.
If the exchange is not successful the connections falls back to standard TCP/IP.
References:
[1] SMC-R Overview and Reference Materials:
http://www-01.ibm.com/software/network/commserver/SMCR/
[2] SMC-R Informational RFC:
http://tools.ietf.org/html/draft-fox-tcpm-shared-memory-rdma-07
[3] Linux SMC-R Overview and Performance Summary
(archs x86 and s390):
http://www-01.ibm.com/software/network/commserver/SMCR/
[4] Shared Use of TCP Experimental Options RFC 6994:
https://tools.ietf.org/rfc/rfc6994.txt [5] IANA ExID SMCR:
http://www.iana.org/assignments/tcp-parameters/tcp-parameters.xhtml#tcp-exids
The patch series is prepared to apply to net-next and consists of these parts:
1. net/ipv4/tcp: TCP experimental option
2. net: definitions to establish new socket family
3. net/smc: new socket family
In the future, SMC-R will be enhanced to cover:
- IPv6 support
- Tracing
- Statistics support
Ursula Braun (3):
tcp: introduce TCP experimental option for SMC
net: introduce socket family constants
smc: introduce socket family AF_SMC
include/linux/socket.h | 4 +- include/linux/tcp.h | 16 +- include/net/request_sock.h | 3 +- include/net/smc.h | 13 + include/net/tcp.h | 145 ++ net/Kconfig | 1 + net/Makefile | 1 + net/core/sock.c | 15 +- net/ipv4/tcp_input.c | 8 + net/ipv4/tcp_minisocks.c | 3 + net/ipv4/tcp_output.c | 23 +- net/smc/Kconfig | 9 + net/smc/Makefile | 3 + net/smc/af_smc.c | 3142 ++++++++++++++++++++++++++++++++++++++++++ net/smc/af_smc.h | 706 ++++++++++ net/smc/smc_core.c | 3291 ++++++++++++++++++++++++++++++++++++++++++++ net/smc/smc_llc.c | 1597 +++++++++++++++++++++ net/smc/smc_llc.h | 192 +++ net/smc/smc_proc.c | 884 ++++++++++++ 19 files changed, 10034 insertions(+), 22 deletions(-) create mode 100644 include/net/smc.h create mode 100644 net/smc/Kconfig create mode 100644 net/smc/Makefile create mode 100644 net/smc/af_smc.c create mode 100644 net/smc/af_smc.h create mode 100644 net/smc/smc_core.c create mode 100644 net/smc/smc_llc.c create mode 100644 net/smc/smc_llc.h create mode 100644 net/smc/smc_proc.c
Signature · 1 line
2.3.8
PATCH v2 1/3 tcp: introduce TCP experimental option for SMC
From: Ursula Braun <[email protected]>
The SMC-R protocol defines dynamic discovery of peers. This is done by implementing experimental TCP options as defined in RFC6994. The TCP code needs to be extended to support RFC6994.
Setting the TCP experimental option for SMC-R [2] will be triggered from kernel exploiters like the new SMC-R socket family by setting a new flag "syn_smc" on struct tcp_sock of the connecting and the listening socket. If the client peer is SMC-R capable, flag syn_smc is kept on the connecting socket after the 3-way TCP handshake, otherwise it is reset. If the server peer is SMC-R capable, the new connected TCP socket has the new flag set, otherwise not.
Code snippet client:
tcp_sk(sock->sk)->syn_smc = 1;
rc = kernel_connect(sock, addr, alen, flags);
if (tcp_sk(sock->sk)->syn_smc) {
/* switch to smc for this connection */Code snippet server:
tcp_sk(sock->sk)->syn_smc = 1;
rc = kernel_listen(sock, backlog);
rc = kernel_accept(sock, &newsock, 0);
if (tcp_sk(newsock->sk)->syn_smc) {
/* switch to smc for this connection */References:
[1] Shared Use of TCP Experimental Options RFC 6994:
https://tools.ietf.org/rfc/rfc6994.txt
[2] IANA ExID SMCR:
http://www.iana.org/assignments/tcp-parameters/tcp-parameters.xhtml#tcp-exids
This patch has already been posted in June 2013, but Dave Miller has postponed applying till the user of the new flags, ie. the entire SMC-R protocol stack is implemented.
--- include/linux/tcp.h | 16 ++++- include/net/request_sock.h | 3 +- include/net/tcp.h | 145 +++++++++++++++++++++++++++++++++++++++++++++ net/ipv4/tcp_input.c | 8 +++ net/ipv4/tcp_minisocks.c | 3 + net/ipv4/tcp_output.c | 23 ++----- 6 files changed, 179 insertions(+), 19 deletions(-)
include/linux/tcp.h +15 -1
@@ -90,15 +90,28 @@ struct tcp_options_received { sack_ok : 4, /* SACK seen on SYN packet */ snd_wscale : 4, /* Window scaling received from sender */ rcv_wscale : 4; /* Window scaling to send to receiver */ + u8 smc_capability:1; /* SMC capability */u8 num_sacks;/* Number of SACK blocks */ u16 user_mss;/* mss requested by user in ioctl */ u16 mss_clamp;/* Maximal mss, negotiated at connection setup */ }; +#if IS_ENABLED (CONFIG_AFSMC ) +static inline void smc_clear_rx_opt (struct tcp_options_received *rx_opt) +{ + rx_opt->smc_capability =0 ; +} +#else +static inline void smc_clear_rx_opt (struct tcp_options_received *rx_opt) +{ +} +#endif +static inline void tcp_clear_options (struct tcp_options_received *rx_opt) { rx_opt->tstamp_ok = rx_opt->sack_ok =0 ; rx_opt->wscale_ok = rx_opt->snd_wscale =0 ; +smc_clear_rx_opt (rx_opt); }/* This is the max number of SACKS that we'll generate and process. It's safe
@@ -207,7 +220,8 @@ struct tcp_sock { syn_fastopen_exp:1,/* SYN includes Fast Open exp. option */ syn_data_acked:1,/* data in SYN is acked by SYN-ACK */ save_syn:1, /* Save headers of SYN packet */ - is_cwnd_limited:1;/* forward progress limited by snd_cwnd? */ + is_cwnd_limited:1,/* forward progress limited by snd_cwnd? */ + syn_smc:1; /* SYN includes SMC */u32 tlp_high_seq;/* snd_nxt at the time of TLP retransmit. */ /* RTT measurement */
include/net/request_sock.h +2 -1
@@ -55,7 +55,8 @@ struct request_sock {struct sock *rsk_listener;u16 mss;u8 num_retrans;/* number of retransmits */ - u8 cookie_ts:1; /* syncookie: encode tcpopts in timestamp */ + u8 cookie_ts:1, /* syncookie: encode tcpopts in timestamp */ + smc_capability:1; u8 num_timeout:7; /* number of timeouts *//* The following two fields can be easily recomputed I think -AK */ u32 window_clamp;/* window clamp at creation time */
include/net/tcp.h +145 -0
173 lines not on this page · raw message
net/ipv4/tcp_input.c +8 -0
@@ -3748,6 +3748,9 @@ void tcp_parse_options(const struct sk_buff *skb,tcp_parse_fastopen_option (opsize -TCPOLEN_EXP_FASTOPEN_BASE , ptr +2 , th->syn, foc, true); + else +smc_parse_options (th ,opt_rx ,ptr , +opsize );break ; }
@@ -5556,6 +5559,8 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb,* is initialized. */ tp->copied_seq = tp->rcv_nxt; +smc_check_reset_syn (tp); +smp_mb ();tcp_finish_connect (sk, skb);
@@ -6002,6 +6007,7 @@ static void tcp_openreq_init(struct request_sock *req, req->rcv_wnd =0 ;/* So that tcp_send_synack() knows! */ req->cookie_ts =0 ; +smc_reset_capability (req);tcp_rsk (req)->rcv_isn =TCP_SKB_CB (skb)->seq;tcp_rsk (req)->rcv_nxt =TCP_SKB_CB (skb)->seq +1 ;tcp_rsk (req)->snt_synack = tcp_time_stamp;
@@ -6142,6 +6148,8 @@ int tcp_conn_request(struct request_sock_ops *rsk_ops,/* Note: tcp_v6_init_req() might override ir_iif for link locals */ inet_rsk (req)->ir_iif = sk->sk_bound_dev_if; +smc_set_capability (req, &tmp_opt); + af_ops->init_req (req, sk, skb);if (security_inet_conn_request (sk, skb, req))
net/ipv4/tcp_minisocks.c +3 -0
@@ -443,6 +443,9 @@ struct sock *tcp_create_openreq_child(struct sock *sk, struct request_sock *req,struct tcp_request_sock *treq =tcp_rsk (req);struct inet_connection_sock *newicsk =inet_csk (newsk);struct tcp_sock *newtp =tcp_sk (newsk); +struct tcp_sock *oldtp =tcp_sk (sk); + +smc_check_reset_syn_req (oldtp, req, newtp);/* Now setup tcp_sock */ newtp->pred_flags =0 ;
net/ipv4/tcp_output.c +6 -17
@@ -419,23 +419,6 @@ static inline bool tcp_urg_mode(const struct tcp_sock *tp)return tp->snd_una != tp->snd_up; } -#define OPTION_SACK_ADVERTISE (1 << 0) -#define OPTION_TS (1 << 1) -#define OPTION_MD5 (1 << 2) -#define OPTION_WSCALE (1 << 3) -#define OPTION_FAST_OPEN_COOKIE (1 << 8) - -struct tcp_out_options { -u16 options;/* bit field of OPTION_* */ -u16 mss;/* 0 to disable */ -u8 ws;/* window scale, 0 to disable */ -u8 num_sack_blocks;/* number of SACK blocks to include */ -u8 hash_size;/* bytes in hash_location */ -__u8 *hash_location;/* temporary pointer, overloaded */ -__u32 tsval, tsecr;/* need to include OPTION_TS */ -struct tcp_fastopen_cookie *fastopen_cookie;/* Fast open cookie */ -}; -/* Write previously computed TCP options to the packet. * * Beware: Something in the Internet is very sensitive to the ordering of
@@ -542,6 +525,8 @@ static void tcp_options_write(__be32 *ptr, struct tcp_sock *tp, } ptr += (len +3 ) >>2 ; } + +smc_options_write (ptr, &options); }/* Compute TCP options for SYN packets. This is not the final
@@ -609,6 +594,8 @@ static unsigned int tcp_syn_options(struct sock *sk, struct sk_buff *skb, } } +smc_set_option (tp, opts, &remaining); +return MAX_TCP_OPTION_SPACE - remaining; }
@@ -670,6 +657,8 @@ static unsigned int tcp_synack_options(struct sock *sk, } } +smc_set_option_cond (tcp_sk (sk), req, opts, &remaining); +return MAX_TCP_OPTION_SPACE - remaining; }
Signature · 1 line
2.3.8
David Miller
maintainerRe: [PATCH V2 net-next 1/3] tcp: introduce TCP experimental option for SMC
From: Ursula Braun <[email protected]>
Date: Tue, 14 Jul 2015 14:42:33 +0200
include/linux/tcp.h struct tcp_options_received { · line 97
Quoted 13 lines
include/linux/tcp.h +1
-0@@ -90,15 +90,28 @@ struct tcp_options_received { sack_ok : 4, /* SACK seen on SYN packet */ snd_wscale : 4, /* Window scaling received from sender */ rcv_wscale : 4; /* Window scaling to send to receiver */ + u8 smc_capability:1; /* SMC capability */u8 num_sacks;/* Number of SACK blocks */ u16 user_mss;/* mss requested by user in ioctl */ u16 mss_clamp;/* Maximal mss, negotiated at connection setup */ };
This adds new space to this structure, which can be avoided.
sack_ok only actually needs 3 bits, not 4, then you can use the extra bit for smc_capability.
Quoted 5 lines
include/net/request_sock.h +0
-0
include/net/request_sock.h struct request_sock { · line 62
Quoted 9 lines
include/net/request_sock.h +2
-1@@ -55,7 +55,8 @@ struct request_sock {struct sock *rsk_listener;u16 mss;u8 num_retrans;/* number of retransmits */ - u8 cookie_ts:1; /* syncookie: encode tcpopts in timestamp */ + u8 cookie_ts:1, /* syncookie: encode tcpopts in timestamp */ + smc_capability:1; u8 num_timeout:7; /* number of timeouts *//* The following two fields can be easily recomputed I think -AK */ u32 window_clamp;/* window clamp at creation time */
Again, similar situation here.
Please find a way to add your new boolean value without expanding the size of this structure. Here is it clear that a single u8 is fully consumed by the cookie_ts and num_timeout bit fields.
Quoted 1 line
+#if
IS_ENABLED(CONFIG_AFSMC)
I think this ifdef is completely pointless.
What do you think every Linux distribution is going to do for their kernels? They are going to turn everything on.
So you need to find a way for your new feature to be nearly zero cost, especially in the fast paths, assuming the code is enabled.
v3 cover net: implement SMC-R solution
From: Ursula Braun <[email protected]>
Dave,
this is V3 of my SMC-R patches, containing mainly a new version of the required tcp changes. Dave, you requested the new feature to be nearly zero cost. Thus my approach is a technique using Static Keys. Do you basicly agree with such an approach?
For now I kept the CONFIG_AFSMC option in addition. Do you prefer to get rid of it in the tcp-code?
V3 changes:
1. Avoid adding of new space for smc-related bits in the tcp structures.
2. Make the smc feature to be nearly zero cost using Static Keys / jump labels
3. Increase / decrease smc static key in the smc-code
4. Make sure the next-to-last patch does not break the build
5. Additional pnet table checking
V2 changes:
1. activate tcp changes for CONFIG_AFSMC only (as suggested by Eric Dumazet)
2. add additional hook in net/core/sock.c
3. fix bitfield endianness problem
Thanks,
Ursula
In 2013, IBM introduced an optimized communications solution for the IBM zEnterprise EC12 and BC12 (s390 in Linux terminology) that is comprised of the IBM 10GbE RoCE Express feature with Shared Memory Communications-RDMA (SMC-R) protocol [1].
SMC-R is designed for the enterprise data center environment and is an open protocol as specified in the informational RFC [2]. The final draft submitted by IBM has been approved for publication and is in the final editorial stage. Another implementation of this protocol is available since 2013 with IBM z/OS Version 2 Release 1.
SMC-R provides a “sockets over RDMA” solution that leverages industry standard RDMA over Converged Ethernet (RoCE) technology.
IBM has developed a Linux implementation of the SMC-R standard. A new socket protocol family AF_SMC is introduced. A preload library can be used to enable TCP-based applications to use SMC-R without changes.
Key aspects of SMC-R are:
1. Provides optimized performance compared to standard TCP/IP over Ethernet within the data center for both request/response (latency) and streaming workloads (CPU savings) [3].
Initial benchmarks on Linux on x86 processors have shown latency reduction of up to 52% with a throughput gain of 111% using SMC-R vs TCP for request/response message patterns (10 concurrent TCP connections
with 16KB messages) and CPU savings of up to 69% for streaming data
patterns (single TCP connection with 20MB of data in one direction).
[1] is currently updated to contain more detailed information on Linux and performance.
2. In order to preserve the traditional network administrative model the SMC-R protocol ties into the existing IP addresses and uses TCP's handshake to establish connections. This allows existing management tools and security infrastructure to control the creation of SMC connections.
3. The SMC-R protocol logically bonds multiple RoCE adapters together
providing redundancy with transparent fail-over for improved high
availability, increased bandwidth and load balancing across multiple RDMA-capable devices.
4. Due to its handshake protocol, SMC-R is compatible with (transparent to) existing TCP connection load balancers that are commonly used in the enterprise data center environment for multi-tier application workloads.
5. SMC-R's handshake protocol allows for transparent fallback to TCP/IP, should one of the peers not be capable of the protocol.
Additional SMC-R overview and reference materials are available [1].
The SMC-R “rendezvous" protocol eliminates the need for RDMA-CM and the exchange occurs through an initial TCP connection. Building on a TCP connection to establish an SMC-R connection solves many key requirements, including #4 and #5 above.
The rendezvous process occurs in 2 phases:
1. TCP/IP 3-way exchange:
Initiated when both client and server indicate SMC-R capability by including TCP experimental options on the TCP/IP 3-way handshake (syn flows) as described in RFC6994 [4]. The ExID assigned by IANA is 0xE2D4C3D9 [5].
2. SMC-R 3-way exchange:
When both partners indicate SMC-R capability then at the completion of the 3-way TCP handshake the SMC-R layers in each peer take control of the TCP connection and exchange their RDMA credentials. If this 3-way
exchange completes successfully the connection continues using SMC-R.
If the exchange is not successful the connections falls back to standard TCP/IP.
References:
[1] SMC-R Overview and Reference Materials:
http://www-01.ibm.com/software/network/commserver/SMCR/
[2] SMC-R Informational RFC:
http://tools.ietf.org/html/draft-fox-tcpm-shared-memory-rdma-07
[3] Linux SMC-R Overview and Performance Summary
(archs x86 and s390):
http://www-01.ibm.com/software/network/commserver/SMCR/
[4] Shared Use of TCP Experimental Options RFC 6994:
https://tools.ietf.org/rfc/rfc6994.txt [5] IANA ExID SMCR:
http://www.iana.org/assignments/tcp-parameters/tcp-parameters.xhtml#tcp-exids
The patch series is prepared to apply to net-next and consists of these parts:
1. include/.../tcp: TCP experimental option - definitions
2. net/ipv4/tcp: TCP experimental option - TCP hooks for SMC 3. net: definitions to establish new socket family 4. net/smc: new socket family 5. net/smc: static key enabling in smc
In the future, SMC-R will be enhanced to cover:
- IPv6 support
- Tracing
- Statistics support
shortlog:
Ursula Braun (5):
tcp: TCP experimental option for SMC - definitions
tcp: TCP experimental option for SMC - TCP hooks
net: introduce socket family constants
smc: introduce socket family AF_SMC
smc: increase / decrease static key
include/linux/socket.h | 4 +- include/linux/tcp.h | 14 +- include/net/inet_sock.h | 3 +- include/net/smc.h | 13 + include/net/tcp.h | 136 ++ net/Kconfig | 1 + net/Makefile | 1 + net/core/sock.c | 20 +- net/ipv4/tcp.c | 3 + net/ipv4/tcp_input.c | 7 + net/ipv4/tcp_minisocks.c | 3 + net/ipv4/tcp_output.c | 23 +- net/ipv4/tcp_timer.c | 2 +- net/smc/Kconfig | 9 + net/smc/Makefile | 3 + net/smc/af_smc.c | 3172 ++++++++++++++++++++++++++++++++++++++++++++ net/smc/af_smc.h | 706 ++++++++++ net/smc/smc_core.c | 3297 ++++++++++++++++++++++++++++++++++++++++++++++ net/smc/smc_llc.c | 1597 ++++++++++++++++++++++ net/smc/smc_llc.h | 192 +++ net/smc/smc_proc.c | 953 ++++++++++++++ 21 files changed, 10135 insertions(+), 24 deletions(-) create mode 100644 include/net/smc.h create mode 100644 net/smc/Kconfig create mode 100644 net/smc/Makefile create mode 100644 net/smc/af_smc.c create mode 100644 net/smc/af_smc.h create mode 100644 net/smc/smc_core.c create mode 100644 net/smc/smc_llc.c create mode 100644 net/smc/smc_llc.h create mode 100644 net/smc/smc_proc.c
Signature · 1 line
2.3.8
PATCH v3 1/5 tcp: TCP experimental option for SMC - definitions
From: Ursula Braun <[email protected]>
The SMC-R protocol defines dynamic discovery of peers. This is done by implementing experimental TCP options as defined in RFC6994. The TCP code needs to be extended to support RFC6994.
Setting the TCP experimental option for SMC-R [2] will be triggered from kernel exploiters like the new SMC-R socket family by setting a new flag "syn_smc" on struct tcp_sock of the connecting and the listening socket. If the client peer is SMC-R capable, flag syn_smc is kept on the connecting socket after the 3-way TCP handshake, otherwise it is reset. If the server peer is SMC-R capable, the new connected TCP socket has the new flag set, otherwise not.
Code snippet client:
tcp_sk(sock->sk)->syn_smc = 1;
rc = kernel_connect(sock, addr, alen, flags);
if (tcp_sk(sock->sk)->syn_smc) {
/* switch to smc for this connection */Code snippet server:
tcp_sk(sock->sk)->syn_smc = 1;
rc = kernel_listen(sock, backlog);
rc = kernel_accept(sock, &newsock, 0);
if (tcp_sk(newsock->sk)->syn_smc) {
/* switch to smc for this connection */References:
[1] Shared Use of TCP Experimental Options RFC 6994:
https://tools.ietf.org/rfc/rfc6994.txt
[2] IANA ExID SMCR:
http://www.iana.org/assignments/tcp-parameters/tcp-parameters.xhtml#tcp-exids
This patch has already been posted in June 2013, but Dave Miller has postponed applying till the user of the new flags, ie. the entire SMC-R protocol stack is implemented.
--- include/linux/tcp.h | 6 ++++-- include/net/inet_sock.h | 3 ++- include/net/tcp.h | 8 ++++++++ 3 files changed, 14 insertions(+), 3 deletions(-)
include/linux/tcp.h +4 -2
@@ -87,7 +87,8 @@ struct tcp_options_received { tstamp_ok : 1, /* TIMESTAMP seen on SYN packet */ dsack : 1, /* D-SACK is scheduled */ wscale_ok : 1, /* Wscale seen on SYN packet */ - sack_ok : 4, /* SACK seen on SYN packet */ + sack_ok : 3, /* SACK seen on SYN packet */ + smc_ok : 1, /* SMC seen on SYN packet */ snd_wscale : 4, /* Window scaling received from sender */ rcv_wscale : 4; /* Window scaling to send to receiver */u8 num_sacks;/* Number of SACK blocks */
@@ -207,7 +208,8 @@ struct tcp_sock { syn_fastopen_exp:1,/* SYN includes Fast Open exp. option */ syn_data_acked:1,/* data in SYN is acked by SYN-ACK */ save_syn:1, /* Save headers of SYN packet */ - is_cwnd_limited:1;/* forward progress limited by snd_cwnd? */ + is_cwnd_limited:1,/* forward progress limited by snd_cwnd? */ + syn_smc:1; /* SYN includes SMC */u32 tlp_high_seq;/* snd_nxt at the time of TLP retransmit. */ /* RTT measurement */
include/net/inet_sock.h +2 -1
@@ -91,7 +91,8 @@ struct inet_request_sock { wscale_ok : 1, ecn_ok : 1, acked : 1, - no_srccheck: 1; + no_srccheck: 1, + smc_ok : 1;kmemcheck_bitfield_end (flags);u32 ir_mark;union {
include/net/tcp.h +8 -0
@@ -46,6 +46,7 @@#include <linux/seq_file.h> #include <linux/memcontrol.h> +#include <linux/unaligned/access_ok.h> extern struct inet_hashinfo tcp_hashinfo;
@@ -185,6 +186,7 @@ void tcp_time_wait(struct sock *sk, int state, int timeo);* experimental options. See draft-ietf-tcpm-experimental-options-00.txt */ #define TCPOPT_FASTOPEN_MAGIC 0xF989 +#define TCPOPT_SMC_MAGIC 0xE2D4C3D9/* * TCP option lengths
@@ -197,6 +199,7 @@ void tcp_time_wait(struct sock *sk, int state, int timeo);#define TCPOLEN_MD5SIG 18#define TCPOLEN_FASTOPEN_BASE 2#define TCPOLEN_EXP_FASTOPEN_BASE 4 +#define TCPOLEN_EXP_SMC_BASE 6/* But this is what stacks really send out. */ #define TCPOLEN_TSTAMP_ALIGNED 12
@@ -207,6 +210,7 @@ void tcp_time_wait(struct sock *sk, int state, int timeo);#define TCPOLEN_SACK_PERBLOCK 8#define TCPOLEN_MD5SIG_ALIGNED 20#define TCPOLEN_MSS_ALIGNED 4 +#define TCPOLEN_EXP_SMC_BASE_ALIGNED 8/* Flags in tp->nonagle */ #define TCP_NAGLE_OFF 1/* Nagle's algo is disabled */
@@ -1762,4 +1766,8 @@ static inline void skb_set_tcp_pure_ack(struct sk_buff *skb) skb->truesize = 2; } +#if IS_ENABLED (CONFIG_AFSMC ) +extern struct static_key tcp_have_smc; +#endif +#endif /* _TCP_H */
Signature · 1 line
2.3.8
PATCH v3 2/5 tcp: TCP experimental option for SMC - TCP hooks
In reply to Ursula BraunFrom: Ursula Braun <[email protected]>
The SMC-R protocol defines dynamic discovery of peers. This is done by implementing experimental TCP options as defined in RFC6994. The TCP code needs to be extended to support RFC6994.
Setting the TCP experimental option for SMC-R [2] will be triggered from kernel exploiters like the new SMC-R socket family by setting a new flag "syn_smc" on struct tcp_sock of the connecting and the listening socket. If the client peer is SMC-R capable, flag syn_smc is kept on the connecting socket after the 3-way TCP handshake, otherwise it is reset. If the server peer is SMC-R capable, the new connected TCP socket has the new flag set, otherwise not.
Code snippet client:
tcp_sk(sock->sk)->syn_smc = 1;
rc = kernel_connect(sock, addr, alen, flags);
if (tcp_sk(sock->sk)->syn_smc) {
/* switch to smc for this connection */Code snippet server:
tcp_sk(sock->sk)->syn_smc = 1;
rc = kernel_listen(sock, backlog);
rc = kernel_accept(sock, &newsock, 0);
if (tcp_sk(newsock->sk)->syn_smc) {
/* switch to smc for this connection */References:
[1] Shared Use of TCP Experimental Options RFC 6994:
https://tools.ietf.org/rfc/rfc6994.txt
[2] IANA ExID SMCR:
http://www.iana.org/assignments/tcp-parameters/tcp-parameters.xhtml#tcp-exids
This patch has already been posted in June 2013, but Dave Miller has postponed applying till the user of the new flags, ie. the entire SMC-R protocol stack is implemented.
--- include/linux/tcp.h | 8 +++ include/net/tcp.h | 128 +++++++++++++++++++++++++++++++++++++++++++++++ net/ipv4/tcp.c | 3 ++ net/ipv4/tcp_input.c | 7 +++ net/ipv4/tcp_minisocks.c | 3 ++ net/ipv4/tcp_output.c | 23 +++------ 6 files changed, 155 insertions(+), 17 deletions(-)
include/linux/tcp.h +8 -0
@@ -96,10 +96,18 @@ struct tcp_options_received {u16 mss_clamp;/* Maximal mss, negotiated at connection setup */ }; +#if IS_ENABLED (CONFIG_AFSMC ) +extern struct static_key tcp_have_smc; +#endif +static inline void tcp_clear_options (struct tcp_options_received *rx_opt) { rx_opt->tstamp_ok = rx_opt->sack_ok =0 ; rx_opt->wscale_ok = rx_opt->snd_wscale =0 ; +#if IS_ENABLED (CONFIG_AFSMC ) +if (static_key_false (&tcp_have_smc)) + rx_opt->smc_ok =0 ; +#endif }/* This is the max number of SACKS that we'll generate and process. It's safe
include/net/tcp.h +128 -0
136 lines not on this page · raw message
net/ipv4/tcp.c +3 -0
@@ -301,6 +301,9 @@ EXPORT_SYMBOL(sysctl_tcp_wmem);atomic_long_t tcp_memory_allocated;/* Current allocated memory. */ EXPORT_SYMBOL (tcp_memory_allocated); +struct static_key tcp_have_smc__read_mostly =STATIC_KEY_INIT_FALSE ; +EXPORT_SYMBOL (tcp_have_smc); +/* * Current number of TCP sockets. */
net/ipv4/tcp_input.c +7 -0
@@ -3748,6 +3748,9 @@ void tcp_parse_options(const struct sk_buff *skb,tcp_parse_fastopen_option (opsize -TCPOLEN_EXP_FASTOPEN_BASE , ptr +2 , th->syn, foc, true); + else +smc_parse_options (th ,opt_rx ,ptr , +opsize );break ; }
@@ -5556,6 +5559,8 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb,* is initialized. */ tp->copied_seq = tp->rcv_nxt; +smc_check_reset_syn (tp); +smp_mb ();tcp_finish_connect (sk, skb);
@@ -6017,6 +6022,8 @@ static void tcp_openreq_init(struct request_sock *req, ireq->ir_rmt_port =tcp_hdr (skb)->source; ireq->ir_num =ntohs (tcp_hdr (skb)->dest); ireq->ir_mark =inet_request_mark (sk, skb); +smc_set_capability (ireq, rx_opt); + } struct request_sock *inet_reqsk_alloc(const struct request_sock_ops *ops,
net/ipv4/tcp_minisocks.c +3 -0
@@ -443,6 +443,9 @@ struct sock *tcp_create_openreq_child(struct sock *sk, struct request_sock *req,struct tcp_request_sock *treq =tcp_rsk (req);struct inet_connection_sock *newicsk =inet_csk (newsk);struct tcp_sock *newtp =tcp_sk (newsk); +struct tcp_sock *oldtp =tcp_sk (sk); + +smc_check_reset_syn_req (oldtp, req, newtp);/* Now setup tcp_sock */ newtp->pred_flags =0 ;
net/ipv4/tcp_output.c +6 -17
@@ -419,23 +419,6 @@ static inline bool tcp_urg_mode(const struct tcp_sock *tp)return tp->snd_una != tp->snd_up; } -#define OPTION_SACK_ADVERTISE (1 << 0) -#define OPTION_TS (1 << 1) -#define OPTION_MD5 (1 << 2) -#define OPTION_WSCALE (1 << 3) -#define OPTION_FAST_OPEN_COOKIE (1 << 8) - -struct tcp_out_options { -u16 options;/* bit field of OPTION_* */ -u16 mss;/* 0 to disable */ -u8 ws;/* window scale, 0 to disable */ -u8 num_sack_blocks;/* number of SACK blocks to include */ -u8 hash_size;/* bytes in hash_location */ -__u8 *hash_location;/* temporary pointer, overloaded */ -__u32 tsval, tsecr;/* need to include OPTION_TS */ -struct tcp_fastopen_cookie *fastopen_cookie;/* Fast open cookie */ -}; -/* Write previously computed TCP options to the packet. * * Beware: Something in the Internet is very sensitive to the ordering of
@@ -542,6 +525,8 @@ static void tcp_options_write(__be32 *ptr, struct tcp_sock *tp, } ptr += (len +3 ) >>2 ; } + +smc_options_write (ptr, &options); }/* Compute TCP options for SYN packets. This is not the final
@@ -609,6 +594,8 @@ static unsigned int tcp_syn_options(struct sock *sk, struct sk_buff *skb, } } +smc_set_option (tp, opts, &remaining); +return MAX_TCP_OPTION_SPACE - remaining; }
@@ -670,6 +657,8 @@ static unsigned int tcp_synack_options(struct sock *sk, } } +smc_set_option_cond (tcp_sk (sk), req, opts, &remaining); +return MAX_TCP_OPTION_SPACE - remaining; }
Signature · 1 line
2.3.8
PATCH v3 3/5 net: introduce socket family constants
In reply to Ursula BraunFrom: Ursula Braun <[email protected]>
The new socket family is assigned the next available address / protocol family constant 41.
Implementing SO_KEEPALIVE for SMC-R requires an extra hook in net/ipv4/timer.c.
--- include/linux/socket.h | 4 +++- include/net/smc.h | 13 +++++++++++++ net/ipv4/tcp_timer.c | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 include/net/smc.h
include/linux/socket.h +3 -1
@@ -200,7 +200,8 @@ struct ucred {#define AF_ALG 38/* Algorithm sockets */ #define AF_NFC 39/* NFC sockets */ #define AF_VSOCK 40/* vSockets */ -#define AF_MAX 41/* For now.. */ +#define AF_SMC 41/* smc sockets>->------->-------*/ +#define AF_MAX 42/* For now.. */ /* Protocol families, same as address families. */ #define PF_UNSPEC AF_UNSPEC
@@ -246,6 +247,7 @@ struct ucred {#define PF_ALG AF_ALG#define PF_NFC AF_NFC#define PF_VSOCK AF_VSOCK +#define PF_SMC AF_SMC#define PF_MAX AF_MAX/* Maximum queue length specifiable by listen. */
include/net/smc.h new file +13 -0
@@ -0,0 +1,13 @@ +/* +* SMC Definitions for the SMC protocol. +* +* Author: Ursula Braun <[email protected]> +*/ +#ifndef _SMC_H +#define _SMC_H + +/* SMC socket options - disjunct with TCP socket options */ +#define SMC_KEEPALIVE 99/* start/stop keepalives */ + +#endif /* _SMC_H */ +
net/ipv4/tcp_timer.c +1 -1
@@ -557,7 +557,7 @@ void tcp_set_keepalive(struct sock *sk, int val)else if (!val)inet_csk_delete_keepalive_timer (sk); } - +EXPORT_SYMBOL (tcp_set_keepalive);static void tcp_keepalive_timer (unsigned long data) {
Signature · 1 line
2.3.8
PATCH v3 4/5 smc: introduce socket family AF_SMC
In reply to Ursula BraunFrom: Ursula Braun <[email protected]>
In 2013, IBM introduced an optimized communications solution for the IBM zEnterprise EC12 and BC12 (s390 in Linux terminology) that is comprised of the IBM 10GbE RoCE Express feature with Shared Memory Communications-RDMA (SMC-R) protocol [1].
SMC-R is designed for the enterprise data center environment and is an open protocol as specified in the informational RFC [2]. The final draft submitted by IBM has been approved for publication and is in the final editorial stage. Another implementation of this protocol is available since 2013 with IBM z/OS Version 2 Release 1.
SMC-R provides a “sockets over RDMA” solution that leverages industry standard RDMA over Converged Ethernet (RoCE) technology.
IBM has developed a Linux implementation of the SMC-R standard. A new socket protocol family AF_SMC is introduced. A preload library can be used to enable TCP-based applications to use SMC-R without changes.
Key aspects of SMC-R are:
1. Provides optimized performance compared to standard TCP/IP over Ethernet within the data center for both request/response (latency) and streaming workloads (CPU savings) [3].
2. In order to preserve the traditional network administrative model the SMC-R protocol ties into the existing IP addresses and uses TCP's handshake to establish connections. This allows existing management tools and security infrastructure to control the creation of SMC connections.
3. The SMC-R protocol logically bonds multiple RoCE adapters together providing redundancy with transparent fail-over for improved high availability, increased bandwidth and load balancing across multiple RDMA-capable devices.
4. Due to its handshake protocol, SMC-R is compatible with (transparent to) existing TCP connection load balancers that are commonly used in the enterprise data center environment for multi-tier application workloads.
5. SMC-R's handshake protocol allows for transparent fallback to TCP/IP, should one of the peers not be capable of the protocol.
Additional SMC-R overview and reference materials are available [1].
The SMC-R “rendezvous" protocol eliminates the need for RDMA-CM and the exchange occurs through an initial TCP connection. Building on a TCP connection to establish an SMC-R connection solves many key requirements, including #4 and #5 above.
The rendezvous process occurs in 2 phases:
1. TCP/IP 3-way exchange:
Initiated when both client and server indicate SMC-R capability by including TCP experimental options on the TCP/IP 3-way handshake (syn
flows) as described in RFC6994 [4]. The ExID assigned by IANA is
0xE2D4C3D9 [5].
2. SMC-R 3-way exchange:
When both partners indicate SMC-R capability then at the completion of the 3-way TCP handshake the SMC-R layers in each peer take control of the TCP connection and exchange their RDMA credentials. If this 3-way exchange completes successfully the connection continues using SMC-R. If the exchange is not successful the connections falls back to standard TCP/IP.
A connection using SMC-R starts out setting up a connection using the TCP/IP protocol [2]. Thus an internal smc-managed TCP socket is established, whose traffic flows across an interface belonging to the same Converged Ethernet fabric, defined by a so-called "pnet table" [1].
As part of the connection setup, flags indicating the support for SMC-R are used to negotiate SMC-R usage. If any of the two parties involved does not support SMC-R, the connection falls back to plain TCP/IP usage (the previously established TCP connection will be used for any further traffic). If both parties support SMC-R, the TCP/IP connection is used to exchange the necessary connection data for setup of RoCE RC-QP connection in the so-called "rendezvous handshake".
The code also implements also the link management of the SMC-R protocol forming link groups for each remote host and provide for
- dynamic addition of further RoCE Host Channel Adapters (HCAs) to form a so-called link group
- seamless failover, moving existing connections from a failed HCA to the remaining HCAs in a link group
- load balancing of connections across the links in a link group
SMC-R design defines memory areas for data transport through RDMA called RDMA Memory Buffer (RMB) which are split up into several RMB Elements (RMBEs) assigned to single connections. This initial Linux implementation requires real contiguous storage for these RMBs and uses a separate RMB with just 1 RMBE for every connection. Its size is derived from:
- a system wide default minimum SMC receive buffer size (tailorable by /proc/net/smc/rcvbuf
- if given, the socket specific SETSOCKOPT SO_RCVBUF configuration
- the size of the tcp socket receive buffer determined from the system wide tcp socket receive buffer configuration
- the amount of available contiguous storage
In the Linux implementation, an equivalent concept exists for the socket send buffers [1].
In the future, SMC-R will be enhanced to cover:
- IPv6 support
- Tracing
- Statistic hooks
References:
[1] SMC-R Overview and Reference Materials:
http://www-01.ibm.com/software/network/commserver/SMCR/
[2] SMC-R Informational RFC:
http://tools.ietf.org/html/draft-fox-tcpm-shared-memory-rdma-07
[3] Linux SMC-R Overview and Performance Summary
(archs x86 and s390):
http://www-01.ibm.com/software/network/commserver/SMCR/
[4] Shared Use of TCP Experimental Options RFC 6994:
https://tools.ietf.org/rfc/rfc6994.txt[5] IANA ExID SMCR:
http://www.iana.org/assignments/tcp-parameters/tcp-parameters.xhtml#tcp-exids
--- net/Kconfig | 1 + net/Makefile | 1 + net/core/sock.c | 20 +- net/smc/Kconfig | 9 + net/smc/Makefile | 3 + net/smc/af_smc.c | 3170 ++++++++++++++++++++++++++++++++++++++++++++++++++ net/smc/af_smc.h | 706 +++++++++++ net/smc/smc_core.c | 3297 ++++++++++++++++++++++++++++++++++++++++++++++++++++ net/smc/smc_llc.c | 1597 +++++++++++++++++++++++++ net/smc/smc_llc.h | 192 +++ net/smc/smc_proc.c | 953 +++++++++++++++ 11 files changed, 9947 insertions(+), 2 deletions(-) create mode 100644 net/smc/Kconfig create mode 100644 net/smc/Makefile create mode 100644 net/smc/af_smc.c create mode 100644 net/smc/af_smc.h create mode 100644 net/smc/smc_core.c create mode 100644 net/smc/smc_llc.c create mode 100644 net/smc/smc_llc.h create mode 100644 net/smc/smc_proc.c
net/Kconfig +1 -0
@@ -54,6 +54,7 @@ source "net/packet/Kconfig" source "net/unix/Kconfig" source "net/xfrm/Kconfig" source "net/iucv/Kconfig" +source "net/smc/Kconfig" config INET bool "TCP/IP networking"
net/Makefile +1 -0
@@ -49,6 +49,7 @@ obj-$(CONFIG_MAC80211) += mac80211/ obj-$(CONFIG_TIPC) += tipc/ obj-$(CONFIG_NETLABEL) += netlabel/ obj-$(CONFIG_IUCV) += iucv/ +obj-$(CONFIG_AFSMC) += smc/ obj-$(CONFIG_RFKILL) += rfkill/ obj-$(CONFIG_NET_9P) += 9p/ obj-$(CONFIG_CAIF) += caif/
net/core/sock.c +18 -2
@@ -139,6 +139,9 @@#ifdef CONFIG_INET #include <net/tcp.h> +#if IS_ENABLED (CONFIG_AFSMC ) +#include <net/smc.h> +#endif /* CONFIG_AFSMC */ #endif #include <net/busy_poll.h>
@@ -784,8 +787,21 @@ set_rcvbuf:case SO_KEEPALIVE :#ifdef CONFIG_INET if (sk->sk_protocol ==IPPROTO_TCP && - sk->sk_type ==SOCK_STREAM ) -tcp_set_keepalive (sk, valbool); + sk->sk_type ==SOCK_STREAM ) { +#if IS_ENABLED (CONFIG_AFSMC ) +if (sk->sk_family ==AF_SMC ) { +/* cannot use the TCP-way, since AFSMC +* should be allowed to be a module +*/ +release_sock (sk); + sock->ops->setsockopt (sock,SOL_TCP , +SMC_KEEPALIVE , + optval, optlen); +lock_sock (sk); + } else +#endif +tcp_set_keepalive (sk, valbool); + }#endif sock_valbool_flag (sk,SOCK_KEEPOPEN , valbool);break ;
net/smc/Kconfig new file +9 -0
@@ -0,0 +1,9 @@ +config AFSMC + tristate "AF_SMC socket address family" + depends on INET && INFINIBAND + ---help--- + SMC_R provides a "sockets over RDMA" solution making use of + RDMA over Converged Ethernet (ROCE) technology. + Socket family AF_SMC implements this solution for Linux. + + Select this option if you want to run AF_SMC socket applications
net/smc/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +ccflags-y += -I$(src) +smc-y := af_smc.o smc_core.o smc_proc.o smc_llc.o +obj-$(CONFIG_AFSMC) += smc.o
net/smc/af_smc.c new file +3170 -0
2,942 lines not on this page · raw message
net/smc/af_smc.h new file +706 -0
706 lines not on this page · raw message
net/smc/smc_core.c new file +3297 -0
3,297 lines not on this page · raw message
net/smc/smc_llc.c new file +1597 -0
1,597 lines not on this page · raw message
net/smc/smc_llc.h new file +192 -0
192 lines not on this page · raw message
net/smc/smc_proc.c new file +953 -0
953 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.3.8
Part of the diff is not shown here. View the raw message.
PATCH v3 5/5 smc: increase / decrease static key
In reply to Ursula BraunFrom: Ursula Braun <[email protected]>
To activate the smc-specific hooks in the TCP-code, static key "tcp_have_smc" is increased and decreased. For now this is done at module load / unload time.
--- net/smc/af_smc.c | 2 ++ 1 file changed, 2 insertions(+)
net/smc/af_smc.c +2 -0
@@ -3142,6 +3142,7 @@ static int __init af_smc_init(void)if (rc) goto out_sock; +static_key_slow_inc (&tcp_have_smc);return 0 ; out_sock:
@@ -3154,6 +3155,7 @@ out: static void __exit af_smc_exit(void) { +static_key_slow_dec (&tcp_have_smc);ib_unregister_client (&smc_ib_client);sock_unregister (PF_SMC );proto_unregister (&smc_proto);
Signature · 1 line
2.3.8
David Miller
maintainerFrom: Ursula Braun <[email protected]>
Date: Wed, 22 Jul 2015 10:59:47 +0200
Quoted 10 lines
1. Provides optimized performance compared to standard TCP/IP over Ethernet within the data center for both request/response (latency) and streaming workloads (CPU savings) [3].
Initial benchmarks on Linux on x86 processors have shown latency reduction of up to 52% with a throughput gain of 111% using SMC-R vs TCP for request/response message patterns (10 concurrent TCP connections
with 16KB messages) and CPU savings of up to 69% for streaming data
patterns (single TCP connection with 20MB of data in one direction).
[1] is currently updated to contain more detailed information on Linux and performance.
I'm really sorry but this is the same rabbit hole and set of claims that have been bullhorned my way for RDMA over the years and I still don't buy it.
None of the RDMA'ish proponents ever talk about what you _don't_ get when this stuff triggers.
No netfilter.
No packet scheduler.
No classifier actions.
No BPF.
No bridging.
Basically, every single interesting feature of the Linux networking goes away once this RDMA thing happens.
Furthermore the benchmarks are carefully choosen to exemplify the perfect environment for this feature to excell at.
Sorry, I don't want any of this in our core networking stack. You'll have to support this completely outside of the TCP implementation and core networking code, and therefore have it %100 in your own separate module with your own can of worms like the Infiniband et al. people do.
Having this standardized or "in widespread successful use" has no bearing upon the things I do not like about this patch set, so do not use those kinds of arguments to try and change my mind. It won't work.
I'm not applying this patch series.
Quoted 11 lines · David Miller
I'm really sorry but this is the same rabbit hole and set of claims that have been bullhorned my way for RDMA over the years and I still don't buy it.
None of the RDMA'ish proponents ever talk about what you _don't_ get when this stuff triggers.
No netfilter.
No packet scheduler.
Quoted 8 lines
No classifier actions.
No BPF.
No bridging.
Basically, every single interesting feature of the Linux networking goes away once this RDMA thing happens.
Correct, Dave: All the RDMA protocols do not benefit from packet-based features of Linux networking. Which is why SMC-R starts with TCP to maintain some of it. This allows for adhering to the TCP management model, e.g. for addressing and capability to intercept connection establishment. We did SMC-R for a good reason -- bringing value to the mainframe datacenter environment, and potentially other setups, too; and that includes performance benefits.
Quoted 3 lines
Furthermore the benchmarks are carefully choosen to exemplify the perfect environment for this feature to excell at.
Our benchmarks shown are by no means "some carefully chosen" selection. Would you like to see some other benchmarks?
Quoted 6 lines
Sorry, I don't want any of this in our core networking stack. You'll have to support this completely outside of the TCP implementation and core networking code, and therefore have it %100 in your own separate module with your own can of worms like the Infiniband et al. people do.
Since you are asking for a solution "100% in our own separate module with our own can of worms", we have to give up the transparent detection whether a communication peer can do SMC-R or not (this has been the purpose of the rejected TCP hooks). Instead, we want just the new self-contained SMC-R socket family added to the kernel. We will adapt the code accordingly to get rid of TCP experimental options. Is it ok for you, if we send the whole new code for /net/smc/ in one single patch since all of it is required for doing the job, or prefer smaller chunks (which, if half way applied, won't get real functionality)?
Kind regards, Ursula
v4 cover net: implement SMC-R solution
In reply to David MillerFrom: Ursula Braun <[email protected]>
Dave,
this is V4 of my SMC-R patches:
Since you are asking for a solution "100% in our own separate module with our own can of worms", we have to give up the transparent detection whether a communication peer can do SMC-R or not (this has been the purpose of the rejected TCP hooks). Instead, we want just the new self-contained SMC-R socket family added to the kernel.
By the way, since August 2015 the SMC-R Informational RFC is no longer a draft, but published as RFC7609.
V4 changes:
1. Remove tcp patches supporting TCP experimental options
2. Remove references to tcp_sock syn_smc flag in smc-code, since TCP experimental options are not supported by the Linux-tcp.
3. clc_wait_msg() simplified
V3 changes:
1. Avoid adding of new space for smc-related bits in the tcp structures.
2. Make the smc feature to be nearly zero cost using Static Keys / jump labels
3. Increase / decrease smc static key in the smc-code
4. Make sure the next-to-last patch does not break the build
5. Additional pnet table checking
V2 changes:
1. activate tcp changes for CONFIG_AFSMC only (as suggested by Eric Dumazet)
2. add additional hook in net/core/sock.c
3. fix bitfield endianness problem
Thanks,
Ursula
In 2013, IBM introduced an optimized communications solution for the IBM zEnterprise EC12 and BC12 (s390 in Linux terminology) that is comprised of the IBM 10GbE RoCE Express feature with Shared Memory Communications-RDMA (SMC-R) protocol [1].
SMC-R is designed for the enterprise data center environment and is an open protocol as specified in the informational RFC7609 [2]. It has been published in August 2015. Another implementation of this protocol is available since 2013 with IBM z/OS Version 2 Release 1.
SMC-R provides a “sockets over RDMA” solution that leverages industry standard RDMA over Converged Ethernet (RoCE) technology.
IBM has developed a Linux implementation of the SMC-R standard. A new socket protocol family AF_SMC is introduced. A preload library can be used to enable TCP-based applications to use SMC-R without changes.
Key aspects of SMC-R are:
1. Provides optimized performance compared to standard TCP/IP over Ethernet within the data center for both request/response (latency) and streaming workloads (CPU savings) [3].
Initial benchmarks on Linux on x86 processors have shown latency reduction of up to 52% with a throughput gain of 111% using SMC-R vs TCP for request/response message patterns (10 concurrent TCP connections
with 16KB messages) and CPU savings of up to 69% for streaming data
patterns (single TCP connection with 20MB of data in one direction).
[1] is currently updated to contain more detailed information on Linux and performance.
2. In order to preserve the traditional network administrative model the SMC-R protocol ties into the existing IP addresses and uses TCP's handshake to establish connections. This allows existing management tools and security infrastructure to control the creation of SMC connections.
3. The SMC-R protocol logically bonds multiple RoCE adapters together
providing redundancy with transparent fail-over for improved high
availability, increased bandwidth and load balancing across multiple RDMA-capable devices.
Without the rejected TCP Experimental Options the following aspects are restricted; alternate solutions are in discussion.
4. Due to its handshake protocol, SMC-R is compatible with (transparent to) existing TCP connection load balancers that are commonly used in the enterprise data center environment for multi-tier application workloads.
5. SMC-R's handshake protocol allows for transparent fallback to TCP/IP, should one of the peers not be capable of the protocol.
Additional SMC-R overview and reference materials are available [1].
The SMC-R “rendezvous" protocol eliminates the need for RDMA-CM and the exchange occurs through an initial TCP connection. Building on a TCP connection to establish an SMC-R connection solves many key requirements. The rendezvous process occurs now in 1 phase only:
1. TCP/IP 3-way exchange with TCP experimental options is skipped.
2. SMC-R 3-way exchange:
It is assumed both partners indicate SMC-R capability. Then at the completion of the 3-way TCP handshake the SMC-R layers in each peer take control of the TCP connection and exchange their RDMA credentials. If this 3-way exchange completes successfully the connection continues using SMC-R. If the exchange is not successful the connections falls back to standard TCP/IP.
References:
[1] SMC-R Overview and Reference Materials:
http://www-01.ibm.com/software/network/commserver/SMCR/
[2] SMC-R Informational RFC:
https://tools.ietf.org/rfc/rfc7609 [3] Linux SMC-R Overview and Performance Summary (archs x86 and s390): http://www-01.ibm.com/software/network/commserver/SMCR/
The patch series is prepared to apply to net-next and consists of these parts:
1. net: definitions to establish new socket family
2. net/smc: new socket family
In the future, SMC-R will be enhanced to cover:
- alternate SMC-capability detection
- IPv6 support
- Tracing
- Statistics support
shortlog:
Ursula Braun (2):
net: introduce socket family constants
smc: introduce socket family AF_SMC
Signature · 1 line
2.3.8
PATCH v4 1/2 net: introduce socket family constants
From: Ursula Braun <[email protected]>
The new socket family is assigned the next available address / protocol family constant 41.
Implementing SO_KEEPALIVE for SMC-R requires an extra hook in net/ipv4/timer.c.
--- include/linux/socket.h | 4 +++- include/net/smc.h | 13 +++++++++++++ net/ipv4/tcp_timer.c | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 include/net/smc.h
include/linux/socket.h +3 -1
@@ -200,7 +200,8 @@ struct ucred {#define AF_ALG 38/* Algorithm sockets */ #define AF_NFC 39/* NFC sockets */ #define AF_VSOCK 40/* vSockets */ -#define AF_MAX 41/* For now.. */ +#define AF_SMC 41/* smc sockets */ +#define AF_MAX 42/* For now.. */ /* Protocol families, same as address families. */ #define PF_UNSPEC AF_UNSPEC
@@ -246,6 +247,7 @@ struct ucred {#define PF_ALG AF_ALG#define PF_NFC AF_NFC#define PF_VSOCK AF_VSOCK +#define PF_SMC AF_SMC#define PF_MAX AF_MAX/* Maximum queue length specifiable by listen. */
include/net/smc.h new file +13 -0
@@ -0,0 +1,13 @@ +/* +* SMC Definitions for the SMC protocol. +* +* Author: Ursula Braun <[email protected]> +*/ +#ifndef _SMC_H +#define _SMC_H + +/* SMC socket options - disjunct with TCP socket options */ +#define SMC_KEEPALIVE 99/* start/stop keepalives */ + +#endif /* _SMC_H */ +
net/ipv4/tcp_timer.c +1 -1
@@ -557,7 +557,7 @@ void tcp_set_keepalive(struct sock *sk, int val)else if (!val)inet_csk_delete_keepalive_timer (sk); } - +EXPORT_SYMBOL (tcp_set_keepalive);static void tcp_keepalive_timer (unsigned long data) {
Signature · 1 line
2.3.8
PATCH v4 2/2 smc: introduce socket family AF_SMC
In reply to Ursula BraunFrom: Ursula Braun <[email protected]>
In 2013, IBM introduced an optimized communications solution for the IBM zEnterprise EC12 and BC12 (s390 in Linux terminology) that is comprised of the IBM 10GbE RoCE Express feature with Shared Memory Communications-RDMA (SMC-R) protocol [1].
SMC-R is designed for the enterprise data center environment and is an open protocol as specified in the informational RFC7609 [2]. It has been published in August 2015. Another implementation of this protocol is available since 2013 with IBM z/OS Version 2 Release 1.
SMC-R provides a “sockets over RDMA” solution that leverages industry standard RDMA over Converged Ethernet (RoCE) technology.
IBM has developed a Linux implementation of the SMC-R standard. A new socket protocol family AF_SMC is introduced. A preload library can be used to enable TCP-based applications to use SMC-R without changes.
Key aspects of SMC-R are:
1. Provides optimized performance compared to standard TCP/IP over Ethernet within the data center for both request/response (latency) and streaming workloads (CPU savings) [3].
2. In order to preserve the traditional network administrative model the SMC-R protocol ties into the existing IP addresses and uses TCP's handshake to establish connections. This allows existing management tools and security infrastructure to control the creation of SMC connections.
3. The SMC-R protocol logically bonds multiple RoCE adapters together providing redundancy with transparent fail-over for improved high availability, increased bandwidth and load balancing across multiple RDMA-capable devices.
4. Due to its handshake protocol, SMC-R is compatible with (transparent to) existing TCP connection load balancers that are commonly used in the enterprise data center environment for multi-tier application workloads.
5. SMC-R's handshake protocol allows for transparent fallback to TCP/IP, should one of the peers not be capable of the protocol.
Additional SMC-R overview and reference materials are available [1].
The SMC-R “rendezvous" protocol eliminates the need for RDMA-CM and the exchange occurs through an initial TCP connection. Building on a TCP connection to establish an SMC-R connection solves many key requirements. The rendezvous process occurs now in 1 phase only:
1. TCP/IP 3-way exchange with TCP experimental options is skipped.
2. SMC-R 3-way exchange:
It is assumed both partners indicate SMC-R capability. Then at the completion of the 3-way TCP handshake the SMC-R layers in each peer take control of the TCP connection and exchange their RDMA credentials. If this 3-way exchange completes successfully the connection continues using SMC-R. If the exchange is not successful the connections falls back to standard TCP/IP.
A connection using SMC-R starts out setting up a connection using the TCP/IP protocol [2]. Thus an internal smc-managed TCP socket is established, whose traffic flows across an interface belonging to the same Converged Ethernet fabric, defined by a so-called "pnet table" [1].
Since SMC-R negotiation during TCP handshake is no longer possible, it is assumed both parties are SMC-R capable. The TCP/IP connection is used to exchange the necessary connection data for setup of RoCE RC-QP connection in the so-called "rendezvous handshake".
The code implements also the link management of the SMC-R protocol forming link groups for each remote host and provides for
- dynamic addition of further RoCE Host Channel Adapters (HCAs) to form a so-called link group
- seamless failover, moving existing connections from a failed HCA to the remaining HCAs in a link group
- load balancing of connections across the links in a link group
SMC-R design defines memory areas for data transport through RDMA called RDMA Memory Buffer (RMB) which are split up into several RMB Elements (RMBEs) assigned to single connections. This initial Linux implementation requires real contiguous storage for these RMBs and uses a separate RMB with just 1 RMBE for every connection. Its size is derived from:
- a system wide default minimum SMC receive buffer size (tailorable by /proc/net/smc/rcvbuf
- if given, the socket specific SETSOCKOPT SO_RCVBUF configuration
- the size of the tcp socket receive buffer determined from the system wide tcp socket receive buffer configuration
- the amount of available contiguous storage
In the Linux implementation, an equivalent concept exists for the socket send buffers [1].
In the future, SMC-R will be enhanced to cover:
- alternate SMC-capability detection
- IPv6 support
- Tracing
- Statistic hooks
References:
[1] SMC-R Overview and Reference Materials:
http://www-01.ibm.com/software/network/commserver/SMCR/
[2] SMC-R Informational RFC:
https://tools.ietf.org/rfc/rfc7609 [3] Linux SMC-R Overview and Performance Summary (archs x86 and s390): http://www-01.ibm.com/software/network/commserver/SMCR/
--- net/Kconfig | 1 + net/Makefile | 1 + net/core/sock.c | 20 +- net/smc/Kconfig | 9 + net/smc/Makefile | 3 + net/smc/af_smc.c | 3136 +++++++++++++++++++++++++++++++++++++++++++++++++ net/smc/af_smc.h | 706 +++++++++++ net/smc/smc_core.c | 3297 ++++++++++++++++++++++++++++++++++++++++++++++++++++ net/smc/smc_llc.c | 1597 +++++++++++++++++++++++++ net/smc/smc_llc.h | 192 +++ net/smc/smc_proc.c | 953 +++++++++++++++ 11 files changed, 9913 insertions(+), 2 deletions(-) create mode 100644 net/smc/Kconfig create mode 100644 net/smc/Makefile create mode 100644 net/smc/af_smc.c create mode 100644 net/smc/af_smc.h create mode 100644 net/smc/smc_core.c create mode 100644 net/smc/smc_llc.c create mode 100644 net/smc/smc_llc.h create mode 100644 net/smc/smc_proc.c
net/Kconfig +1 -0
@@ -54,6 +54,7 @@ source "net/packet/Kconfig" source "net/unix/Kconfig" source "net/xfrm/Kconfig" source "net/iucv/Kconfig" +source "net/smc/Kconfig" config INET bool "TCP/IP networking"
net/Makefile +1 -0
@@ -49,6 +49,7 @@ obj-$(CONFIG_MAC80211) += mac80211/ obj-$(CONFIG_TIPC) += tipc/ obj-$(CONFIG_NETLABEL) += netlabel/ obj-$(CONFIG_IUCV) += iucv/ +obj-$(CONFIG_AFSMC) += smc/ obj-$(CONFIG_RFKILL) += rfkill/ obj-$(CONFIG_NET_9P) += 9p/ obj-$(CONFIG_CAIF) += caif/
net/core/sock.c +18 -2
@@ -139,6 +139,9 @@#ifdef CONFIG_INET #include <net/tcp.h> +#if IS_ENABLED (CONFIG_AFSMC ) +#include <net/smc.h> +#endif /* CONFIG_AFSMC */ #endif #include <net/busy_poll.h>
@@ -784,8 +787,21 @@ set_rcvbuf:case SO_KEEPALIVE :#ifdef CONFIG_INET if (sk->sk_protocol ==IPPROTO_TCP && - sk->sk_type ==SOCK_STREAM ) -tcp_set_keepalive (sk, valbool); + sk->sk_type ==SOCK_STREAM ) { +#if IS_ENABLED (CONFIG_AFSMC ) +if (sk->sk_family ==AF_SMC ) { +/* cannot use the TCP-way, since AFSMC +* should be allowed to be a module +*/ +release_sock (sk); + sock->ops->setsockopt (sock,SOL_TCP , +SMC_KEEPALIVE , + optval, optlen); +lock_sock (sk); + } else +#endif +tcp_set_keepalive (sk, valbool); + }#endif sock_valbool_flag (sk,SOCK_KEEPOPEN , valbool);break ;
net/smc/Kconfig new file +9 -0
@@ -0,0 +1,9 @@ +config AFSMC + tristate "AF_SMC socket address family" + depends on INET && INFINIBAND + ---help--- + SMC_R provides a "sockets over RDMA" solution making use of + RDMA over Converged Ethernet (ROCE) technology. + Socket family AF_SMC implements this solution for Linux. + + Select this option if you want to run AF_SMC socket applications
net/smc/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +ccflags-y += -I$(src) +smc-y := af_smc.o smc_core.o smc_proc.o smc_llc.o +obj-$(CONFIG_AFSMC) += smc.o
net/smc/af_smc.c new file +3136 -0
2,942 lines not on this page · raw message
net/smc/af_smc.h new file +706 -0
706 lines not on this page · raw message
net/smc/smc_core.c new file +3297 -0
3,297 lines not on this page · raw message
net/smc/smc_llc.c new file +1597 -0
1,597 lines not on this page · raw message
net/smc/smc_llc.h new file +192 -0
192 lines not on this page · raw message
net/smc/smc_proc.c new file +953 -0
953 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.3.8
Part of the diff is not shown here. View the raw message.
David Miller
maintainerFrom: Ursula Braun <[email protected]>
Date: Fri, 21 Aug 2015 13:30:27 +0200
Quoted 8 lines
this is V4 of my SMC-R patches:
Since you are asking for a solution "100% in our own separate module with our own can of worms", we have to give up the transparent detection whether a communication peer can do SMC-R or not (this has been the purpose of the rejected TCP hooks). Instead, we want just the new self-contained SMC-R socket family added to the kernel.
By the way, since August 2015 the SMC-R Informational RFC is no longer a draft, but published as RFC7609.
The tcp_set_keepalive() layering hack is still beyond what I'm willing to apply, sorry.
Also, as a coding style note, all of your code needs to be adjusted to declare local function variables in "reverse christimas tree" order, that is longest line to shortest.
PATCH v2 2/3 net: introduce socket family constants
In reply to Ursula BraunFrom: Ursula Braun <[email protected]>
The new socket family is assigned the next available address / protocol family constant 41.
Implementing SO_KEEPALIVE for SMC-R requires an extra hook in net/core/sock.c.
--- include/linux/socket.h | 4 +++- include/net/smc.h | 13 +++++++++++++ net/Kconfig | 1 + net/Makefile | 1 + net/core/sock.c | 15 +++++++++++++-- 5 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 include/net/smc.h
include/linux/socket.h +3 -1
@@ -200,7 +200,8 @@ struct ucred {#define AF_ALG 38/* Algorithm sockets */ #define AF_NFC 39/* NFC sockets */ #define AF_VSOCK 40/* vSockets */ -#define AF_MAX 41/* For now.. */ +#define AF_SMC 41/* smc sockets>->------->-------*/ +#define AF_MAX 42/* For now.. */ /* Protocol families, same as address families. */ #define PF_UNSPEC AF_UNSPEC
@@ -246,6 +247,7 @@ struct ucred {#define PF_ALG AF_ALG#define PF_NFC AF_NFC#define PF_VSOCK AF_VSOCK +#define PF_SMC AF_SMC#define PF_MAX AF_MAX/* Maximum queue length specifiable by listen. */
include/net/smc.h new file +13 -0
@@ -0,0 +1,13 @@ +/* +* SMC Definitions for the SMC protocol. +* +* Author: Ursula Braun <[email protected]> +*/ +#ifndef _SMC_H +#define _SMC_H + +/* SMC socket options - disjunct with TCP socket options */ +#define SMC_KEEPALIVE 99/* start/stop keepalives */ + +#endif /* _SMC_H */ +
net/Kconfig +1 -0
@@ -54,6 +54,7 @@ source "net/packet/Kconfig" source "net/unix/Kconfig" source "net/xfrm/Kconfig" source "net/iucv/Kconfig" +source "net/smc/Kconfig" config INET bool "TCP/IP networking"
net/Makefile +1 -0
@@ -49,6 +49,7 @@ obj-$(CONFIG_MAC80211) += mac80211/ obj-$(CONFIG_TIPC) += tipc/ obj-$(CONFIG_NETLABEL) += netlabel/ obj-$(CONFIG_IUCV) += iucv/ +obj-$(CONFIG_AFSMC) += smc/ obj-$(CONFIG_RFKILL) += rfkill/ obj-$(CONFIG_NET_9P) += 9p/ obj-$(CONFIG_CAIF) += caif/
net/core/sock.c +13 -2
@@ -139,6 +139,9 @@#ifdef CONFIG_INET #include <net/tcp.h> +#if IS_ENABLED (CONFIG_AFSMC ) +#include <net/smc.h> +#endif /* CONFIG_AFSMC */ #endif #include <net/busy_poll.h>
@@ -784,8 +787,16 @@ set_rcvbuf:case SO_KEEPALIVE :#ifdef CONFIG_INET if (sk->sk_protocol ==IPPROTO_TCP && - sk->sk_type ==SOCK_STREAM ) -tcp_set_keepalive (sk, valbool); + sk->sk_type ==SOCK_STREAM ) { +#if IS_ENABLED (CONFIG_AFSMC ) +if (sk->sk_family ==AF_SMC ) + sock->ops->setsockopt (sock,SOL_TCP , +SMC_KEEPALIVE , + optval, optlen); + else +#endif +tcp_set_keepalive (sk, valbool); + }#endif sock_valbool_flag (sk,SOCK_KEEPOPEN , valbool);break ;
Signature · 1 line
2.3.8
David Miller
maintainerRe: [PATCH V2 net-next 2/3] net: introduce socket family constants
From: Ursula Braun <[email protected]>
Date: Tue, 14 Jul 2015 14:42:34 +0200
net/Kconfig source "net/packet/Kconfig" · line 57
Quoted 9 lines
net/Kconfig +1
-0@@ -54,6 +54,7 @@ source "net/packet/Kconfig" source "net/unix/Kconfig" source "net/xfrm/Kconfig" source "net/iucv/Kconfig" +source "net/smc/Kconfig"
This breaks the build, every patch in the series must leave the kernel in a consistent, building, working state.
This patch series submission is of very low quality.
PATCH v2 3/3 smc: introduce socket family AF_SMC
In reply to Ursula BraunFrom: Ursula Braun <[email protected]>
In 2013, IBM introduced an optimized communications solution for the IBM zEnterprise EC12 and BC12 (s390 in Linux terminology) that is comprised of the IBM 10GbE RoCE Express feature with Shared Memory Communications-RDMA (SMC-R) protocol [1].
SMC-R is designed for the enterprise data center environment and is an open protocol as specified in the informational RFC [2]. The final draft submitted by IBM has been approved for publication and is in the final editorial stage. Another implementation of this protocol is available since 2013 with IBM z/OS Version 2 Release 1.
SMC-R provides a “sockets over RDMA” solution that leverages industry standard RDMA over Converged Ethernet (RoCE) technology.
IBM has developed a Linux implementation of the SMC-R standard. A new socket protocol family AF_SMC is introduced. A preload library can be used to enable TCP-based applications to use SMC-R without changes.
Key aspects of SMC-R are:
1. Provides optimized performance compared to standard TCP/IP over Ethernet within the data center for both request/response (latency) and streaming workloads (CPU savings) [3].
2. In order to preserve the traditional network administrative model the SMC-R protocol ties into the existing IP addresses and uses TCP's handshake to establish connections. This allows existing management tools and security infrastructure to control the creation of SMC connections.
3. The SMC-R protocol logically bonds multiple RoCE adapters together providing redundancy with transparent fail-over for improved high availability, increased bandwidth and load balancing across multiple RDMA-capable devices.
4. Due to its handshake protocol, SMC-R is compatible with (transparent to) existing TCP connection load balancers that are commonly used in the enterprise data center environment for multi-tier application workloads.
5. SMC-R's handshake protocol allows for transparent fallback to TCP/IP, should one of the peers not be capable of the protocol.
Additional SMC-R overview and reference materials are available [1].
The SMC-R “rendezvous" protocol eliminates the need for RDMA-CM and the exchange occurs through an initial TCP connection. Building on a TCP connection to establish an SMC-R connection solves many key requirements, including #4 and #5 above.
The rendezvous process occurs in 2 phases:
1. TCP/IP 3-way exchange:
Initiated when both client and server indicate SMC-R capability by including TCP experimental options on the TCP/IP 3-way handshake (syn
flows) as described in RFC6994 [4]. The ExID assigned by IANA is
0xE2D4C3D9 [5].
2. SMC-R 3-way exchange:
When both partners indicate SMC-R capability then at the completion of the 3-way TCP handshake the SMC-R layers in each peer take control of the TCP connection and exchange their RDMA credentials. If this 3-way exchange completes successfully the connection continues using SMC-R. If the exchange is not successful the connections falls back to standard TCP/IP.
A connection using SMC-R starts out setting up a connection using the TCP/IP protocol [2]. Thus an internal smc-managed TCP socket is established, whose traffic flows across an interface belonging to the same Converged Ethernet fabric, defined by a so-called "pnet table" [1].
As part of the connection setup, flags indicating the support for SMC-R are used to negotiate SMC-R usage. If any of the two parties involved does not support SMC-R, the connection falls back to plain TCP/IP usage (the previously established TCP connection will be used for any further traffic). If both parties support SMC-R, the TCP/IP connection is used to exchange the necessary connection data for setup of RoCE RC-QP connection in the so-called "rendezvous handshake".
The code also implements also the link management of the SMC-R protocol forming link groups for each remote host and provide for
- dynamic addition of further RoCE Host Channel Adapters (HCAs) to form a so-called link group
- seamless failover, moving existing connections from a failed HCA to the remaining HCAs in a link group
- load balancing of connections across the links in a link group
SMC-R design defines memory areas for data transport through RDMA called RDMA Memory Buffer (RMB) which are split up into several RMB Elements (RMBEs) assigned to single connections. This initial Linux implementation requires real contiguous storage for these RMBs and uses a separate RMB with just 1 RMBE for every connection. Its size is derived from:
- a system wide default minimum SMC receive buffer size (tailorable by /proc/net/smc/rcvbuf
- if given, the socket specific SETSOCKOPT SO_RCVBUF configuration
- the size of the tcp socket receive buffer determined from the system wide tcp socket receive buffer configuration
- the amount of available contiguous storage
In the Linux implementation, an equivalent concept exists for the socket send buffers [1].
In the future, SMC-R will be enhanced to cover:
- IPv6 support
- Tracing
- Statistic hooks
References:
[1] SMC-R Overview and Reference Materials:
http://www-01.ibm.com/software/network/commserver/SMCR/
[2] SMC-R Informational RFC:
http://tools.ietf.org/html/draft-fox-tcpm-shared-memory-rdma-07
[3] Linux SMC-R Overview and Performance Summary
(archs x86 and s390):
http://www-01.ibm.com/software/network/commserver/SMCR/
[4] Shared Use of TCP Experimental Options RFC 6994:
https://tools.ietf.org/rfc/rfc6994.txt [5] IANA ExID SMCR:
http://www.iana.org/assignments/tcp-parameters/tcp-parameters.xhtml#tcp-exids
--- net/smc/Kconfig | 9 + net/smc/Makefile | 3 + net/smc/af_smc.c | 3142 +++++++++++++++++++++++++++++++++++++++++++++++++ net/smc/af_smc.h | 706 +++++++++++ net/smc/smc_core.c | 3291 ++++++++++++++++++++++++++++++++++++++++++++++++++++ net/smc/smc_llc.c | 1597 +++++++++++++++++++++++++ net/smc/smc_llc.h | 192 +++ net/smc/smc_proc.c | 884 ++++++++++++++ 8 files changed, 9824 insertions(+) create mode 100644 net/smc/Kconfig create mode 100644 net/smc/Makefile create mode 100644 net/smc/af_smc.c create mode 100644 net/smc/af_smc.h create mode 100644 net/smc/smc_core.c create mode 100644 net/smc/smc_llc.c create mode 100644 net/smc/smc_llc.h create mode 100644 net/smc/smc_proc.c
net/smc/Kconfig new file +9 -0
@@ -0,0 +1,9 @@ +config AFSMC + tristate "AF_SMC socket address family" + depends on INET && INFINIBAND + ---help--- + SMC_R provides a "sockets over RDMA" solution making use of + RDMA over Converged Ethernet (ROCE) technology. + Socket family AF_SMC implements this solution for Linux. + + Select this option if you want to run AF_SMC socket applications
net/smc/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +ccflags-y += -I$(src) +smc-y := af_smc.o smc_core.o smc_proc.o smc_llc.o +obj-$(CONFIG_AFSMC) += smc.o
net/smc/af_smc.c new file +3142 -0
2,988 lines not on this page · raw message
net/smc/af_smc.h new file +706 -0
706 lines not on this page · raw message
net/smc/smc_core.c new file +3291 -0
3,291 lines not on this page · raw message
net/smc/smc_llc.c new file +1597 -0
1,597 lines not on this page · raw message
net/smc/smc_llc.h new file +192 -0
192 lines not on this page · raw message
net/smc/smc_proc.c new file +884 -0
884 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.3.8
Part of the diff is not shown here. View the raw message.