• Home
  • Raw
  • Download

Lines Matching +full:ls +full:- +full:bits

1 /* SPDX-License-Identifier: GPL-2.0 */
13 * ********************** FC-NVME LS API ********************
15 * Data structures used by both FC-NVME hosts and FC-NVME
16 * targets to perform FC-NVME LS requests or transmit
23 * struct nvmefc_ls_req - Request structure passed from the transport
24 * to the LLDD to perform a NVME-FC LS request and obtain
26 * Used by nvme-fc transport (host) to send LS's such as
29 * Used by the nvmet-fc transport (controller) to send
30 * LS's such as Disconnect Association.
39 * @timeout: Maximum amount of time, in seconds, to wait for the LS response.
40 * If timeout exceeded, LLDD to abort LS exchange and complete
41 * LS request with error status.
42 * @private: pointer to memory allocated alongside the ls request structure
48 * the LS request. req argument is the pointer to the original LS
50 * negative errno on failure (example: -ENXIO).
69 * struct nvmefc_ls_rsp - Structure passed from the transport to the LLDD
70 * to request the transmit the NVME-FC LS response to a
71 * NVME-FC LS request. The structure originates in the LLDD
74 * FC exchange context for the NVME-FC LS request that was
76 * Used by the LLDD to pass the nvmet-fc transport (controller)
77 * received LS's such as Create Association, Create Connection
79 * Used by the LLDD to pass the nvme-fc transport (host)
80 * received LS's such as Disconnect Association or Disconnect
83 * The structure is allocated by the LLDD whenever a LS Request is received
84 * from the FC link. The address of the structure is passed to the nvmet-fc
85 * or nvme-fc layer via the xxx_rcv_ls_req() transport routines.
90 * the remote N_Port that sent the LS as well as any FC exchange context.
91 * Upon completion of the LS response transmit, the LLDD will pass the
92 * address of the structure back to the transport LS rsp done() routine,
95 * the transport and the LLDD can de-allocate the structure.
101 * When the structure is used for the LLDD->xmt_ls_rsp() call, the
109 * @rspbuf: pointer to the LS response buffer
110 * @rspdma: PCI DMA address of the LS response buffer
111 * @rsplen: Length, in bytes, of the LS response buffer
113 * transmitting the LS response. req argument is the pointer to
114 * the original ls request.
115 * @nvme_fc_private: pointer to an internal transport-specific structure
131 * ********************** LLDD FC-NVME Host API ********************
140 * struct nvme_fc_port_info - port-specific ids and FC connection-specific
152 * @port_id: FC N_Port_ID currently assigned the port. Upper 8 bits must
171 * struct nvmefc_fcp_req - Request structure passed from NVME-FC transport
174 * Values set by the NVME-FC layer prior to calling the LLDD fcp_io
203 * negative errno value upon failure (ex: -EIO). Note: this is
205 * status of the FCP operation at the NVME-FC level.
252 * struct nvme_fc_local_port - structure used between NVME-FC transport and
259 * @port_num: NVME-FC transport host port number
275 * @port_id: FC N_Port_ID currently assigned the port. Upper 8 bits must
280 /* static/read-only fields */
295 * struct nvme_fc_remote_port - structure used between NVME-FC transport and
302 * @port_num: NVME-FC transport remote subsystem port number
306 * @localport: pointer to the NVME-FC local host port the subsystem is
317 * @port_id: FC N_Port_ID currently assigned the port. Upper 8 bits must
339 * struct nvme_fc_port_template - structure containing static entrypoints and
342 * NVME-FC transport remembers template reference and may
359 * @create_queue: Upon creating a host<->controller association, queues are
368 * at the block-level is also passed in. The LLDD should use the
374 * host<->controller association teardown, this routine is called
383 * @ls_req: Called to issue a FC-NVME FC-4 LS service request.
386 * LLDD is to allocate an exchange, issue the LS request, obtain the
387 * LS response, and call the "done" routine specified in the request
388 * structure (argument to done is the ls request structure itself).
391 * @fcp_io: called to issue a FC-NVME I/O request. The I/O may be for
393 * fully describe the io: the buffer containing the FC-NVME CMD IU
395 * and the buffer to place the FC-NVME RSP IU into. The LLDD will
402 * @ls_abort: called to request the LLDD to abort the indicated ls request.
404 * the request, the LLDD must still call the ls request done routine
414 * @xmt_ls_rsp: Called to transmit the response to a FC-NVME FC-4 LS service.
415 * The nvmefc_ls_rsp structure is the same LLDD-supplied exchange
417 * the LS request was received. The structure will fully describe
420 * non-zero errno status), and upon completion of the transmit, call
424 * consider the LS handling complete and the nvmefc_ls_rsp structure
450 * the localport->private pointer.
457 * the remoteport->private pointer.
462 * behalf whenever a ls request structure is allocated. The additional
464 * specified by the ls_request->private pointer.
471 * specified by the fcp_request->private pointer.
475 /* initiator-based functions */
537 * Routine called to pass a NVME-FC LS request, received by the lldd,
538 * to the nvme-fc transport.
540 * If the return value is zero: the LS was successfully accepted by the
542 * If the return value is non-zero: the transport has not accepted the
543 * LS. The lldd should ABTS-LS the LS.
545 * Note: if the LLDD receives and ABTS for the LS prior to the transport
546 * calling the ops->xmt_ls_rsp() routine to transmit a response, the LLDD
547 * shall mark the LS as aborted, and when the xmt_ls_rsp() is called: the
550 * soon as the LS was marked or can delay until the xmt_ls_rsp() call is
552 * Note: if an RCV LS was successfully posted to the transport and the
556 * noop the transmission of the rsp and call the lsrsp->done() routine
566 * *************** LLDD FC-NVME Target/Subsystem API ***************
574 * struct nvmet_fc_port_info - port-specific ids and FC connection-specific
583 * @port_id: FC N_Port_ID currently assigned the port. Upper 8 bits must
593 /* Operations that NVME-FC layer may request the LLDD to perform for FCP */
604 * struct nvmefc_tgt_fcp_req - Structure used between LLDD and NVMET-FC
606 * the specific FC-NVME IU operation(s) to perform
607 * for a FC-NVME FCP IO.
609 * Structure used between LLDD and nvmet-fc layer to represent the exchange
610 * context for a FC-NVME FCP I/O operation (e.g. a nvme sqe, the sqe-related
614 * from the FC link. The address of the structure is passed to the nvmet-fc
622 * op done() routine, allowing the nvmet-fc layer to release dma resources.
624 * further access will be made by the nvmet-fc layer and the LLDD can
625 * de-allocate the structure.
631 * When the structure is used for an FCP target operation, the nvmet-fc
634 * upon compeletion of the operation. The nvmet-fc layer will also set a
637 * Values set by the NVMET-FC layer prior to calling the LLDD fcp_op
640 * @hwqid: Specifies the hw queue index (0..N-1, where N is the
668 * @nvmet_fc_private: pointer to an internal NVMET-FC layer structure used
669 * as part of the NVMET-FC processing. The LLDD is not to
714 * struct nvmet_fc_target_port - structure used between NVME-FC transport and
721 * @port_num: NVME-FC transport subsytem port number
733 * @port_id: FC N_Port_ID currently assigned the port. Upper 8 bits must
738 /* static/read-only fields */
752 * struct nvmet_fc_target_template - structure containing static entrypoints
755 * registrations. NVME-FC transport remembers template
766 * @xmt_ls_rsp: Called to transmit the response to a FC-NVME FC-4 LS service.
767 * The nvmefc_ls_rsp structure is the same LLDD-supplied exchange
769 * the LS request was received. The structure will fully describe
772 * non-zero errno status), and upon completion of the transmit, call
776 * consider the LS handling complete and the nvmefc_ls_rsp structure
779 * LS received.
783 * The nvmefc_tgt_fcp_req structure is the same LLDD-supplied
790 * more FC sequences (preferrably 1). Note: the fc-nvme layer
797 * Note: the FC-NVME layer may call the WRITEDATA operation
811 * may retramsit the FCP_RSP iu if necessary per FC-NVME. Upon
820 * FCP_RSP iu if FCP_CONF is not received per FC-NVME. Upon
830 * the LLDD-supplied exchange structure must remain valid until the
835 * operations, the fc-nvme layer may immediate convert, in the same
842 * Returns 0 on success, -<errno> on failure (Ex: -EIO)
846 * The command may be in-between operations (nothing active in LLDD)
865 * is now free to re-use the rcv buffer associated with the
874 * @ls_req: Called to issue a FC-NVME FC-4 LS service request.
877 * The targetport that is to issue the LS request is identified by
879 * LS request is identified by the hosthandle argument. The nvmet-fc
880 * transport is only allowed to issue FC-NVME LS's on behalf of an
881 * association that was created prior by a Create Association LS.
883 * nvmefc_ls_rsp structure for the Create Association LS that
889 * The LLDD is to allocate an exchange, issue the LS request, obtain
890 * the LS response, and call the "done" routine specified in the
891 * request structure (argument to done is the ls request structure
893 * Entrypoint is Optional - but highly recommended.
895 * @ls_abort: called to request the LLDD to abort the indicated ls request.
897 * the request, the LLDD must still call the ls request done routine
924 * @target_features: The LLDD sets bits in this field to correspond to
933 * the targetport->private pointer.
937 * memory that it would like nvmet-fc layer to allocate on the LLDD's
938 * behalf whenever a ls request structure is allocated. The additional
940 * specified by the ls_request->private pointer.
984 * Routine called to pass a NVME-FC LS request, received by the lldd,
985 * to the nvmet-fc transport.
987 * If the return value is zero: the LS was successfully accepted by the
989 * If the return value is non-zero: the transport has not accepted the
990 * LS. The lldd should ABTS-LS the LS.
992 * Note: if the LLDD receives and ABTS for the LS prior to the transport
993 * calling the ops->xmt_ls_rsp() routine to transmit a response, the LLDD
994 * shall mark the LS as aborted, and when the xmt_ls_rsp() is called: the
997 * soon as the LS was marked or can delay until the xmt_ls_rsp() call is
999 * Note: if an RCV LS was successfully posted to the transport and the
1003 * noop the transmission of the rsp and call the lsrsp->done() routine
1013 * connectivity to a NVME-FC host port which there had been active
1015 * hosthandle. The hosthandle is given to the nvmet-fc transport
1016 * when a NVME LS was received, typically to create a new association.
1017 * The nvmet-fc transport will cache the hostport value with the
1018 * association for use in LS requests for the association.
1019 * When the LLDD calls this routine, the nvmet-fc transport will
1024 * part of sending LS's to terminate the association. The LLDD
1025 * should reject the LS's if they are attempted.
1027 * port, the nvmet-fc transport will call the ops->host_release()
1028 * callback. As of the callback, the nvmet-fc transport will no
1035 * If nvmet_fc_rcv_fcp_req returns non-zero, the transport has not accepted
1036 * the FCP cmd. The lldd should ABTS-LS the cmd.