[PATCH] nvme-tcp: fix request PDU size when header digest is enabled
Keith Busch
kbusch at kernel.org
Tue Oct 27 09:04:43 PDT 2026
On Mon, Oct 26, 2026 at 03:46:21PM -0300, Christian Aurich Zanettini Martins wrote:
> @@ -566,7 +566,7 @@ static int nvme_tcp_init_request(struct blk_mq_tag_set *set,
> struct nvme_tcp_cmd_pdu *pdu;
> int queue_idx = (set == &ctrl->tag_set) ? hctx_idx + 1 : 0;
> struct nvme_tcp_queue *queue = &ctrl->queues[queue_idx];
> - u8 hdgst = nvme_tcp_hdgst_len(queue);
> + u8 hdgst = ctrl->ctrl.opts->hdr_digest ? NVME_TCP_DIGEST_LENGTH : 0;
I think everything this function needs should be initialized prior to
this function being called.
> mutex_lock(&queue->pf_cache_lock);
See where mutex_init is called for this queue's pf_cache_lock. Can you
move the queue's hdr_digest setting to that location instead?
More information about the Linux-nvme
mailing list