[PATCH v3] nvmet-tcp: report a bounded MDTS instead of "no limit"

Kenta Akagi k at mgml.me
Wed Dec 2 11:21:31 PST 2026


Hi Alfonso and Maurizio,

Thank you both for working on this issue. We encountered I/O errors when 
using a recent kernel as an NVMe/TCP target, which we suspect may be related 
to the issue discussed here.

Is there any ongoing work on this? If helpful, I'd be happy to send two patches:

1. Implement nvmet_tcp_get_mdts() with NVMET_TCP_MAX_MDTS=10 (4 MiB), 
   matching the existing command-length limit.
2. Update the NVMET_TCP_MAXH2CDATA comment from “16M” to “4 MiB”.

Setting MDTS to 10 would fix our failures and avoid the 2 MiB case 
discussed in the thread: a command exceeding the proposed 1 MiB MDTS but still 
being accepted by the 4 MiB guard.  General MDTS enforcement could follow separately.

An LLM-assisted review also suggested that passthrough MDTS calculation may bypass 
this callback. However, I haven't reproduced that case, so I'd leave that path unchanged 
for now.

Would this be a helpful way forward? I'd be glad to coordinate with your plans.

Thanks,
akagi



More information about the Linux-nvme mailing list