diff options
Diffstat (limited to 'samples')
-rw-r--r-- | samples/client.c | 2 | ||||
-rw-r--r-- | samples/server.c | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/samples/client.c b/samples/client.c index 38da81d..da211b8 100644 --- a/samples/client.c +++ b/samples/client.c @@ -51,7 +51,7 @@ #define CLIENT_MAX_FDS (32) -/* This is low, so we get testing of vfu_dma_read/write() chunking. */ +/* This is low, so we get testing of vfu_sgl_read/write() chunking. */ #define CLIENT_MAX_DATA_XFER_SIZE (1024) static char const *irq_to_str[] = { diff --git a/samples/server.c b/samples/server.c index 1bd7710..e994ac1 100644 --- a/samples/server.c +++ b/samples/server.c @@ -204,9 +204,9 @@ static void do_dma_io(vfu_ctx_t *vfu_ctx, struct server_data *server_data) assert(vfu_ctx != NULL); - ret = vfu_addr_to_sg(vfu_ctx, - (vfu_dma_addr_t)server_data->regions[0].iova.iov_base, - count, sg, 1, PROT_WRITE); + ret = vfu_addr_to_sgl(vfu_ctx, + (vfu_dma_addr_t)server_data->regions[0].iova.iov_base, + count, sg, 1, PROT_WRITE); if (ret < 0) { err(EXIT_FAILURE, "failed to map %p-%p", server_data->regions[0].iova.iov_base, @@ -217,17 +217,17 @@ static void do_dma_io(vfu_ctx_t *vfu_ctx, struct server_data *server_data) crc1 = rte_hash_crc(buf, count, 0); vfu_log(vfu_ctx, LOG_DEBUG, "%s: WRITE addr %p count %d", __func__, server_data->regions[0].iova.iov_base, count); - ret = vfu_dma_write(vfu_ctx, sg, buf); + ret = vfu_sgl_write(vfu_ctx, sg, 1, buf); if (ret < 0) { - err(EXIT_FAILURE, "vfu_dma_write failed"); + err(EXIT_FAILURE, "vfu_sgl_write failed"); } memset(buf, 0, count); vfu_log(vfu_ctx, LOG_DEBUG, "%s: READ addr %p count %d", __func__, server_data->regions[0].iova.iov_base, count); - ret = vfu_dma_read(vfu_ctx, sg, buf); + ret = vfu_sgl_read(vfu_ctx, sg, 1, buf); if (ret < 0) { - err(EXIT_FAILURE, "vfu_dma_read failed"); + err(EXIT_FAILURE, "vfu_sgl_read failed"); } crc2 = rte_hash_crc(buf, count, 0); |