All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH mptcp-next] Squash-to: "selftests: mptcp: mptfo Initiator/Listener"
@ 2022-11-11 10:17 Paolo Abeni
  2022-11-11 11:55 ` Squash-to: "selftests: mptcp: mptfo Initiator/Listener": Tests Results MPTCP CI
  0 siblings, 1 reply; 3+ messages in thread
From: Paolo Abeni @ 2022-11-11 10:17 UTC (permalink / raw)
  To: mptcp; +Cc: Dmytro Shytyi

We need to cope with multiple iteration of the remote peer address
selection loop

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
 tools/testing/selftests/net/mptcp/mptcp_connect.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.c b/tools/testing/selftests/net/mptcp/mptcp_connect.c
index 134e569cd75a..8635619ab1fd 100644
--- a/tools/testing/selftests/net/mptcp/mptcp_connect.c
+++ b/tools/testing/selftests/net/mptcp/mptcp_connect.c
@@ -375,13 +375,12 @@ static int sock_connect_mptcp(const char * const remoteaddr,
 			set_mark(sock, cfg_mark);
 
 		if (cfg_sockopt_types.mptfo) {
-			winfo->len = read(infd, winfo->buf, sizeof(winfo->buf));
+			if (!winfo->len)
+				winfo->len = read(infd, winfo->buf, sizeof(winfo->buf));
 
 			syn_copied = sendto(sock, winfo->buf, winfo->len, MSG_FASTOPEN,
 					    a->ai_addr, a->ai_addrlen);
-			if (syn_copied < 0)
-				perror("sendto");
-			if (syn_copied) {
+			if (syn_copied >= 0) {
 				winfo->off = syn_copied;
 				winfo->len -= syn_copied;
 				*peer = a;
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [PATCH mptcp-next 5/5] Squash-to: "selftests: mptcp: mptfo Initiator/Listener"
@ 2022-11-14 16:46 Matthieu Baerts
  2022-11-14 18:23 ` Squash-to: "selftests: mptcp: mptfo Initiator/Listener": Tests Results MPTCP CI
  0 siblings, 1 reply; 3+ messages in thread
From: Matthieu Baerts @ 2022-11-14 16:46 UTC (permalink / raw)
  To: mptcp; +Cc: Matthieu Baerts

mptcp: fix warning reported by checkpatch:

  mptcp_connect.c:398:  Blank lines aren't necessary after an open brace '{'

(while at it...)

Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---
 tools/testing/selftests/net/mptcp/mptcp_connect.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.c b/tools/testing/selftests/net/mptcp/mptcp_connect.c
index c8bd109c991f..8a8266957bc5 100644
--- a/tools/testing/selftests/net/mptcp/mptcp_connect.c
+++ b/tools/testing/selftests/net/mptcp/mptcp_connect.c
@@ -399,7 +399,6 @@ static int sock_connect_mptcp(const char * const remoteaddr,
 			close(sock);
 			sock = -1;
 		} else {
-
 			perror("connect()");
 			close(sock);
 			sock = -1;
-- 
2.37.2


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

end of thread, other threads:[~2022-11-14 18:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-11 10:17 [PATCH mptcp-next] Squash-to: "selftests: mptcp: mptfo Initiator/Listener" Paolo Abeni
2022-11-11 11:55 ` Squash-to: "selftests: mptcp: mptfo Initiator/Listener": Tests Results MPTCP CI
  -- strict thread matches above, loose matches on Subject: below --
2022-11-14 16:46 [PATCH mptcp-next 5/5] Squash-to: "selftests: mptcp: mptfo Initiator/Listener" Matthieu Baerts
2022-11-14 18:23 ` Squash-to: "selftests: mptcp: mptfo Initiator/Listener": Tests Results MPTCP CI

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.