Project

General

Profile

Optimization #3127

Unable to set XDP on 'ens2f0': Invalid argument (-22) - Mellanox cards and Intel cards with jumbo frames

Added by Srijan Nandi about 2 months ago. Updated about 2 months ago.

Status:
Assigned
Priority:
Normal
Assignee:
Target version:
Effort:
Difficulty:
Label:

Description

I am getting this error. I thought this was fixed.

xdp-mode: driver
xdp-filter-file: /etc/suricata/ebpf/xdp_filter.bpf

[20473] 26/8/2019 -- 19:33:58 - (suricata.c:1071) <Notice> (LogVersion) -- This is Suricata version 5.0.0-dev (f43584661 2019-08-23) running in SYSTEM mode

[20474] 26/8/2019 -- 19:33:58 - (runmode-af-packet.c:272) <Info> (ParseAFPConfig) -- AF_PACKET IPS mode activated ens2f0->ens2f1
[20474] 26/8/2019 -- 19:33:58 - (util-ebpf.c:465) <Info> (EBPFLoadFile) -- Successfully loaded eBPF file '/etc/suricata/ebpf/xdp_filter.bpf' on 'ens2f0'
[20474] 26/8/2019 -- 19:33:58 - (util-ebpf.c:492) <Error> (EBPFSetupXDP) -- [ERRCODE: SC_ERR_INVALID_VALUE(130)] - Unable to set XDP on 'ens2f0': Invalid argument (-22)

-=Srijan Nandi


Files

suricata.txt (33.6 KB) suricata.txt suricata yaml Srijan Nandi, 08/26/2019 01:50 PM

History

#1

Updated by Srijan Nandi about 2 months ago

Attached suricata.yaml file

#2

Updated by Srijan Nandi about 2 months ago

int err = bpf_set_link_xdp_fd(ifindex, fd, flags);
if (err != 0) {
char buf129;
libbpf_strerror(err, buf, sizeof(buf));
SCLogError(SC_ERR_INVALID_VALUE, "Unable to set XDP on '%s': %s (%d)",
iface, buf, err);
return -1;

#3

Updated by Srijan Nandi about 2 months ago

Removing mtu 9000 from /etc/network/interfaces, resolved the issue.

#4

Updated by Peter Manev about 2 months ago

I don't think XDP supports 9k jumbo frames - https://www.spinics.net/lists/xdp-newbies/msg00525.html

#5

Updated by Srijan Nandi about 2 months ago

Thank you, Peter.

#6

Updated by Victor Julien about 2 months ago

  • Tracker changed from Support to Optimization
  • Subject changed from Unable to set XDP on 'ens2f0': Invalid argument (-22) - Mellanox cards and Intel cards to Unable to set XDP on 'ens2f0': Invalid argument (-22) - Mellanox cards and Intel cards with jumbo frames
  • Status changed from New to Assigned
  • Assignee set to Eric Leblond
  • Priority changed from Urgent to Normal
  • Target version set to TBD

Eric Leblond, as we check the MTU we should be able to refuse to start in XDP mode in this case, right? With a helpful error message of course.

Also available in: Atom PDF