From: "Maurizio Lombardi" <mlombard@arkamax.eu>
To: "Ing. Alfonso Kuen Arroyo" <gerencia@idkmanager.com>,
"Christoph Hellwig" <hch@lst.de>
Cc: <sagi@grimberg.me>, <kch@nvidia.com>,
<linux-nvme@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
<mlombard@arkamax.eu>
Subject: Re: [PATCH] nvmet-tcp: fix stale comment on NVMET_TCP_MAXH2CDATA
Date: Tue, 22 Sep 2026 08:23:36 +0200 [thread overview]
Message-ID: <DLLMOFXNSI43.22DN54SMA5U6L@arkamax.eu> (raw)
In-Reply-To: <178999815960.27132.5021907314171265355@idkmanager.com>
On Mon Sep 21, 2026 at 3:42 PM CEST, Ing. Alfonso Kuen Arroyo wrote:
> On Sun Sep 20, 2026, Christoph Hellwig wrote:
>> Maybe use SZ_4M instead of having a value and a comment that can get
>> out of sync?
>
> Good call - that also gets rid of the case Maurizio flagged (a value and
> a human-maintained comment that describe the same number and can drift
> independently). v2 below; the file doesn't pull in linux/sizes.h yet
> (checked, no other SZ_ user in it), so it needs the include.
>
> Signed-off-by: Alfonso Kuen
> ---
> drivers/nvme/target/tcp.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c
> --- a/drivers/nvme/target/tcp.c
> +++ b/drivers/nvme/target/tcp.c
> @@ -18,12 +18,13 @@
> #include <net/handshake.h>
> #include <linux/inet.h>
> #include <linux/llist.h>
> +#include <linux/sizes.h>
> #include <trace/events/sock.h>
>
> #include "nvmet.h"
>
> #define NVMET_TCP_DEF_INLINE_DATA_SIZE (4 * PAGE_SIZE)
> -#define NVMET_TCP_MAXH2CDATA 0x400000 /* 16M arbitrary limit */
> +#define NVMET_TCP_MAXH2CDATA SZ_4M
> #define NVMET_TCP_BACKLOG 128
>
> static int param_store_val(const char *str, int *val, int min, int max)
> --
Looks good to me, but you should formally submit it with subject "PATCH V2"
and proper commit message.
Maurizio
prev parent reply other threads:[~2026-09-22 6:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-19 3:02 Ing. Alfonso Kuen Arroyo
2026-09-21 6:54 ` Christoph Hellwig
2026-09-21 13:42 ` Ing. Alfonso Kuen Arroyo
2026-09-22 6:23 ` Maurizio Lombardi [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=DLLMOFXNSI43.22DN54SMA5U6L@arkamax.eu \
--to=mlombard@arkamax.eu \
--cc=gerencia@idkmanager.com \
--cc=hch@lst.de \
--cc=kch@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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
all inboxes | Powered by JetHome®