From: Christoph Hellwig <hch@lst.de>
To: Aurelien Aptel <aaptel@nvidia.com>
Cc: linux-nvme@lists.infradead.org, Christoph Hellwig <hch@lst.de>,
Sagi Grimberg <sagi@grimberg.me>,
Chaitanya Kulkarni <kch@nvidia.com>,
smalin@nvidia.com, linux-kernel@vger.kernel.org,
Max Gurtovoy <mgurtovoy@nvidia.com>
Subject: Re: [PATCH v2] nvmet: introduce new mdts configuration entry
Date: Tue, 7 Apr 2026 07:23:58 +0200 [thread overview]
Message-ID: <20260407052358.GA6089@lst.de> (raw)
In-Reply-To: <20260402132108.250386-1-aaptel@nvidia.com>
On Thu, Apr 02, 2026 at 01:21:08PM +0000, Aurelien Aptel wrote:
> +static inline u8 nvmet_ctrl_mdts(struct nvmet_req *req)
> +{
> + struct nvmet_ctrl *ctrl = req->sq->ctrl;
> + u8 mdts;
> +
> + /* Limit MDTS according to port config or transport capability */
> + mdts = req->port->mdts;
> + if (ctrl->ops->get_mdts)
> + mdts = min_not_zero(ctrl->ops->get_mdts(ctrl), mdts);
> +
> + return mdts;
This could be simplified a little more:
/* Limit MDTS according to port config or transport capability */
+static inline u8 nvmet_ctrl_mdts(struct nvmet_req *req)
{
struct nvmet_ctrl *ctrl = req->sq->ctrl;
u8 mdts = req->port->mdts;
if (!ctrl->ops->get_mdts)
return mdts;
return min_not_zero(ctrl->ops->get_mdts(ctrl), mdts);
}
Otherwise looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
prev parent reply other threads:[~2026-04-07 5:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-01 10:13 [PATCH] nvmet: introduce new mdts configuration entry Aurelien Aptel
2026-04-01 14:10 ` Christoph Hellwig
2026-04-01 16:18 ` Aurelien Aptel
2026-04-02 13:21 ` [PATCH v2] " Aurelien Aptel
2026-04-07 5:23 ` Christoph Hellwig [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260407052358.GA6089@lst.de \
--to=hch@lst.de \
--cc=aaptel@nvidia.com \
--cc=kch@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=mgurtovoy@nvidia.com \
--cc=sagi@grimberg.me \
--cc=smalin@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox