[PATCH v5 5/6] nvme-tcp: Support KeyUpdate
Hannes Reinecke
hare at suse.de
Mon Dec 1 07:03:14 PST 2025
On 12/1/25 05:18, Alistair Francis wrote:
> On Thu, Nov 27, 2025 at 11:31 PM Hannes Reinecke <hare at suse.de> wrote:
>>
>> On 11/12/25 05:27, alistair23 at gmail.com wrote:
>>> From: Alistair Francis <alistair.francis at wdc.com>
[ .. ]>>> @@ -976,10 +986,26 @@ static int nvme_tcp_recvmsg_data(struct
nvme_tcp_queue *queue)
>>>
>>> ret = sock_recvmsg(queue->sock, &msg, msg.msg_flags);
>>> if (ret < 0) {
>>> - dev_err(queue->ctrl->ctrl.device,
>>> - "queue %d failed to receive request %#x data",
>>> - nvme_tcp_queue_id(queue), rq->tag);
>>> - return ret;
>>> + /* 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);
>>> +
>> This is not correct; reading the control message implies a kernel
>> memory allocation as message buffer, not an interator (as it's the
>> case here).
>
> I don't follow what you mean
>
Ah, right. My comment refers to users of tls_alert_recv(), which we
don't do here.
Sorry for the noise.
You can add my:
Reviewed-by: Hannes Reinecke <hare at suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare at suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
More information about the Linux-nvme
mailing list