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
  • netdevice.h
Find file BlameHistoryPermalink
  • Jakub Kicinski's avatar
    net: provide macros for commonly copied lockless queue stop/wake code · c91c46de
    Jakub Kicinski authored Apr 06, 2023
    A lot of drivers follow the same scheme to stop / start queues
    without introducing locks between xmit and NAPI tx completions.
    I'm guessing they all copy'n'paste each other's code.
    The original code dates back all the way to e1000 and Linux 2.6.19.
    
    Smaller drivers shy away from the scheme and introduce a lock
    which may cause deadlocks in netpoll.
    
    Provide macros which encapsulate the necessary logic.
    
    The macros do not prevent false wake ups, the extra barrier
    required to close that race is not worth it. See discussion in:
    https://lore.kernel.org/all/c39312a2-4537-14b4-270c-9fe1fbb91e89@gmail.com/
    
    
    
    Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    c91c46de
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7