With NETIF_F_HW_TLS_TX packets are encrypted in HW. This cannot be
logically done when HW_CSUM offload is off.
Fixes: 2342a8512a1e ("net: Add TLS TX offload features")
Signed-off-by: Tariq Toukan <[email protected]>
Reviewed-by: Boris Pismenny <[email protected]>
---
net/core/dev.c | 5 +++++
1 file changed, 5 insertions(+)
Hi,
Please queue to -stable >= v4.18.
Thanks.
diff --git a/net/core/dev.c b/net/core/dev.c
index 82dc6b48e45f..5f72ea17d3f7 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -9588,6 +9588,11 @@ static netdev_features_t netdev_fix_features(struct
net_device *dev,
}
}
+ if ((features & NETIF_F_HW_TLS_TX) && !(features & NETIF_F_HW_CSUM)) {
+ netdev_dbg(dev, "Dropping TLS TX HW offload feature since no
CSUM feature.\n");
+ features &= ~NETIF_F_HW_TLS_TX;
+ }
+
return features;
}
--
2.21.0