History

net/smc: Introduce IPPROTO_SMC

This patch allows to create smc socket via AF_INET, similar to the following code, /* create v4 smc sock */ v4 = socket(AF_INET, SOCK_STREAM, IPPROTO_SMC); /* create v6 smc sock */ v6 = socket(AF_INET6, SOCK_STREAM, IPPROTO_SMC); There are several reasons why we believe it is appropriate here: 1. For smc sockets, it actually use IPv4 (AF-INET) or IPv6 (AF-INET6) address. There is no AF_SMC address at all. 2. Create smc socket in the AF_INET(6) path, which allows us to reuse the infrastructure of AF_INET(6) path, such as common ebpf hooks. Otherwise, smc have to implement it again in AF_SMC path.

D. Wythe committed 2 years ago

Commit d25a92c1 parent 13543d05 files · +198 −3Browse files

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

Unified · Split

include/uapi/linux/in.h+2−0
@@ -81,6 +81,8 @@ enum { · 80 unmodified lines
8181 #define IPPROTO_ETHERNET IPPROTO_ETHERNET
8282 IPPROTO_RAW = 255, /* Raw IP packets */
8383 #define IPPROTO_RAW IPPROTO_RAW
84+ IPPROTO_SMC = 256, /* Shared Memory Communications */
85+#define IPPROTO_SMC IPPROTO_SMC
8486 IPPROTO_MPTCP = 262, /* Multipath TCP connection */
8587 #define IPPROTO_MPTCP IPPROTO_MPTCP
8688 IPPROTO_MAX