[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200324115708.31186-1-vladyslavt@mellanox.com>
Date: Tue, 24 Mar 2020 13:57:08 +0200
From: Vladyslav Tarasiuk <vladyslavt@...lanox.com>
To: davem@...emloft.net, netdev@...r.kernel.org
Cc: maximmi@...lanox.com, mkubecek@...e.cz, moshe@...lanox.com,
Vladyslav Tarasiuk <vladyslavt@...lanox.com>
Subject: [PATCH net-next] 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: f70bb06563ed ("ethtool: update mapping of features to legacy ioctl requests")
Signed-off-by: Vladyslav Tarasiuk <vladyslavt@...lanox.com>
---
net/ethtool/ioctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c
index 3852a58d7f95..10d929abdf6a 100644
--- a/net/ethtool/ioctl.c
+++ b/net/ethtool/ioctl.c
@@ -196,7 +196,7 @@ static netdev_features_t ethtool_get_feature_mask(u32 eth_cmd)
switch (eth_cmd) {
case ETHTOOL_GTXCSUM:
case ETHTOOL_STXCSUM:
- return NETIF_F_CSUM_MASK | NETIF_F_FCOE_CRC_BIT |
+ return NETIF_F_CSUM_MASK | NETIF_F_FCOE_CRC |
NETIF_F_SCTP_CRC;
case ETHTOOL_GRXCSUM:
case ETHTOOL_SRXCSUM:
--
2.17.1
Powered by blists - more mailing lists