Page MenuHomeFreeBSD

siftr: refactor batch log processing
ClosedPublic

Authored by rscheff on Dec 7 2023, 11:34 AM.
Tags
None
Referenced Files
F150559185: D42949.id.diff
Thu, Apr 2, 8:48 AM
Unknown Object (File)
Tue, Mar 31, 12:10 PM
Unknown Object (File)
Thu, Mar 26, 6:08 AM
Unknown Object (File)
Thu, Mar 26, 6:06 AM
Unknown Object (File)
Fri, Mar 6, 6:01 AM
Unknown Object (File)
Fri, Mar 6, 1:40 AM
Unknown Object (File)
Mar 3 2026, 3:36 AM
Unknown Object (File)
Mar 2 2026, 12:15 AM
Subscribers

Details

Summary

D41175 introduced a condition, where free could be called
while in a critical section or under spinlock.

Refactoring the code to perform the batch processing of
log messaged in two phases, first cycling through a limited
number of collected packets, and only afterwards freeing
these processed packets.

Test Plan

Repro was done using a VM with packetdrill -v on a
script also starting a tcpdump, with near 100% reproducability.

These changes fix the panic, while retaining the batch
log processing.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

  • replace magic number with defined variable
This revision is now accepted and ready to land.Dec 7 2023, 12:26 PM
This revision was automatically updated to reflect the committed changes.

I think I have tested this method of separating packet processing and free before. But I want to make sure it is performing as expected. I will give my comment after testing.

sys/netinet/siftr.c
521

Add a space between ";cnt > 0" for readability.

Tested in Emulab.net. Looks good to me.