@@ -68,6 +68,11 @@ static inline bool sk_is_mptcp(const struct sock *sk)
return tcp_sk(sk)->is_mptcp;
}
+static inline struct mptcp_ext *mptcp_get_ext(struct sk_buff *skb)
+{
+ return (struct mptcp_ext *)skb_ext_find(skb, SKB_EXT_MPTCP);
+}
+
static inline bool rsk_is_mptcp(const struct request_sock *req)
{
return tcp_rsk(req)->is_mptcp;
@@ -153,6 +158,11 @@ static inline void mptcp_init(void)
{
}
+static inline struct mptcp_ext *mptcp_get_ext(struct sk_buff *skb)
+{
+ return NULL;
+}
+
static inline bool sk_is_mptcp(const struct sock *sk)
{
return false;
@@ -2406,4 +2406,9 @@ static inline u64 tcp_transmit_time(const struct sock *sk)
return 0;
}
+static inline __be32 mptcp_option(u8 subopt, u8 len, u8 nib, u8 field)
+{
+ return htonl((TCPOPT_MPTCP << 24) | (len << 16) | (subopt << 12) |
+ ((nib & 0xF) << 8) | field);
+}
#endif /* _TCP_H */
@@ -130,12 +130,6 @@ struct mptcp_options_received {
u16 port;
};
-static inline __be32 mptcp_option(u8 subopt, u8 len, u8 nib, u8 field)
-{
- return htonl((TCPOPT_MPTCP << 24) | (len << 16) | (subopt << 12) |
- ((nib & 0xF) << 8) | field);
-}
-
struct mptcp_addr_info {
sa_family_t family;
__be16 port;
@@ -486,11 +480,6 @@ void mptcp_pm_nl_rm_addr_received(struct mptcp_sock *msk);
void mptcp_pm_nl_rm_subflow_received(struct mptcp_sock *msk, u8 rm_id);
int mptcp_pm_nl_get_local_id(struct mptcp_sock *msk, struct sock_common *skc);
-static inline struct mptcp_ext *mptcp_get_ext(struct sk_buff *skb)
-{
- return (struct mptcp_ext *)skb_ext_find(skb, SKB_EXT_MPTCP);
-}
-
static inline bool before64(__u64 seq1, __u64 seq2)
{
return (__s64)(seq1 - seq2) < 0;