Hi Victor,

I was originally using !PKT_ALLOC, but that was not set reliably everywhere. There are three states:

1)      Stack allocated: !PKT_ALLOC & !PKT_MPIPE

2)      Malloc’d PKT_ALLOC & !PKT_MPIPE

3)      Allocated by mPIPE, !PKT_ALLOC & PKT_MPIPE.

I see two options:

1)      Get rid of stack allocated Packet Buffers, which are only in Unit Test code, but would be large number of small changes.

2)      Change PKT_MPIPE to PKT_HW_ALLOC (or some other name).

Regards,
-Ken

From: Victor Julien [mailto:notifications@github.com]
Sent: Tuesday, June 25, 2013 8:49 AM
To: inliniac/suricata
Cc: Kenneth Steele
Subject: Re: [suricata] Initial Tile mPIPE support (#403)


In src/decode.h:

> @@ -639,7 +650,7 @@ enum {

>          (p)->dp = 0;                            \

>          (p)->proto = 0;                         \

>          (p)->recursion_level = 0;               \

> -        (p)->flags = (p)->flags & PKT_ALLOC;    \

> +        (p)->flags = (p)->flags & (PKT_ALLOC | PKT_MPIPE); \

Not happy about this change. I think we need to consider a more generic flag here, something not tied to mpipe

—
Reply to this email directly or view it on GitHub<https://github.com/inliniac/suricata/pull/403/files#r4864809>.