STRUCT FC_FCP_PKT(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’– NAME ๐Ÿ’–

okay bestie, welcome to the struct fc_fcp_pkt(9) page from the Kernel API Manual! โœจ

struct fc_fcp_pkt โ€” FCP request structure (one for each scsi_cmnd request) ๐Ÿซถ

โœจ SYNOPSIS โœจ

this is the whole struct, copied exactly, no cap:

       struct fc_fcp_pkt {
           spinlock_t scsi_pkt_lock;
           refcount_t ref_cnt;
           u32 data_len;
           struct scsi_cmnd  *cmd;
           struct list_head  list;
           struct fc_lport   *lp;
           u8 state;
           u8 cdb_status;
           u8 status_code;
           u8 scsi_comp_flags;
           u32 io_status;
           u32 req_flags;
           u32 scsi_resid;
           size_t xfer_len;
           struct fcp_cmnd   cdb_cmd;
           u32 xfer_contig_end;
           u16 max_payload;
           u16 xfer_ddp;
           struct fc_rport   *rport;
           struct fc_seq     *seq_ptr;
           struct timer_list timer;
           int wait_for_comp;
           int timer_delay;
           u32 recov_retry;
           struct fc_seq     *recov_seq;
           struct completion tm_done;
        };

๐Ÿงš Members ๐Ÿงš

  • scsi_pkt_lock โ€” lock to protect the SCSI packet (must be taken before the host_lock if both are to be held at the same time) ๐Ÿ’…
  • ref_cnt โ€” reference count ๐Ÿ”ข
  • data_len โ€” the length of the data ๐Ÿ“
  • cmd โ€” the SCSI command (set and clear with the host_lock held) ๐Ÿซถ
  • list โ€” tracks queued commands (accessed with the host_lock held) ๐Ÿ“‹
  • lp โ€” the associated local port ๐ŸŒ€
  • state โ€” the state of the I/O โœจ
  • cdb_status โ€” CDB status ๐ŸŽ€
  • status_code โ€” FCP I/O status ๐Ÿ’–
  • scsi_comp_flags โ€” completion flags (bit 3 Underrun bit 2: overrun) ๐Ÿšฆ
  • io_status โ€” SCSI result (upper 24 bits) ๐Ÿ’€
  • req_flags โ€” request flags (bit 0: read bit:1 write) ๐Ÿ“
  • scsi_resid โ€” SCSI residule length ๐Ÿงฎ
  • xfer_len โ€” the transfer length ๐Ÿ“ฆ
  • cdb_cmd โ€” the CDB command ๐ŸŽฏ
  • xfer_contig_end โ€” the offset into the buffer if the buffer is contiguous (Tx and Rx) ๐Ÿงญ
  • max_payload โ€” the maximum payload size (in bytes) ๐Ÿงบ
  • xfer_ddp โ€” indicates if this transfer used DDP (XID of the exchange will be set here if DDP was setup) ๐Ÿฆ‹
  • rport โ€” the remote port that the SCSI command is targeted at ๐ŸŽฏ
  • seq_ptr โ€” the sequence that will carry the SCSI command ๐Ÿš€
  • timer โ€” the command timer โฐ
  • wait_for_comp โ€” indicator to wait for completion of the I/O (in jiffies) โณ
  • timer_delay โ€” FCP packet timer delay in jiffies ๐Ÿ•ฐ๏ธ
  • recov_retry โ€” number of recovery retries ๐Ÿ”
  • recov_seq โ€” the sequence for REC or SRR ๐Ÿงต
  • tm_done โ€” completion indicator โœ…

๐Ÿฆ‹ SEE ALSO ๐Ÿฆ‹

Kernel file ./include/scsi/libfc.h โ€” plus these besties, all kept exactly: enum fc_lport_state(9), enum fc_rport_state(9), struct fc_disc_port(9), enum fc_rport_event(9), struct fc_rport_operations(9), struct fc_rport_libfc_priv(9), struct fc_rport_priv(9), struct fc_stats(9), struct fc_seq_els_data(9), struct fc_seq(9), struct fc_exch(9), struct fc_disc(9), struct fc_lport(9), struct fc4_prov(9), fc_lport_test_ready(9), fc_set_wwnn(9), fc_set_wwpn(9), fc_lport_state_enter(9), fc_lport_init_stats(9), fc_lport_free_stats(9), lport_priv(9), libfc_host_alloc(9). โœจ


little sign-off bestie: source/version is ./include/scsi, date is October 2026, and the page is struct fc_fcp_pkt(9) ๐Ÿซถ๐Ÿ’œโœจ

๐Ÿ“ฆ where this page comes from