Skip to content

Xdp tunnel 7674 v9#15028

Closed
catenacyber wants to merge 12 commits into
OISF:mainfrom
catenacyber:xdp-tunnel-7674-v9
Closed

Xdp tunnel 7674 v9#15028
catenacyber wants to merge 12 commits into
OISF:mainfrom
catenacyber:xdp-tunnel-7674-v9

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
  • EBPF is now in suricata --build-info list of features
  • ebpf: remove unused macro
  • test: new afpacket max-packets feature

SV_BRANCH=OISF/suricata-verify#2969

#14378 rebased with last 2 commits

  • simple ebpf: remove unused macro
  • test : add new feature for SV live test : configure option max_packets (only available if compiled with -DAFPACKET_TEST_REPLAY) so that suricata knows when to stop while listening to live traffic

catenacyber and others added 11 commits March 13, 2026 14:11
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
for SV to run tests based on the presence of this feature
so as to run ebpf live tests
@catenacyber

Copy link
Copy Markdown
Contributor Author

My branch xdp-tunnel-7674-v9.1 has only the 4 easy commits (code refactoring, no new functionality)

@catenacyber catenacyber marked this pull request as draft March 13, 2026 15:14
@catenacyber

Copy link
Copy Markdown
Contributor Author

Draft : fixing formatting

@coveralls

coveralls commented Mar 13, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 79.273% (+60.3%) from 18.946%
when pulling 432f235 on catenacyber:xdp-tunnel-7674-v9
into 8c29c47 on OISF:main.

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
@catenacyber catenacyber marked this pull request as ready for review March 13, 2026 16:43
@suricata-qa

Copy link
Copy Markdown

Information: QA ran without warnings.

Pipeline = 30295

2 similar comments
@suricata-qa

Copy link
Copy Markdown

Information: QA ran without warnings.

Pipeline = 30295

@suricata-qa

Copy link
Copy Markdown

Information: QA ran without warnings.

Pipeline = 30295

@codecov

codecov Bot commented Mar 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 54.54545% with 135 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.55%. Comparing base (8c29c47) to head (432f235).
⚠️ Report is 35 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15028      +/-   ##
==========================================
- Coverage   82.60%   82.55%   -0.06%     
==========================================
  Files         990      991       +1     
  Lines      271615   271841     +226     
==========================================
+ Hits       224360   224406      +46     
- Misses      47255    47435     +180     
Flag Coverage Δ
fuzzcorpus 60.94% <21.21%> (-0.08%) ⬇️
livemode 18.35% <12.79%> (+<0.01%) ⬆️
netns 18.34% <17.17%> (-0.04%) ⬇️
pcap 45.14% <23.23%> (-0.12%) ⬇️
suricata-verify 66.07% <54.20%> (-0.05%) ⬇️
unittests 58.77% <16.49%> (-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.

@catenacyber catenacyber mentioned this pull request Mar 16, 2026
@catenacyber catenacyber added the needs rebase Needs rebase to main label Mar 25, 2026
@catenacyber

Copy link
Copy Markdown
Contributor Author

Rebased in #15102

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs rebase Needs rebase to main

Development

Successfully merging this pull request may close these issues.

3 participants