From patchwork Fri Oct 11 09:27:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geliang Tang X-Patchwork-Id: 13832272 X-Patchwork-Delegate: mat@martineau.name Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 120A5804 for ; Fri, 11 Oct 2024 09:27:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728638851; cv=none; b=Dw9pi3bNYKQwIdbyH2gUMnUOEzBPQstIjS8yJbSP5qpi6VAeidIMaGLMtegMuJ7Hqkxq44DcbvSFj+3o5+K0JcDIeweiIFD/9KPkQzRHahahOzAlrpW32CQGjtoCPf16oMp0AoZPKs7lgl/h7yLA6VKVH5g+R0mEkk3nJ6XDxQw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728638851; c=relaxed/simple; bh=Gz6HbhDzNQZ8VvZImuhA0bSkF4NjHsir9HNmr/KM86k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OWdFin4raBt43tgXQ+oi0WrGxch4G9jO3igX1hJJTcmGKeL+H1Z9Z5U9yigev7NrAwN2s2C6cF3dDebEY+xziVF2dcF9f+yO/N4Jzbem7oHmj8XPFiC7kjlTnTjZgPbhizGiNNlYm9OjoVJgSR41dAkhNZQftvHookydqkN84P0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aS/D7SyF; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aS/D7SyF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F37AC4CEC3; Fri, 11 Oct 2024 09:27:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728638850; bh=Gz6HbhDzNQZ8VvZImuhA0bSkF4NjHsir9HNmr/KM86k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aS/D7SyFeCq4v520yEviSiWBzAZ/QyNLMsjSodHqZHt5bnAprovVFIStAx+EhPA+P Sda2oHYTU8diG6fd516oKeiee0rQeO2y5q1b+Mmne+65qNZvCHYqbkKoRGeWn6HWyw sR+U32QnsvgXr861ZNvuWMhw8Ar2Dc0+cnpyIRukKcEZtLCwie5t6iqFawhSTTHb6j aEXUb+Tp9RjNf40O7NTgsgU6G+HYinYahau4TpmDEJcb73QngEPrGeOGr77Av9gIJ6 OPQlSgcjjP5MuvGCSM4URViaUB2ycVxfnUdc00HGsTqUwFkrw4GqAbmdlViVDoAKvJ w5bXrpAe1pwZQ== From: Geliang Tang To: mptcp@lists.linux.dev Cc: Geliang Tang Subject: [PATCH mptcp-next v4 01/11] Revert "mptcp: add sched_data helpers" Date: Fri, 11 Oct 2024 17:27:13 +0800 Message-ID: <29e13e7fb70f446ec82e9a53341719d11475fa01.1728638310.git.tanggeliang@kylinos.cn> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Geliang Tang Drop this patch. Signed-off-by: Geliang Tang --- net/mptcp/bpf.c | 8 -------- net/mptcp/protocol.h | 2 -- net/mptcp/sched.c | 22 ---------------------- 3 files changed, 32 deletions(-) diff --git a/net/mptcp/bpf.c b/net/mptcp/bpf.c index 9b87eee13955..681a76f7c6a8 100644 --- a/net/mptcp/bpf.c +++ b/net/mptcp/bpf.c @@ -271,14 +271,6 @@ __bpf_kfunc void bpf_mptcp_sock_release(struct mptcp_sock *msk) WARN_ON_ONCE(!sk || !refcount_dec_not_one(&sk->sk_refcnt)); } -__bpf_kfunc struct mptcp_subflow_context * -bpf_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]; -} - __bpf_kfunc bool bpf_mptcp_subflow_queues_empty(struct sock *sk) { return tcp_rtx_queue_empty(sk); diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index b963e68451b1..e774f28a6f8d 100644 --- a/net/mptcp/protocol.h +++ b/net/mptcp/protocol.h @@ -723,8 +723,6 @@ void mptcp_sock_graft(struct sock *sk, struct socket *parent); u64 mptcp_wnd_end(const struct mptcp_sock *msk); void mptcp_set_timeout(struct sock *sk); bool bpf_mptcp_subflow_queues_empty(struct sock *sk); -struct mptcp_subflow_context * -bpf_mptcp_subflow_ctx_by_pos(const struct mptcp_sched_data *data, unsigned int pos); struct sock *__mptcp_nmpc_sk(struct mptcp_sock *msk); bool __mptcp_close(struct sock *sk, long timeout); void mptcp_cancel_work(struct sock *sk); diff --git a/net/mptcp/sched.c b/net/mptcp/sched.c index 5257bc6c8cd6..78ed508ebc1b 100644 --- a/net/mptcp/sched.c +++ b/net/mptcp/sched.c @@ -143,26 +143,6 @@ void mptcp_subflow_set_scheduled(struct mptcp_subflow_context *subflow, WRITE_ONCE(subflow->scheduled, scheduled); } -static void mptcp_sched_data_set_contexts(const struct mptcp_sock *msk, - struct mptcp_sched_data *data) -{ - struct mptcp_subflow_context *subflow; - int i = 0; - - mptcp_for_each_subflow(msk, subflow) { - if (i == MPTCP_SUBFLOWS_MAX) { - pr_warn_once("too many subflows"); - break; - } - mptcp_subflow_set_scheduled(subflow, false); - data->contexts[i++] = subflow; - } - data->subflows = i; - - for (; i < MPTCP_SUBFLOWS_MAX; i++) - data->contexts[i] = NULL; -} - int mptcp_sched_get_send(struct mptcp_sock *msk) { struct mptcp_subflow_context *subflow; @@ -189,7 +169,6 @@ int mptcp_sched_get_send(struct mptcp_sock *msk) data.reinject = false; if (msk->sched == &mptcp_sched_default || !msk->sched) return mptcp_sched_default_get_subflow(msk, &data); - mptcp_sched_data_set_contexts(msk, &data); return msk->sched->get_subflow(msk, &data); } @@ -212,6 +191,5 @@ int mptcp_sched_get_retrans(struct mptcp_sock *msk) data.reinject = true; if (msk->sched == &mptcp_sched_default || !msk->sched) return mptcp_sched_default_get_subflow(msk, &data); - mptcp_sched_data_set_contexts(msk, &data); return msk->sched->get_subflow(msk, &data); }