aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/control/controller.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2014-07-10 16:28:44 +0200
committerMartin Willi <martin@revosec.ch>2014-11-21 10:55:45 +0100
commit3c7193f114e9dbb4f725aaf9e050fb132d9f2600 (patch)
treeb9c6e31c214681a7069f265837054a475461e03a /src/libcharon/control/controller.c
parent02794456a9d9d81df238c7fac8aaff4dbc4c39de (diff)
downloadstrongswan-3c7193f114e9dbb4f725aaf9e050fb132d9f2600.tar.bz2
strongswan-3c7193f114e9dbb4f725aaf9e050fb132d9f2600.tar.xz
kernel-netlink: Support parallel Netlink queries
Instead of locking the socket exclusively to wait for replies, use watcher to wait for and read in responses asynchronously. This allows multiple parallel Netlink queries, which can significantly improve performance if the kernel Netlink layer has longer latencies and supports parallel queries. For vanilla Linux, parallel queries don't make much sense, as it usually returns EBUSY for the relevant dump requests. This requires a retry, and in the end makes queries more expensive under high load. Instead of checking the Netlink message sequence number to detect multi-part messages, this code now relies on the NLM_F_MULTI flag to detect them. This has previously been avoided (by 1d51abb7). It is unclear if the flag did not work correctly on very old Linux kernels, or if the flag was not used appropriately by strongSwan. The flag seems to work just fine back to 2.6.18, which is a kernel still in use by RedHat/CentOS 5.
Diffstat (limited to 'src/libcharon/control/controller.c')
0 files changed, 0 insertions, 0 deletions