From 541ee8295e0fe1b7c51fa4aee74aaa12f696860b Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 15 Sep 2012 07:25:56 +0200 Subject: 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. --- src/fastd.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/fastd.c') 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); -- cgit v1.2.3