Optimizing use of SSL?

Ben Greear greearb
Wed Feb 2 15:38:47 PST 2011

I've been looking at ways to optimize wpa_supplicant for when we are using
lots and lots of vifs (say, 128).  These are configured to use WPA,
and the NIC (ath9k) is set to software-encryption in order to work with multiple

I ran it under callgrind (valgrind --tool=callgrind) with only
16 vifs, and libcrypto seems to be using most of the CPU.

I'm wondering if anyone has any ideas for ways to optimize
supplicant to work better in this case.  I was thinking it
should only be passing relatively few pkts around, so I'm
not too sure why it's such a CPU hog.

4,581,598,299  PROGRAM TOTALS

            Ir  file:function
2,564,525,741  ???:sha1_block_data_order [/home/lanforge/libcrypto.so.10]
   299,365,682  /home/greearb/git/btbits/3plibs/hostap/wpa_supplicant/../src/crypto/sha1.c:hmac_sha1_vector [/home/lanforge/local/bin/wpa_supplicant]
   224,639,185  /usr/src/debug/glibc-2.12-232-gdbb0472/malloc/malloc.c:_int_malloc [/lib/libc-2.12.90.so]
   128,313,655  ???:OPENSSL_cleanse [/home/lanforge/libcrypto.so.10]
   111,192,556  /usr/src/debug/glibc-2.12-232-gdbb0472/malloc/malloc.c:_int_free [/lib/libc-2.12.90.so]
    91,288,322  ???:SHA1_Update [/home/lanforge/libcrypto.so.10]
    82,700,165  ???:SHA1_Final [/home/lanforge/libcrypto.so.10]

Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

More information about the Hostap mailing list