All of lore.kernel.org
 help / color / mirror / Atom feed
* [MPTCP] Re: [PATCH v2 01/13] selftest: add mmap-write support
@ 2019-11-20 20:39 Florian Westphal
  0 siblings, 0 replies; 4+ messages in thread
From: Florian Westphal @ 2019-11-20 20:39 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 1165 bytes --]

Matthieu Baerts <matthieu.baerts(a)tessares.net> wrote:
> > diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> > index b5367fe2c6ea..478bc47c3d60 100755
> > --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> > +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> > @@ -3,7 +3,7 @@
> >   time_start=$(date +%s)
> > -optstring="d:e:l:r:h6c"
> > +optstring="b:d:e:l:r:h6c:m:"
> 
> Just a small detail but the capture (-c) option doesn't any argument. I
> guess we should also apply this:

> -optstring="b:d:e:l:r:h4c:m:"
> +optstring="b:d:e:l:r:h4cm:"
>  ret=0
>  sin=""
>  sout=""

Oh, absolutely.

Can you also apply this fixlet that Mat pointed out?

diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.c b/tools/testing/selftests/net/mptcp/mptcp_connect.c
--- a/tools/testing/selftests/net/mptcp/mptcp_connect.c
+++ b/tools/testing/selftests/net/mptcp/mptcp_connect.c
@@ -391,7 +391,7 @@ static int do_recvfile(int infd, int outfd)
        ssize_t r;
 
        do {
-               char buf[16536];
+               char buf[16384];

Thanks!

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

* [MPTCP] Re: [PATCH v2 01/13] selftest: add mmap-write support
@ 2019-11-21 12:41 Matthieu Baerts
  0 siblings, 0 replies; 4+ messages in thread
From: Matthieu Baerts @ 2019-11-21 12:41 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 1665 bytes --]

Hi Florian,

On 20/11/2019 21:39, Florian Westphal wrote:
> Matthieu Baerts <matthieu.baerts(a)tessares.net> wrote:
>>> diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
>>> index b5367fe2c6ea..478bc47c3d60 100755
>>> --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh
>>> +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
>>> @@ -3,7 +3,7 @@
>>>    time_start=$(date +%s)
>>> -optstring="d:e:l:r:h6c"
>>> +optstring="b:d:e:l:r:h6c:m:"
>>
>> Just a small detail but the capture (-c) option doesn't any argument. I
>> guess we should also apply this:
> 
>> -optstring="b:d:e:l:r:h4c:m:"
>> +optstring="b:d:e:l:r:h4cm:"
>>   ret=0
>>   sin=""
>>   sout=""
> 
> Oh, absolutely.

Great!

- 8c39e2086d0f: selftests:mptcp: fix typo in opts

> Can you also apply this fixlet that Mat pointed out?
> 
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.c b/tools/testing/selftests/net/mptcp/mptcp_connect.c
> --- a/tools/testing/selftests/net/mptcp/mptcp_connect.c
> +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.c
> @@ -391,7 +391,7 @@ static int do_recvfile(int infd, int outfd)
>          ssize_t r;
>   
>          do {
> -               char buf[16536];
> +               char buf[16384];

Just did:

- 2acf87c192a7: selftests:mptcp: buf with a power 2 size
- c35e69234be2..39d0ec7ab1eb: result

Tests + export are in progress.

Cheers,
Matt
-- 
Matthieu Baerts | R&D Engineer
matthieu.baerts(a)tessares.net
Tessares SA | Hybrid Access Solutions
www.tessares.net
1 Avenue Jean Monnet, 1348 Louvain-la-Neuve, Belgium

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

* [MPTCP] Re: [PATCH v2 01/13] selftest: add mmap-write support
@ 2019-11-20 20:05 Matthieu Baerts
  0 siblings, 0 replies; 4+ messages in thread
From: Matthieu Baerts @ 2019-11-20 20:05 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 1672 bytes --]

Hi Florian,

On 18/11/2019 22:45, Florian Westphal wrote:
> No changes on default options.  New option -b allows to set a lower
> send buffer size.
> 
> New option "-m mmap" allows to use a mode where the sender transmits the
> entire file in very large chunks (using mmap + write) instead of the
> default poll+read/write.
> 
> This is mainly useful to make sure we cope with large writes.
> I also added sendfile() support (as its easy), but it won't work yet
> for mptcp sockets.

Thank you for the patch!

[...]

> diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> index b5367fe2c6ea..478bc47c3d60 100755
> --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> @@ -3,7 +3,7 @@
>   
>   time_start=$(date +%s)
>   
> -optstring="d:e:l:r:h6c"
> +optstring="b:d:e:l:r:h6c:m:"

Just a small detail but the capture (-c) option doesn't any argument. I 
guess we should also apply this:

====
diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh 
b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
index 1f840c87be5d..61b9e2a9c891 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
@@ -3,7 +3,7 @@

  time_start=$(date +%s)

-optstring="b:d:e:l:r:h4c:m:"
+optstring="b:d:e:l:r:h4cm:"
  ret=0
  sin=""
  sout=""
====

Cheers,
Matt
-- 
Matthieu Baerts | R&D Engineer
matthieu.baerts(a)tessares.net
Tessares SA | Hybrid Access Solutions
www.tessares.net
1 Avenue Jean Monnet, 1348 Louvain-la-Neuve, Belgium

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

* [MPTCP] Re: [PATCH v2 01/13] selftest: add mmap-write support
@ 2019-11-19 22:58 Mat Martineau
  0 siblings, 0 replies; 4+ messages in thread
From: Mat Martineau @ 2019-11-19 22:58 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 1741 bytes --]


On Mon, 18 Nov 2019, Florian Westphal wrote:

> No changes on default options.  New option -b allows to set a lower
> send buffer size.
>
> New option "-m mmap" allows to use a mode where the sender transmits the
> entire file in very large chunks (using mmap + write) instead of the
> default poll+read/write.
>
> This is mainly useful to make sure we cope with large writes.
> I also added sendfile() support (as its easy), but it won't work yet
> for mptcp sockets.
>
> should be squashed into mptcp: add basic kselftest for mptcp
>
> Signed-off-by: Florian Westphal <fw(a)strlen.de>
> ---
> .../selftests/net/mptcp/mptcp_connect.c       | 257 +++++++++++++++++-
> .../selftests/net/mptcp/mptcp_connect.sh      |  36 ++-
> 2 files changed, 284 insertions(+), 9 deletions(-)
>
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.c b/tools/testing/selftests/net/mptcp/mptcp_connect.c
> index ddfd85b31808..ea8e08b1f481 100644
> --- a/tools/testing/selftests/net/mptcp/mptcp_connect.c
> +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.c
...
> @@ -352,6 +375,168 @@ static int copyfd_io(int infd, int peerfd, int outfd)
> 	return 0;
> }
>
> +static int do_recvfile(int infd, int outfd)
> +{
> +	ssize_t r;
> +
> +	do {
> +		char buf[16536];

The array size makes me think you intended 2^14 (16384) but changed only 
the first two digits of 2^16 (65536). It doesn't make a real difference to 
the test, though.

Mat


> +
> +		r = do_rnd_read(infd, buf, sizeof(buf));
> +		if (r > 0) {
> +			if (write(outfd, buf, r) != r)
> +				break;
> +		} else if (r < 0) {
> +			perror("read");
> +		}
> +	} while (r > 0);
> +
> +	return (int)r;
> +}


--
Mat Martineau
Intel

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

end of thread, other threads:[~2019-11-21 12:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-20 20:39 [MPTCP] Re: [PATCH v2 01/13] selftest: add mmap-write support Florian Westphal
  -- strict thread matches above, loose matches on Subject: below --
2019-11-21 12:41 Matthieu Baerts
2019-11-20 20:05 Matthieu Baerts
2019-11-19 22:58 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.