net: iavf: reject unsupported coalescing params
authorJakub Kicinski <kuba@kernel.org>
Wed, 11 Mar 2020 22:32:57 +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/iavf/iavf_ethtool.c

index f807e2c..2c39d46 100644 (file)
@@ -996,6 +996,10 @@ static int iavf_set_rxfh(struct net_device *netdev, const u32 *indir,
 }
 
 static const struct ethtool_ops iavf_ethtool_ops = {
+       .supported_coalesce_params = ETHTOOL_COALESCE_USECS |
+                                    ETHTOOL_COALESCE_MAX_FRAMES |
+                                    ETHTOOL_COALESCE_MAX_FRAMES_IRQ |
+                                    ETHTOOL_COALESCE_USE_ADAPTIVE,
        .get_drvinfo            = iavf_get_drvinfo,
        .get_link               = ethtool_op_get_link,
        .get_ringparam          = iavf_get_ringparam,