Skip to content

Commit ac71387

Browse files
Ursula Braundavem330
authored andcommitted
smc: establish new socket family
* enable smc module loading and unloading * register new socket family * basic smc socket creation and deletion * use backing TCP socket to run CLC (Connection Layer Control) handshake of SMC protocol * Setup for infiniband traffic is implemented in follow-on patches. For now fallback to TCP socket is always used. Signed-off-by: Ursula Braun <[email protected]> Reviewed-by: Utz Bacher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 4b9d07a commit ac71387

File tree

9 files changed

+688
-4
lines changed

9 files changed

+688
-4
lines changed

MAINTAINERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10850,6 +10850,13 @@ S: Maintained
1085010850
F: drivers/staging/media/st-cec/
1085110851
F: Documentation/devicetree/bindings/media/stih-cec.txt
1085210852

10853+
SHARED MEMORY COMMUNICATIONS (SMC) SOCKETS
10854+
M: Ursula Braun <[email protected]>
10855+
10856+
W: http://www.ibm.com/developerworks/linux/linux390/
10857+
S: Supported
10858+
F: net/smc/
10859+
1085310860
SYNOPSYS DESIGNWARE DMAC DRIVER
1085410861
M: Viresh Kumar <[email protected]>
1085510862
M: Andy Shevchenko <[email protected]>

include/linux/socket.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,12 @@ struct ucred {
202202
#define AF_VSOCK 40 /* vSockets */
203203
#define AF_KCM 41 /* Kernel Connection Multiplexor*/
204204
#define AF_QIPCRTR 42 /* Qualcomm IPC Router */
205+
#define AF_SMC 43 /* smc sockets: reserve number for
206+
* PF_SMC protocol family that
207+
* reuses AF_INET address family
208+
*/
205209

206-
#define AF_MAX 43 /* For now.. */
210+
#define AF_MAX 44 /* For now.. */
207211

208212
/* Protocol families, same as address families. */
209213
#define PF_UNSPEC AF_UNSPEC
@@ -251,6 +255,7 @@ struct ucred {
251255
#define PF_VSOCK AF_VSOCK
252256
#define PF_KCM AF_KCM
253257
#define PF_QIPCRTR AF_QIPCRTR
258+
#define PF_SMC AF_SMC
254259
#define PF_MAX AF_MAX
255260

256261
/* Maximum queue length specifiable by listen. */

net/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ source "net/packet/Kconfig"
5757
source "net/unix/Kconfig"
5858
source "net/xfrm/Kconfig"
5959
source "net/iucv/Kconfig"
60+
source "net/smc/Kconfig"
6061

6162
config INET
6263
bool "TCP/IP networking"

net/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ obj-$(CONFIG_MAC80211) += mac80211/
5151
obj-$(CONFIG_TIPC) += tipc/
5252
obj-$(CONFIG_NETLABEL) += netlabel/
5353
obj-$(CONFIG_IUCV) += iucv/
54+
obj-$(CONFIG_SMC) += smc/
5455
obj-$(CONFIG_RFKILL) += rfkill/
5556
obj-$(CONFIG_NET_9P) += 9p/
5657
obj-$(CONFIG_CAIF) += caif/

net/core/sock.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ static const char *const af_family_key_strings[AF_MAX+1] = {
222222
"sk_lock-AF_RXRPC" , "sk_lock-AF_ISDN" , "sk_lock-AF_PHONET" ,
223223
"sk_lock-AF_IEEE802154", "sk_lock-AF_CAIF" , "sk_lock-AF_ALG" ,
224224
"sk_lock-AF_NFC" , "sk_lock-AF_VSOCK" , "sk_lock-AF_KCM" ,
225-
"sk_lock-AF_MAX"
225+
"sk_lock-AF_SMC" , "sk_lock-AF_MAX"
226226
};
227227
static const char *const af_family_slock_key_strings[AF_MAX+1] = {
228228
"slock-AF_UNSPEC", "slock-AF_UNIX" , "slock-AF_INET" ,
@@ -239,7 +239,7 @@ static const char *const af_family_slock_key_strings[AF_MAX+1] = {
239239
"slock-AF_RXRPC" , "slock-AF_ISDN" , "slock-AF_PHONET" ,
240240
"slock-AF_IEEE802154", "slock-AF_CAIF" , "slock-AF_ALG" ,
241241
"slock-AF_NFC" , "slock-AF_VSOCK" ,"slock-AF_KCM" ,
242-
"slock-AF_MAX"
242+
"slock-AF_SMC" , "slock-AF_MAX"
243243
};
244244
static const char *const af_family_clock_key_strings[AF_MAX+1] = {
245245
"clock-AF_UNSPEC", "clock-AF_UNIX" , "clock-AF_INET" ,
@@ -256,7 +256,7 @@ static const char *const af_family_clock_key_strings[AF_MAX+1] = {
256256
"clock-AF_RXRPC" , "clock-AF_ISDN" , "clock-AF_PHONET" ,
257257
"clock-AF_IEEE802154", "clock-AF_CAIF" , "clock-AF_ALG" ,
258258
"clock-AF_NFC" , "clock-AF_VSOCK" , "clock-AF_KCM" ,
259-
"clock-AF_MAX"
259+
"closck-AF_smc" , "clock-AF_MAX"
260260
};
261261

262262
/*

net/smc/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
config SMC
2+
tristate "SMC socket protocol family"
3+
depends on INET && INFINIBAND
4+
---help---
5+
SMC-R provides a "sockets over RDMA" solution making use of
6+
RDMA over Converged Ethernet (RoCE) technology to upgrade
7+
AF_INET TCP connections transparently.
8+
The Linux implementation of the SMC-R solution is designed as
9+
a separate socket family SMC.
10+
11+
Select this option if you want to run SMC socket applications

net/smc/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
obj-$(CONFIG_SMC) += smc.o
2+
smc-y := af_smc.o

0 commit comments

Comments
 (0)