Re: [PATCH v5 5/6] nvme-tcp: Support KeyUpdate

Christoph Hellwig
2025-11-12T06:59:38Z

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.