mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Maurizio Lombardi" <mlombard@arkamax.eu>
To: "Kenta Akagi" <kenta.akagi@linecorp.com>,
	"Christoph Hellwig" <hch@lst.de>,
	"Sagi Grimberg" <sagi@grimberg.me>,
	"Chaitanya Kulkarni" <kch@nvidia.com>,
	"Ibrahim Hashimov" <security@auditcode.ai>,
	"Keith Busch" <kbusch@kernel.org>
Cc: <linux-nvme@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
	<gerencia@idkmanager.com>, <mlombard@arkamax.eu>
Subject: Re: [PATCH 1/2] nvmet-tcp: match the MAXH2CDATA comment to its byte value
Date: Sat, 05 Dec 2026 11:09:37 +0100	[thread overview]
Message-ID: <DNCPTT3GRE9L.ZGSPTLDU3EQX@arkamax.eu> (raw)
In-Reply-To: <CAHAfc0cDXFSNcm-ekhMLjw6VfCV+3P_MfmxEFSXGvByjdMyrvQ@mail.gmail.com>

On Thu Dec 3, 2026 at 11:32 AM CET, Kenta Akagi wrote:
> NVMET_TCP_MAXH2CDATA is 0x400000, or 4 MiB. Update its comment to match
> the existing value. The constant and its users are unchanged.
>
> Signed-off-by: Kenta Akagi <kenta.akagi@linecorp.com>
> ---
>  drivers/nvme/target/tcp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c
> index 8a2e0e056131..c70804efb853 100644
> --- a/drivers/nvme/target/tcp.c
> +++ b/drivers/nvme/target/tcp.c
> @@ -24,7 +24,7 @@
>  #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		0x400000 /* 4 MiB arbitrary limit */
>  #define NVMET_TCP_BACKLOG 128
>
>  static int param_store_val(const char *str, int *val, int min, int max)

Thanks for the patch,

I would suggest to use SZ_4M:

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)
--
2.53.0

Maurizio

      parent reply	other threads:[~2026-12-05 10:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 10:32 Kenta Akagi
2026-12-03 10:32 ` [PATCH 2/2] nvmet-tcp: advertise a 4 MiB MDTS limit Kenta Akagi
2026-12-03 17:10   ` Kenta Akagi
2026-12-03 17:49   ` Ing. Alfonso Kuen Arroyo
2026-12-03 17:49 ` [PATCH 1/2] nvmet-tcp: match the MAXH2CDATA comment to its byte value Ing. Alfonso Kuen Arroyo
2026-12-05 10:09 ` 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=DNCPTT3GRE9L.ZGSPTLDU3EQX@arkamax.eu \
    --to=mlombard@arkamax.eu \
    --cc=gerencia@idkmanager.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=kch@nvidia.com \
    --cc=kenta.akagi@linecorp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --cc=security@auditcode.ai \
    /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®