API call: per packet acquisition module packet release function
When discarding a packet because Suricata is done with it, AF_PACKET with mmap needs to tell the kernel to release it. Tilera needs the same.
Allow each pkt acq module to register a packet release function.
Make sure this function is called in TmqhOutputPacketpool.
(side thought: can this be used to set verdicts in nfq as well?)
#1 Updated by Eric Leblond over 6 years ago
- File 0001-capture-add-data-release-mechanism.patch 0001-capture-add-data-release-mechanism.patch added
- % Done changed from 0 to 60
The attached patch implement a similar idea. It adds a data release mechanism. If the capture module has a call to indicate that userland has finished with the data,
it is possible to use this system. The data will then be released when the treatment of the packet is finished.
To do so the Packet structure has been modified:
+ TmEcode (*ReleaseData)(struct Packet_ *); + void *relptr;
If ReleaseData and relptr are not null, the function is called
when the treatment of the Packet is finished.
Thus it is sufficient for the capture module to code a function
wrapping the data release mechanism and to assign it to ReleaseData
All locking have to be handled by the ReleaseData function.
#3 Updated by Victor Julien about 6 years ago
- Status changed from New to Closed
- % Done changed from 60 to 100