linux/drivers/nvme/host
Varun Prakash c2700d2886 nvme-tcp: send H2CData PDUs based on MAXH2CDATA
As per NVMe/TCP specification (revision 1.0a, section 3.6.2.3)
Maximum Host to Controller Data length (MAXH2CDATA): Specifies the
maximum number of PDU-Data bytes per H2CData PDU in bytes. This value
is a multiple of dwords and should be no less than 4,096.

Current code sets H2CData PDU data_length to r2t_length,
it does not check MAXH2CDATA value. Fix this by setting H2CData PDU
data_length to min(req->h2cdata_left, queue->maxh2cdata).

Also validate MAXH2CDATA value returned by target in ICResp PDU,
if it is not a multiple of dword or if it is less than 4096 return
-EINVAL from nvme_tcp_init_connection().

Signed-off-by: Varun Prakash <varun@chelsio.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2022-02-23 14:43:11 +01:00
..
core.c nvme: also mark passthrough-only namespaces ready in nvme_update_ns_info 2022-02-23 14:42:58 +01:00
fabrics.c nvme-fabrics: remove the unneeded ret variable in nvmf_dev_show 2022-01-27 08:17:17 +01:00
fabrics.h nvme-fabrics: fix state check in nvmf_ctlr_matches_baseopts() 2022-02-03 07:30:57 +01:00
fault_inject.c block: remove the ->rq_disk field in struct request 2021-11-29 06:41:29 -07:00
fc.c for-5.16/drivers-2021-10-29 2021-11-01 09:27:38 -07:00
fc.h nvme-fc: Update header and host for common definitions for LS handling 2020-05-09 16:18:33 -06:00
hwmon.c nvme-hwmon: Return error code when registration fails 2021-03-05 13:41:03 +01:00
ioctl.c remove the lightnvm subsystem 2021-08-14 15:54:09 -06:00
Kconfig nvme: Have NVME_FABRICS select NVME_CORE instead of transport drivers 2021-08-16 21:03:18 +02:00
Makefile remove the lightnvm subsystem 2021-08-14 15:54:09 -06:00
multipath.c block: fix surprise removal for drivers calling blk_set_queue_dying 2022-02-17 07:54:03 -07:00
nvme.h for-5.17/drivers-2022-01-11 2022-01-12 10:35:23 -08:00
pci.c nvme-pci: add the IGNORE_DEV_SUBNQN quirk for Intel P4500/P4600 SSDs 2022-01-27 08:17:14 +01:00
rdma.c nvme-rdma: fix possible use-after-free in transport error_recovery work 2022-02-02 09:19:07 +01:00
tcp.c nvme-tcp: send H2CData PDUs based on MAXH2CDATA 2022-02-23 14:43:11 +01:00
trace.c nvme: add set feature tracing support 2021-08-16 14:42:23 +02:00
trace.h block: remove the ->rq_disk field in struct request 2021-11-29 06:41:29 -07:00
zns.c nvme: report write pointer for a full zone as zone start + zone len 2021-12-06 08:52:08 +01:00