Skip to content

Commit 3ee17bc

Browse files
mjmartineaudavem330
authored andcommitted
mptcp: Add MPTCP to skb extensions
Add enum value for MPTCP and update config dependencies v5 -> v6: - fixed '__unused' field size Co-developed-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Co-developed-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 1323059 commit 3ee17bc

4 files changed

Lines changed: 48 additions & 0 deletions

File tree

‎MAINTAINERS‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11573,6 +11573,16 @@ F: net/ipv6/calipso.c
1157311573
F: net/netfilter/xt_CONNSECMARK.c
1157411574
F: net/netfilter/xt_SECMARK.c
1157511575

11576+
NETWORKING [MPTCP]
11577+
M: Mat Martineau <mathew.j.martineau@linux.intel.com>
11578+
M: Matthieu Baerts <matthieu.baerts@tessares.net>
11579+
L: netdev@vger.kernel.org
11580+
L: mptcp@lists.01.org
11581+
W: https://github.com/multipath-tcp/mptcp_net-next/wiki
11582+
B: https://github.com/multipath-tcp/mptcp_net-next/issues
11583+
S: Maintained
11584+
F: include/net/mptcp.h
11585+
1157611586
NETWORKING [TCP]
1157711587
M: Eric Dumazet <edumazet@google.com>
1157811588
L: netdev@vger.kernel.org

‎include/linux/skbuff.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4096,6 +4096,9 @@ enum skb_ext_id {
40964096
#endif
40974097
#if IS_ENABLED(CONFIG_NET_TC_SKB_EXT)
40984098
TC_SKB_EXT,
4099+
#endif
4100+
#if IS_ENABLED(CONFIG_MPTCP)
4101+
SKB_EXT_MPTCP,
40994102
#endif
41004103
SKB_EXT_NUM, /* must be last */
41014104
};

‎include/net/mptcp.h‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
/*
3+
* Multipath TCP
4+
*
5+
* Copyright (c) 2017 - 2019, Intel Corporation.
6+
*/
7+
8+
#ifndef __NET_MPTCP_H
9+
#define __NET_MPTCP_H
10+
11+
#include <linux/types.h>
12+
13+
/* MPTCP sk_buff extension data */
14+
struct mptcp_ext {
15+
u64 data_ack;
16+
u64 data_seq;
17+
u32 subflow_seq;
18+
u16 data_len;
19+
u8 use_map:1,
20+
dsn64:1,
21+
data_fin:1,
22+
use_ack:1,
23+
ack64:1,
24+
__unused:3;
25+
/* one byte hole */
26+
};
27+
28+
#endif /* __NET_MPTCP_H */

‎net/core/skbuff.c‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
#include <net/ip6_checksum.h>
6969
#include <net/xfrm.h>
7070
#include <net/mpls.h>
71+
#include <net/mptcp.h>
7172

7273
#include <linux/uaccess.h>
7374
#include <trace/events/skb.h>
@@ -4109,6 +4110,9 @@ static const u8 skb_ext_type_len[] = {
41094110
#if IS_ENABLED(CONFIG_NET_TC_SKB_EXT)
41104111
[TC_SKB_EXT] = SKB_EXT_CHUNKSIZEOF(struct tc_skb_ext),
41114112
#endif
4113+
#if IS_ENABLED(CONFIG_MPTCP)
4114+
[SKB_EXT_MPTCP] = SKB_EXT_CHUNKSIZEOF(struct mptcp_ext),
4115+
#endif
41124116
};
41134117

41144118
static __always_inline unsigned int skb_ext_total_length(void)
@@ -4122,6 +4126,9 @@ static __always_inline unsigned int skb_ext_total_length(void)
41224126
#endif
41234127
#if IS_ENABLED(CONFIG_NET_TC_SKB_EXT)
41244128
skb_ext_type_len[TC_SKB_EXT] +
4129+
#endif
4130+
#if IS_ENABLED(CONFIG_MPTCP)
4131+
skb_ext_type_len[SKB_EXT_MPTCP] +
41254132
#endif
41264133
0;
41274134
}

0 commit comments

Comments
 (0)