I'm trying to load my first eBPF program to the XDP hook, but can't use DRV_MODE.
To be more specific, I'm using
Ubuntu 20.04 LTS (GNU/Linux 5.4.0-100-generic x86_64), with a NIC
ca:00.0 Ethernet controller: Mellanox Technologies MT2892 Family [ConnectX-6 Dx]. And I updated the driver to the latest version:
driver: mlx5_core version: 5.6-2.0.9 firmware-version: 22.32.2004 (DEL0000000027) expansion-rom-version: bus-info: 0000:ca:00.0 supports-statistics: yes supports-test: yes supports-eeprom-access: no supports-register-dump: no supports-priv-flags: yes
But I still can't load the program in driver mode.
bpf_set_link_xdp_fd(ifindex, prog_fd, XDP_FLAGS_UPDATE_IF_NOEXIST | XDP_FLAGS_DRV_MODE).
I'm stuck here, and can't find messages about whether this Mellanox driver support XDP native mode or not(actually the NIC is pretty good I think it should support XDP native mode).
Can anyone give me some guidance that may sort me out?