From 957dbe6fdc10ab6e25e90af503e78fc8c8c49b72 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 14 Oct 2019 11:05:42 +0200 Subject: include: add MNL_SOCKET_DUMP_SIZE definition Add definition to recommend a new buffer size for netlink dumps. Details are available here: commit d35c99ff77ecb2eb239731b799386f3b3637a31e Author: Eric Dumazet Date: Thu Oct 6 04:13:18 2016 +0900 netlink: do not enter direct reclaim from netlink_dump() iproute2 is using 32 KBytes buffer in netlink dumps to speed up netlink dumps for a while. Let's recommend this buffer size through this new definition. Update examples too. Signed-off-by: Pablo Neira Ayuso --- examples/netfilter/nfct-dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/netfilter/nfct-dump.c') diff --git a/examples/netfilter/nfct-dump.c b/examples/netfilter/nfct-dump.c index 114af61..cb8e52c 100644 --- a/examples/netfilter/nfct-dump.c +++ b/examples/netfilter/nfct-dump.c @@ -263,8 +263,8 @@ static int data_cb(const struct nlmsghdr *nlh, void *data) int main(void) { + char buf[MNL_SOCKET_DUMP_SIZE]; struct mnl_socket *nl; - char buf[MNL_SOCKET_BUFFER_SIZE]; struct nlmsghdr *nlh; struct nfgenmsg *nfh; uint32_t seq, portid; -- cgit v1.2.3