summaryrefslogtreecommitdiffstats
path: root/src/fastd.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-09-15 07:25:56 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-09-15 07:25:56 +0200
commit541ee8295e0fe1b7c51fa4aee74aaa12f696860b (patch)
treee0df9c0989500ed2089b64004ac337ebc4dcc97e /src/fastd.c
parent37385fcd836bcc086b56b8dc7089d5038c203f13 (diff)
downloadfastd-541ee8295e0fe1b7c51fa4aee74aaa12f696860b.tar
fastd-541ee8295e0fe1b7c51fa4aee74aaa12f696860b.zip
Add support for using kernel implementations of GHASH
This doesn't really improve performance on my Intel CPU (I guess due to the context switches), but more tests have to be made, in combination with offloading the AES to the kernel as well, and on different hardware.
Diffstat (limited to 'src/fastd.c')
-rw-r--r--src/fastd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fastd.c b/src/fastd.c
index 3bbf30f..ec70c6c 100644
--- a/src/fastd.c
+++ b/src/fastd.c
@@ -28,6 +28,7 @@
#include "fastd.h"
#include "handshake.h"
+#include "linux_alg.h"
#include "peer.h"
#include "task.h"
@@ -784,6 +785,8 @@ int main(int argc, char *argv[]) {
init_log(&ctx);
+ fastd_linux_alg_init(&ctx);
+
if (conf.generate_key) {
conf.protocol->generate_key(&ctx);
exit(0);
@@ -857,6 +860,8 @@ int main(int argc, char *argv[]) {
free(ctx.protocol_state);
free(ctx.eth_addr);
+ fastd_linux_alg_close(&ctx);
+
close_log(&ctx);
fastd_config_release(&ctx, &conf);