Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
You need to sign in or sign up before continuing.
  • linux
  • include
  • linux
  • ethtool.h
Find file BlameHistoryPermalink
  • Jakub Kicinski's avatar
    ethtool: add infrastructure for centralized checking of coalescing parameters · 95cddcb5
    Jakub Kicinski authored Mar 04, 2020
    
    
    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: default avatarJakub Kicinski <kuba@kernel.org>
    Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
    Reviewed-by: default avatarMichal Kubecek <mkubecek@suse.cz>
    Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
    Reviewed-by: default avatarAlexander Duyck <alexander.h.duyck@linux.intel.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    95cddcb5
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7