Project

General

Profile

Actions

Bug #6365

closed

Suricata AF_XDP not using libxdp XDP dispatcher and can't co-exist with another XDP program

Added by Vincent Li over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

Hi,

While testing suricata AF_XDP, I noticed I could not attach another XDP program to the interface that has AF_XDP program attached

for example, AF_XDP attached interface

root@r220:~# xdp-loader status
CURRENT XDP PROGRAM STATUS:

Interface        Prio  Program name      Mode     ID   Tag               Chain actions
--------------------------------------------------------------------------------------
lo                     <No XDP program loaded!>
enp1s0f0               <No XDP program loaded!>
enp1s0f1               <No XDP program loaded!>
eno1                   <No XDP program loaded!>
eno2                                     skb      38   03b13f331978c78c 

then if I use xdp-loader to attach another XDP program to eno2 interface, I got

#xdp-loader load eno2 -m skb ./xdp_pass.o

libxdp: Generating multi-prog dispatcher for 1 programs
libxdp: Existing program is not using a dispatcher, can't replace; unload first
Couldn't attach XDP program on iface 'eno2': Device or resource busy(-16)

it appears to me AF_XDP program should be able to co-exist with another XDP program if they are using libxdp XDP dispatcher.
it looks suricata AF_XDP is not setup to use dispatcher.

Actions #1

Updated by Vincent Li over 1 year ago

  • Tracker changed from Optimization to Bug
  • Subject changed from AF_XDP co-exist with other XDP program to Suricata AF_XDP not using libxdp XDP dispatcher and can't co-exist with another XDP program
Actions #2

Updated by Vincent Li over 1 year ago

  • Status changed from New to In Progress
  • Assignee changed from OISF Dev to Vincent Li
Actions #3

Updated by Vincent Li over 1 year ago

  • Status changed from In Progress to Closed

it looks my old libbpf version 0.7 installation might interfere with libxdp, and suricata could be using old libbpf to cause the issue, after re-install libbpf 1.x, re-install libxdp, re-install suricata, the issue is gone, and suricata AF_XDP is using xdp dispatcher. close the ticket

Actions

Also available in: Atom PDF