[SPDK] Question about MDTS and MAXH2CDATA for NVMe/TCP target

Wenhua Liu <liuw at vmware.com>
Newsgroups dev.linux.lists.spdk
Message-ID <[email protected]>
Hi,

I see in the current implementation, for NVMe/TCP target, both controller MDTS and NVMe/TCP have the same value.

spdk_nvmf_ctrlr_identify_ctrlr:

       cdata->mdts = spdk_u32log2(transport->opts.max_io_size / 4096);


nvmf_tcp_icreq_handle:

      ic_resp->maxh2cdata = ttransport->transport.opts.max_io_size;

On host side, upper layer (which is NVMe/TCP independent) uses MDTS to determine the maximum IO size. But with the current implementation, there can only be H2CData PDU transferred, the R2T mechanism is not fully utilized. Because of this, if the max_io_size  is small, the upper layer has to split large IO coming from application to multiple smaller chunks and send to NVMe/TCP initiator driver. If the max_io_size is large, it may take long time for one PDU to be transferred (I’m not expertized on Network and don’t know what problem can happen).

I found this when I ran fio with blocksize setting to 512KB.  I wanted to test a fix I made for MAXH2CDATA impacts the IO behavior but only saw one H2CData PDU for any IOs.

In my understanding, the MDTS and the MAXH2CDATA don’t have to be same, making them initialized from different config parameters will give us more flexibility.

Thanks,
-Wenhua Liu
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.