* [MPTCP] [PATCH RFC 10/10] mptcp: token: rename token_release
@ 2019-08-25 18:59 Florian Westphal
0 siblings, 0 replies; only message in thread
From: Florian Westphal @ 2019-08-25 18:59 UTC (permalink / raw)
To: mptcp
[-- Attachment #1: Type: text/plain, Size: 1861 bytes --]
avoid namespace pollution -- add an mptcp prefix.
Signed-off-by: Florian Westphal <fw(a)strlen.de>
---
net/mptcp/protocol.h | 2 +-
net/mptcp/subflow.c | 3 +--
net/mptcp/token.c | 9 ++++++++-
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index 94b06ec168ff..daeea2ec6fd5 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -235,7 +235,7 @@ int mptcp_token_new_connect(struct sock *sk);
int mptcp_token_new_accept(u32 token);
void mptcp_token_update_accept(struct sock *sk, struct sock *conn);
struct mptcp_sock *mptcp_token_get_sock(u32 token);
-void token_release(u32 token);
+void mptcp_token_release(u32 token);
void mptcp_token_destroy(u32 token);
void crypto_key_sha1(u64 key, u32 *token, u64 *idsn);
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index 1cfd18e74486..fa244c0e6267 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -386,8 +386,7 @@ static void subflow_ulp_release(struct sock *sk)
struct subflow_context *ctx = subflow_ctx(sk);
pr_debug("subflow=%p", ctx);
-
- token_release(ctx->token);
+ mptcp_token_release(ctx->token);
kfree(ctx);
}
diff --git a/net/mptcp/token.c b/net/mptcp/token.c
index 3c1f43542e1e..c28b3c8b85a1 100644
--- a/net/mptcp/token.c
+++ b/net/mptcp/token.c
@@ -315,7 +315,14 @@ void mptcp_token_destroy_request(u32 token)
spin_unlock_bh(&token_tree_lock);
}
-void token_release(u32 token)
+/**
+ * mptcp_token_release - put reference on token without withdrawing it
+ * @token - token of mptcp connection that the subflow is "leaving"
+ *
+ * This is used to close/remove a subflow without removing the
+ * mptcp connection from the token <-> mptcp_sk map.
+ */
+void mptcp_token_release(u32 token)
{
struct sock *conn;
--
2.21.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-08-25 18:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-25 18:59 [MPTCP] [PATCH RFC 10/10] mptcp: token: rename token_release Florian Westphal
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.