lpfc_bg_setup_sgl_prot(9)
π lpfc_bg_setup_sgl_prot(9) π
okay so real talk, this one lives in the Kernel API Manual and it's giving "deep in the SCSI layer, but make it fashion." stay with me bestie, it's actually so good once you see it.
β¨ NAME β¨
lpfc_bg_setup_sgl_prot β sets up the BlockGuard SGL with protection data. like, it's assembling the scatter/gather list and it's bringing the protection data along too. slay.
πΈ SYNOPSIS πΈ
uint32_t lpfc_bg_setup_sgl_prot (struct lpfc_hba *phba , struct
scsi_cmnd *sc , struct sli4_sge *sgl , int datacnt , int protcnt ,
struct lpfc_io_buf *lpfc_cmd );
π ARGUMENTS π
phbaβ the Hba that this call is being executed for. yes, that one. πscβ pointer to the scsi command we're working on. the main character of this operation, fr.sglβ pointer to the buffer list for the protection groups.datacntβ the number of segments of data that have been dma mapped.protcntβ the number of segments of protection data that have been dma mapped. (yes, it's spelled "segment" singular in the original, and honestly? iconic.)lpfc_cmdβ the lpfc scsi command object pointer.
π¦ DESCRIPTION π¦
so this function sets up the SGL buffer list for protection groups of type LPFC_PG_TYPE_DIF. that's the whole vibe.
it's usually used when DIFs are in their own buffers, separate from the data. then the HBA can be instructed to place the DIFs in the outgoing stream. and for read operations? The HBA could extract the DIFs and place them in DIF buffers. lowkey multitasking queen behavior. π
the buffer list for this type consists of one or more of the protection groups described below:
start of first prot group --> | DISEED |
βββββββββββββββββββββββββββββββββ
β DIF (Prot SGE) β
β Data SGE β
β more Data SGE's ... (opt) β
βββββββββββββββββββββββββββββββββ
start of new prot group --> | DISEED |
βββββββββββ
β ... β
βββββββββββ
like, one DIF then one data SGE then optionally more data SGEs, rinse and repeat. it's giving pattern. it's giving structure. we love a consistent layout. π
β NOTE β
ngl this part matters: it is assumed that both data and protection s/g buffers have been mapped for DMA. don't come at this function with unmapped buffers, bestie, it's not that kind of party. π
Returns the number of SGEs added to the SGL. that's your little receipt. π
π₯ SEE ALSO π₯
- Kernel file
./drivers/scsi/lpfc/lpfc_scsi.c lpfc_sli4_set_rsp_sgl_last(9),lpfc_rampdown_queue_depth(9),lpfc_ramp_down_queue_handler(9),lpfc_scsi_dev_block(9),lpfc_new_scsi_buf_s3(9),lpfc_sli4_vport_delete_fcp_xri_aborted(9),lpfc_sli4_io_xri_aborted(9),lpfc_get_scsi_buf_s3(9),lpfc_get_scsi_buf_s4(9),lpfc_get_scsi_buf(9),lpfc_release_scsi_buf_s3(9),lpfc_release_scsi_buf_s4(9),lpfc_release_scsi_buf(9),lpfc_fcpcmd_to_iocb(9),lpfc_scsi_prep_dma_buf_s3(9),lpfc_bg_err_inject(9),lpfc_sc_to_bg_opcodes(9),lpfc_bg_err_opcodes(9),lpfc_bg_setup_bpl(9),lpfc_bg_setup_bpl_prot(9),lpfc_bg_setup_sgl(9),lpfc_prot_group_type(9),lpfc_bg_scsi_adjust_dl(9),lpfc_bg_scsi_prep_dma_buf_s3(9),lpfc_scsi_prep_dma_buf_s4(9),lpfc_bg_scsi_prep_dma_buf_s4(9),lpfc_scsi_prep_dma_buf(9),lpfc_bg_scsi_prep_dma_buf(9),lpfc_scsi_prep_cmnd_buf(9),lpfc_send_scsi_error_event(9),lpfc_scsi_unprep_dma_buf(9),lpfc_unblock_requests(9),lpfc_block_requests(9),lpfc_update_cmf_cmpl(9),lpfc_update_cmf_cmd(9),lpfc_handle_fcp_err(9),lpfc_fcp_io_cmd_wqe_cmpl(9),lpfc_scsi_cmd_iocb_cmpl(9),lpfc_scsi_prep_cmnd_buf_s3(9),lpfc_scsi_prep_cmnd_buf_s4(9),lpfc_scsi_prep_cmnd(9),lpfc_scsi_prep_task_mgmt_cmd_s3(9),lpfc_scsi_prep_task_mgmt_cmd_s4(9),lpfc_scsi_api_table_setup(9),lpfc_tskmgmt_def_cmpl(9),lpfc_check_pci_resettable(9),lpfc_info(9),lpfc_poll_rearm_timer(9),lpfc_poll_start_timer(9),lpfc_poll_timeout(9),lpfc_queuecommand(9),lpfc_abort_handler(9),lpfc_check_fcp_rsp(9),lpfc_send_taskmgmt(9),lpfc_chk_tgt_mapped(9),lpfc_reset_flush_io_context(9),lpfc_device_reset_handler(9),lpfc_target_reset_handler(9),lpfc_host_reset_handler(9),lpfc_sdev_init(9),lpfc_sdev_configure(9),lpfc_sdev_destroy(9),lpfc_create_device_data(9),lpfc_delete_device_data(9),__lpfc_get_device_data(9),lpfc_find_next_oas_lun(9),lpfc_enable_oas_lun(9),lpfc_disable_oas_lun(9)
like yes that's a lot of friends, but that's the friend group, okay? every single one of them. no cap. π«Ά
okay that's the whole thing!! it comes from ./drivers/scsi/lpfc and it's dated October 2026 β mark your calendars bestie, and that's the whole lpfc_bg_setup_sgl_prot(9) situation. mwah. ππβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms