* [LTP] [PATCH 1/2] netstress: TCONF on wrong -T parameter @ 2018-07-19 12:53 Petr Vorel 2018-07-19 12:53 ` [LTP] [RFC PATCH 2/2] netstress: Update help for -m behavior Petr Vorel 2018-07-26 7:45 ` [LTP] [PATCH 1/2] netstress: TCONF on wrong -T parameter Petr Vorel 0 siblings, 2 replies; 6+ messages in thread From: Petr Vorel @ 2018-07-19 12:53 UTC (permalink / raw) To: ltp Helps to find typo errors. Signed-off-by: Petr Vorel <pvorel@suse.cz> --- testcases/network/netstress/netstress.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testcases/network/netstress/netstress.c b/testcases/network/netstress/netstress.c index 17e401eb0..48fb0aabd 100644 --- a/testcases/network/netstress/netstress.c +++ b/testcases/network/netstress/netstress.c @@ -837,6 +837,8 @@ static void set_protocol_type(void) proto_type = TYPE_DCCP; else if (!strcmp(type, "sctp")) proto_type = TYPE_SCTP; + else + tst_brk(TCONF, "wrong proto_type: '%s'", type); } static void setup(void) -- 2.18.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [LTP] [RFC PATCH 2/2] netstress: Update help for -m behavior 2018-07-19 12:53 [LTP] [PATCH 1/2] netstress: TCONF on wrong -T parameter Petr Vorel @ 2018-07-19 12:53 ` Petr Vorel 2018-07-23 6:22 ` Alexey Kodanev 2018-07-24 14:14 ` Petr Vorel 2018-07-26 7:45 ` [LTP] [PATCH 1/2] netstress: TCONF on wrong -T parameter Petr Vorel 1 sibling, 2 replies; 6+ messages in thread From: Petr Vorel @ 2018-07-19 12:53 UTC (permalink / raw) To: ltp For udp, udp_lite and DCCP on client is timeout set 100. For udp and udp_lite on server on low timeout it reaches "recv failed" error (due no listen in udp and udp_lite). Signed-off-by: Petr Vorel <pvorel@suse.cz> --- I documented the current state, but I it looks to me that udp and udp_lite on server is a bug. Or wanted behaviour? Kind regards, Petr --- testcases/network/netstress/netstress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcases/network/netstress/netstress.c b/testcases/network/netstress/netstress.c index 48fb0aabd..62301ca9f 100644 --- a/testcases/network/netstress/netstress.c +++ b/testcases/network/netstress/netstress.c @@ -999,7 +999,7 @@ static struct tst_option options[] = { {"r:", &rarg, "-r x Number of client requests"}, {"n:", &narg, "-n x Client message size"}, {"N:", &Narg, "-N x Server message size"}, - {"m:", &Targ, "-m x Reply timeout in microsec."}, + {"m:", &Targ, "-m x Reply timeout in microsec (only for tcp and sctp, also affects server on udp and udp_lite)."}, {"d:", &rpath, "-d x x is a path to file where result is saved"}, {"A:", &Aarg, "-A x x max payload length (generated randomly)\n"}, -- 2.18.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [LTP] [RFC PATCH 2/2] netstress: Update help for -m behavior 2018-07-19 12:53 ` [LTP] [RFC PATCH 2/2] netstress: Update help for -m behavior Petr Vorel @ 2018-07-23 6:22 ` Alexey Kodanev 2018-07-24 14:14 ` Petr Vorel 1 sibling, 0 replies; 6+ messages in thread From: Alexey Kodanev @ 2018-07-23 6:22 UTC (permalink / raw) To: ltp On 19.07.2018 15:53, Petr Vorel wrote: > For udp, udp_lite and DCCP on client is timeout set 100. > For udp and udp_lite on server on low timeout it reaches "recv failed" > error (due no listen in udp and udp_lite). > > Signed-off-by: Petr Vorel <pvorel@suse.cz> > --- > I documented the current state, but I it looks to me that udp and > udp_lite on server is a bug. Or wanted behaviour? > > Hi Petr, Since the server waits for requests from the client, the timeout value for UDP/DCCP is the same as for the other protocols. Also the server starts earlier than the client, so it should wait some time to get the client requests. I've changed the client side only because either request from the client or reply from the server might be lost. > Kind regards, > Petr > --- > testcases/network/netstress/netstress.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/testcases/network/netstress/netstress.c b/testcases/network/netstress/netstress.c > index 48fb0aabd..62301ca9f 100644 > --- a/testcases/network/netstress/netstress.c > +++ b/testcases/network/netstress/netstress.c > @@ -999,7 +999,7 @@ static struct tst_option options[] = { > {"r:", &rarg, "-r x Number of client requests"}, > {"n:", &narg, "-n x Client message size"}, > {"N:", &Narg, "-N x Server message size"}, > - {"m:", &Targ, "-m x Reply timeout in microsec."}, > + {"m:", &Targ, "-m x Reply timeout in microsec (only for tcp and sctp, also affects server on udp and udp_lite)."}, What about dccp? May be "Receive timeout in milliseconds (not affects UDP/DCCP client)"? Thanks, Alexey ^ permalink raw reply [flat|nested] 6+ messages in thread
* [LTP] [RFC PATCH 2/2] netstress: Update help for -m behavior 2018-07-19 12:53 ` [LTP] [RFC PATCH 2/2] netstress: Update help for -m behavior Petr Vorel 2018-07-23 6:22 ` Alexey Kodanev @ 2018-07-24 14:14 ` Petr Vorel 2018-07-27 10:24 ` Alexey Kodanev 1 sibling, 1 reply; 6+ messages in thread From: Petr Vorel @ 2018-07-24 14:14 UTC (permalink / raw) To: ltp Hi Alexey, > Hi Petr, > Since the server waits for requests from the client, the timeout > value for UDP/DCCP is the same as for the other protocols. Also the > server starts earlier than the client, so it should wait some time > to get the client requests. > I've changed the client side only because either request from the > client or reply from the server might be lost. Thanks for your explanation. I mean: UDP itself is the only protocol which don't support listen() so netstress server using UDP timeouts after some time. The default is 100ms. But due obvious return before listen() for UDP in server_init() -m parameter affects behavior of the server in UDP (how quickly it timeouts): $ date +"%T.%3N"; testcases/network/netstress/netstress -m 1 -T udp; date +"%T.%3N" 15:52:34.501 tst_test.c:1015: INFO: Timeout per run is 0h 05m 00s netstress.c:917: INFO: max requests '3' netstress.c:944: INFO: using UDP netstress.c:676: INFO: assigning a name to the server socket... netstress.c:683: INFO: bind to port 47728 netstress.c:575: FAIL: recv failed, sock '3' netstress.c:642: BROK: Server closed ... 15:52:34.516 $ date +"%T.%3N"; testcases/network/netstress/netstress -m 1000 -T udp; date +"%T.%3N" 16:01:27.064 ... 16:01:28.079 date +"%T.%3N"; testcases/network/netstress/netstress -m 10000 -T udp; date +"%T.%3N" 16:00:39.647 ... 16:00:49.672 I just wonder if we want to document it (or at least don't state -m as "client only config"). > > - {"m:", &Targ, "-m x Reply timeout in microsec."}, > > + {"m:", &Targ, "-m x Reply timeout in microsec (only for tcp and sctp, also affects server on udp and udp_lite)."}, > What about dccp? Yes, I left it, thanks! > May be "Receive timeout in milliseconds (not affects UDP/DCCP client)"? Yes, this is better. Kind regards, Petr ^ permalink raw reply [flat|nested] 6+ messages in thread
* [LTP] [RFC PATCH 2/2] netstress: Update help for -m behavior 2018-07-24 14:14 ` Petr Vorel @ 2018-07-27 10:24 ` Alexey Kodanev 0 siblings, 0 replies; 6+ messages in thread From: Alexey Kodanev @ 2018-07-27 10:24 UTC (permalink / raw) To: ltp On 07/24/2018 05:14 PM, Petr Vorel wrote: > Hi Alexey, > >> Hi Petr, > >> Since the server waits for requests from the client, the timeout >> value for UDP/DCCP is the same as for the other protocols. Also the >> server starts earlier than the client, so it should wait some time >> to get the client requests. > >> I've changed the client side only because either request from the >> client or reply from the server might be lost. > > Thanks for your explanation. > I mean: UDP itself is the only protocol which don't support listen() so > netstress server using UDP timeouts after some time. The default is 100ms. Hmm, for the server the default should be 60 sec. Does it timeout earlier? It is more than enough for the tests to start the client on the other end and start sending requests. If it hasn't happened during this time period there is no reason to have it running there. > But due obvious return before listen() for UDP in server_init() -m parameter > affects behavior of the server in UDP (how quickly it timeouts): > And with listen() it won't wait forever either, it will be killed by LTP timeout per test run... > $ date +"%T.%3N"; testcases/network/netstress/netstress -m 1 -T udp; date +"%T.%3N" > 15:52:34.501 > tst_test.c:1015: INFO: Timeout per run is 0h 05m 00s > netstress.c:917: INFO: max requests '3' > netstress.c:944: INFO: using UDP > netstress.c:676: INFO: assigning a name to the server socket... > netstress.c:683: INFO: bind to port 47728 > netstress.c:575: FAIL: recv failed, sock '3' > netstress.c:642: BROK: Server closed > ... > 15:52:34.516 Thanks, Alexey ^ permalink raw reply [flat|nested] 6+ messages in thread
* [LTP] [PATCH 1/2] netstress: TCONF on wrong -T parameter 2018-07-19 12:53 [LTP] [PATCH 1/2] netstress: TCONF on wrong -T parameter Petr Vorel 2018-07-19 12:53 ` [LTP] [RFC PATCH 2/2] netstress: Update help for -m behavior Petr Vorel @ 2018-07-26 7:45 ` Petr Vorel 1 sibling, 0 replies; 6+ messages in thread From: Petr Vorel @ 2018-07-26 7:45 UTC (permalink / raw) To: ltp Hi, > Helps to find typo errors. > Signed-off-by: Petr Vorel <pvorel@suse.cz> > --- > testcases/network/netstress/netstress.c | 2 ++ > 1 file changed, 2 insertions(+) > diff --git a/testcases/network/netstress/netstress.c b/testcases/network/netstress/netstress.c > index 17e401eb0..48fb0aabd 100644 > --- a/testcases/network/netstress/netstress.c > +++ b/testcases/network/netstress/netstress.c > @@ -837,6 +837,8 @@ static void set_protocol_type(void) > proto_type = TYPE_DCCP; > else if (!strcmp(type, "sctp")) > proto_type = TYPE_SCTP; > + else > + tst_brk(TCONF, "wrong proto_type: '%s'", type); Pushed with minor change: Using TBROK to be consistent with error messages in setup(): tst_brk(TBROK, "Invalid proto_type: '%s'", type); Kind regards, Petr ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-07-27 10:24 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-07-19 12:53 [LTP] [PATCH 1/2] netstress: TCONF on wrong -T parameter Petr Vorel 2018-07-19 12:53 ` [LTP] [RFC PATCH 2/2] netstress: Update help for -m behavior Petr Vorel 2018-07-23 6:22 ` Alexey Kodanev 2018-07-24 14:14 ` Petr Vorel 2018-07-27 10:24 ` Alexey Kodanev 2018-07-26 7:45 ` [LTP] [PATCH 1/2] netstress: TCONF on wrong -T parameter Petr Vorel
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.