CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]    2025/12/17 19:14:09

Modified files:
        sys/net        : if_vlan.c 

Log message:
take advantage of if_vinput not sleeping now to avoid real refcnts

the vlan tag hash was an array of smr protectect lists. previously
when we found a vlan interface in the tag hash we'd take a real ref
(refcnt_take) to that interface before pushing it through the network
stack with if_vinput. we did this because the network stack can
sleep, and you can't sleep in an smr critical section.

now that if_vinput simply queues the packet without sleeping, we
can call it from the smr critical section and skip taking and
releasing real refs with atomic ops. this is a win if the vlan
parent interfaces are multiq and doing a lot of packets across
multiple softnet threads because the cacheline the refcnt is on
doesnt have to be modified, hopefully it can be shared (or not used
at all) instead.

Reply via email to