> By the way, why not always call nvmet_check_data_len_lte() ? > > Don’t we agree that the host is allowed to send sgl describing a buffer that is larger than the payload for any nvme io/admin cmd ? > (and not only for dsm / set_features cmd) I think we're better off with a tighter check, to avoid possible bugs.