@@ -78,6 +78,11 @@ static inline bool rsk_drop_req(const struct request_sock *req)
return tcp_rsk(req)->is_mptcp && tcp_rsk(req)->drop_req;
}
+static inline struct mptcp_ext *mptcp_get_ext(struct sk_buff *skb)
+{
+ return (struct mptcp_ext *)skb_ext_find(skb, SKB_EXT_MPTCP);
+}
+
void mptcp_space(const struct sock *ssk, int *space, int *full_space);
bool mptcp_syn_options(struct sock *sk, const struct sk_buff *skb,
unsigned int *size, struct mptcp_out_options *opts);
@@ -169,6 +174,11 @@ static inline bool rsk_drop_req(const struct request_sock *req)
return false;
}
+static inline struct mptcp_ext *mptcp_get_ext(struct sk_buff *skb)
+{
+ return NULL;
+}
+
static inline void mptcp_parse_option(const struct sk_buff *skb,
const unsigned char *ptr, int opsize,
struct tcp_options_received *opt_rx)
@@ -2377,4 +2377,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 */
@@ -139,12 +139,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;
@@ -568,11 +562,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);
-}
-
void mptcp_diag_subflow_init(struct tcp_ulp_ops *ops);
static inline bool __mptcp_check_fallback(const struct mptcp_sock *msk)