Loading include/spdk/ioat.h +4 −2 Original line number Diff line number Diff line Loading @@ -90,12 +90,14 @@ void ioat_unregister_thread(void); int64_t ioat_submit_copy(void *cb_arg, ioat_callback_t cb_fn, void *dst, const void *src, uint64_t nbytes); /* /** * Check for completed requests on the current thread. * * Before submitting any requests on a thread, the thread must be registered * using the \ref ioat_register_thread() function. * * \returns 0 on success or negative if something went wrong. */ void ioat_process_events(void); int ioat_process_events(void); #endif lib/ioat/ioat.c +8 −8 Original line number Diff line number Diff line Loading @@ -339,7 +339,7 @@ static int ioat_reset_hw(struct ioat_channel *ioat) return 0; } static void static int ioat_process_channel_events(struct ioat_channel *ioat) { struct ioat_descriptor *desc; Loading @@ -347,7 +347,7 @@ ioat_process_channel_events(struct ioat_channel *ioat) uint32_t tail; if (ioat->head == ioat->tail) { return; return 0; } status = *ioat->comp_update; Loading @@ -355,12 +355,11 @@ ioat_process_channel_events(struct ioat_channel *ioat) if (is_ioat_halted(status)) { ioat_printf(ioat, "%s: Channel halted (%x)\n", __func__, ioat->regs->chanerr); /* TODO: report error */ return; return -1; } if (completed_descriptor == ioat->last_seen) { return; return 0; } do { Loading @@ -376,6 +375,7 @@ ioat_process_channel_events(struct ioat_channel *ioat) } while (hw_desc_phys_addr != completed_descriptor); ioat->last_seen = hw_desc_phys_addr; return 0; } static int Loading Loading @@ -663,11 +663,11 @@ ioat_submit_copy(void *cb_arg, ioat_callback_t cb_fn, return nbytes; } void ioat_process_events(void) int ioat_process_events(void) { if (!ioat_thread_channel) { return; return -1; } ioat_process_channel_events(ioat_thread_channel); return ioat_process_channel_events(ioat_thread_channel); } Loading
include/spdk/ioat.h +4 −2 Original line number Diff line number Diff line Loading @@ -90,12 +90,14 @@ void ioat_unregister_thread(void); int64_t ioat_submit_copy(void *cb_arg, ioat_callback_t cb_fn, void *dst, const void *src, uint64_t nbytes); /* /** * Check for completed requests on the current thread. * * Before submitting any requests on a thread, the thread must be registered * using the \ref ioat_register_thread() function. * * \returns 0 on success or negative if something went wrong. */ void ioat_process_events(void); int ioat_process_events(void); #endif
lib/ioat/ioat.c +8 −8 Original line number Diff line number Diff line Loading @@ -339,7 +339,7 @@ static int ioat_reset_hw(struct ioat_channel *ioat) return 0; } static void static int ioat_process_channel_events(struct ioat_channel *ioat) { struct ioat_descriptor *desc; Loading @@ -347,7 +347,7 @@ ioat_process_channel_events(struct ioat_channel *ioat) uint32_t tail; if (ioat->head == ioat->tail) { return; return 0; } status = *ioat->comp_update; Loading @@ -355,12 +355,11 @@ ioat_process_channel_events(struct ioat_channel *ioat) if (is_ioat_halted(status)) { ioat_printf(ioat, "%s: Channel halted (%x)\n", __func__, ioat->regs->chanerr); /* TODO: report error */ return; return -1; } if (completed_descriptor == ioat->last_seen) { return; return 0; } do { Loading @@ -376,6 +375,7 @@ ioat_process_channel_events(struct ioat_channel *ioat) } while (hw_desc_phys_addr != completed_descriptor); ioat->last_seen = hw_desc_phys_addr; return 0; } static int Loading Loading @@ -663,11 +663,11 @@ ioat_submit_copy(void *cb_arg, ioat_callback_t cb_fn, return nbytes; } void ioat_process_events(void) int ioat_process_events(void) { if (!ioat_thread_channel) { return; return -1; } ioat_process_channel_events(ioat_thread_channel); return ioat_process_channel_events(ioat_thread_channel); }