Commit f3950cf4 authored by Yuriy Umanets's avatar Yuriy Umanets Committed by Tomasz Zawadzki
Browse files

fio/bdev_plugin: Added env_context to fio config



FIO config can have "env_context" field now. It allows passing to DPDK
the start-up options essential for mlx5 crypto/reduce support. This
enables using FIO plugin for testing mlx5 crypto/compress vbdev PMDs.

For example:
env_context=--allow=0000:01:00.0,class=crypto,wcs_file=/path/credentials.txt

Signed-off-by: default avatarYuriy Umanets <yumanets@nvidia.com>
Change-Id: I8b862a431fa5b838e337a64e736d4f6700f83599
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11633


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
parent 4a11579e
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ struct spdk_fio_options {
	void *pad;
	char *conf;
	char *json_conf;
	char *env_context;
	char *log_flags;
	unsigned mem_mb;
	int mem_single_seg;
@@ -299,6 +300,9 @@ spdk_init_thread_poll(void *arg)
		opts.mem_size = eo->mem_mb;
	}
	opts.hugepage_single_segments = eo->mem_single_seg;
	if (eo->env_context) {
		opts.env_context = eo->env_context;
	}

	if (spdk_env_init(&opts) < 0) {
		SPDK_ERRLOG("Unable to initialize SPDK env\n");
@@ -1267,6 +1271,15 @@ static struct fio_option options[] = {
		.category	= FIO_OPT_C_ENGINE,
		.group		= FIO_OPT_G_INVALID,
	},
	{
		.name           = "env_context",
		.lname          = "Environment context options",
		.type           = FIO_OPT_STR_STORE,
		.off1           = offsetof(struct spdk_fio_options, env_context),
		.help           = "Opaque context for use of the env implementation",
		.category       = FIO_OPT_C_ENGINE,
		.group          = FIO_OPT_G_INVALID,
	},
	{
		.name		= NULL,
	},