Optimization #3127
openUnable to set XDP on 'ens2f0': Invalid argument (-22) - Mellanox cards and Intel cards with jumbo frames
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
Updated by Srijan Nandi over 5 years ago
- File suricata.txt suricata.txt added
Attached suricata.yaml file
Updated by Srijan Nandi over 5 years ago
int err = bpf_set_link_xdp_fd(ifindex, fd, flags);
if (err != 0) {
char buf[129];
libbpf_strerror(err, buf, sizeof(buf));
SCLogError(SC_ERR_INVALID_VALUE, "Unable to set XDP on '%s': %s (%d)",
iface, buf, err);
return -1;
Updated by Srijan Nandi over 5 years ago
Removing mtu 9000 from /etc/network/interfaces, resolved the issue.
Updated by Peter Manev over 5 years ago
I don't think XDP supports 9k jumbo frames - https://www.spinics.net/lists/xdp-newbies/msg00525.html
Updated by Victor Julien over 5 years 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.
Updated by Victor Julien about 2 years ago
- Status changed from Assigned to New
- Assignee changed from Eric Leblond to Community Ticket