nvme-tcp: use in-capsule data for I/O connect
authorCaleb Sander <csander@purestorage.com>
Thu, 7 Jul 2022 21:12:45 +0000 (15:12 -0600)
committerChristoph Hellwig <hch@lst.de>
Tue, 12 Jul 2022 15:34:38 +0000 (17:34 +0200)
commita70c11e1174ee394d50c9d7b4f485b6771a60b88
tree437630fd6798a492525d08df4e21db8fcb3f92f6
parent6c16bb03731017adb66e6bf234e6ebd4a64fa926
nvme-tcp: use in-capsule data for I/O connect

Currently, command data is only sent in-capsule on the for admin or I/O
commands on queues that indicate support for it.  Send fabrics command
data in-capsule for I/O queues as well to avoid needing a separate
H2CData PDU for the connect command.

This is optimization. Without this change, we send the connect command
capsule and data in separate PDUs (CapsuleCmd and H2CData), and must wait
for the controller to respond with an R2T PDU before sending the H2CData.

With the change, we send a single CapsuleCmd PDU that includes the data.
This reduces the number of bytes (and likely packets) sent across the network,
and simplifies the send state machine handling in the driver.

Signed-off-by: Caleb Sander <csander@purestorage.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/tcp.c