Mariano,
I too have been running into the same error as you. While Samer’s statement about removing the Offload Traffic Sniffer holds true (meaning you can’t enable or disable the sniffer through ethtool anymore), RMDA sniffer support was introduced into libpcap version 1.9.0 or newer and shouldn’t rely on that. My question to you is are you using the Ubuntu distribution’s repo tcpdump package or have you installed them from somewhere else manually?
In my scenario, I am using a similar config to you, except I am using Ubuntu 20.04 and the following tcpdump --version:
tcpdump version 4.9.3
libpcap version 1.9.1 (with TPACKET_V3)
OpenSSL 1.1.1f 31 Mar 2020
I get the same output:
user@remote2:/mnt/nfsrdma$ sudo tcpdump -i mlx5_1
tcpdump: mlx5_1: No such device exists
(SIOCGIFHWADDR: No such device)
What is making me scratch my head is when I download the exact same versions in source code form from the tcpdump.org site (tcpdump 4.9.3 and libpcap 1.9.1), compile them, then ‘make install’ them, it works just fine:
user@remote2:/mnt/nfsrdma$ sudo tcpdump -i mlx5_1
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on mlx5_1, link-type EN10MB (Ethernet), capture size 262144 bytes
Note: if you don’t ‘apt remove tcpdump libpcap0.8’ your path may still be pointing to the distro install. The compiled install path is /usr/local/sbin/.
The only thing that I can think of is that the OFED install provided the Mellanox specific hw support information that was pulled into the compile process, which the distro package does not natively include. I would prefer to have a recommendation to my customers that doesn’t include compiling code, so if anyone else finds and shares an easier package manager alternative to compiling code I would appreciate it!