net: i40e: reject unsupported coalescing params
authorJakub Kicinski <kuba@kernel.org>
Wed, 11 Mar 2020 22:32:56 +0000 (15:32 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Mar 2020 18:32:36 +0000 (11:32 -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/intel/i40e/i40e_ethtool.c

index 317f3f1458db443d89f2e626dca4cee3b8cff463..aa8026b1eb81a75ed4458d53ac6908c56d70f5da 100644 (file)
@@ -5249,6 +5249,11 @@ static const struct ethtool_ops i40e_ethtool_recovery_mode_ops = {
 };
 
 static const struct ethtool_ops i40e_ethtool_ops = {
+       .supported_coalesce_params = ETHTOOL_COALESCE_USECS |
+                                    ETHTOOL_COALESCE_MAX_FRAMES_IRQ |
+                                    ETHTOOL_COALESCE_USE_ADAPTIVE |
+                                    ETHTOOL_COALESCE_RX_USECS_HIGH |
+                                    ETHTOOL_COALESCE_TX_USECS_HIGH,
        .get_drvinfo            = i40e_get_drvinfo,
        .get_regs_len           = i40e_get_regs_len,
        .get_regs               = i40e_get_regs,