From owner-svn-src-all@freebsd.org Fri Sep 2 21:11:38 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8545BCD8D5; Fri, 2 Sep 2016 21:11:38 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E54998D; Fri, 2 Sep 2016 21:11:38 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u82LBbkq005791; Fri, 2 Sep 2016 21:11:37 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u82LBbad005790; Fri, 2 Sep 2016 21:11:37 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201609022111.u82LBbad005790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Fri, 2 Sep 2016 21:11:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305304 - head/tools/tools/crypto X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2016 21:11:39 -0000 Author: gnn Date: Fri Sep 2 21:11:37 2016 New Revision: 305304 URL: https://svnweb.freebsd.org/changeset/base/305304 Log: Clean up the usage message and remove dead code. Reviewed by: cem MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC (Netgate) Differential Revision: https://reviews.freebsd.org/D7765 Modified: head/tools/tools/crypto/cryptotest.c Modified: head/tools/tools/crypto/cryptotest.c ============================================================================== --- head/tools/tools/crypto/cryptotest.c Fri Sep 2 20:41:43 2016 (r305303) +++ head/tools/tools/crypto/cryptotest.c Fri Sep 2 21:11:37 2016 (r305304) @@ -84,6 +84,7 @@ */ #include +#include #include #include #include @@ -130,9 +131,6 @@ struct alg { { "aes", 0, 16, 16, 16, CRYPTO_AES_CBC}, { "aes192", 0, 16, 24, 24, CRYPTO_AES_CBC}, { "aes256", 0, 16, 32, 32, CRYPTO_AES_CBC}, -#ifdef notdef - { "arc4", 0, 8, 1, 32, CRYPTO_ARC4 }, -#endif { "md5", 1, 8, 16, 16, CRYPTO_MD5_HMAC }, { "sha1", 1, 8, 20, 20, CRYPTO_SHA1_HMAC }, { "sha256", 1, 8, 32, 32, CRYPTO_SHA2_256_HMAC }, @@ -146,8 +144,8 @@ usage(const char* cmd) printf("usage: %s [-czsbv] [-d dev] [-a algorithm] [count] [size ...]\n", cmd); printf("where algorithm is one of:\n"); - printf(" des 3des (default) blowfish cast skipjack rij\n"); - printf(" aes aes192 aes256 arc4\n"); + printf(" null des 3des (default) blowfish cast skipjack rij\n"); + printf(" aes aes192 aes256 md5 sha1 sha256 sha384 sha512\n"); printf("count is the number of encrypt/decrypt ops to do\n"); printf("size is the number of bytes of text to encrypt+decrypt\n"); printf("\n"); @@ -158,6 +156,7 @@ usage(const char* cmd) printf("-v be verbose\n"); printf("-b mark operations for batching\n"); printf("-p profile kernel crypto operation (must be root)\n"); + printf("-t n for n threads and run tests concurrently\n"); exit(-1); } @@ -483,17 +482,10 @@ runtests(struct alg *alg, int count, int if (t) { int nops = alg->ishash ? count : 2*count; -#if 0 - t /= threads; - printf("%6.3lf sec, %7d %6s crypts, %7d bytes, %8.0lf byte/sec, %7.1lf Mb/sec\n", - t, nops, alg->name, size, (double)nops*size / t, - (double)nops*size / t * 8 / 1024 / 1024); -#else nops *= threads; printf("%8.3lf sec, %7d %6s crypts, %7d bytes, %8.0lf byte/sec, %7.1lf Mb/sec\n", t, nops, alg->name, size, (double)nops*size / t, (double)nops*size / t * 8 / 1024 / 1024); -#endif } #ifdef __FreeBSD__ if (profile) {