All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geliang Tang <geliang.tang@suse.com>
To: Matthieu Baerts <matthieu.baerts@tessares.net>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next v11 03/11] Squash to "mptcp: add sched_data_set_contexts helper"
Date: Thu, 13 Jul 2023 15:15:19 +0800	[thread overview]
Message-ID: <20230713071519.GA19684@localhost.localdomain> (raw)
In-Reply-To: <5694986e33e230afaa68c83c9e9fd64f7a551da1.1687827857.git.geliang.tang@suse.com>

On Tue, Jun 27, 2023 at 09:06:46AM +0800, Geliang Tang wrote:
> mptcp: add sched_data helpers
> 
> Add a new helper mptcp_sched_data_set_contexts() to set the subflow
> pointers array in struct mptcp_sched_data. Add a new helper
> mptcp_subflow_ctx_by_pos() to get the given pos subflow from the
> contexts array in struct mptcp_sched_data. They will be invoked by
> the BPF schedulers to export the subflow pointers to the BPF contexts.

Hi Matt,

You forgot to help me update the subject and commit log :)

Thanks,
-Geliang

> 
> Signed-off-by: Geliang Tang <geliang.tang@suse.com>
> ---
>  net/mptcp/protocol.h | 2 ++
>  net/mptcp/sched.c    | 9 +++++++++
>  2 files changed, 11 insertions(+)
> 
> diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
> index 8c9b2a03dc94..cb2f34c8ed09 100644
> --- a/net/mptcp/protocol.h
> +++ b/net/mptcp/protocol.h
> @@ -664,6 +664,8 @@ void mptcp_subflow_set_scheduled(struct mptcp_subflow_context *subflow,
>  				 bool scheduled);
>  void mptcp_sched_data_set_contexts(const struct mptcp_sock *msk,
>  				   struct mptcp_sched_data *data);
> +struct mptcp_subflow_context *
> +mptcp_subflow_ctx_by_pos(const struct mptcp_sched_data *data, unsigned int pos);
>  struct sock *mptcp_subflow_get_send(struct mptcp_sock *msk);
>  struct sock *mptcp_subflow_get_retrans(struct mptcp_sock *msk);
>  int mptcp_sched_get_send(struct mptcp_sock *msk);
> diff --git a/net/mptcp/sched.c b/net/mptcp/sched.c
> index c7c167e48d72..82665263bb94 100644
> --- a/net/mptcp/sched.c
> +++ b/net/mptcp/sched.c
> @@ -108,11 +108,20 @@ void mptcp_sched_data_set_contexts(const struct mptcp_sock *msk,
>  		mptcp_subflow_set_scheduled(subflow, false);
>  		data->contexts[i++] = subflow;
>  	}
> +	data->subflows = i;
>  
>  	for (; i < MPTCP_SUBFLOWS_MAX; i++)
>  		data->contexts[i] = NULL;
>  }
>  
> +struct mptcp_subflow_context *
> +mptcp_subflow_ctx_by_pos(const struct mptcp_sched_data *data, unsigned int pos)
> +{
> +	if (pos >= MPTCP_SUBFLOWS_MAX)
> +		return NULL;
> +	return data->contexts[pos];
> +}
> +
>  int mptcp_sched_get_send(struct mptcp_sock *msk)
>  {
>  	struct mptcp_subflow_context *subflow;
> -- 
> 2.35.3
> 

  reply	other threads:[~2023-07-13  7:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-27  1:06 [PATCH mptcp-next v11 00/11] BPF packet scheduler updates part 1 Geliang Tang
2023-06-27  1:06 ` [PATCH mptcp-next v11 01/11] Squash to "mptcp: drop last_snd and MPTCP_RESET_SCHEDULER" Geliang Tang
2023-06-27  1:06 ` [PATCH mptcp-next v11 02/11] Squash to "mptcp: add struct mptcp_sched_ops" Geliang Tang
2023-06-27  1:06 ` [PATCH mptcp-next v11 03/11] Squash to "mptcp: add sched_data_set_contexts helper" Geliang Tang
2023-07-13  7:15   ` Geliang Tang [this message]
2023-07-13  8:50     ` Matthieu Baerts
2023-06-27  1:06 ` [PATCH mptcp-next v11 04/11] mptcp: register default scheduler Geliang Tang
2023-06-27  1:06 ` [PATCH mptcp-next v11 05/11] Squash to "bpf: Add bpf_mptcp_sched_ops" Geliang Tang
2023-06-27  1:06 ` [PATCH mptcp-next v11 06/11] Squash to "bpf: Add bpf_mptcp_sched_kfunc_set" Geliang Tang
2023-06-27  1:06 ` [PATCH mptcp-next v11 07/11] Squash to "selftests/bpf: Add mptcp sched structs" Geliang Tang
2023-06-27  1:06 ` [PATCH mptcp-next v11 08/11] Squash to "selftests/bpf: Add bpf_first scheduler" Geliang Tang
2023-06-27  1:06 ` [PATCH mptcp-next v11 09/11] Squash to "selftests/bpf: Add bpf_bkup scheduler" Geliang Tang
2023-06-27  1:06 ` [PATCH mptcp-next v11 10/11] Squash to "selftests/bpf: Add bpf_rr scheduler" Geliang Tang
2023-07-03 15:38   ` Paolo Abeni
2023-07-04  2:06     ` Geliang Tang
2023-06-27  1:06 ` [PATCH mptcp-next v11 11/11] Squash to "selftests/bpf: Add bpf_red scheduler" Geliang Tang
2023-06-27  1:29   ` Squash to "selftests/bpf: Add bpf_red scheduler": Tests Results MPTCP CI
2023-06-27  9:13   ` MPTCP CI
2023-07-05  9:11 ` [PATCH mptcp-next v11 00/11] BPF packet scheduler updates part 1 Matthieu Baerts
2023-07-05 17:53   ` Mat Martineau
2023-07-06  8:49   ` Geliang Tang

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=20230713071519.GA19684@localhost.localdomain \
    --to=geliang.tang@suse.com \
    --cc=matthieu.baerts@tessares.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 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.