summaryrefslogtreecommitdiff
path: root/net/l3mdev
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2020-03-05 08:15:31 +0300
committerDavid S. Miller <davem@davemloft.net>2020-03-05 23:12:34 +0300
commit95cddcb5cc202d3f2499596b9af5b77536c5f86a (patch)
tree558330fa99180638accb6588e5172f351f14a914 /net/l3mdev
parent56dc0a0eac999b77b1d37fe83a3c0409a6066319 (diff)
downloadlinux-95cddcb5cc202d3f2499596b9af5b77536c5f86a.tar.xz
ethtool: add infrastructure for centralized checking of coalescing parameters
Linux supports 22 different interrupt coalescing parameters. No driver implements them all. Some drivers just ignore the ones they don't support, while others have to carry a long list of checks to reject unsupported settings. To simplify the drivers add the ability to specify inside ethtool_ops which parameters are supported and let the core reject attempts to set any other one. This commit makes the mechanism an opt-in, only drivers which set ethtool_opts->coalesce_types to a non-zero value will have the checks enforced. The same mask is used for global and per queue settings. v3: - move the (temporary) check if driver defines types earlier (Michal) - rename used_types -> nonzero_params, and coalesce_types -> supported_coalesce_params (Alex) - use EOPNOTSUPP instead of EINVAL (Andrew, Michal) Leaving the long series of ifs for now, it seems nice to be able to grep for the field and flag names. This will probably have to be revisited once netlink support lands. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Michal Kubecek <mkubecek@suse.cz> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Alexander Duyck <alexander.h.duyck@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/l3mdev')
0 files changed, 0 insertions, 0 deletions