Page MenuHomeFreeBSD

siftr: refactor batch log processing
ClosedPublic

Authored by rscheff on Dec 7 2023, 11:34 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 26, 9:25 PM
Unknown Object (File)
Mon, Dec 22, 3:11 PM
Unknown Object (File)
Nov 21 2025, 9:32 AM
Unknown Object (File)
Nov 15 2025, 12:29 AM
Unknown Object (File)
Nov 14 2025, 1:39 PM
Unknown Object (File)
Oct 30 2025, 4:00 AM
Unknown Object (File)
Oct 28 2025, 2:53 AM
Unknown Object (File)
Oct 24 2025, 3:23 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.