Loading examples/nvme/identify/identify.c +1 −1 Original line number Diff line number Diff line Loading @@ -93,7 +93,7 @@ get_feature(struct nvme_controller *ctrlr, uint8_t fid) static void get_features(struct nvme_controller *ctrlr) { int i; size_t i; uint8_t features_to_get[] = { NVME_FEAT_ARBITRATION, Loading lib/nvme/nvme_ctrlr.c +7 −5 Original line number Diff line number Diff line Loading @@ -56,7 +56,8 @@ nvme_ctrlr_construct_io_qpairs(struct nvme_controller *ctrlr) { struct nvme_qpair *qpair; union nvme_cap_lo_register cap_lo; int i, num_entries, num_trackers, rc; uint32_t i, num_entries, num_trackers; int rc; if (ctrlr->ioq != NULL) { /* Loading Loading @@ -112,7 +113,7 @@ nvme_ctrlr_construct_io_qpairs(struct nvme_controller *ctrlr) static void nvme_ctrlr_fail(struct nvme_controller *ctrlr) { int i; uint32_t i; ctrlr->is_failed = true; nvme_qpair_fail(&ctrlr->adminq); Loading Loading @@ -261,7 +262,8 @@ nvme_ctrlr_enable(struct nvme_controller *ctrlr) int nvme_ctrlr_hw_reset(struct nvme_controller *ctrlr) { int i, rc; uint32_t i; int rc; union nvme_cc_register cc; cc.raw = nvme_mmio_read_4(ctrlr, cc.raw); Loading Loading @@ -396,7 +398,7 @@ nvme_ctrlr_create_qpairs(struct nvme_controller *ctrlr) { struct nvme_completion_poll_status status; struct nvme_qpair *qpair; int i; uint32_t i; if (nvme_ctrlr_construct_io_qpairs(ctrlr)) { nvme_printf(ctrlr, "nvme_ctrlr_construct_io_qpairs failed!\n"); Loading Loading @@ -687,7 +689,7 @@ nvme_ctrlr_construct(struct nvme_controller *ctrlr, void *devhandle) void nvme_ctrlr_destruct(struct nvme_controller *ctrlr) { int i; uint32_t i; nvme_ctrlr_disable(ctrlr); nvme_ctrlr_shutdown(ctrlr); Loading lib/nvme/nvme_ctrlr_cmd.c +3 −3 Original line number Diff line number Diff line Loading @@ -261,12 +261,12 @@ nvme_ctrlr_cmd_get_error_page(struct nvme_controller *ctrlr, nvme_assert(num_entries > 0, ("%s called with num_entries==0\n", __func__)); /* Controller's error log page entries is 0-based. */ nvme_assert(num_entries <= (ctrlr->cdata.elpe + 1), nvme_assert(num_entries <= (ctrlr->cdata.elpe + 1u), ("%s called with num_entries=%d but (elpe+1)=%d\n", __func__, num_entries, ctrlr->cdata.elpe + 1)); if (num_entries > (ctrlr->cdata.elpe + 1)) num_entries = ctrlr->cdata.elpe + 1; if (num_entries > (ctrlr->cdata.elpe + 1u)) num_entries = ctrlr->cdata.elpe + 1u; nvme_ctrlr_cmd_get_log_page(ctrlr, NVME_LOG_ERROR, NVME_GLOBAL_NAMESPACE_TAG, payload, sizeof(*payload) * num_entries, Loading lib/nvme/nvme_impl.h +1 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,7 @@ nvme_malloc(const char *tag, size_t size, unsigned align, uint64_t *phys_addr) * Return the physical address for the specified virtual address. */ #define nvme_vtophys(buf) vtophys(buf) #define NVME_VTOPHYS_ERROR VTOPHYS_ERROR extern struct rte_mempool *request_mempool; Loading lib/nvme/nvme_qpair.c +2 −2 Original line number Diff line number Diff line Loading @@ -709,7 +709,7 @@ nvme_qpair_submit_request(struct nvme_qpair *qpair, struct nvme_request *req) */ phys_addr = nvme_vtophys(req->u.payload); if (phys_addr == -1) { if (phys_addr == NVME_VTOPHYS_ERROR) { _nvme_fail_request_bad_vtophys(qpair, tr); return; } Loading @@ -731,7 +731,7 @@ nvme_qpair_submit_request(struct nvme_qpair *qpair, struct nvme_request *req) while (cur_nseg < nseg) { seg_addr = req->u.payload + cur_nseg * PAGE_SIZE - unaligned; phys_addr = nvme_vtophys(seg_addr); if (phys_addr == -1) { if (phys_addr == NVME_VTOPHYS_ERROR) { _nvme_fail_request_bad_vtophys(qpair, tr); return; } Loading Loading
examples/nvme/identify/identify.c +1 −1 Original line number Diff line number Diff line Loading @@ -93,7 +93,7 @@ get_feature(struct nvme_controller *ctrlr, uint8_t fid) static void get_features(struct nvme_controller *ctrlr) { int i; size_t i; uint8_t features_to_get[] = { NVME_FEAT_ARBITRATION, Loading
lib/nvme/nvme_ctrlr.c +7 −5 Original line number Diff line number Diff line Loading @@ -56,7 +56,8 @@ nvme_ctrlr_construct_io_qpairs(struct nvme_controller *ctrlr) { struct nvme_qpair *qpair; union nvme_cap_lo_register cap_lo; int i, num_entries, num_trackers, rc; uint32_t i, num_entries, num_trackers; int rc; if (ctrlr->ioq != NULL) { /* Loading Loading @@ -112,7 +113,7 @@ nvme_ctrlr_construct_io_qpairs(struct nvme_controller *ctrlr) static void nvme_ctrlr_fail(struct nvme_controller *ctrlr) { int i; uint32_t i; ctrlr->is_failed = true; nvme_qpair_fail(&ctrlr->adminq); Loading Loading @@ -261,7 +262,8 @@ nvme_ctrlr_enable(struct nvme_controller *ctrlr) int nvme_ctrlr_hw_reset(struct nvme_controller *ctrlr) { int i, rc; uint32_t i; int rc; union nvme_cc_register cc; cc.raw = nvme_mmio_read_4(ctrlr, cc.raw); Loading Loading @@ -396,7 +398,7 @@ nvme_ctrlr_create_qpairs(struct nvme_controller *ctrlr) { struct nvme_completion_poll_status status; struct nvme_qpair *qpair; int i; uint32_t i; if (nvme_ctrlr_construct_io_qpairs(ctrlr)) { nvme_printf(ctrlr, "nvme_ctrlr_construct_io_qpairs failed!\n"); Loading Loading @@ -687,7 +689,7 @@ nvme_ctrlr_construct(struct nvme_controller *ctrlr, void *devhandle) void nvme_ctrlr_destruct(struct nvme_controller *ctrlr) { int i; uint32_t i; nvme_ctrlr_disable(ctrlr); nvme_ctrlr_shutdown(ctrlr); Loading
lib/nvme/nvme_ctrlr_cmd.c +3 −3 Original line number Diff line number Diff line Loading @@ -261,12 +261,12 @@ nvme_ctrlr_cmd_get_error_page(struct nvme_controller *ctrlr, nvme_assert(num_entries > 0, ("%s called with num_entries==0\n", __func__)); /* Controller's error log page entries is 0-based. */ nvme_assert(num_entries <= (ctrlr->cdata.elpe + 1), nvme_assert(num_entries <= (ctrlr->cdata.elpe + 1u), ("%s called with num_entries=%d but (elpe+1)=%d\n", __func__, num_entries, ctrlr->cdata.elpe + 1)); if (num_entries > (ctrlr->cdata.elpe + 1)) num_entries = ctrlr->cdata.elpe + 1; if (num_entries > (ctrlr->cdata.elpe + 1u)) num_entries = ctrlr->cdata.elpe + 1u; nvme_ctrlr_cmd_get_log_page(ctrlr, NVME_LOG_ERROR, NVME_GLOBAL_NAMESPACE_TAG, payload, sizeof(*payload) * num_entries, Loading
lib/nvme/nvme_impl.h +1 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,7 @@ nvme_malloc(const char *tag, size_t size, unsigned align, uint64_t *phys_addr) * Return the physical address for the specified virtual address. */ #define nvme_vtophys(buf) vtophys(buf) #define NVME_VTOPHYS_ERROR VTOPHYS_ERROR extern struct rte_mempool *request_mempool; Loading
lib/nvme/nvme_qpair.c +2 −2 Original line number Diff line number Diff line Loading @@ -709,7 +709,7 @@ nvme_qpair_submit_request(struct nvme_qpair *qpair, struct nvme_request *req) */ phys_addr = nvme_vtophys(req->u.payload); if (phys_addr == -1) { if (phys_addr == NVME_VTOPHYS_ERROR) { _nvme_fail_request_bad_vtophys(qpair, tr); return; } Loading @@ -731,7 +731,7 @@ nvme_qpair_submit_request(struct nvme_qpair *qpair, struct nvme_request *req) while (cur_nseg < nseg) { seg_addr = req->u.payload + cur_nseg * PAGE_SIZE - unaligned; phys_addr = nvme_vtophys(seg_addr); if (phys_addr == -1) { if (phys_addr == NVME_VTOPHYS_ERROR) { _nvme_fail_request_bad_vtophys(qpair, tr); return; } Loading