net: mlx4: reject unsupported coalescing params
authorJakub Kicinski <kuba@kernel.org>
Tue, 10 Mar 2020 02:15:07 +0000 (19:15 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 10 Mar 2020 23:28:53 +0000 (16:28 -0700)
Set ethtool_ops->supported_coalesce_params to let
the core reject unsupported coalescing parameters.

This driver did not previously reject unsupported parameters.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c

index 8bf1f08..8a5ea25 100644 (file)
@@ -2121,6 +2121,10 @@ static int mlx4_en_set_phys_id(struct net_device *dev,
 }
 
 const struct ethtool_ops mlx4_en_ethtool_ops = {
+       .supported_coalesce_params = ETHTOOL_COALESCE_USECS |
+                                    ETHTOOL_COALESCE_MAX_FRAMES |
+                                    ETHTOOL_COALESCE_TX_MAX_FRAMES_IRQ |
+                                    ETHTOOL_COALESCE_PKT_RATE_RX_USECS,
        .get_drvinfo = mlx4_en_get_drvinfo,
        .get_link_ksettings = mlx4_en_get_link_ksettings,
        .set_link_ksettings = mlx4_en_set_link_ksettings,