* [MPTCP] Re: [MPTCP][PATCH v7 mptcp-next 3/5] selftests: mptcp: drop first flag in do_rnd_write
@ 2020-08-21 3:59 Mat Martineau
0 siblings, 0 replies; only message in thread
From: Mat Martineau @ 2020-08-21 3:59 UTC (permalink / raw)
To: mptcp
[-- Attachment #1: Type: text/plain, Size: 1803 bytes --]
On Thu, 13 Aug 2020, Geliang Tang wrote:
> This patch dropped the flag "first" in do_rnd_write to make RM_ADDR test
> case work. Since we need to slow down not only the transfer process of
> the first 100 bytes, but also all the transfer process of all data to let
> the RM_ADDR suboption can be sent and received completely.
It would be better to only slow down the RM_ADDR test. Maybe add a command
line parameter that sets a global cfg_join_slow or something?
Mat
>
> Signed-off-by: Geliang Tang <geliangtang(a)gmail.com>
> ---
> tools/testing/selftests/net/mptcp/mptcp_connect.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.c b/tools/testing/selftests/net/mptcp/mptcp_connect.c
> index 090620c3e10c..e48c00fc117d 100644
> --- a/tools/testing/selftests/net/mptcp/mptcp_connect.c
> +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.c
> @@ -260,7 +260,6 @@ static int sock_connect_mptcp(const char * const remoteaddr,
>
> static size_t do_rnd_write(const int fd, char *buf, const size_t len)
> {
> - static bool first = true;
> unsigned int do_w;
> ssize_t bw;
>
> @@ -268,7 +267,7 @@ static size_t do_rnd_write(const int fd, char *buf, const size_t len)
> if (do_w == 0 || do_w > len)
> do_w = len;
>
> - if (cfg_join && first && do_w > 100)
> + if (cfg_join && do_w > 100)
> do_w = 100;
>
> bw = write(fd, buf, do_w);
> @@ -276,10 +275,8 @@ static size_t do_rnd_write(const int fd, char *buf, const size_t len)
> perror("write");
>
> /* let the join handshake complete, before going on */
> - if (cfg_join && first) {
> + if (cfg_join)
> usleep(200000);
> - first = false;
> - }
>
> return bw;
> }
> --
> 2.17.1
--
Mat Martineau
Intel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-08-21 3:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-21 3:59 [MPTCP] Re: [MPTCP][PATCH v7 mptcp-next 3/5] selftests: mptcp: drop first flag in do_rnd_write Mat Martineau
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.