HomeFreeBSD

frag6: check global limits before hash and lock

Description

frag6: check global limits before hash and lock

Check whether we are accepting more fragments (based on global limits)
before doing expensive operations of calculating the hash and taking the
bucket lock. This slightly increases a "race" between check time and
incrementing counters (which is already there) possibly allowing a few
more fragments than the maximum limits. However, when under attack,
we rather save this CPU time for other packets/work.

MFC after: 3 weeks
Sponsored by: Netflix

Details

Committed
bzOct 24 2019, 11:58 AM
Parents
rS354018: Store a handle for the event handler. This will be used when unloading the
Branches
Unknown
Tags
Unknown