RDMA/ipoib: reject unsupported coalescing params
authorJakub Kicinski <kuba@kernel.org>
Fri, 6 Mar 2020 01:05:57 +0000 (17:05 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 7 Mar 2020 06:45:55 +0000 (22:45 -0800)
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>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/infiniband/ulp/ipoib/ipoib_ethtool.c

index 63e4f9d15fd9146d4c7f5be7e7a8e44bb0cdf2f0..a10a0c2ca2da10c143cf1d63e789ee37d6773390 100644 (file)
@@ -213,6 +213,8 @@ static int ipoib_get_link_ksettings(struct net_device *netdev,
 }
 
 static const struct ethtool_ops ipoib_ethtool_ops = {
+       .supported_coalesce_params = ETHTOOL_COALESCE_RX_USECS |
+                                    ETHTOOL_COALESCE_RX_MAX_FRAMES,
        .get_link_ksettings     = ipoib_get_link_ksettings,
        .get_drvinfo            = ipoib_get_drvinfo,
        .get_coalesce           = ipoib_get_coalesce,