git: poll - Fix events == 0 handling for TAP and TUN, fix console spam

Matthew Dillon dillon at crater.dragonflybsd.org
Wed Aug 28 11:33:14 PDT 2024


commit 83e7061fc08c2bcaeaaa75ad86aff4605a2904ea
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Wed Aug 28 11:30:32 2024 -0700

    poll - Fix events == 0 handling for TAP and TUN, fix console spam
    
    * BSD poll() supports events == 0 representing a "HUP ONLY" event.
      Most of our devices properly support this but TAP and TUN did not.
    
      Fix TAP and TUN to support this feature.  This fixes openvpn()
      when operating under heavier loads.
    
    * Fix console spam on non-debug kprintf()s by rate-limiting any
      such spam if it occurs.  If a device doe snot support poll()'s
      HUP ONLY feature, the loop deregistration path will be hit and
      generate a kprintf().  We don't want console spam to stall the
      cpu.

Summary of changes:
 sys/kern/sys_generic.c | 28 ++++++++++++++++++----------
 sys/net/tap/if_tap.c   | 10 ++++++----
 sys/net/tun/if_tun.c   |  6 ++++--
 3 files changed, 28 insertions(+), 16 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/83e7061fc08c2bcaeaaa75ad86aff4605a2904ea


-- 
DragonFly BSD source repository


More information about the Commits mailing list