From: Dmytro Shytyi <dmytro@shytyi.net>
To: mptcp@lists.linux.dev
Cc: Dmytro Shytyi <dmytro@shytyi.net>
Subject: [RFC PATCH mptcp-next v5 09/10] These 2 functions are from protocol.c. Cannot import as not in protocol.h. Should I leave them like this? Or add prototypes in protocol.h and reuse?
Date: Wed, 14 Sep 2022 13:31:50 +0200 [thread overview]
Message-ID: <20220914113151.9898-9-dmytro@shytyi.net> (raw)
In-Reply-To: <20220914113151.9898-1-dmytro@shytyi.net>
These 2 functions are from
protocol.c. Cannot import as not in protocol.h. Should I leave them like
this? Or add prototypes in protocol.h and reuse?
Signed-off-by: Dmytro Shytyi <dmytro@shytyi.net>
---
net/mptcp/fastopen.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/net/mptcp/fastopen.c b/net/mptcp/fastopen.c
index fd0e4b7c8f68..6a4cb7a28871 100644
--- a/net/mptcp/fastopen.c
+++ b/net/mptcp/fastopen.c
@@ -102,6 +102,25 @@ void mptcp_treat_3d_ack_fastopen(struct mptcp_sock *msk, struct mptcp_subflow_co
}
}
+static void mptcp_rmem_uncharge(struct sock *sk, int size)
+{
+ struct mptcp_sock *msk = mptcp_sk(sk);
+ int reclaimable;
+
+ msk->rmem_fwd_alloc += size;
+ reclaimable = msk->rmem_fwd_alloc - sk_unused_reserved_mem(sk);
+
+}
+
+static void mptcp_rfree(struct sk_buff *skb)
+{
+ unsigned int len = skb->truesize;
+ struct sock *sk = skb->sk;
+
+ atomic_sub(len, &sk->sk_rmem_alloc);
+ mptcp_rmem_uncharge(sk, len);
+}
+
void mptcp_fastopen_add_skb(struct sock *sk, struct sk_buff *skb, struct request_sock *req)
{
struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);
--
2.25.1
next prev parent reply other threads:[~2022-09-14 11:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-14 11:31 [RFC PATCH mptcp-next v5 01/10] mptcp: Fast Open Mechanism Dmytro Shytyi
2022-09-14 11:31 ` [RFC PATCH mptcp-next v5 02/10] Initiator: MSG_FASTOPEN in sendto triggers the mptcp_sendsmg_fastopen. It requests a MPTFO cookie. Suggestion @palbeni(JAN 17): 'split the patch in several small one, clearly documenting in the individual commit message what each patch is doing and why' Dmytro Shytyi
2022-09-14 11:31 ` [RFC PATCH mptcp-next v5 03/10] Initiator: mptcp_sendmsg_fastopen. Usage of lock_sock() / release_sock() leads to hangup' Dmytro Shytyi
2022-09-14 11:31 ` [RFC PATCH mptcp-next v5 04/10] Treat a socket option TCP_FASTOPEN on Lister side. Suggestion @mmartineau(MAY 22): 'Need to use ssk instead of sk in these several lines' (1 AUG): 'Since fastopen is only relevant for the initial subflow (and never with MP_JOIN). __mptcp_nmpc_socket() should give the initial subflow' Dmytro Shytyi
2022-09-14 11:31 ` [RFC PATCH mptcp-next v5 05/10] This fixes the unexpected value of subflow->map_seq for the second packet that leads to packet discard and further retransmit Dmytro Shytyi
2022-09-14 11:31 ` [RFC PATCH mptcp-next v5 06/10] This commit introduces mptfo variables for msk and options. Also fixes the infinite retransmissions in the end of second session. Suggestion @palbeni (SEP 1) during the meting to 'look at data_ack' Dmytro Shytyi
2022-09-14 11:31 ` [RFC PATCH mptcp-next v5 07/10] Add the received skb on the listener side to msk and set flag mptfo to 1 to treat some parts only in MPTFO case. This function is called from the functions presented in the next patch Dmytro Shytyi
2022-09-14 11:31 ` [RFC PATCH mptcp-next v5 08/10] This is temporary modification and will be adressed in the new version of the patch: Remove OPTIONS_TS from the options. See disscusion in the mailing list (JAN 18) [PATCH v2] fastopen with @palbeni Dmytro Shytyi
2022-09-14 11:31 ` Dmytro Shytyi [this message]
2022-09-14 11:31 ` [RFC PATCH mptcp-next v5 10/10] MPTFO tests: these are examples that probably are going to be integrated to the mptcp_connect.* selftests Dmytro Shytyi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220914113151.9898-9-dmytro@shytyi.net \
--to=dmytro@shytyi.net \
--cc=mptcp@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).