]> git.baikalelectronics.ru Git - kernel.git/commitdiff
nvmet-tcp: fix maxh2cdata icresp parameter
authorSagi Grimberg <sagi@grimberg.me>
Wed, 26 Feb 2020 00:42:27 +0000 (16:42 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Apr 2020 08:50:09 +0000 (10:50 +0200)
commit 7b33c93e2fc553c1b7b0cde35d5e909352d95308 upstream.

MAXH2CDATA is not zero based. Also no reason to limit ourselves to
1M transfers as we can do more easily. Make this an arbitrary limit
of 16M.

Reported-by: Wenhua Liu <liuw@vmware.com>
Cc: stable@vger.kernel.org # v5.0+
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvme/target/tcp.c

index 2fe34fd4c3f3bb53ee7901b705d4e9e6a4f03af9..22014e76d77148f5579a732b89f9dc1811329f69 100644 (file)
@@ -794,7 +794,7 @@ static int nvmet_tcp_handle_icreq(struct nvmet_tcp_queue *queue)
        icresp->hdr.pdo = 0;
        icresp->hdr.plen = cpu_to_le32(icresp->hdr.hlen);
        icresp->pfv = cpu_to_le16(NVME_TCP_PFV_1_0);
-       icresp->maxdata = cpu_to_le32(0xffff); /* FIXME: support r2t */
+       icresp->maxdata = cpu_to_le32(0x400000); /* 16M arbitrary limit */
        icresp->cpda = 0;
        if (queue->hdr_digest)
                icresp->digest |= NVME_TCP_HDR_DIGEST_ENABLE;