libnvmf.h (2da066ef6d85d3f7cd8aaec14369d66254836536) | libnvmf.h (365b89e8ea4af34a05f68aa28e77573e89fa00b2) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (c) 2022-2024 Chelsio Communications, Inc. 5 * Written by: John Baldwin <jhb@FreeBSD.org> 6 */ 7 8#ifndef __LIBNVMF_H__ 9#define __LIBNVMF_H__ 10 | 1/*- 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (c) 2022-2024 Chelsio Communications, Inc. 5 * Written by: John Baldwin <jhb@FreeBSD.org> 6 */ 7 8#ifndef __LIBNVMF_H__ 9#define __LIBNVMF_H__ 10 |
11#include <sys/_nv.h> |
|
11#include <sys/uio.h> 12#include <stdbool.h> 13#include <stddef.h> 14#include <dev/nvme/nvme.h> 15#include <dev/nvmf/nvmf.h> 16#include <dev/nvmf/nvmf_proto.h> 17 18struct nvmf_capsule; --- 225 unchanged lines hidden (view full) --- 244/* Return the requested data length of a GET_LOG_PAGE command. */ 245uint64_t nvmf_get_log_page_length(const struct nvme_command *cmd); 246 247/* Return the requested data offset of a GET_LOG_PAGE command. */ 248uint64_t nvmf_get_log_page_offset(const struct nvme_command *cmd); 249 250/* Prepare to handoff a controller qpair. */ 251int nvmf_handoff_controller_qpair(struct nvmf_qpair *qp, | 12#include <sys/uio.h> 13#include <stdbool.h> 14#include <stddef.h> 15#include <dev/nvme/nvme.h> 16#include <dev/nvmf/nvmf.h> 17#include <dev/nvmf/nvmf_proto.h> 18 19struct nvmf_capsule; --- 225 unchanged lines hidden (view full) --- 245/* Return the requested data length of a GET_LOG_PAGE command. */ 246uint64_t nvmf_get_log_page_length(const struct nvme_command *cmd); 247 248/* Return the requested data offset of a GET_LOG_PAGE command. */ 249uint64_t nvmf_get_log_page_offset(const struct nvme_command *cmd); 250 251/* Prepare to handoff a controller qpair. */ 252int nvmf_handoff_controller_qpair(struct nvmf_qpair *qp, |
252 struct nvmf_handoff_controller_qpair *h); | 253 const struct nvmf_fabric_connect_cmd *cmd, 254 const struct nvmf_fabric_connect_data *data, struct nvmf_ioc_nv *nv); |
253 254/* Host-specific APIs. */ 255 256/* 257 * Connect to an admin or I/O queue. If this fails, a detailed error 258 * message can be obtained from nvmf_association_error. 259 */ 260struct nvmf_qpair *nvmf_connect(struct nvmf_association *na, --- 82 unchanged lines hidden (view full) --- 343/* 344 * Disconnect all active host associations previously handed off to 345 * the kernel. 346 */ 347int nvmf_disconnect_all(void); 348 349/* 350 * Fetch reconnect parameters from an existing kernel host to use for | 255 256/* Host-specific APIs. */ 257 258/* 259 * Connect to an admin or I/O queue. If this fails, a detailed error 260 * message can be obtained from nvmf_association_error. 261 */ 262struct nvmf_qpair *nvmf_connect(struct nvmf_association *na, --- 82 unchanged lines hidden (view full) --- 345/* 346 * Disconnect all active host associations previously handed off to 347 * the kernel. 348 */ 349int nvmf_disconnect_all(void); 350 351/* 352 * Fetch reconnect parameters from an existing kernel host to use for |
351 * establishing a new association. | 353 * establishing a new association. The caller must destroy the 354 * returned nvlist. |
352 */ | 355 */ |
353int nvmf_reconnect_params(int fd, struct nvmf_reconnect_params *rparams); | 356int nvmf_reconnect_params(int fd, nvlist_t **nvlp); |
354 355/* 356 * Handoff active host association to an existing host in the kernel. 357 * This frees the qpairs (even on error). 358 */ 359int nvmf_reconnect_host(int fd, struct nvmf_qpair *admin_qp, 360 u_int num_queues, struct nvmf_qpair **io_queues, 361 const struct nvme_controller_data *cdata); 362 363#endif /* !__LIBNVMF_H__ */ | 357 358/* 359 * Handoff active host association to an existing host in the kernel. 360 * This frees the qpairs (even on error). 361 */ 362int nvmf_reconnect_host(int fd, struct nvmf_qpair *admin_qp, 363 u_int num_queues, struct nvmf_qpair **io_queues, 364 const struct nvme_controller_data *cdata); 365 366#endif /* !__LIBNVMF_H__ */ |