Lines Matching full:nc
113 struct nvmf_capsule *nc, *tc; in nvmf_free_qpair() local
115 TAILQ_FOREACH_SAFE(nc, &qp->nq_rx_capsules, nc_link, tc) { in nvmf_free_qpair()
116 TAILQ_REMOVE(&qp->nq_rx_capsules, nc, nc_link); in nvmf_free_qpair()
117 nvmf_free_capsule(nc); in nvmf_free_qpair()
127 struct nvmf_capsule *nc; in nvmf_allocate_command() local
129 nc = qp->nq_association->na_ops->allocate_capsule(qp); in nvmf_allocate_command()
130 if (nc == NULL) in nvmf_allocate_command()
133 nc->nc_qpair = qp; in nvmf_allocate_command()
134 nc->nc_qe_len = sizeof(struct nvme_command); in nvmf_allocate_command()
135 memcpy(&nc->nc_sqe, sqe, nc->nc_qe_len); in nvmf_allocate_command()
138 nc->nc_sqe.fuse &= ~NVMEM(NVME_CMD_PSDT); in nvmf_allocate_command()
139 nc->nc_sqe.fuse |= NVMEF(NVME_CMD_PSDT, NVME_PSDT_SGL); in nvmf_allocate_command()
140 return (nc); in nvmf_allocate_command()
146 struct nvmf_capsule *nc; in nvmf_allocate_response() local
148 nc = qp->nq_association->na_ops->allocate_capsule(qp); in nvmf_allocate_response()
149 if (nc == NULL) in nvmf_allocate_response()
152 nc->nc_qpair = qp; in nvmf_allocate_response()
153 nc->nc_qe_len = sizeof(struct nvme_completion); in nvmf_allocate_response()
154 memcpy(&nc->nc_cqe, cqe, nc->nc_qe_len); in nvmf_allocate_response()
155 return (nc); in nvmf_allocate_response()
159 nvmf_capsule_append_data(struct nvmf_capsule *nc, void *buf, size_t len, in nvmf_capsule_append_data() argument
162 if (nc->nc_qe_len == sizeof(struct nvme_completion)) in nvmf_capsule_append_data()
164 if (nc->nc_data_len != 0) in nvmf_capsule_append_data()
167 nc->nc_data = buf; in nvmf_capsule_append_data()
168 nc->nc_data_len = len; in nvmf_capsule_append_data()
169 nc->nc_send_data = send; in nvmf_capsule_append_data()
174 nvmf_free_capsule(struct nvmf_capsule *nc) in nvmf_free_capsule() argument
176 nc->nc_qpair->nq_association->na_ops->free_capsule(nc); in nvmf_free_capsule()
180 nvmf_transmit_capsule(struct nvmf_capsule *nc) in nvmf_transmit_capsule() argument
182 return (nc->nc_qpair->nq_association->na_ops->transmit_capsule(nc)); in nvmf_transmit_capsule()
192 nvmf_capsule_sqe(const struct nvmf_capsule *nc) in nvmf_capsule_sqe() argument
194 assert(nc->nc_qe_len == sizeof(struct nvme_command)); in nvmf_capsule_sqe()
195 return (&nc->nc_sqe); in nvmf_capsule_sqe()
199 nvmf_capsule_cqe(const struct nvmf_capsule *nc) in nvmf_capsule_cqe() argument
201 assert(nc->nc_qe_len == sizeof(struct nvme_completion)); in nvmf_capsule_cqe()
202 return (&nc->nc_cqe); in nvmf_capsule_cqe()
206 nvmf_validate_command_capsule(const struct nvmf_capsule *nc) in nvmf_validate_command_capsule() argument
208 assert(nc->nc_qe_len == sizeof(struct nvme_command)); in nvmf_validate_command_capsule()
210 if (NVMEV(NVME_CMD_PSDT, nc->nc_sqe.fuse) != NVME_PSDT_SGL) in nvmf_validate_command_capsule()
213 return (nc->nc_qpair->nq_association->na_ops->validate_command_capsule(nc)); in nvmf_validate_command_capsule()
217 nvmf_capsule_data_len(const struct nvmf_capsule *nc) in nvmf_capsule_data_len() argument
219 return (nc->nc_qpair->nq_association->na_ops->capsule_data_len(nc)); in nvmf_capsule_data_len()
223 nvmf_receive_controller_data(const struct nvmf_capsule *nc, in nvmf_receive_controller_data() argument
226 return (nc->nc_qpair->nq_association->na_ops->receive_controller_data(nc, in nvmf_receive_controller_data()
231 nvmf_send_controller_data(const struct nvmf_capsule *nc, const void *buf, in nvmf_send_controller_data() argument
234 return (nc->nc_qpair->nq_association->na_ops->send_controller_data(nc, in nvmf_send_controller_data()