scripts/nvmf_perf: add adq_enable option to configuration file
Parse the config file for "adq_enable" flag and enable the option in SPDK Target and SPDK Initiator configuration. At this point the flag has no effect on the generated traffic, as the system and priority queues are not configured properly. These settings will be added gradually in following patches. Change-Id: I5d7bc892f3aa7bbe691b7e0983294b56fcf994f5 Signed-off-by: Karol Latecki <karol.latecki@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6260 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
ddb4d24b1d
commit
f9dd94b515
@ -61,6 +61,11 @@ Number of shared buffers to use when creating transport layer.
|
||||
|
||||
Boolean. If set to true - enable "dif_insert_or_strip" option for TCP transport layer.
|
||||
|
||||
### adq_enable
|
||||
|
||||
Configure and use ADQ on selected system. Only available when using Intel E810 NICs.
|
||||
Set to "true" to enable.
|
||||
|
||||
## Initiator
|
||||
|
||||
Describes initiator arguments. There can be more than one initiator section in the configuration file.
|
||||
@ -107,6 +112,11 @@ by default. Not used if "mode" is set to "spdk".
|
||||
Path to the fio binary that will be used to compile SPDK and run the test.
|
||||
If not specified, then the script will use /usr/src/fio/fio as the default.
|
||||
|
||||
### adq_enable
|
||||
|
||||
Configure and use ADQ on selected system. Only available when using Intel E810 NICs.
|
||||
Set to "true" to enable.
|
||||
|
||||
### extra_params
|
||||
|
||||
Space separated string with additional settings for "nvme connect" command
|
||||
|
@ -31,6 +31,12 @@ class Server:
|
||||
self.local_nic_info = []
|
||||
self._nics_json_obj = {}
|
||||
|
||||
self.enable_adq = False
|
||||
self.adq_priority = None
|
||||
if "adq_enable" in server_config and server_config["adq_enable"]:
|
||||
self.enable_adq = server_config["adq_enable"]
|
||||
self.adq_priority = 1
|
||||
|
||||
if not re.match("^[A-Za-z0-9]*$", name):
|
||||
self.log_print("Please use a name which contains only letters or numbers")
|
||||
sys.exit(1)
|
||||
@ -705,7 +711,8 @@ class SPDKTarget(Target):
|
||||
# Create RDMA transport layer
|
||||
rpc.nvmf.nvmf_create_transport(self.client, trtype=self.transport,
|
||||
num_shared_buffers=self.num_shared_buffers,
|
||||
dif_insert_or_strip=self.dif_insert_strip)
|
||||
dif_insert_or_strip=self.dif_insert_strip,
|
||||
sock_priority=self.adq_priority)
|
||||
self.log_print("SPDK NVMeOF transport layer:")
|
||||
rpc.client.print_dict(rpc.nvmf.nvmf_get_transports(self.client))
|
||||
|
||||
@ -809,6 +816,12 @@ class SPDKTarget(Target):
|
||||
self.log_print("Target socket options:")
|
||||
rpc.client.print_dict(rpc.sock.sock_impl_get_options(self.client, impl_name="posix"))
|
||||
|
||||
if self.enable_adq:
|
||||
rpc.sock.sock_impl_set_options(self.client, impl_name="posix", enable_placement_id=1)
|
||||
rpc.bdev.bdev_nvme_set_options(self.client, timeout_us=0, action_on_timeout=None,
|
||||
nvme_adminq_poll_period_us=100000, retry_count=4)
|
||||
rpc.nvmf.nvmf_set_config(self.client, acceptor_poll_rate=10000)
|
||||
|
||||
rpc.app.framework_set_scheduler(self.client, name=self.scheduler_name)
|
||||
|
||||
rpc.framework_start_init(self.client)
|
||||
@ -926,6 +939,10 @@ class SPDKInitiator(Initiator):
|
||||
"adrfam": "IPv4"
|
||||
}
|
||||
}
|
||||
|
||||
if self.enable_adq:
|
||||
nvme_ctrl["params"].update({"priority": "1"})
|
||||
|
||||
bdev_cfg_section["subsystems"][0]["config"].append(nvme_ctrl)
|
||||
|
||||
return json.dumps(bdev_cfg_section, indent=2)
|
||||
|
Loading…
Reference in New Issue
Block a user