| /spdk/include/spdk/ |
| H A D | tree.h | 73 #define SPLAY_HEAD(name, type) \ argument 75 struct type *sph_root; /* root of the tree */ \ 85 #define SPLAY_ENTRY(type) \ argument 87 struct type *spe_left; /* left element */ \ 88 struct type *spe_right; /* right element */ \ 130 #define SPLAY_PROTOTYPE(name, type, field, cmp) \ argument 131 void name##_SPLAY(struct name *, struct type *); \ 133 struct type *name##_SPLAY_INSERT(struct name *, struct type *); \ 134 struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \ 137 static __attribute__((unused)) __inline struct type * \ [all …]
|
| H A D | queue_extras.h | 128 #define STAILQ_HEAD(name, type) \ argument 130 struct type *stqh_first;/* first element */ \ 131 struct type **stqh_last;/* addr of last next element */ \ 159 #define STAILQ_LAST(head, type, field) \ argument 161 SPDK_CONTAINEROF((head)->stqh_last, struct type, field.stqe_next)) 171 #define STAILQ_SWAP(head1, head2, type) do { \ argument 172 struct type *swap_first = STAILQ_FIRST(head1); \ 173 struct type **swap_last = (head1)->stqh_last; \ 187 #define LIST_HEAD(name, type) \ argument 189 struct type *lh_first; /* first element */ \ [all …]
|
| H A D | notify.h | 22 typedef int (*spdk_notify_foreach_type_cb)(const struct spdk_notify_type *type, void *ctx); 28 char type[SPDK_NOTIFY_MAX_NAME_SIZE]; member 51 struct spdk_notify_type *spdk_notify_type_register(const char *type); 59 const char *spdk_notify_type_get_name(const struct spdk_notify_type *type); 78 uint64_t spdk_notify_send(const char *type, const char *ctx);
|
| /spdk/lib/ftl/base/ |
| H A D | ftl_base_dev.c | 31 ftl_base_device_valid(const struct ftl_base_device_type *type) in ftl_base_device_valid() argument 33 return type && type->name && strlen(type->name); in ftl_base_device_valid() 37 ftl_base_device_register(struct ftl_base_device_type *type) in ftl_base_device_register() argument 39 if (!ftl_base_device_valid(type)) { in ftl_base_device_register() 45 if (!ftl_base_device_type_get_desc(type->name)) { in ftl_base_device_register() 46 TAILQ_INSERT_TAIL(&g_devs, type, base_devs_entry); in ftl_base_device_register() 48 SPDK_NOTICELOG("[FTL] Registered base device, name: %s\n", type->name); in ftl_base_device_register() 50 SPDK_ERRLOG("[FTL] Cannot register base device, already exist, name: %s\n", type->name); in ftl_base_device_register() 60 struct ftl_base_device_type *type; in ftl_base_device_get_type_by_bdev() local 64 TAILQ_FOREACH(type, &g_devs, base_devs_entry) { in ftl_base_device_get_type_by_bdev() [all …]
|
| /spdk/lib/ftl/nvc/ |
| H A D | ftl_nvc_dev.c | 30 ftl_nv_cache_device_valid(const struct ftl_nv_cache_device_type *type) in ftl_nv_cache_device_valid() argument 32 return type && type->name && strlen(type->name) > 0; in ftl_nv_cache_device_valid() 36 ftl_nv_cache_device_register(struct ftl_nv_cache_device_type *type) in ftl_nv_cache_device_register() argument 38 if (!ftl_nv_cache_device_valid(type)) { in ftl_nv_cache_device_register() 44 if (!ftl_nv_cache_device_type_get_type(type->name)) { in ftl_nv_cache_device_register() 45 TAILQ_INSERT_TAIL(&g_devs, type, internal.entry); in ftl_nv_cache_device_register() 46 SPDK_NOTICELOG("Registered NV cache device, name: %s\n", type->name); in ftl_nv_cache_device_register() 48 SPDK_ERRLOG("Cannot register NV cache device, already exists, name: %s\n", type->name); in ftl_nv_cache_device_register() 59 const struct ftl_nv_cache_device_type *type = NULL; in ftl_nv_cache_device_get_type_by_bdev() local 65 type = entry; in ftl_nv_cache_device_get_type_by_bdev() [all …]
|
| /spdk/lib/ftl/upgrade/ |
| H A D | ftl_sb_v5.c | 314 rc = ftl_layout_tracker_bdev_rm_region(layout_tracker, reg->type, reg->current.version); in sb_md_layout_delete_prev_region() 329 ftl_layout_tracker_bdev_find_next_region(layout_tracker, reg->type, ®_search_ctx); in sb_md_layout_update_prev_region() 334 rc = ftl_layout_tracker_bdev_rm_region(layout_tracker, reg_props.type, reg_props.ver); in sb_md_layout_update_prev_region() 338 reg_search_ctx = ftl_layout_tracker_bdev_insert_region(layout_tracker, reg_props.type, new_version, in sb_md_layout_update_prev_region() 343 reg_search_ctx = sb_md_layout_find_region(dev, reg_props.type, sb_md_layout_find_oldest_region, in sb_md_layout_update_prev_region() 358 reg_next = sb_md_layout_find_region(dev, reg->type, sb_md_layout_find_region_version, &new_version); in ftl_superblock_v5_md_layout_upgrade_region() 366 ftl_bug(reg_next->type != reg->type); in ftl_superblock_v5_md_layout_upgrade_region() 380 latest_ver = ftl_layout_upgrade_region_get_latest_version(reg->type); in ftl_superblock_v5_md_layout_upgrade_region() 383 reg_next = sb_md_layout_find_region(dev, reg->type, sb_md_layout_find_latest_regio in ftl_superblock_v5_md_layout_upgrade_region() 541 enum ftl_layout_region_type type; layout_fixup_base() member 579 enum ftl_layout_region_type type; layout_fixup_nvc() member [all...] |
| H A D | ftl_sb_v3.c | 21 return sb_ver->v3.md_layout_head.type == FTL_LAYOUT_REGION_TYPE_INVALID; in ftl_superblock_v3_md_layout_is_empty() 75 layout->region[n].type = FTL_LAYOUT_REGION_TYPE_INVALID; in ftl_superblock_v3_md_layout_load_all() 78 while (sb_reg->type != FTL_LAYOUT_REGION_TYPE_INVALID) { in ftl_superblock_v3_md_layout_load_all() 82 if (sb_reg->type == FTL_LAYOUT_REGION_TYPE_FREE_NVC || in ftl_superblock_v3_md_layout_load_all() 83 sb_reg->type == FTL_LAYOUT_REGION_TYPE_FREE_BASE) { in ftl_superblock_v3_md_layout_load_all() 87 if (sb_reg->type >= FTL_LAYOUT_REGION_TYPE_MAX_V3) { in ftl_superblock_v3_md_layout_load_all() 92 if (md_region_is_fixed(sb_reg->type)) { in ftl_superblock_v3_md_layout_load_all() 97 reg = &layout->region[sb_reg->type]; in ftl_superblock_v3_md_layout_load_all() 99 if (reg->type == FTL_LAYOUT_REGION_TYPE_INVALID || sb_reg->version < reg->current.version) { in ftl_superblock_v3_md_layout_load_all() 100 reg->type = sb_reg->type; in ftl_superblock_v3_md_layout_load_all() [all …]
|
| H A D | ftl_sb_upgrade.c | 33 if (reg->current.version <= ftl_layout_upgrade_region_get_latest_version(reg->type)) { in sb_v4_to_v5_verify() 42 reg->type, reg->current.version, ftl_layout_upgrade_region_get_latest_version(reg->type), in sb_v4_to_v5_verify() 85 while (sb_reg->type != FTL_LAYOUT_REGION_TYPE_INVALID) { in sb_v3_md_layout_convert() 86 if (sb_reg->type == FTL_LAYOUT_REGION_TYPE_FREE_NVC || in sb_v3_md_layout_convert() 87 sb_reg->type == FTL_LAYOUT_REGION_TYPE_FREE_BASE) { in sb_v3_md_layout_convert() 91 if (sb_reg->type >= FTL_LAYOUT_REGION_TYPE_MAX) { in sb_v3_md_layout_convert() 96 if (sb_v3_md_region_is_fixed(sb_reg->type)) { in sb_v3_md_layout_convert() 101 if (sb_v3_md_region_is_nvc(sb_reg->type)) { in sb_v3_md_layout_convert() 102 reg_props = ftl_layout_tracker_bdev_insert_region(dev->nvc_layout_tracker, sb_reg->type, in sb_v3_md_layout_convert() 105 reg_props = ftl_layout_tracker_bdev_insert_region(dev->base_layout_tracker, sb_reg->type, in sb_v3_md_layout_convert() [all …]
|
| H A D | ftl_trim_upgrade.c | 46 uint32_t type) in v0_to_v1_upgrade_setup_ctx() argument 52 if (md_ops->region_open(dev, type, FTL_TRIM_LOG_VERSION_1, sizeof(struct ftl_trim_log), 1, in v0_to_v1_upgrade_setup_ctx() 73 if (v0_to_v1_upgrade_setup_ctx(dev, lctx, lctx->reg->type)) { in v0_to_v1_upgrade() 108 if (md_ops->region_create(dev, region->type, FTL_TRIM_LOG_VERSION_1, 1) && in v0_to_v1_upgrade_enabled() 109 md_ops->region_open(dev, region->type, FTL_TRIM_LOG_VERSION_1, sizeof(struct ftl_trim_log), in v0_to_v1_upgrade_enabled()
|
| H A D | ftl_p2l_upgrade.c | 44 v2_upgrade_setup_ctx(struct spdk_ftl_dev *dev, struct ftl_layout_upgrade_ctx *lctx, uint32_t type) in v2_upgrade_setup_ctx() argument 52 if (md_ops->region_open(dev, lctx->reg->type, FTL_P2L_VERSION_2, in v2_upgrade_setup_ctx() 75 if (v2_upgrade_setup_ctx(dev, lctx, lctx->reg->type)) { in v2_upgrade() 105 if (md_ops->region_create(dev, region->type, FTL_P2L_VERSION_2, dev->layout.p2l.ckpt_pages) && in v1_to_v2_upgrade_enabled() 106 … md_ops->region_open(dev, region->type, FTL_P2L_VERSION_2, sizeof(struct ftl_p2l_ckpt_page_no_vss), in v1_to_v2_upgrade_enabled()
|
| H A D | ftl_chunk_upgrade.c | 58 uint32_t type) in v1_to_v2_upgrade_setup_ctx() argument 66 if (md_ops->region_open(dev, type, FTL_NVC_VERSION_2, sizeof(struct ftl_nv_cache_chunk_md), in v1_to_v2_upgrade_setup_ctx() 94 if (v1_to_v2_upgrade_setup_ctx(dev, lctx, lctx->reg->type)) { in v1_to_v2_upgrade() 127 if (md_ops->region_create(dev, region->type, FTL_NVC_VERSION_2, dev->layout.nvc.chunk_count) && in v1_to_v2_upgrade_enabled() 128 md_ops->region_open(dev, region->type, FTL_NVC_VERSION_2, sizeof(struct ftl_nv_cache_chunk_md), in v1_to_v2_upgrade_enabled()
|
| /spdk/lib/notify/ |
| H A D | notify.c | 30 spdk_notify_type_register(const char *type) in spdk_notify_type_register() argument 34 if (!type) { in spdk_notify_type_register() 35 SPDK_ERRLOG("Invalid notification type %p\n", type); in spdk_notify_type_register() 37 } else if (!type[0] || strlen(type) >= SPDK_NOTIFY_MAX_NAME_SIZE) { in spdk_notify_type_register() 38 SPDK_ERRLOG("Notification type '%s' too short or too long\n", type); in spdk_notify_type_register() 44 if (strcmp(type, it->name) == 0) { in spdk_notify_type_register() 45 SPDK_NOTICELOG("Notification type ' in spdk_notify_type_register() 64 spdk_notify_type_get_name(const struct spdk_notify_type * type) spdk_notify_type_get_name() argument 85 spdk_notify_send(const char * type,const char * ctx) spdk_notify_send() argument [all...] |
| /spdk/lib/json/ |
| H A D | json_util.c | 20 if (val->type == SPDK_JSON_VAL_ARRAY_BEGIN || val->type == SPDK_JSON_VAL_OBJECT_BEGIN) { in spdk_json_val_len() 32 if (val->type != SPDK_JSON_VAL_STRING && val->type != SPDK_JSON_VAL_NAME) { in spdk_json_strequal() 50 if (val->type != SPDK_JSON_VAL_STRING && val->type != SPDK_JSON_VAL_NAME) { in spdk_json_strdup() 95 if (val->type != SPDK_JSON_VAL_NUMBER) { in json_number_split() 304 if (values == NULL || values->type != SPDK_JSON_VAL_OBJECT_BEGIN) { in _json_decode_object() 368 .type = SPDK_JSON_VAL_INVALID in spdk_json_free_object() 405 if (values == NULL || values->type != SPDK_JSON_VAL_ARRAY_BEGIN) { in spdk_json_decode_array() 435 if (val->type != SPDK_JSON_VAL_TRUE && val->type != SPDK_JSON_VAL_FALSE) { in spdk_json_decode_bool() 439 *f = val->type == SPDK_JSON_VAL_TRUE; in spdk_json_decode_bool() 518 json_first(struct spdk_json_val *object, enum spdk_json_val_type type) in json_first() argument [all …]
|
| /spdk/scripts/ |
| H A D | rpc.py | 40 default=5260, type=int) 43 default=None, type=float) 46 default=0, type=int) 103 """, type=int, default=2) 125 """, type=int, default=2) 180 p.add_argument('-p', '--period', help="Scheduler period in microseconds", type=int) 181 p.add_argument('--load-limit', help="Scheduler load limit. Reserved for dynamic scheduler", type=int) 182 p.add_argument('--core-limit', help="Scheduler core limit. Reserved for dynamic scheduler", type=int) 183 p.add_argument('--core-busy', help="Scheduler core busy limit. Reserved for dynamic scheduler", type=int) 206 p.add_argument('-i', '--isolated-core-mask', help="Mask of CPU cores to isolate from scheduling change", type [all...] |
| /spdk/test/unit/lib/ftl/ftl_sb/ |
| H A D | ftl_sb_ut.c | 156 reg->type = regno; in test_setup() 205 sb->v3.md_layout_head.type = FTL_LAYOUT_REGION_TYPE_INVALID; in test_setup_sb_ver() 296 sb_reg->type = reg_type; in test_superblock_v3_md_layout_add() 346 if (md_region_is_fixed(reg->type)) { in test_ftl_superblock_v3_md_layout_build() 350 /* For VSS emulation the last layout type is a fixed region, we need to move back the list and end the list on previous entry */ in test_ftl_superblock_v3_md_layout_build() 357 if (test_superblock_v3_md_layout_add(dev, sb_reg, reg->type, reg->current.version, in test_ftl_superblock_v3_md_layout_build() 391 g_dev.layout.region[reg_type].type = reg_type; in test_sb_v3_region_reinit() 401 while (sb_reg->type != FTL_LAYOUT_REGION_TYPE_INVALID) { in test_sb_v3_find_region_ver() 402 if (sb_reg->type == reg_type && sb_reg->version == reg_ver) { in test_sb_v3_find_region_ver() 479 md_type_head = sb->v3.md_layout_head.type; in test_sb_v3_md_layout() [all...] |
| /spdk/test/unit/lib/json/json_util.c/ |
| H A D | json_util_ut.c | 17 v.type = SPDK_JSON_VAL_NUMBER; \ 53 v.type = SPDK_JSON_VAL_STRING; in test_strequal() 61 v.type = SPDK_JSON_VAL_NAME; in test_strequal() 64 v.type = SPDK_JSON_VAL_NUMBER; in test_strequal() 67 v.type = SPDK_JSON_VAL_STRING; in test_strequal() 220 object[0].type = SPDK_JSON_VAL_ARRAY_BEGIN; in test_decode_object() 266 values[0].type = SPDK_JSON_VAL_ARRAY_BEGIN; in test_decode_array() 268 values[1].type = SPDK_JSON_VAL_NUMBER; in test_decode_array() 271 values[2].type = SPDK_JSON_VAL_NUMBER; in test_decode_array() 274 values[3].type in test_decode_array() [all...] |
| /spdk/lib/ftl/utils/ |
| H A D | ftl_layout_tracker_bdev.c | 23 uint32_t type; member 52 entry_free->reg.type = FTL_LAYOUT_REGION_TYPE_FREE; in layout_tracker_init_entries() 107 if (entry->reg.type != FTL_LAYOUT_REGION_TYPE_FREE) { in layout_region_find_min_free() 136 if ((entry->reg.type == reg_type || reg_type == FTL_LAYOUT_REGION_TYPE_INVALID) in layout_region_find_from() 225 entry_new->reg.type = reg_type; in ftl_layout_tracker_bdev_add_region() 240 entry_new->reg.type = reg_type; in ftl_layout_tracker_bdev_add_region() 302 entry_new->reg.type = FTL_LAYOUT_REGION_TYPE_FREE; in ftl_layout_tracker_bdev_insert_region() 328 entry_new->reg.type = reg_type; in ftl_layout_tracker_bdev_insert_region() 343 entry_new->reg.type = reg_type; in ftl_layout_tracker_bdev_insert_region() 362 entry->reg.type = FTL_LAYOUT_REGION_TYPE_FREE; in ftl_layout_tracker_bdev_rm_region() [all …]
|
| /spdk/lib/trace/ |
| H A D | trace_flags.c | 252 spdk_trace_register_owner_type(uint8_t type, char id_prefix) in spdk_trace_register_owner_type() argument 256 assert(type != OWNER_TYPE_NONE); in spdk_trace_register_owner_type() 266 owner_type = &g_trace_file->owner_type[type]; in spdk_trace_register_owner_type() 267 assert(owner_type->type == 0); in spdk_trace_register_owner_type() 269 owner_type->type = type; in spdk_trace_register_owner_type() 318 owner->type = owner_type; in spdk_trace_register_owner() 387 spdk_trace_register_object(uint8_t type, char id_prefix) in spdk_trace_register_object() argument 391 assert(type != OBJECT_NONE); in spdk_trace_register_object() 401 object = &g_trace_file->object[type]; in spdk_trace_register_object() 402 assert(object->type == 0); in spdk_trace_register_object() [all …]
|
| /spdk/module/accel/error/ |
| H A D | accel_error.c | 99 if (info->opts.type == ACCEL_ERROR_INJECT_DISABLE) { in accel_error_submit_tasks() 111 info->opts.type = ACCEL_ERROR_INJECT_DISABLE; in accel_error_inject_channel() 131 switch (info->opts.type) { in accel_error_inject_error() 207 if (curr->type == ACCEL_ERROR_INJECT_DISABLE) { 211 curr->type = ACCEL_ERROR_INJECT_DISABLE; in accel_error_get_io_channel() 309 accel_error_get_type_name(enum accel_error_inject_type type) 318 if ((int)type >= ACCEL_ERROR_INJECT_MAX) { 322 return typenames[type]; 333 if (opts->type == ACCEL_ERROR_INJECT_DISABLE) { 340 spdk_json_write_named_string(w, "type", accel_error_get_type_nam 221 accel_error_get_type_name(enum accel_error_inject_type type) accel_error_get_type_name() argument [all...] |
| /spdk/test/unit/lib/jsonrpc/jsonrpc_server.c/ |
| H A D | jsonrpc_server_ut.c | 51 CU_ASSERT(g_request->id && g_request->id->type == SPDK_JSON_VAL_NUMBER); \ 56 CU_ASSERT(g_request->id && g_request->id->type == SPDK_JSON_VAL_STRING); \ 60 CU_ASSERT(g_request->id && g_request->id->type == SPDK_JSON_VAL_NULL) 74 CU_ASSERT(g_cur_param->type == SPDK_JSON_VAL_ARRAY_BEGIN); \ 78 CU_ASSERT(g_cur_param->type == SPDK_JSON_VAL_ARRAY_END); \ 82 CU_ASSERT(g_cur_param->type == SPDK_JSON_VAL_OBJECT_BEGIN); \ 86 CU_ASSERT(g_cur_param->type == SPDK_JSON_VAL_OBJECT_END); \ 90 CU_ASSERT(g_cur_param->type == SPDK_JSON_VAL_NUMBER); \ 96 CU_ASSERT(g_cur_param->type == SPDK_JSON_VAL_NAME); \ 102 CU_ASSERT(g_cur_param->type [all...] |
| /spdk/test/event/scheduler/ |
| H A D | scheduler_plugin.py | 35 p.add_argument('-a', '--active', help='Percent of time thread is active', type=int) 39 p.add_argument('thread_id', help='spdk_thread id', type=int) 40 p.add_argument('active', help='Percent of time thread is active', type=int) 44 p.add_argument('thread_id', help='spdk_thread id', type=int)
|
| /spdk/test/rpc_plugins/ |
| H A D | scheduler_plugin.py | 35 p.add_argument('-a', '--active', help='Percent of time thread is active', type=int) 39 p.add_argument('thread_id', help='spdk_thread id', type=int) 40 p.add_argument('active', help='Percent of time thread is active', type=int) 44 p.add_argument('thread_id', help='spdk_thread id', type=int)
|
| /spdk/lib/jsonrpc/ |
| H A D | jsonrpc_server.c | 96 if (req.version && (req.version->type != SPDK_JSON_VAL_STRING || in parse_single_request() 101 if (!req.method || req.method->type != SPDK_JSON_VAL_STRING) { in parse_single_request() 106 if (req.id->type == SPDK_JSON_VAL_STRING || in parse_single_request() 107 req.id->type == SPDK_JSON_VAL_NUMBER || in parse_single_request() 108 req.id->type == SPDK_JSON_VAL_NULL) { in parse_single_request() 117 if (req.params->type != SPDK_JSON_VAL_NULL) { in parse_single_request() 118 if (req.params->type != SPDK_JSON_VAL_ARRAY_BEGIN && in parse_single_request() 119 req.params->type != SPDK_JSON_VAL_OBJECT_BEGIN) { in parse_single_request() 262 if (request->values[0].type == SPDK_JSON_VAL_OBJECT_BEGIN) { in jsonrpc_parse_request() 264 } else if (request->values[0].type == SPDK_JSON_VAL_ARRAY_BEGIN) { in jsonrpc_parse_request() [all …]
|
| /spdk/test/nvmf/target/ |
| H A D | multitarget_rpc.py | 29 default=5260, type=int) 32 default=60.0, type=float) 45 …p.add_argument('-n', '--name', help='Target name (unique to application)', type=str, required=True) 47 type=int, required=False) 55 …p.add_argument('-n', '--name', help='Target name (unique to application)', type=str, required=True)
|
| /spdk/test/unit/lib/nvmf/vfio_user.c/ |
| H A D | vfio_user_ut.c | 138 cmd.dptr.sgl1.unkeyed.type = SPDK_NVME_SGL_TYPE_DATA_BLOCK; in test_nvme_cmd_map_sgls() 149 sgl[0].unkeyed.type = SPDK_NVME_SGL_TYPE_DATA_BLOCK; in test_nvme_cmd_map_sgls() 152 sgl[1].unkeyed.type = SPDK_NVME_SGL_TYPE_DATA_BLOCK; in test_nvme_cmd_map_sgls() 156 cmd.dptr.sgl1.unkeyed.type = SPDK_NVME_SGL_TYPE_LAST_SEGMENT; in test_nvme_cmd_map_sgls() 168 sgl[0].unkeyed.type = SPDK_NVME_SGL_TYPE_DATA_BLOCK; in test_nvme_cmd_map_sgls() 171 sgl[1].unkeyed.type = SPDK_NVME_SGL_TYPE_LAST_SEGMENT; in test_nvme_cmd_map_sgls() 175 sgl[9].unkeyed.type = SPDK_NVME_SGL_TYPE_DATA_BLOCK; in test_nvme_cmd_map_sgls() 178 sgl[10].unkeyed.type = SPDK_NVME_SGL_TYPE_DATA_BLOCK; in test_nvme_cmd_map_sgls() 182 cmd.dptr.sgl1.unkeyed.type = SPDK_NVME_SGL_TYPE_SEGMENT; in test_nvme_cmd_map_sgls() 198 sgl[0].unkeyed.type in test_nvme_cmd_map_sgls() [all...] |