Add support for testing checksumming speed

fio --crctest will test all of them, --crctest=md5,crc32c will
test md5 and crc32c, for example.

Signed-off-by: Jens Axboe <axboe@fb.com>
diff --git a/init.c b/init.c
index 6c48d3a..b26dc9f 100644
--- a/init.c
+++ b/init.c
@@ -208,6 +208,11 @@
 		.val		= 'T',
 	},
 	{
+		.name		= (char *) "crctest",
+		.has_arg	= optional_argument,
+		.val		= 'G',
+	},
+	{
 		.name		= (char *) "idle-prof",
 		.has_arg	= required_argument,
 		.val		= 'I',
@@ -1405,6 +1410,7 @@
 	printf("  --version\t\tPrint version info and exit\n");
 	printf("  --help\t\tPrint this page\n");
 	printf("  --cpuclock-test\tPerform test/validation of CPU clock\n");
+	printf("  --crctest\t\tTest speed of checksum functions\n");
 	printf("  --cmdhelp=cmd\t\tPrint command help, \"all\" for all of"
 		" them\n");
 	printf("  --enghelp=engine\tPrint ioengine help, or list"
@@ -1604,6 +1610,8 @@
 	fio_client_add_cmd_option(client, opt);
 }
 
+extern int fio_crctest(const char *);
+
 int parse_cmd_line(int argc, char *argv[], int client_type)
 {
 	struct thread_data *td = NULL;
@@ -1868,6 +1876,10 @@
 			do_exit++;
 			exit_val = fio_monotonic_clocktest();
 			break;
+		case 'G':
+			do_exit++;
+			exit_val = fio_crctest(optarg);
+			break;
 		case 'L': {
 			long long val;