]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net/tls: Device offload to use lowest netdevice in chain
authorTariq Toukan <tariqt@nvidia.com>
Sun, 17 Jan 2021 14:59:48 +0000 (16:59 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 19 Jan 2021 04:48:40 +0000 (20:48 -0800)
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@nvidia.com>
Reviewed-by: Boris Pismenny <borisp@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/tls/tls_device.c

index f7fb7d2c1de1f728d07b6f0aa69a8a759bfecb08..75ceea0a41bf367e573e4ad66167203e2c68d8f8 100644 (file)
@@ -113,7 +113,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);
        }