netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: alistair23@gmail.com
Cc: chuck.lever@oracle.com, hare@kernel.org,
	kernel-tls-handshake@lists.linux.dev, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-nvme@lists.infradead.org, linux-nfs@vger.kernel.org,
	kbusch@kernel.org, axboe@kernel.dk, hch@lst.de, sagi@grimberg.me,
	kch@nvidia.com, hare@suse.de,
	Alistair Francis <alistair.francis@wdc.com>
Subject: Re: [PATCH v5 5/6] nvme-tcp: Support KeyUpdate
Date: Wed, 12 Nov 2025 07:59:25 +0100	[thread overview]
Message-ID: <20251112065925.GF4873@lst.de> (raw)
In-Reply-To: <20251112042720.3695972-6-alistair.francis@wdc.com>

On Wed, Nov 12, 2025 at 02:27:19PM +1000, alistair23@gmail.com wrote:
>  
>  		ret = sock_recvmsg(queue->sock, &msg, msg.msg_flags);
>  		if (ret < 0) {
> +			/* If MSG_CTRUNC is set, it's a control message,
> +			 * so let's read the control message.
> +			 */

This is not the normal kernel comment style, which would be:

			/*
			 * If MSG_CTRUNC is set, it's a control message, so
			 * let's read the control message.
+			 */

> +			if (msg.msg_flags & MSG_CTRUNC) {
> +				memset(&msg, 0, sizeof(msg));
> +				msg.msg_flags = MSG_DONTWAIT;
> +				msg.msg_control = cbuf;
> +				msg.msg_controllen = sizeof(cbuf);
> +
> +				ret = sock_recvmsg(queue->sock, &msg, msg.msg_flags);

Overly long line.  Also given that we're in the main receive handler
it would be nice to have this outside the main flow using a goto and
an unlikely label anyway.


  reply	other threads:[~2025-11-12  6:59 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-12  4:27 [PATCH v5 0/6] nvme-tcp: Support receiving KeyUpdate requests alistair23
2025-11-12  4:27 ` [PATCH v5 1/6] net/handshake: Store the key serial number on completion alistair23
2025-11-12 15:02   ` Chuck Lever
2025-11-30 22:21   ` Sagi Grimberg
2025-11-12  4:27 ` [PATCH v5 2/6] net/handshake: Define handshake_sk_destruct_req alistair23
2025-11-12 15:47   ` Chuck Lever
2025-11-13 10:19     ` Alistair Francis
2025-11-13 14:01       ` Chuck Lever
2025-11-13 14:37         ` Chuck Lever
2025-11-14  3:44           ` Alistair Francis
2025-11-14 14:14             ` Chuck Lever
2025-11-19  0:45               ` Alistair Francis
2025-11-20 13:51                 ` Chuck Lever
2025-11-25  5:00                   ` Alistair Francis
2025-11-25 13:55                     ` Chuck Lever
2025-11-12  4:27 ` [PATCH v5 3/6] net/handshake: Ensure the request is destructed on completion alistair23
2025-11-12  4:27 ` [PATCH v5 4/6] net/handshake: Support KeyUpdate message types alistair23
2025-11-12 15:49   ` Chuck Lever
2025-11-13  2:16     ` Alistair Francis
2025-11-13 14:41   ` Chuck Lever
2025-11-27 13:12   ` Hannes Reinecke
2025-11-12  4:27 ` [PATCH v5 5/6] nvme-tcp: Support KeyUpdate alistair23
2025-11-12  6:59   ` Christoph Hellwig [this message]
2025-11-12 14:31     ` Chuck Lever
2025-11-12 14:38       ` Christoph Hellwig
2025-11-12 14:38         ` Chuck Lever
2025-11-27 13:31   ` Hannes Reinecke
2025-12-01  4:18     ` Alistair Francis
2025-12-01 15:03       ` Hannes Reinecke
2025-11-30 22:31   ` Sagi Grimberg
2025-12-01 23:27     ` Alistair Francis
2025-11-12  4:27 ` [PATCH v5 6/6] nvmet-tcp: " alistair23
2025-11-12  7:01   ` Christoph Hellwig

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=20251112065925.GF4873@lst.de \
    --to=hch@lst.de \
    --cc=alistair.francis@wdc.com \
    --cc=alistair23@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=chuck.lever@oracle.com \
    --cc=hare@kernel.org \
    --cc=hare@suse.de \
    --cc=kbusch@kernel.org \
    --cc=kch@nvidia.com \
    --cc=kernel-tls-handshake@lists.linux.dev \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).