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)
Mon, Nov 4, 3:02 AM
Unknown Object (File)
Mon, Nov 4, 3:00 AM
Unknown Object (File)
Fri, Oct 18, 1:47 PM
Unknown Object (File)
Sep 24 2024, 8:45 PM
Unknown Object (File)
Sep 24 2024, 4:18 PM
Unknown Object (File)
Sep 21 2024, 2:57 AM
Unknown Object (File)
Sep 20 2024, 1:50 AM
Unknown Object (File)
Sep 19 2024, 5:59 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.