Loading...
Searching...
No Matches
spdk_nvmf_transport_ops Struct Reference
Collaboration diagram for spdk_nvmf_transport_ops:

Data Fields

char name [SPDK_NVMF_TRSTRING_MAX_LEN]
 Transport name.
 
enum spdk_nvme_transport_type type
 Transport type.
 
void(* opts_init )(struct spdk_nvmf_transport_opts *opts)
 Initialize transport options to default value.
 
struct spdk_nvmf_transport *(* create )(struct spdk_nvmf_transport_opts *opts)
 Create a transport for the given transport opts.
 
int(* create_async )(struct spdk_nvmf_transport_opts *opts, spdk_nvmf_transport_create_done_cb cb_fn, void *cb_arg)
 
void(* dump_opts )(struct spdk_nvmf_transport *transport, struct spdk_json_write_ctx *w)
 Dump transport-specific opts into JSON.
 
int(* destroy )(struct spdk_nvmf_transport *transport, spdk_nvmf_transport_destroy_done_cb cb_fn, void *cb_arg)
 Destroy the transport.
 
int(* listen )(struct spdk_nvmf_transport *transport, const struct spdk_nvme_transport_id *trid, struct spdk_nvmf_listen_opts *opts)
 Instruct the transport to accept new connections at the address provided.
 
void(* listen_dump_opts )(struct spdk_nvmf_transport *transport, const struct spdk_nvme_transport_id *trid, struct spdk_json_write_ctx *w)
 Dump transport-specific listen opts into JSON.
 
void(* stop_listen )(struct spdk_nvmf_transport *transport, const struct spdk_nvme_transport_id *trid)
 Stop accepting new connections at the given address.
 
int(* listen_associate )(struct spdk_nvmf_transport *transport, const struct spdk_nvmf_subsystem *subsystem, const struct spdk_nvme_transport_id *trid)
 It is a notification that a listener is being associated with the subsystem.
 
int(* subsystem_add_ns )(struct spdk_nvmf_transport *transport, const struct spdk_nvmf_subsystem *subsystem, struct spdk_nvmf_ns *ns)
 It is a notification that a namespace is being added to the subsystem.
 
void(* subsystem_remove_ns )(struct spdk_nvmf_transport *transport, const struct spdk_nvmf_subsystem *subsystem, uint32_t nsid)
 It is a notification that a namespace has been removed from the subsystem.
 
void(* cdata_init )(struct spdk_nvmf_transport *transport, struct spdk_nvmf_subsystem *subsystem, struct spdk_nvmf_ctrlr_data *cdata)
 Initialize subset of identify controller data.
 
void(* listener_discover )(struct spdk_nvmf_transport *transport, struct spdk_nvme_transport_id *trid, struct spdk_nvmf_discovery_log_page_entry *entry)
 Fill out a discovery log entry for a specific listen address.
 
struct spdk_nvmf_transport_poll_group *(* poll_group_create )(struct spdk_nvmf_transport *transport, struct spdk_nvmf_poll_group *group)
 Create a new poll group.
 
struct spdk_nvmf_transport_poll_group *(* get_optimal_poll_group )(struct spdk_nvmf_qpair *qpair)
 Get the polling group of the queue pair optimal for the specific transport.
 
void(* poll_group_destroy )(struct spdk_nvmf_transport_poll_group *group)
 Destroy a poll group.
 
int(* poll_group_add )(struct spdk_nvmf_transport_poll_group *group, struct spdk_nvmf_qpair *qpair)
 Add a qpair to a poll group.
 
int(* poll_group_remove )(struct spdk_nvmf_transport_poll_group *group, struct spdk_nvmf_qpair *qpair)
 Remove a qpair from a poll group.
 
int(* poll_group_poll )(struct spdk_nvmf_transport_poll_group *group)
 Poll the group to process I/O.
 
int(* req_free )(struct spdk_nvmf_request *req)
 
int(* req_complete )(struct spdk_nvmf_request *req)
 
void(* req_get_buffers_done )(struct spdk_nvmf_request *req)
 Callback for the iobuf based queuing of requests awaiting free buffers.
 
void(* qpair_fini )(struct spdk_nvmf_qpair *qpair, spdk_nvmf_transport_qpair_fini_cb cb_fn, void *cb_args)
 
int(* qpair_get_peer_trid )(struct spdk_nvmf_qpair *qpair, struct spdk_nvme_transport_id *trid)
 
int(* qpair_get_local_trid )(struct spdk_nvmf_qpair *qpair, struct spdk_nvme_transport_id *trid)
 
int(* qpair_get_listen_trid )(struct spdk_nvmf_qpair *qpair, struct spdk_nvme_transport_id *trid)
 
void(* qpair_abort_request )(struct spdk_nvmf_qpair *qpair, struct spdk_nvmf_request *req)
 
void(* poll_group_dump_stat )(struct spdk_nvmf_transport_poll_group *group, struct spdk_json_write_ctx *w)
 
int(* subsystem_add_host )(struct spdk_nvmf_transport *transport, const struct spdk_nvmf_subsystem *subsystem, const char *hostnqn, const struct spdk_json_val *transport_specific)
 
void(* subsystem_remove_host )(struct spdk_nvmf_transport *transport, const struct spdk_nvmf_subsystem *subsystem, const char *hostnqn)
 
void(* subsystem_dump_host )(struct spdk_nvmf_transport *transport, const struct spdk_nvmf_subsystem *subsystem, const char *hostnqn, struct spdk_json_write_ctx *w)
 

Field Documentation

◆ create

struct spdk_nvmf_transport *(* spdk_nvmf_transport_ops::create) (struct spdk_nvmf_transport_opts *opts)

Create a transport for the given transport opts.

Either synchronous or asynchronous version shall be implemented.

◆ listen

int(* spdk_nvmf_transport_ops::listen) (struct spdk_nvmf_transport *transport, const struct spdk_nvme_transport_id *trid, struct spdk_nvmf_listen_opts *opts)

Instruct the transport to accept new connections at the address provided.

This may be called multiple times.

◆ listen_associate

int(* spdk_nvmf_transport_ops::listen_associate) (struct spdk_nvmf_transport *transport, const struct spdk_nvmf_subsystem *subsystem, const struct spdk_nvme_transport_id *trid)

It is a notification that a listener is being associated with the subsystem.

Most transports will not need to take any action here, as the enforcement of the association is done in the generic code.

Returns a negated errno code to block the association. 0 to allow.

◆ req_get_buffers_done

void(* spdk_nvmf_transport_ops::req_get_buffers_done) (struct spdk_nvmf_request *req)

Callback for the iobuf based queuing of requests awaiting free buffers.

Called when all requested buffers are allocated for the given request. Used only if initial spdk_iobuf_get() call didn't allocate all buffers at once and request was queued internally in the iobuf until free buffers become available. This callback is optional and not all transports need to implement it. If not set then transport implementation must queue such requests internally.

◆ subsystem_add_ns

int(* spdk_nvmf_transport_ops::subsystem_add_ns) (struct spdk_nvmf_transport *transport, const struct spdk_nvmf_subsystem *subsystem, struct spdk_nvmf_ns *ns)

It is a notification that a namespace is being added to the subsystem.

Most transports will not need to take any action here.

Returns a negated errno code to block the attachment. 0 to allow.

◆ subsystem_remove_ns

void(* spdk_nvmf_transport_ops::subsystem_remove_ns) (struct spdk_nvmf_transport *transport, const struct spdk_nvmf_subsystem *subsystem, uint32_t nsid)

It is a notification that a namespace has been removed from the subsystem.

Most transports will not need to take any action here.


The documentation for this struct was generated from the following file: