summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-08 13:37:03 -0800
committerDavid S. Miller <davem@davemloft.net>2011-03-08 13:37:03 -0800
commitd44e265a04f72aa06a566bc49d5f236eb372d378 (patch)
tree8a211236d5f978aa9671efdfe182d28adcd42d5c
parentcb6e764a3d6a3db265f6f7d3b181da18754e3fcc (diff)
downloadnet_test_tools-d44e265a04f72aa06a566bc49d5f236eb372d378.tar.gz
route_bench: Set NLM_F_NOREPLY in do_bench().
This avoids us seeing overhead from netlink reply generation. As a backup we keep the socket filter there in case the kernel does not support this feature. Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--route_bench.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/route_bench.c b/route_bench.c
index 063b15e..eb91dcf 100644
--- a/route_bench.c
+++ b/route_bench.c
@@ -181,7 +181,10 @@ static int do_bench(int count, in_addr_t src_addr, in_addr_t dst_addr,
nlh = mnl_nlmsg_put_header(send_buf);
nlh->nlmsg_type = RTM_GETROUTE;
- nlh->nlmsg_flags = NLM_F_REQUEST;
+
+#define NLM_F_NOREPLY 0x1000
+
+ nlh->nlmsg_flags = NLM_F_REQUEST | NLM_F_NOREPLY;
nlh->nlmsg_seq = seq = time(NULL);
rtm = mnl_nlmsg_put_extra_header(nlh, sizeof(struct rtmsg));