提交 5c6429aa 编写于 作者: T Tariq Toukan 提交者: Yang Yingliang

net: Disable NETIF_F_HW_TLS_RX when RXCSUM is disabled

stable inclusion
from linux-4.19.171
commit fffe7ab69dc57460913854b815351b2cdf9a3c9d

--------------------------------

commit a3eb4e9d upstream.

With NETIF_F_HW_TLS_RX packets are decrypted in HW. This cannot be
logically done when RXCSUM offload is off.

Fixes: 14136564 ("net: Add TLS RX offload feature")
Signed-off-by: NTariq Toukan <tariqt@nvidia.com>
Reviewed-by: NBoris Pismenny <borisp@nvidia.com>
Link: https://lore.kernel.org/r/20210117151538.9411-1-tariqt@nvidia.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NCheng Jian <cj.chengjian@huawei.com>
上级 e3292aa7
...@@ -8351,6 +8351,11 @@ static netdev_features_t netdev_fix_features(struct net_device *dev, ...@@ -8351,6 +8351,11 @@ static netdev_features_t netdev_fix_features(struct net_device *dev,
} }
} }
if ((features & NETIF_F_HW_TLS_RX) && !(features & NETIF_F_RXCSUM)) {
netdev_dbg(dev, "Dropping TLS RX HW offload feature since no RXCSUM feature.\n");
features &= ~NETIF_F_HW_TLS_RX;
}
return features; return features;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册