]> git.baikalelectronics.ru Git - kernel.git/commit
ethtool: fix incorrect tx-checksumming settings reporting
authorVladyslav Tarasiuk <vladyslavt@mellanox.com>
Tue, 24 Mar 2020 11:57:08 +0000 (13:57 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Mar 2020 23:25:11 +0000 (16:25 -0700)
commit65c99ce95d8592145ffa6e7b29f35a68b3fc8a28
tree47f4f37960a0d70ea69666b71d4dbc0096fb9603
parent9ed21a1a74ee2ebc2bf1f140352bcd20c3a7a534
ethtool: fix incorrect tx-checksumming settings reporting

Currently, ethtool feature mask for checksum command is ORed with
NETIF_F_FCOE_CRC_BIT, which is bit's position number, instead of the
actual feature bit - NETIF_F_FCOE_CRC.

The invalid bitmask here might affect unrelated features when toggling
TX checksumming. For example, TX checksumming is always mistakenly
reported as enabled on the netdevs tested (mlx5, virtio_net).

Fixes: 4947275de9cf ("ethtool: update mapping of features to legacy ioctl requests")
Signed-off-by: Vladyslav Tarasiuk <vladyslavt@mellanox.com>
Reviewed-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ethtool/ioctl.c