protocol.c (0f69403d2535ffc7200a8414cf3ca66a49b0d741) protocol.c (d39dceca388ad0e4f748836806349ebe09282283)
1// SPDX-License-Identifier: GPL-2.0
2/* Multipath TCP
3 *
4 * Copyright (c) 2017 - 2019, Intel Corporation.
5 */
6
7#define pr_fmt(fmt) "MPTCP: " fmt
8

--- 2063 unchanged lines hidden (view full) ---

2072static struct inet_protosw mptcp_protosw = {
2073 .type = SOCK_STREAM,
2074 .protocol = IPPROTO_MPTCP,
2075 .prot = &mptcp_prot,
2076 .ops = &mptcp_stream_ops,
2077 .flags = INET_PROTOSW_ICSK,
2078};
2079
1// SPDX-License-Identifier: GPL-2.0
2/* Multipath TCP
3 *
4 * Copyright (c) 2017 - 2019, Intel Corporation.
5 */
6
7#define pr_fmt(fmt) "MPTCP: " fmt
8

--- 2063 unchanged lines hidden (view full) ---

2072static struct inet_protosw mptcp_protosw = {
2073 .type = SOCK_STREAM,
2074 .protocol = IPPROTO_MPTCP,
2075 .prot = &mptcp_prot,
2076 .ops = &mptcp_stream_ops,
2077 .flags = INET_PROTOSW_ICSK,
2078};
2079
2080void mptcp_proto_init(void)
2080void __init mptcp_proto_init(void)
2081{
2082 mptcp_prot.h.hashinfo = tcp_prot.h.hashinfo;
2083
2084 if (percpu_counter_init(&mptcp_sockets_allocated, 0, GFP_KERNEL))
2085 panic("Failed to allocate MPTCP pcpu counter\n");
2086
2087 mptcp_subflow_init();
2088 mptcp_pm_init();

--- 45 unchanged lines hidden (view full) ---

2134static struct inet_protosw mptcp_v6_protosw = {
2135 .type = SOCK_STREAM,
2136 .protocol = IPPROTO_MPTCP,
2137 .prot = &mptcp_v6_prot,
2138 .ops = &mptcp_v6_stream_ops,
2139 .flags = INET_PROTOSW_ICSK,
2140};
2141
2081{
2082 mptcp_prot.h.hashinfo = tcp_prot.h.hashinfo;
2083
2084 if (percpu_counter_init(&mptcp_sockets_allocated, 0, GFP_KERNEL))
2085 panic("Failed to allocate MPTCP pcpu counter\n");
2086
2087 mptcp_subflow_init();
2088 mptcp_pm_init();

--- 45 unchanged lines hidden (view full) ---

2134static struct inet_protosw mptcp_v6_protosw = {
2135 .type = SOCK_STREAM,
2136 .protocol = IPPROTO_MPTCP,
2137 .prot = &mptcp_v6_prot,
2138 .ops = &mptcp_v6_stream_ops,
2139 .flags = INET_PROTOSW_ICSK,
2140};
2141
2142int mptcp_proto_v6_init(void)
2142int __init mptcp_proto_v6_init(void)
2143{
2144 int err;
2145
2146 mptcp_v6_prot = mptcp_prot;
2147 strcpy(mptcp_v6_prot.name, "MPTCPv6");
2148 mptcp_v6_prot.slab = NULL;
2149 mptcp_v6_prot.destroy = mptcp_v6_destroy;
2150 mptcp_v6_prot.obj_size = sizeof(struct mptcp6_sock);

--- 12 unchanged lines hidden ---
2143{
2144 int err;
2145
2146 mptcp_v6_prot = mptcp_prot;
2147 strcpy(mptcp_v6_prot.name, "MPTCPv6");
2148 mptcp_v6_prot.slab = NULL;
2149 mptcp_v6_prot.destroy = mptcp_v6_destroy;
2150 mptcp_v6_prot.obj_size = sizeof(struct mptcp6_sock);

--- 12 unchanged lines hidden ---