fragattacks/src
Masashi Honma f0356ec85c eloop: Add epoll option for better performance
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>
2014-05-16 18:25:51 +03:00
..
ap hostapd: Check for overlapping 20 MHz BSS before starting 20/40 MHz BSS 2014-05-16 01:14:01 +03:00
common MACsec: Add common IEEE 802.1X definitions 2014-05-09 20:05:28 +03:00
crypto OpenSSL: Detect and prevent TLS heartbeat attack 2014-04-09 14:58:48 +03:00
drivers nl80211: Fix send_frame freq for IBSS 2014-05-15 16:56:49 +03:00
eap_common EAP-pwd peer: Export Session-Id through getSessionId callback 2014-05-11 21:22:55 +03:00
eap_peer EAP-IKEv2: Allow frag ack without integrity checksum 2014-05-11 22:47:25 +03:00
eap_server EAP-pwd server: Allow fragment_size to be configured 2014-05-11 22:47:25 +03:00
eapol_auth RADIUS server: Allow EAP methods to log into SQLite DB 2014-03-09 18:21:13 +02:00
eapol_supp MACsec: Add define for EAPOL type MKA 2014-05-09 20:05:28 +03:00
l2_packet l2_packet: Fix l2_packet_none (hostapd default) 2014-04-14 23:04:55 +03:00
p2p P2P: Iterate through full pref_chan list in search of a valid channel 2014-05-16 16:49:17 +03:00
pae MACsec: Add PAE implementation 2014-05-09 20:42:44 +03:00
radius RADIUS: Define EAP-Key-Name 2014-05-11 21:10:03 +03:00
rsn_supp TDLS: Fully tear down existing link before setup 2014-04-29 18:59:12 +03:00
tls X.509: Fix v3 parsing with issuerUniqueID/subjectUniqueID present 2014-05-10 13:13:47 +03:00
utils eloop: Add epoll option for better performance 2014-05-16 18:25:51 +03:00
wps Make dl_list_first() and dl_list_last() uses easier for static analyzers 2014-04-29 12:52:10 +03:00
lib.rules Add rules for building src/crypto as a library 2009-12-05 22:03:46 +02:00
Makefile MACsec: Add PAE implementation 2014-05-09 20:42:44 +03:00