[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230712161513.134860-13-aaptel@nvidia.com>
Date: Wed, 12 Jul 2023 16:14:59 +0000
From: Aurelien Aptel <aaptel@...dia.com>
To: linux-nvme@...ts.infradead.org,
netdev@...r.kernel.org,
sagi@...mberg.me,
hch@....de,
kbusch@...nel.org,
axboe@...com,
chaitanyak@...dia.com,
davem@...emloft.net,
kuba@...nel.org
Cc: Aurelien Aptel <aaptel@...dia.com>,
aurelien.aptel@...il.com,
smalin@...dia.com,
malin1024@...il.com,
ogerlitz@...dia.com,
yorayz@...dia.com,
borisp@...dia.com,
galshalom@...dia.com,
mgurtovoy@...dia.com
Subject: [PATCH v12 12/26] nvme-tcp: Only enable offload with TLS if the driver supports it
Check if ULP offload driver supports ULP-over-TLS before enabling the
offload with tls.
Signed-off-by: Aurelien Aptel <aaptel@...dia.com>
Signed-off-by: Shai Malin <smalin@...dia.com>
Reviewed-by: Max Gurtovoy <mgurtovoy@...dia.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
Powered by blists - more mailing lists