Thread (44 messages) flat view 44 messages, 5 authors, 2026-07-30

Re: [PATCH v2 30/33] ibmvfc: implement nvme-fc IO command submission callback

From: Tyrel Datwyler <tyreld@linux.ibm.com>
Date: 2026-07-30 23:17:41
Also in: linux-scsi, lkml

On 7/29/26 11:48 AM, Dave Marquardt wrote:
Tyrel Datwyler [off-list ref] writes:
quoted
diff --git a/drivers/scsi/ibmvscsi/ibmvfc-core.c b/drivers/scsi/ibmvscsi/ibmvfc-core.c
index 45c7bcf69201..bc975f632da2 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc-core.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc-core.c
@@ -1539,7 +1539,7 @@ static void ibmvfc_set_login_info(struct ibmvfc_host *vhost)
 
 	login_info->ostype = cpu_to_be32(IBMVFC_OS_LINUX);
 	login_info->max_dma_len = cpu_to_be64(max_sectors << 9);
-	login_info->max_payload = cpu_to_be32(sizeof(struct ibmvfc_fcp_cmd_iu));
+	login_info->max_payload = cpu_to_be32(sizeof(struct nvme_fc_cmd_iu));
Do you know that sizeof(struct nvme_fc_cmd_iu) >= sizeof(struct
ibmvfc_fcp_cmd_iu) just by examination? I was wondering if using MAX()
here might be less prone to future breakage if the structures change.

-Dave
I confirmed at the time I wrote the code that a nvme_fc_cmd_iu is bigger. Off
the top of my head I believe and nvme fcp command IU is roughly three times
larger than a standard fcp command. I had considered wrapping them in a union
and doing the sizeof the union.

-Tyrel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help