Skip to content

Commit

Permalink
fabtests/pytest/common: Allow registering mr with dmabuf
Browse files Browse the repository at this point in the history
Add an input parameter for ClientServerTest to allow
registering hmem memory via dmabuf.

Signed-off-by: Shi Jin <[email protected]>
  • Loading branch information
shijin-aws committed Nov 1, 2023
1 parent 504bbc3 commit cac4eec
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion fabtests/pytest/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,12 @@ def __init__(self, cmdline_args, executable,
memory_type="host_to_host",
timeout=None,
warmup_iteration_type=None,
completion_type="queue"):
completion_type="queue",
do_dmabuf_reg_for_hmem=False):

self._cmdline_args = cmdline_args
self._timeout = timeout or cmdline_args.timeout
self.do_dmabuf_reg_for_hmem = do_dmabuf_reg_for_hmem
self._server_base_command, server_additonal_environment = self.prepare_base_command("server", executable, iteration_type,
completion_semantic, prefix_type,
datacheck_type, message_size,
Expand Down Expand Up @@ -397,6 +399,10 @@ def prepare_base_command(self, command_type, executable,
pytest.skip("no {} device".format(host_memory_type))

command += " -D " + host_memory_type

if self.do_dmabuf_reg_for_hmem:
command += " -R"

additional_environment = None

if "PYTEST_XDIST_WORKER" in os.environ:
Expand Down

0 comments on commit cac4eec

Please sign in to comment.