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

dpdk: bug/6790 add worker sync on finish v4 #10642

Closed

Conversation

lukashino
Copy link
Contributor

Follow-up of: #10628
Ticket: #6790
https://redmine.openinfosecfoundation.org/issues/6790

Describe changes:
v4

  • renamed a struct member (fixed typo)
  • made the functions inline
  • addressed other minor comments from the previous PR

v3

  • refactored the receive loop

v2

  • added a pointer check after calloc operation
  • improved the reasoning in the commit message

v1

  • worker synchronization added before the port is closed
  • in the peered modes, the thread only closes the peered port - it cannot close its own port because it might still be used by the other peered threads

Lukas Sismis added 3 commits March 14, 2024 12:53
When Suricata was running in IPS mode and received a signal to stop,
the first worker of every interface/port stopped the port and
proactively stopped the peered interface as well.
This was done to be as accurate with port stats as possible.
However, in a highly active scenarios (lots of packets moving around)
the peered workers might still be in the process of a packet
release operation. These workers would then attempt to transmit
on a stopped interface - resulting in an errorneous operation.

Instead, this patch proposes a worker synchronization of the given
port. After these workers are synchronized, it is known that no packets
will be sent of the peered interface, therefore the first worker can
stop it. This however cannot be assumed about "its own" port as the
peered workers can still try to send the packets. Therefore, ports
are only stopped by the peered workers.

Ticket: OISF#6790
@victorjulien victorjulien added this to the 8.0 milestone Mar 14, 2024
@suricata-qa
Copy link

WARNING:

field baseline test %
SURI_TLPR1_stats_chk
.uptime 638 658 103.13%

Pipeline 19348

This was referenced Mar 15, 2024
@victorjulien
Copy link
Member

Merged in #10652, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants