mounts['/dev/vfio/vfio'] = '/dev/vfio/vfio'
return mounts
+ def _get_dsa_mounts(self, files: Dict[str, str]) -> Dict[str, str]:
+ mounts = dict()
+ if 'enable_dsa_acceleration' in files:
+ mounts['/dev/dsa'] = '/dev/dsa'
+ mounts['/dev/char'] = '/dev/char'
+ return mounts
+
def _get_tls_cert_key_mounts(
self, data_dir: str, files: Dict[str, str]
) -> Dict[str, str]:
else:
mounts.update(self._get_container_mounts(data_dir, log_dir))
mounts.update(self._get_huge_pages_mounts(self.files))
+ mounts.update(self._get_dsa_mounts(self.files))
mounts.update(self._get_tls_cert_key_mounts(data_dir, self.files))
def customize_container_binds(
args.extend(['--ulimit', 'memlock=-1:-1'])
args.extend(['--ulimit', 'nofile=10240'])
args.extend(['--cap-add=CAP_SYS_NICE'])
+ # idxd/dsa
+ if 'enable_dsa_acceleration' in self.files:
+ args.extend(['--privileged'])
+ args.extend(['--cap-add=SYS_RAWIO'])
if 'spdk_mem_size' not in self.files:
args.extend(['--cap-add=SYS_ADMIN'])
if 'spdk_huge_pages' in self.files:
except ValueError:
logger.error(f"Invalid value for SPDK huge pages: {spec.spdk_huge_pages}")
+ # Enable DSA probing
+ if spec.enable_dsa_acceleration:
+ daemon_spec.extra_files['enable_dsa_acceleration'] = str(spec.enable_dsa_acceleration)
+
if spec.enable_auth:
if (
not spec.client_cert
{% if transport_tcp_options %}
transport_tcp_options = {{ transport_tcp_options }}
{% endif %}
+enable_dsa_acceleration = {{ spec.enable_dsa_acceleration }}
{% if spec.tgt_cmd_extra_args %}
tgt_cmd_extra_args = {{ spec.tgt_cmd_extra_args }}
{% endif %}
conn_retries = 10
transports = tcp
transport_tcp_options = {{"in_capsule_data_size": 8192, "max_io_qpairs_per_ctrlr": 7}}
+enable_dsa_acceleration = True
tgt_cmd_extra_args = {tgt_cmd_extra_args}
qos_timeslice_in_usecs = 0
notifications_interval = 60
"config": "",
"keyring": "[client.nvmeof.testpool.mygroup.test.qwert]\nkey = None\n",
"files": {
- "ceph-nvmeof.conf": nvmeof_gateway_conf
+ "ceph-nvmeof.conf": nvmeof_gateway_conf,
+ "enable_dsa_acceleration": "True"
}
}
}),
transports: Optional[str] = 'tcp',
transport_tcp_options: Optional[Dict[str, int]] =
{"in_capsule_data_size": 8192, "max_io_qpairs_per_ctrlr": 7},
+ enable_dsa_acceleration: bool = True,
tgt_cmd_extra_args: Optional[str] = None,
iobuf_options: Optional[Dict[str, int]] = None,
qos_timeslice_in_usecs: Optional[int] = 0,
self.transports = transports
#: List of extra arguments for transports in the form opt=value
self.transport_tcp_options: Optional[Dict[str, int]] = transport_tcp_options
+ #: ``enable_dsa_acceleration`` enable dsa acceleration
+ self.enable_dsa_acceleration = enable_dsa_acceleration
#: ``tgt_cmd_extra_args`` extra arguments for the nvmf_tgt process
self.tgt_cmd_extra_args = tgt_cmd_extra_args
#: List of extra arguments for SPDK iobuf in the form opt=value