mptcp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [MPTCP][PATCH mptcp-next] Squash to "mptcp: generate the data checksum"
@ 2021-05-07  4:18 Geliang Tang
  2021-05-11  0:45 ` Mat Martineau
  2021-05-13  7:42 ` Matthieu Baerts
  0 siblings, 2 replies; 9+ messages in thread
From: Geliang Tang @ 2021-05-07  4:18 UTC (permalink / raw)
  To: mptcp; +Cc: Geliang Tang

Move the csum_replace2 trunk into the later patch "mptcp: receive
checksum for MP_CAPABLE with data".

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
 net/mptcp/options.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index beac01f58cba..99fc21406168 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -519,9 +519,6 @@ static void mptcp_write_data_fin(struct mptcp_subflow_context *subflow,
 		 */
 		ext->data_fin = 1;
 		ext->data_len++;
-
-		/* the pseudo header has changed, update the csum accordingly */
-		csum_replace2(&ext->csum, htons(ext->data_len - 1), htons(ext->data_len));
 	}
 }
 
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [MPTCP][PATCH mptcp-next] Squash to "mptcp: generate the data checksum"
@ 2021-05-18  7:06 Geliang Tang
  2021-05-20 21:56 ` Mat Martineau
  2021-06-03 14:59 ` Matthieu Baerts
  0 siblings, 2 replies; 9+ messages in thread
From: Geliang Tang @ 2021-05-18  7:06 UTC (permalink / raw)
  To: mptcp; +Cc: Geliang Tang

Move this line "__wsum csum = ~csum_unfold(mpext->csum);" from "mptcp:
validate the data checksum" to "mptcp: generate the data checksum".

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
 net/mptcp/protocol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 38ce8d50e665..58253bd09f93 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -1311,7 +1311,7 @@ static bool mptcp_alloc_tx_skb(struct sock *sk, struct sock *ssk)
 static void mptcp_update_data_checksum(struct sk_buff *skb, int added)
 {
 	struct mptcp_ext *mpext = mptcp_get_ext(skb);
-	__wsum csum = csum_unfold(mpext->csum);
+	__wsum csum = ~csum_unfold(mpext->csum);
 	int offset = skb->len - added;
 
 	mpext->csum = csum_fold(csum_block_add(csum, skb_checksum(skb, offset, added, 0), offset));
-- 
2.31.1


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

end of thread, other threads:[~2021-06-03 14:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-07  4:18 [MPTCP][PATCH mptcp-next] Squash to "mptcp: generate the data checksum" Geliang Tang
2021-05-11  0:45 ` Mat Martineau
2021-05-11  4:03   ` Geliang Tang
2021-05-11 23:17     ` Mat Martineau
2021-05-12  4:18       ` Geliang Tang
2021-05-13  7:42 ` Matthieu Baerts
2021-05-18  7:06 Geliang Tang
2021-05-20 21:56 ` Mat Martineau
2021-06-03 14:59 ` Matthieu Baerts

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