mptcp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [MPTCP][PATCH mptcp-next] Squash to "mptcp: send out MP_FAIL when data checksum fail"
@ 2021-06-30 12:52 Geliang Tang
  2021-07-07 23:51 ` Mat Martineau
  0 siblings, 1 reply; 2+ messages in thread
From: Geliang Tang @ 2021-06-30 12:52 UTC (permalink / raw)
  To: mptcp; +Cc: Geliang Tang

Just set the sk_state of the subsocket to TCP_CLOSE, then the flag
MPTCP_WORK_CLOSE_SUBFLOW will be set in subflow_sched_work_if_closed,
and the subflow will be closed.

mptcp_subflow_reset is somehow duplicate here.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
 net/mptcp/subflow.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index d297b941586d..cbf91e22574c 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -1159,7 +1159,11 @@ static bool subflow_check_data_avail(struct sock *ssk)
 	/* RFC 8684 section 3.7. */
 	if (subflow->send_mp_fail) {
 		if (mptcp_has_another_subflow_established(ssk)) {
-			mptcp_subflow_reset(ssk);
+			ssk->sk_err = EBADMSG;
+			tcp_set_state(ssk, TCP_CLOSE);
+			subflow->reset_transient = 0;
+			subflow->reset_reason = MPTCP_RST_EMIDDLEBOX;
+			tcp_send_active_reset(ssk, GFP_ATOMIC);
 			while ((skb = skb_peek(&ssk->sk_receive_queue)))
 				sk_eat_skb(ssk, skb);
 			WRITE_ONCE(subflow->data_avail, 0);
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [MPTCP][PATCH mptcp-next] Squash to "mptcp: send out MP_FAIL when data checksum fail"
  2021-06-30 12:52 [MPTCP][PATCH mptcp-next] Squash to "mptcp: send out MP_FAIL when data checksum fail" Geliang Tang
@ 2021-07-07 23:51 ` Mat Martineau
  0 siblings, 0 replies; 2+ messages in thread
From: Mat Martineau @ 2021-07-07 23:51 UTC (permalink / raw)
  To: Geliang Tang; +Cc: mptcp

On Wed, 30 Jun 2021, Geliang Tang wrote:

> Just set the sk_state of the subsocket to TCP_CLOSE, then the flag
> MPTCP_WORK_CLOSE_SUBFLOW will be set in subflow_sched_work_if_closed,
> and the subflow will be closed.
>
> mptcp_subflow_reset is somehow duplicate here.
>
> Signed-off-by: Geliang Tang <geliangtang@gmail.com>
> ---
> net/mptcp/subflow.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>

Thanks for updating the v3 patch set with this. Please squash this in v4.

> diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
> index d297b941586d..cbf91e22574c 100644
> --- a/net/mptcp/subflow.c
> +++ b/net/mptcp/subflow.c
> @@ -1159,7 +1159,11 @@ static bool subflow_check_data_avail(struct sock *ssk)
> 	/* RFC 8684 section 3.7. */
> 	if (subflow->send_mp_fail) {
> 		if (mptcp_has_another_subflow_established(ssk)) {
> -			mptcp_subflow_reset(ssk);
> +			ssk->sk_err = EBADMSG;
> +			tcp_set_state(ssk, TCP_CLOSE);
> +			subflow->reset_transient = 0;
> +			subflow->reset_reason = MPTCP_RST_EMIDDLEBOX;
> +			tcp_send_active_reset(ssk, GFP_ATOMIC);
> 			while ((skb = skb_peek(&ssk->sk_receive_queue)))
> 				sk_eat_skb(ssk, skb);
> 			WRITE_ONCE(subflow->data_avail, 0);
> -- 
> 2.31.1

--
Mat Martineau
Intel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-07 23:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-30 12:52 [MPTCP][PATCH mptcp-next] Squash to "mptcp: send out MP_FAIL when data checksum fail" Geliang Tang
2021-07-07 23:51 ` Mat Martineau

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).