summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorGal Pressman <gal@nvidia.com>2021-11-29 11:08:41 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-01-05 12:37:45 +0100
commit20f6896787c508098a8eaade48e39be79bffe22b (patch)
treeb53392a11ba9fa684229deb3e232b6f54b17ad63 /tools
parentb85f87d30dba4a0e629f2dc37acdc70a3a2afbfa (diff)
net/mlx5e: Fix wrong features assignment in case of error
[ Upstream commit 992d8a4e38f0527f24e273ce3a9cd6dea1a6a436 ] In case of an error in mlx5e_set_features(), 'netdev->features' must be updated with the correct state of the device to indicate which features were updated successfully. To do that we maintain a copy of 'netdev->features' and update it after successful feature changes, so we can assign it to back to 'netdev->features' if needed. However, since not all netdev features are handled by the driver (e.g. GRO/TSO/etc), some features may not be updated correctly in case of an error updating another feature. For example, while requesting to disable TSO (feature which is not handled by the driver) and enable HW-GRO, if an error occurs during HW-GRO enable, 'oper_features' will be assigned with 'netdev->features' and HW-GRO turned off. TSO will remain enabled in such case, which is a bug. To solve that, instead of using 'netdev->features' as the baseline of 'oper_features' and changing it on set feature success, use 'features' instead and update it in case of errors. Fixes: 75b81ce719b7 ("net/mlx5e: Don't override netdev features field unless in error flow") Signed-off-by: Gal Pressman <gal@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions