iovisor / bcc

BCC - Tools for BPF-based Linux IO analysis, networking, monitoring, and more
Apache License 2.0
20.36k stars 3.86k forks source link

Offload xdp_drop_count.py error #5051

Closed joaolopix closed 3 months ago

joaolopix commented 3 months ago

When trying to offload an ebpf xdp program to a Netronome SmartNIC a ctypes error is given. This can be seen when running xdp_drop_count.py:

error

This is also noted in: https://stackoverflow.com/questions/66628566/trying-to-load-xdp-on-nic-offloaded. However, no solution is provided. According to the merge: https://github.com/iovisor/bcc/pull/2502, this should not be the error given in case of the nic not supporting offload.

The issue is fixable by casting the device interface name to a const char pointer. This allows the programs to load correctly:

success