diff options
author | Jianguo Wu <wujianguo@chinatelecom.cn> | 2021-05-28 01:54:25 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-05-28 22:59:15 +0200 |
commit | c68a0cd1735fe09fa7c1a7de1f11a5b674f1c549 (patch) | |
tree | e7da16242533e06863778ed7ab8122e812413742 /net/mptcp/token.c | |
parent | mptcp: fix pr_debug in mptcp_token_new_connect (diff) | |
download | linux-c68a0cd1735fe09fa7c1a7de1f11a5b674f1c549.tar.xz linux-c68a0cd1735fe09fa7c1a7de1f11a5b674f1c549.zip |
mptcp: using TOKEN_MAX_RETRIES instead of magic number
We have macro TOKEN_MAX_RETRIES for the number of token generate retries,
so using TOKEN_MAX_RETRIES in subflow_check_req().
And rename TOKEN_MAX_RETRIES to MPTCP_TOKEN_MAX_RETRIES as it is now
exposed.
Fixes: 535fb8152f31 ("mptcp: token: move retry to caller")
Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Jianguo Wu <wujianguo@chinatelecom.cn>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mptcp/token.c')
-rw-r--r-- | net/mptcp/token.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/mptcp/token.c b/net/mptcp/token.c index 72a24e63b131..a98e554b034f 100644 --- a/net/mptcp/token.c +++ b/net/mptcp/token.c @@ -33,7 +33,6 @@ #include <net/mptcp.h> #include "protocol.h" -#define TOKEN_MAX_RETRIES 4 #define TOKEN_MAX_CHAIN_LEN 4 struct token_bucket { @@ -153,7 +152,7 @@ int mptcp_token_new_connect(struct sock *sk) { struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk); struct mptcp_sock *msk = mptcp_sk(subflow->conn); - int retries = TOKEN_MAX_RETRIES; + int retries = MPTCP_TOKEN_MAX_RETRIES; struct token_bucket *bucket; again: |