Loading CONFIG +0 −4 Original line number Diff line number Diff line Loading @@ -57,10 +57,6 @@ CONFIG_DPDK_DIR?=/path/to/dpdk # Defaults to depending on DPDK. CONFIG_NVME_IMPL?=nvme_impl.h # Header file to use for IOAT implementation specific functions. # Defaults to depending on DPDK. CONFIG_IOAT_IMPL?=ioat_impl.h # Build SPDK FIO plugin. Requires FIO_SOURCE_DIR set to a valid # fio source code directory. CONFIG_FIO_PLUGIN?=n Loading lib/ioat/Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..) include $(SPDK_ROOT_DIR)/mk/spdk.common.mk CFLAGS += $(ENV_CFLAGS) -include $(CONFIG_IOAT_IMPL) CFLAGS += $(ENV_CFLAGS) C_SRCS = ioat.c LIBNAME = ioat Loading lib/ioat/ioat.c +12 −12 Original line number Diff line number Diff line Loading @@ -272,7 +272,7 @@ static int ioat_reset_hw(struct spdk_ioat_chan *ioat) timeout = 20; /* in milliseconds */ while (is_ioat_active(status) || is_ioat_idle(status)) { ioat_delay_us(1000); spdk_delay_us(1000); timeout--; if (timeout == 0) { SPDK_ERRLOG("timed out waiting for suspend\n"); Loading @@ -292,7 +292,7 @@ static int ioat_reset_hw(struct spdk_ioat_chan *ioat) timeout = 20; while (ioat_reset_pending(ioat)) { ioat_delay_us(1000); spdk_delay_us(1000); timeout--; if (timeout == 0) { SPDK_ERRLOG("timed out waiting for reset\n"); Loading Loading @@ -352,11 +352,11 @@ ioat_channel_destruct(struct spdk_ioat_chan *ioat) } if (ioat->hw_ring) { ioat_free(ioat->hw_ring); spdk_free(ioat->hw_ring); } if (ioat->comp_update) { ioat_free((void *)ioat->comp_update); spdk_free((void *)ioat->comp_update); ioat->comp_update = NULL; } Loading Loading @@ -402,7 +402,7 @@ ioat_channel_start(struct spdk_ioat_chan *ioat) ioat->max_xfer_size = 1U << xfercap; } ioat->comp_update = ioat_zmalloc(sizeof(*ioat->comp_update), SPDK_IOAT_CHANCMP_ALIGN, ioat->comp_update = spdk_zmalloc(sizeof(*ioat->comp_update), SPDK_IOAT_CHANCMP_ALIGN, &comp_update_bus_addr); if (ioat->comp_update == NULL) { return -1; Loading @@ -417,7 +417,7 @@ ioat_channel_start(struct spdk_ioat_chan *ioat) return -1; } ioat->hw_ring = ioat_zmalloc(num_descriptors * sizeof(union spdk_ioat_hw_desc), 64, ioat->hw_ring = spdk_zmalloc(num_descriptors * sizeof(union spdk_ioat_hw_desc), 64, &ioat->hw_ring_phys_addr); if (!ioat->hw_ring) { return -1; Loading @@ -442,7 +442,7 @@ ioat_channel_start(struct spdk_ioat_chan *ioat) i = 100; while (i-- > 0) { ioat_delay_us(100); spdk_delay_us(100); status = ioat_get_chansts(ioat); if (is_ioat_idle(status)) break; Loading Loading @@ -594,8 +594,8 @@ spdk_ioat_submit_copy(struct spdk_ioat_chan *ioat, void *cb_arg, spdk_ioat_req_c vsrc = (uint64_t)src; vsrc_page = _2MB_PAGE(vsrc); vdst_page = _2MB_PAGE(vdst); psrc_page = ioat_vtophys((void *)vsrc_page); pdst_page = ioat_vtophys((void *)vdst_page); psrc_page = spdk_vtophys((void *)vsrc_page); pdst_page = spdk_vtophys((void *)vdst_page); remaining = nbytes; Loading @@ -620,12 +620,12 @@ spdk_ioat_submit_copy(struct spdk_ioat_chan *ioat, void *cb_arg, spdk_ioat_req_c if (_2MB_PAGE(vsrc) != vsrc_page) { vsrc_page = _2MB_PAGE(vsrc); psrc_page = ioat_vtophys((void *)vsrc_page); psrc_page = spdk_vtophys((void *)vsrc_page); } if (_2MB_PAGE(vdst) != vdst_page) { vdst_page = _2MB_PAGE(vdst); pdst_page = ioat_vtophys((void *)vdst_page); pdst_page = spdk_vtophys((void *)vdst_page); } } /* Issue null descriptor for null transfer */ Loading Loading @@ -678,7 +678,7 @@ spdk_ioat_submit_fill(struct spdk_ioat_chan *ioat, void *cb_arg, spdk_ioat_req_c remaining -= op_size; last_desc = ioat_prep_fill(ioat, ioat_vtophys((void *)vdst), spdk_vtophys((void *)vdst), fill_pattern, op_size); Loading lib/ioat/ioat_impl.hdeleted 100644 → 0 +0 −42 Original line number Diff line number Diff line #ifndef __IOAT_IMPL_H__ #define __IOAT_IMPL_H__ #include <pthread.h> #include <stdio.h> #include <stdbool.h> #include "spdk/assert.h" #include "spdk/env.h" /** * \file * * This file describes the functions required to integrate * the userspace IOAT driver for a specific implementation. This * implementation is specific for DPDK. Users would revise it as * necessary for their own particular environment if not using it * within the SPDK framework. */ /** * Allocate a pinned, physically contiguous memory buffer with the * given size and alignment. */ #define ioat_zmalloc spdk_zmalloc /** * Free a memory buffer previously allocated with ioat_zmalloc. */ #define ioat_free spdk_free /** * Return the physical address for the specified virtual address. */ #define ioat_vtophys(buf) spdk_vtophys(buf) /** * Delay us. */ #define ioat_delay_us spdk_delay_us #endif /* __IOAT_IMPL_H__ */ mk/ioat.unittest.mk +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk C_SRCS = $(TEST_FILE) $(OTHER_FILES) CFLAGS += -I$(SPDK_ROOT_DIR)/lib -include $(SPDK_ROOT_DIR)/test/lib/ioat/unit/ioat_impl.h CFLAGS += -I$(SPDK_ROOT_DIR)/lib LIBS += -lcunit $(SPDK_ROOT_DIR)/lib/log/libspdk_log.a Loading Loading
CONFIG +0 −4 Original line number Diff line number Diff line Loading @@ -57,10 +57,6 @@ CONFIG_DPDK_DIR?=/path/to/dpdk # Defaults to depending on DPDK. CONFIG_NVME_IMPL?=nvme_impl.h # Header file to use for IOAT implementation specific functions. # Defaults to depending on DPDK. CONFIG_IOAT_IMPL?=ioat_impl.h # Build SPDK FIO plugin. Requires FIO_SOURCE_DIR set to a valid # fio source code directory. CONFIG_FIO_PLUGIN?=n Loading
lib/ioat/Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..) include $(SPDK_ROOT_DIR)/mk/spdk.common.mk CFLAGS += $(ENV_CFLAGS) -include $(CONFIG_IOAT_IMPL) CFLAGS += $(ENV_CFLAGS) C_SRCS = ioat.c LIBNAME = ioat Loading
lib/ioat/ioat.c +12 −12 Original line number Diff line number Diff line Loading @@ -272,7 +272,7 @@ static int ioat_reset_hw(struct spdk_ioat_chan *ioat) timeout = 20; /* in milliseconds */ while (is_ioat_active(status) || is_ioat_idle(status)) { ioat_delay_us(1000); spdk_delay_us(1000); timeout--; if (timeout == 0) { SPDK_ERRLOG("timed out waiting for suspend\n"); Loading @@ -292,7 +292,7 @@ static int ioat_reset_hw(struct spdk_ioat_chan *ioat) timeout = 20; while (ioat_reset_pending(ioat)) { ioat_delay_us(1000); spdk_delay_us(1000); timeout--; if (timeout == 0) { SPDK_ERRLOG("timed out waiting for reset\n"); Loading Loading @@ -352,11 +352,11 @@ ioat_channel_destruct(struct spdk_ioat_chan *ioat) } if (ioat->hw_ring) { ioat_free(ioat->hw_ring); spdk_free(ioat->hw_ring); } if (ioat->comp_update) { ioat_free((void *)ioat->comp_update); spdk_free((void *)ioat->comp_update); ioat->comp_update = NULL; } Loading Loading @@ -402,7 +402,7 @@ ioat_channel_start(struct spdk_ioat_chan *ioat) ioat->max_xfer_size = 1U << xfercap; } ioat->comp_update = ioat_zmalloc(sizeof(*ioat->comp_update), SPDK_IOAT_CHANCMP_ALIGN, ioat->comp_update = spdk_zmalloc(sizeof(*ioat->comp_update), SPDK_IOAT_CHANCMP_ALIGN, &comp_update_bus_addr); if (ioat->comp_update == NULL) { return -1; Loading @@ -417,7 +417,7 @@ ioat_channel_start(struct spdk_ioat_chan *ioat) return -1; } ioat->hw_ring = ioat_zmalloc(num_descriptors * sizeof(union spdk_ioat_hw_desc), 64, ioat->hw_ring = spdk_zmalloc(num_descriptors * sizeof(union spdk_ioat_hw_desc), 64, &ioat->hw_ring_phys_addr); if (!ioat->hw_ring) { return -1; Loading @@ -442,7 +442,7 @@ ioat_channel_start(struct spdk_ioat_chan *ioat) i = 100; while (i-- > 0) { ioat_delay_us(100); spdk_delay_us(100); status = ioat_get_chansts(ioat); if (is_ioat_idle(status)) break; Loading Loading @@ -594,8 +594,8 @@ spdk_ioat_submit_copy(struct spdk_ioat_chan *ioat, void *cb_arg, spdk_ioat_req_c vsrc = (uint64_t)src; vsrc_page = _2MB_PAGE(vsrc); vdst_page = _2MB_PAGE(vdst); psrc_page = ioat_vtophys((void *)vsrc_page); pdst_page = ioat_vtophys((void *)vdst_page); psrc_page = spdk_vtophys((void *)vsrc_page); pdst_page = spdk_vtophys((void *)vdst_page); remaining = nbytes; Loading @@ -620,12 +620,12 @@ spdk_ioat_submit_copy(struct spdk_ioat_chan *ioat, void *cb_arg, spdk_ioat_req_c if (_2MB_PAGE(vsrc) != vsrc_page) { vsrc_page = _2MB_PAGE(vsrc); psrc_page = ioat_vtophys((void *)vsrc_page); psrc_page = spdk_vtophys((void *)vsrc_page); } if (_2MB_PAGE(vdst) != vdst_page) { vdst_page = _2MB_PAGE(vdst); pdst_page = ioat_vtophys((void *)vdst_page); pdst_page = spdk_vtophys((void *)vdst_page); } } /* Issue null descriptor for null transfer */ Loading Loading @@ -678,7 +678,7 @@ spdk_ioat_submit_fill(struct spdk_ioat_chan *ioat, void *cb_arg, spdk_ioat_req_c remaining -= op_size; last_desc = ioat_prep_fill(ioat, ioat_vtophys((void *)vdst), spdk_vtophys((void *)vdst), fill_pattern, op_size); Loading
lib/ioat/ioat_impl.hdeleted 100644 → 0 +0 −42 Original line number Diff line number Diff line #ifndef __IOAT_IMPL_H__ #define __IOAT_IMPL_H__ #include <pthread.h> #include <stdio.h> #include <stdbool.h> #include "spdk/assert.h" #include "spdk/env.h" /** * \file * * This file describes the functions required to integrate * the userspace IOAT driver for a specific implementation. This * implementation is specific for DPDK. Users would revise it as * necessary for their own particular environment if not using it * within the SPDK framework. */ /** * Allocate a pinned, physically contiguous memory buffer with the * given size and alignment. */ #define ioat_zmalloc spdk_zmalloc /** * Free a memory buffer previously allocated with ioat_zmalloc. */ #define ioat_free spdk_free /** * Return the physical address for the specified virtual address. */ #define ioat_vtophys(buf) spdk_vtophys(buf) /** * Delay us. */ #define ioat_delay_us spdk_delay_us #endif /* __IOAT_IMPL_H__ */
mk/ioat.unittest.mk +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk C_SRCS = $(TEST_FILE) $(OTHER_FILES) CFLAGS += -I$(SPDK_ROOT_DIR)/lib -include $(SPDK_ROOT_DIR)/test/lib/ioat/unit/ioat_impl.h CFLAGS += -I$(SPDK_ROOT_DIR)/lib LIBS += -lcunit $(SPDK_ROOT_DIR)/lib/log/libspdk_log.a Loading