aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeliang Tang <tanggeliang@kylinos.cn>2024-02-26 11:05:12 +0800
committerGeliang Tang <tanggeliang@kylinos.cn>2024-04-22 17:31:48 +0800
commitcdd282d6fe419258d224476aa2bcc738362ff378 (patch)
tree51089a405c410d7e88e74aeabe02ab5379ec9084
parent27da9b0cef60cf375d6982bf8654bab68aa6dba6 (diff)
downloadmptcp_net-next-cdd282d6fe419258d224476aa2bcc738362ff378.tar.gz
mptcp: export mptcp_wnd_end helper
This patch moves mptcp_wnd_end() helper from protocol.c to protocol.h, and add 'static inline' prefix for it. Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
-rw-r--r--net/mptcp/protocol.c6
-rw-r--r--net/mptcp/protocol.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index c33fc9968c0f81..0abafaa2584c52 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -48,12 +48,6 @@ static void mptcp_check_send_data_fin(struct sock *sk);
DEFINE_PER_CPU(struct mptcp_delegated_action, mptcp_delegated_actions);
static struct net_device mptcp_napi_dev;
-/* Returns end sequence number of the receiver's advertised window */
-u64 mptcp_wnd_end(const struct mptcp_sock *msk)
-{
- return READ_ONCE(msk->wnd_end);
-}
-
static const struct proto_ops *mptcp_fallback_tcp_ops(const struct sock *sk)
{
#if IS_ENABLED(CONFIG_MPTCP_IPV6)
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index 2a27c044732db1..537bb7c8f9748a 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -373,6 +373,12 @@ static inline void msk_owned_by_me(const struct mptcp_sock *msk)
#define mptcp_sk(ptr) container_of_const(ptr, struct mptcp_sock, sk.icsk_inet.sk)
#endif
+/* Returns end sequence number of the receiver's advertised window */
+static inline u64 mptcp_wnd_end(const struct mptcp_sock *msk)
+{
+ return READ_ONCE(msk->wnd_end);
+}
+
/* the msk socket don't use the backlog, also account for the bulk
* free memory
*/