Skip to content

Xdp tunnel 7674 v18#15746

Open
catenacyber wants to merge 8 commits into
OISF:mainfrom
catenacyber:xdp-tunnel-7674-v18
Open

Xdp tunnel 7674 v18#15746
catenacyber wants to merge 8 commits into
OISF:mainfrom
catenacyber:xdp-tunnel-7674-v18

Conversation

@catenacyber

Copy link
Copy Markdown
Contributor

Link to ticket: https://redmine.openinfosecfoundation.org/issues/
https://redmine.openinfosecfoundation.org/issues/7674

Describe changes:

  • introduces configurable tunnel_id to distinguish same-looking (same 5-tuple) flows encapsulated in different tunnels
  • adds a config option to "skip" the packets that are not part of a tunnel on interfaces receiving tunneled traffic
  • handle xdp bypass of these encapsulated flows
  • use this new tunnel_id as a multi-tenant selector
  • test: new afpacket max-packets feature

SV_BRANCH=OISF/suricata-verify#3186

#15710 rebased, with comments from #15469 addressed in last commit (+ typo fix in some commit message)

Should I do a PR with just the 2 last commits for the SV framework improvement ? (And a simple already passing SV test)

catenacyber and others added 8 commits June 28, 2026 21:43
So that we know for a packet which precise type of tunnel it
is (like erspan2).
Ticket: 7674

To distinguish flows with the same 5-tuple but coming from different
configured tunnel sources.

For vxlan, we need to call
1. PacketTunnelPktSetup with vxlan header
2. Call a new DecodeVXLANtunnel which
  - sets the tunnel id
  - call DecodeEthernet on data after vxlan header as before
Ticket: 7674

On interfaces meant to receive only tunneled traffic
so as to run ebpf live tests
Ticket: 7674

Allows a compile-time option AFPACKET_TEST_REPLAY, that allows
to set a configuration max-packets per afpacket interface,
after which the PktAcqLoop stops.

This allows suricata-verify tests to run with tcpreplay,
and know when to stop
@codecov

codecov Bot commented Jun 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 51.47059% with 132 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.93%. Comparing base (17dc065) to head (1910be2).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15746      +/-   ##
==========================================
- Coverage   82.95%   82.93%   -0.03%     
==========================================
  Files        1003     1004       +1     
  Lines      275096   275345     +249     
==========================================
+ Hits       228217   228367     +150     
- Misses      46879    46978      +99     
Flag Coverage Δ
fuzzcorpus 61.41% <15.07%> (-0.07%) ⬇️
livemode 18.33% <10.29%> (-0.03%) ⬇️
netns 22.69% <11.39%> (-0.02%) ⬇️
pcap 45.31% <17.27%> (-0.07%) ⬇️
suricata-verify 66.91% <51.10%> (-0.05%) ⬇️
unittests 58.41% <11.39%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@suricata-qa

Copy link
Copy Markdown

WARNING:

field baseline test %
SURI_TLPR1_stats_chk
.app_layer.flow.ftp_data 760 881 115.92%
.app_layer.error.ftp.parser 17 0 -

Pipeline = 32291

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