diff --git a/libknet/tests/knet_bench.c b/libknet/tests/knet_bench.c index 10d0844f7..bb95d1572 100644 --- a/libknet/tests/knet_bench.c +++ b/libknet/tests/knet_bench.c @@ -45,6 +45,7 @@ static int wait_for_perf_rx = 0; static char *compresscfg = NULL; static char *cryptocfg = NULL; static int machine_output = 0; +static int use_access_lists = 0; static int bench_shutdown_in_progress = 0; static pthread_mutex_t shutdown_mutex = PTHREAD_MUTEX_INITIALIZER; @@ -77,6 +78,7 @@ static void print_help(void) printf("knet_bench usage:\n"); printf(" -h print this help (no really)\n"); printf(" -d enable debug logs (default INFO)\n"); + printf(" -f enable use of access lists (default: off)\n"); printf(" -c [implementation]:[crypto]:[hashing] crypto configuration. (default disabled)\n"); printf(" Example: -c nss:aes128:sha1\n"); printf(" -z [implementation]:[level]:[threshold] compress configuration. (default disabled)\n"); @@ -247,7 +249,7 @@ static void setup_knet(int argc, char *argv[]) memset(nodes, 0, sizeof(nodes)); - while ((rv = getopt(argc, argv, "aCT:S:s:ldom:wb:t:n:c:p:X::P:z:h")) != EOF) { + while ((rv = getopt(argc, argv, "aCT:S:s:ldfom:wb:t:n:c:p:X::P:z:h")) != EOF) { switch(rv) { case 'h': print_help(); @@ -259,6 +261,9 @@ static void setup_knet(int argc, char *argv[]) case 'd': debug = KNET_LOG_DEBUG; break; + case 'f': + use_access_lists = 1; + break; case 'c': if (cryptocfg) { printf("Error: -c can only be specified once\n"); @@ -455,6 +460,11 @@ static void setup_knet(int argc, char *argv[]) exit(FAIL); } + if (knet_handle_enable_access_lists(knet_h, use_access_lists) < 0) { + printf("Unable to knet_handle_enable_access_lists: %s\n", strerror(errno)); + exit(FAIL); + } + if (cryptocfg) { memset(&knet_handle_crypto_cfg, 0, sizeof(knet_handle_crypto_cfg)); cryptomodel = strtok(cryptocfg, ":");