From 5163796ab0f772d8f3bc8473e92d401d67cbe6bd Mon Sep 17 00:00:00 2001 From: Vadim Kochan Date: Tue, 5 Jan 2016 21:42:40 +0200 Subject: flowtop: Use one nfct handle for dump & refresh flows Simplify dump & flows refreshing via one nfct handle, which is enough. Signed-off-by: Vadim Kochan Signed-off-by: Tobias Klauser --- flowtop.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/flowtop.c b/flowtop.c index cc5ffa2..4c15c06 100644 --- a/flowtop.c +++ b/flowtop.c @@ -1615,7 +1615,6 @@ static void collector_dump_flows(void) static void *collector(void *null __maybe_unused) { - struct nfct_handle *ct_update; struct nfct_handle *ct_event; struct pollfd poll_fd[1]; @@ -1631,12 +1630,6 @@ static void *collector(void *null __maybe_unused) nfct_callback_register(ct_event, NFCT_T_ALL, flow_event_cb, NULL); - ct_update = nfct_open(CONNTRACK, NF_NETLINK_CONNTRACK_UPDATE); - if (!ct_update) - panic("Cannot create a nfct handle: %s\n", strerror(errno)); - - nfct_callback_register(ct_update, NFCT_T_ALL, flow_event_cb, NULL); - poll_fd[0].fd = nfct_fd(ct_event); poll_fd[0].events = POLLIN; @@ -1644,10 +1637,6 @@ static void *collector(void *null __maybe_unused) panic("Cannot set non-blocking socket: fcntl(): %s\n", strerror(errno)); - if (fcntl(nfct_fd(ct_update), F_SETFL, O_NONBLOCK) == -1) - panic("Cannot set non-blocking socket: fcntl(): %s\n", - strerror(errno)); - rcu_register_thread(); collector_dump_flows(); @@ -1666,7 +1655,7 @@ static void *collector(void *null __maybe_unused) collector_dump_flows(); } - collector_refresh_flows(ct_update); + collector_refresh_flows(ct_event); status = poll(poll_fd, 1, 0); if (status < 0) { @@ -1688,7 +1677,6 @@ static void *collector(void *null __maybe_unused) spinlock_destroy(&flow_list.lock); nfct_close(ct_event); - nfct_close(ct_update); pthread_exit(NULL); } -- cgit v1.2.3-54-g00ecf ntation?id=ec971ea5f2426a0bf9d5cca9a103743918c12978'>commitdiff
diff options
context:
space:
mode:
authorRichard Zhao <richard.zhao@linaro.org>2012-09-05 01:08:59 +0200
committerRafael J. Wysocki <rjw@sisk.pl>2012-09-09 22:06:33 +0200
commitec971ea5f2426a0bf9d5cca9a103743918c12978 (patch)
tree58594e18af78718548dea595c26e1a67d964a29e /Documentation
parente1f0b8e9b04a262834ed111e605e5d215685dfab (diff)
ARM: add cpufreq transiton notifier to adjust loops_per_jiffy for smp
If CONFIG_SMP, cpufreq skips loops_per_jiffy update, because different arch has different per-cpu loops_per_jiffy definition. Signed-off-by: Richard Zhao <richard.zhao@linaro.org> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'Documentation')