I have created a new branch mpipe2 (https://github.com/ken-tilera/suricata-1/tree/mpipe2) that addresses this review comment. It also adds the missing suricata.yaml.in file and some other minor fixes. It is not yet complete, but I wanted to get feedback on this change first.

Regards,
-Ken


From: Eric Leblond [mailto:notifications@github.com]
Sent: Wednesday, June 26, 2013 4:17 AM
To: inliniac/suricata
Cc: Kenneth Steele
Subject: Re: [suricata] Initial Tile mPIPE support (#403)


In src/tmqh-packetpool.c:

> @@ -270,8 +275,15 @@ void TmqhOutputPacketpool(ThreadVars *t, Packet *p)

>              SCFree(p->root);

>              p->root = NULL;

>          } else {

> -            PACKET_RECYCLE(p->root);

> -            RingBufferMrMwPut(ringbuffer, (void *)p->root);

> +#ifdef HAVE_MPIPE

We have the ReleaseData API which is made for that. Take a look at https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Packet_Acquisition_API#Packet-release-mechanism
Basically if p->ReleaseData is a callback function which is called when cleaning the file.
I wonder if it is not possible to get rid of PKT_MPIPE by using this API (or if not we can make it evolve).

—
Reply to this email directly or view it on GitHub<https://github.com/inliniac/suricata/pull/403/files#r4886081>.