[LTP] [PATCH 2/4] netstress: allow setting MSG_ZEROCOPY for other protocols

Alexey Kodanev
2019-02-11T18:07:45Z

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
testcases/network/netstress/netstress.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/testcases/network/netstress/netstress.c b/testcases/network/netstress/netstress.c
index 2cdc91a..63d02c9 100644
--- a/testcases/network/netstress/netstress.c
+++ b/testcases/network/netstress/netstress.c
@@ -942,13 +942,14 @@ static void setup(void)
}
}

+ if (zcopy)
+ send_flags |= MSG_ZEROCOPY;
+
switch (proto_type) {
case TYPE_TCP:
tst_res(TINFO, "TCP %s is using %s TCP API.",
(client_mode) ? "client" : "server",
(fastopen_api) ? "Fastopen" : "old");
- if (zcopy)
- send_flags |= MSG_ZEROCOPY;
check_tfo_value();
break;
case TYPE_UDP:
--
1.7.1