From: Mat Martineau <martineau@kernel.org>
To: Matthieu Baerts <matthieu.baerts@tessares.net>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, mptcp@lists.linux.dev,
Geliang Tang <geliang.tang@suse.com>,
Mat Martineau <martineau@kernel.org>
Subject: [PATCH net-next 06/10] mptcp: add scheduled in mptcp_subflow_context
Date: Mon, 21 Aug 2023 15:25:17 -0700 [thread overview]
Message-ID: <20230821-upstream-net-next-20230818-v1-6-0c860fb256a8@kernel.org> (raw)
In-Reply-To: <20230821-upstream-net-next-20230818-v1-0-0c860fb256a8@kernel.org>
From: Geliang Tang <geliang.tang@suse.com>
This patch adds a new member scheduled in struct mptcp_subflow_context,
which will be set in the MPTCP scheduler context when the scheduler
picks this subflow to send data.
Add a new helper mptcp_subflow_set_scheduled() to set this flag using
WRITE_ONCE().
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: Mat Martineau <martineau@kernel.org>
---
net/mptcp/protocol.h | 3 +++
net/mptcp/sched.c | 6 ++++++
2 files changed, 9 insertions(+)
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index 548c302a757e..e7523a40132f 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -491,6 +491,7 @@ struct mptcp_subflow_context {
is_mptfo : 1, /* subflow is doing TFO */
__unused : 9;
enum mptcp_data_avail data_avail;
+ bool scheduled;
u32 remote_nonce;
u64 thmac;
u32 local_nonce;
@@ -663,6 +664,8 @@ void mptcp_unregister_scheduler(struct mptcp_sched_ops *sched);
int mptcp_init_sched(struct mptcp_sock *msk,
struct mptcp_sched_ops *sched);
void mptcp_release_sched(struct mptcp_sock *msk);
+void mptcp_subflow_set_scheduled(struct mptcp_subflow_context *subflow,
+ bool scheduled);
static inline bool __tcp_can_send(const struct sock *ssk)
{
diff --git a/net/mptcp/sched.c b/net/mptcp/sched.c
index 53773668b5ee..d295b92a5789 100644
--- a/net/mptcp/sched.c
+++ b/net/mptcp/sched.c
@@ -87,3 +87,9 @@ void mptcp_release_sched(struct mptcp_sock *msk)
bpf_module_put(sched, sched->owner);
}
+
+void mptcp_subflow_set_scheduled(struct mptcp_subflow_context *subflow,
+ bool scheduled)
+{
+ WRITE_ONCE(subflow->scheduled, scheduled);
+}
--
2.41.0
next prev parent reply other threads:[~2023-08-21 22:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-21 22:25 [PATCH net-next 00/10] mptcp: Prepare MPTCP packet scheduler for BPF extension Mat Martineau
2023-08-21 22:25 ` [PATCH net-next 01/10] mptcp: refactor push_pending logic Mat Martineau
2023-08-21 22:25 ` [PATCH net-next 02/10] mptcp: drop last_snd and MPTCP_RESET_SCHEDULER Mat Martineau
2023-08-21 22:25 ` [PATCH net-next 03/10] mptcp: add struct mptcp_sched_ops Mat Martineau
2023-08-21 22:25 ` [PATCH net-next 04/10] mptcp: add a new sysctl scheduler Mat Martineau
2023-08-21 22:25 ` [PATCH net-next 05/10] mptcp: add sched in mptcp_sock Mat Martineau
2023-08-21 22:25 ` Mat Martineau [this message]
2023-08-21 22:25 ` [PATCH net-next 07/10] mptcp: add scheduler wrappers Mat Martineau
2023-08-21 22:25 ` [PATCH net-next 08/10] mptcp: use get_send wrapper Mat Martineau
2023-08-21 22:25 ` [PATCH net-next 09/10] mptcp: use get_retrans wrapper Mat Martineau
2023-08-21 22:25 ` [PATCH net-next 10/10] mptcp: register default scheduler Mat Martineau
2023-08-23 1:40 ` [PATCH net-next 00/10] mptcp: Prepare MPTCP packet scheduler for BPF extension patchwork-bot+netdevbpf
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=20230821-upstream-net-next-20230818-v1-6-0c860fb256a8@kernel.org \
--to=martineau@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=geliang.tang@suse.com \
--cc=kuba@kernel.org \
--cc=matthieu.baerts@tessares.net \
--cc=mptcp@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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).