[SRU][F:linux-bluefield][PATCH 31/32] net/tls: Device offload to use lowest netdevice in chain

Daniel Jurgens danielj at nvidia.com
Mon May 3 19:39:16 UTC 2021


From: Tariq Toukan <tariqt at nvidia.com>

BugLink: https://bugs.launchpad.net/bugs/1926994

Do not call the tls_dev_ops of upper devices. Instead, ask them
for the proper lowest device and communicate with it directly.

Signed-off-by: Tariq Toukan <tariqt at nvidia.com>
Reviewed-by: Boris Pismenny <borisp at nvidia.com>
Signed-off-by: Jakub Kicinski <kuba at kernel.org>
(cherry picked from commit 153cbd137f0ad9ee334fa805155b983e25a432e7)
Signed-off-by: Daniel Jurgens <danielj at nvidia.com>
---
 net/tls/tls_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c
index eda8481..ea2180c 100644
--- a/net/tls/tls_device.c
+++ b/net/tls/tls_device.c
@@ -111,7 +111,7 @@ static struct net_device *get_netdev_for_sock(struct sock *sk)
 	struct net_device *netdev = NULL;
 
 	if (likely(dst)) {
-		netdev = dst->dev;
+		netdev = netdev_sk_get_lowest_dev(dst->dev, sk);
 		dev_hold(netdev);
 	}
 
-- 
1.8.3.1




More information about the kernel-team mailing list