From 188cd00c520855615331d35c087a22215767b8fb Mon Sep 17 00:00:00 2001 From: John Levon Date: Fri, 27 May 2022 19:06:31 +0100 Subject: re-work SGL API (#675) Harmonize and rename the vfu_*sg() APIs to better reflect their functionality: in our case, there is no mapping happening as part of these calls, they are merely housekeeping for range splitting, dirty tracking, and so on. Signed-off-by: John Levon Reviewed-by: Thanos Makatos --- test/py/test_quiesce.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/py/test_quiesce.py') diff --git a/test/py/test_quiesce.py b/test/py/test_quiesce.py index f283ccc..0e2a980 100644 --- a/test/py/test_quiesce.py +++ b/test/py/test_quiesce.py @@ -102,7 +102,7 @@ def test_device_quiesce_error_after_busy(mock_quiesce, mock_dma_register): mock_dma_register.assert_not_called() # check that the DMA region was NOT added - count, sgs = vfu_addr_to_sg(ctx, 0x10000, 0x1000) + count, sgs = vfu_addr_to_sgl(ctx, 0x10000, 0x1000) assert count == -1 assert c.get_errno() == errno.ENOENT @@ -110,18 +110,18 @@ def test_device_quiesce_error_after_busy(mock_quiesce, mock_dma_register): # DMA map/unmap, migration device state transition, and reset callbacks # have the same function signature in Python def _side_effect(ctx, _): - count, sgs = vfu_addr_to_sg(ctx, 0x10000, 0x1000) + count, sgs = vfu_addr_to_sgl(ctx, 0x10000, 0x1000) assert count == 1 sg = sgs[0] assert sg.dma_addr == 0x10000 and sg.region == 0 \ and sg.length == 0x1000 and sg.offset == 0 and sg.writeable iovec = iovec_t() - ret = vfu_map_sg(ctx, sg, iovec) + ret = vfu_sgl_get(ctx, sg, iovec) assert ret == 0, "%s" % c.get_errno() assert iovec.iov_base != 0 assert iovec.iov_len == 0x1000 assert ret == 0 - vfu_unmap_sg(ctx, sg, iovec) + vfu_sgl_put(ctx, sg, iovec) return 0 -- cgit v1.1