Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packet Pool fixes #1065

Closed
wants to merge 2 commits into from
Closed

Packet Pool fixes #1065

wants to merge 2 commits into from

Conversation

ken-tilera
Copy link
Contributor

Fixes the non-TLS crash in autofp mode, where only some Packet Pools are initialized, by checking for initialization on each access and initializing if needed.

Adds calls to PacketPoolDestroy() to cleanup allocated memory.

Passes travis-ci

On non-TLS systems, check each time the Thread Local Storage
is requested and if it has not been initialized for this thread, initialize it.
The prevents not initializing the worker threads in autofp run mode.
PktPool *pool = GetThreadPacketPool();
if (pool)
return pool;

/* Create a new pool for this thread. */
pool = (PktPool*)SCMallocAligned(sizeof(PktPool), CLS);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed undeclared 'pool' variable here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I obviously didn’t check the non-TLS case. Sigh.

From: Victor Julien [mailto:notifications@github.com]
Sent: Wednesday, July 30, 2014 5:56 AM
To: inliniac/suricata
Cc: Kenneth Steele
Subject: Re: [suricata] Packet Pool fixes (#1065)

In src/tmqh-packetpool.c:

{

 TmqhPacketpoolInit();
  • /* Check that the pool is not already created */
  • PktPool *pool = GetThreadPacketPool();
  • if (pool)
  •    return pool;
    

 /* Create a new pool for this thread. */

 pool = (PktPool*)SCMallocAligned(sizeof(PktPool), CLS);

I fixed undeclared 'pool' variable here.


Reply to this email directly or view it on GitHubhttps://github.com//pull/1065/files#r15574878.

@inliniac
Copy link
Contributor

Merged with one small fix, thanks Ken!

@inliniac inliniac closed this Jul 30, 2014
@ken-tilera
Copy link
Contributor Author

Thanks. I had been testing non-TLS by editing config.h to comment out the #define TLS line. That might be a good standard test. Easier than compiling on BSD.

-Ken

From: Victor Julien [mailto:notifications@github.com]
Sent: Wednesday, July 30, 2014 5:56 AM
To: inliniac/suricata
Cc: Kenneth Steele
Subject: Re: [suricata] Packet Pool fixes (#1065)

Merged with one small fix, thanks Ken!


Reply to this email directly or view it on GitHubhttps://github.com//pull/1065#issuecomment-50595406.

AkakiAlice added a commit to AkakiAlice/suricata that referenced this pull request Oct 31, 2024
@AkakiAlice AkakiAlice mentioned this pull request Oct 31, 2024
5 tasks
AkakiAlice added a commit to AkakiAlice/suricata that referenced this pull request Nov 7, 2024
AkakiAlice added a commit to AkakiAlice/suricata that referenced this pull request Nov 7, 2024
AkakiAlice added a commit to AkakiAlice/suricata that referenced this pull request Nov 7, 2024
@AkakiAlice AkakiAlice mentioned this pull request Nov 7, 2024
5 tasks
AkakiAlice added a commit to AkakiAlice/suricata that referenced this pull request Dec 12, 2024
@AkakiAlice AkakiAlice mentioned this pull request Dec 12, 2024
5 tasks
AkakiAlice added a commit to AkakiAlice/suricata that referenced this pull request Dec 13, 2024
AkakiAlice added a commit to AkakiAlice/suricata that referenced this pull request Dec 16, 2024
AkakiAlice added a commit to AkakiAlice/suricata that referenced this pull request Dec 17, 2024
vlan.id matches on Virtual Local Area Network IDs
It is an unsigned 16-bit integer
Valid range for the default configuration = [1-4094]
Supports prefiltering

Ticket: OISF#1065
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants