mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-26 17:28:29 -05:00
f0356ec85c
This patch adds epoll option for the eloop implementation. This can be selected with the CONFIG_ELOOP_EPOLL=y build option. [merit] See Table1. Table1. comparison table +--------+--------+-----------+------------+-------------+ | | add fd | remove fd | prepare fd | dispatch fd | +--------+--------+-----------+------------+-------------+ | select | O(1) | O(1) | O(N) | O(N) | +--------+--------+-----------+------------+-------------+ | poll | O(1) | O(1) | O(N) | O(N) | +--------+--------+-----------+------------+-------------+ | epoll | O(1) | O(1) | 0 | O(M) | +--------+--------+-----------+------------+-------------+ "add fd" is addition of fd by eloop_sock_table_add_sock(). "remove fd" is removal of fd by eloop_sock_table_remove_sock(). "prepare fd" is preparation of fds before wait in eloop_run(). "dispatch fd" is dispatchment of fds by eloop_sock_table_dispatch(). "N" is all watching fds. "M" is fds which could be dispatched after waiting. As shown in Table1, epoll option has better performance on "prepare fd" column. Because select/poll option requires setting fds before every select()/poll(). But epoll_wait() doesn't need it. And epoll option has also better performance on "dispatch fd" column. Because select/poll option needs to check all registered fds to find out dispatchable fds. But epoll option doesn't require checking all registered fds. Because epoll_wait() returns dispatchable fd set. So epoll option is effective for GO/AP functionality. [demerit] The epoll option requires additional heap memory. In case of P2P GO, it is about 8K bytes. Signed-off-by: Masashi Honma <masashi.honma@gmail.com> |
||
---|---|---|
.. | ||
.gitignore | ||
base64.c | ||
base64.h | ||
bitfield.c | ||
bitfield.h | ||
browser-android.c | ||
browser-system.c | ||
browser-wpadebug.c | ||
browser.c | ||
browser.h | ||
build_config.h | ||
common.c | ||
common.h | ||
edit_readline.c | ||
edit_simple.c | ||
edit.c | ||
edit.h | ||
eloop_win.c | ||
eloop.c | ||
eloop.h | ||
ext_password_i.h | ||
ext_password_test.c | ||
ext_password.c | ||
ext_password.h | ||
http_curl.c | ||
http-utils.h | ||
includes.h | ||
ip_addr.c | ||
ip_addr.h | ||
list.h | ||
Makefile | ||
os_internal.c | ||
os_none.c | ||
os_unix.c | ||
os_win32.c | ||
os.h | ||
pcsc_funcs.c | ||
pcsc_funcs.h | ||
platform.h | ||
radiotap_iter.h | ||
radiotap.c | ||
radiotap.h | ||
state_machine.h | ||
trace.c | ||
trace.h | ||
uuid.c | ||
uuid.h | ||
wpa_debug.c | ||
wpa_debug.h | ||
wpabuf.c | ||
wpabuf.h | ||
xml_libxml2.c | ||
xml-utils.c | ||
xml-utils.h |