Thread (62 messages) 62 messages, 5 authors, 2023-08-21
STALE1072d REVIEWED: 1 (1M)
Revisions (25)
  1. v6 [diff vs current]
  2. v7 [diff vs current]
  3. v8 [diff vs current]
  4. v9 [diff vs current]
  5. v10 [diff vs current]
  6. v11 [diff vs current]
  7. v12 current
  8. v13 [diff vs current]
  9. v14 [diff vs current]
  10. v15 [diff vs current]
  11. v16 [diff vs current]
  12. v17 [diff vs current]
  13. v18 [diff vs current]
  14. v19 [diff vs current]
  15. v20 [diff vs current]
  16. v21 [diff vs current]
  17. v22 [diff vs current]
  18. v23 [diff vs current]
  19. v24 [diff vs current]
  20. v25 [diff vs current]
  21. v26 [diff vs current]
  22. v27 [diff vs current]
  23. v28 [diff vs current]
  24. v29 [diff vs current]
  25. v30 [diff vs current]

[PATCH v12 12/26] nvme-tcp: Only enable offload with TLS if the driver supports it

From: Aurelien Aptel <hidden>
Date: 2023-07-12 16:17:58
Also in: linux-nvme
Subsystem: nvm express driver, the rest · Maintainers: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg, Linus Torvalds

Check if ULP offload driver supports ULP-over-TLS before enabling the
offload with tls.

Signed-off-by: Aurelien Aptel <redacted>
Signed-off-by: Shai Malin <redacted>
Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com>
---
 drivers/nvme/host/tcp.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index e560bdf3a023..afb3dedcbc0c 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -367,6 +367,10 @@ static inline bool is_netdev_ulp_offload_active(struct net_device *netdev,
 	if (!nvme_tcp_ddp_query_limits(netdev, queue))
 		return false;
 
+	/* If we are using TLS and netdev doesn't support it, do not offload */
+	if (queue->ctrl->ctrl.opts->tls && !queue->ddp_limits.tls)
+		return false;
+
 	/* If netdev supports nvme-tcp ddp offload, we can offload */
 	if (test_bit(ULP_DDP_C_NVME_TCP_BIT, netdev->ulp_ddp_caps.active))
 		return true;
-- 
2.34.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help