Enable rdma-sniffer for libpcap

Bug #2006557 reported by Amir Tzin
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libpcap (Debian)
Won't Fix
Unknown
libpcap (Ubuntu)
Fix Released
Wishlist
dann frazier
linux (Ubuntu)
Invalid
Undecided
Unassigned
Lunar
Invalid
Undecided
Unassigned

Bug Description

Hi,

The request is to build and configure stock package libpcap with rdma-sniffer enabled.
We'd like users of rdma devices to be able to sniff on them using stock tcpdump.
Currently when using default tcpdump It does not list rdma devices.

$ tcpdump -D |grep -i rdma
$

when using locally build tcpdump (with rdma enabled)
$ cd <tcpdump source folder>
$ ./tcpdump -D |grep -i rdma
24.rocep4s0 (RDMA sniffer)
25.rocep7s0f0 (RDMA sniffer)
26.rocep7s0f1 (RDMA sniffer)
27.rocep10s0f0 (RDMA sniffer)
28.rocep10s0f1 (RDMA sniffer)
29.rocep33s0f0 (RDMA sniffer)
30.rocep33s0f1 (RDMA sniffer)
31.rocep36s0f0 (RDMA sniffer)
32.ibp36s0f1 (RDMA sniffer)

Locally build steps:
clone sources:
$ mkdir tcpdumpbuild
$ cd tcpdumpbuild/
$ git clone https://github.com/the-tcpdump-group/tcpdump.git
$ git clone https://github.com/the-tcpdump-group/libpcap.git

install required packages (including rdma packages so libpcap is built with rdma enabled):
$ apt install flex bison librdmacm-dev librdmacm1 rdma-core rdmacm-utils
configure and build
$ cd libpcap
$ ./autogen.sh
$ ./configure --enable-rdma=yes
$ make
cd ../tcpdump/
./autogen.sh
./configure
$ make

now ./tcpdump -D can show rdma devices.

Thanks !

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 2006557

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
dann frazier (dannf)
Changed in linux (Ubuntu):
status: Incomplete → Invalid
summary: - [focal, jammy]Enable rdma-sniffer for libpcap
+ Enable rdma-sniffer for libpcap
dann frazier (dannf)
no longer affects: libpcap (Ubuntu Bionic)
no longer affects: linux (Ubuntu Bionic)
no longer affects: linux (Ubuntu Focal)
no longer affects: linux (Ubuntu Jammy)
no longer affects: linux (Ubuntu Kinetic)
Revision history for this message
Paride Legovini (paride) wrote :

Hello Amir and thanks for this bug report. Dann identified a fix and forwarded it to Debian [1]. It is best if the change lands in Debian so Debian and other downstream distros will also benefit for the change, and Ubuntu developers won't have to maintain a delta.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1030898

Changed in libpcap (Ubuntu Lunar):
status: New → Triaged
importance: Undecided → Low
Changed in libpcap (Debian):
status: Unknown → Won't Fix
Paride Legovini (paride)
no longer affects: libpcap (Ubuntu Focal)
no longer affects: libpcap (Ubuntu Jammy)
no longer affects: libpcap (Ubuntu Kinetic)
no longer affects: libpcap (Ubuntu Lunar)
Changed in libpcap (Ubuntu):
importance: Low → Wishlist
Revision history for this message
Paride Legovini (paride) wrote :

Apparently the libpcap Debian maintainer rejected adding the new libibverbs dependency:

> So far I've resisted adding extra binary dependencies to
> libpcap and this seems like a very specialized use case.

We could in principle add the dependency via an Ubuntu delta (the library is in main), but given that the package is currently a sync I believe that we need a use case that is compelling enough to justify the increased maintenance that comes with carrying a delta.

@Amir: can you please elaborate a bit more on the use case for which you need rdma sniffing? Is the feature going to be generally useful?

Once we get a better picture on why the feature is useful, I suggest trying once again to get it enabled in Debian by providing additional information to the Debian maintainer (the linked Debian bug doesn't explain much).

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

I am setting this one to incomplete until Amir provides the information requested by Paride. After doing so, please, set this bug status back to new.

Changed in libpcap (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Chris Moore (cmoore4) wrote :

This is functionality is going to be important for our customers. RDMA / RoCE are used extensively in our clusters, and we're going to run into more cases where people need to be able to trace the RDMA traffic. There are other tools in Ubuntu to manage OFED devices and RDMA, so RDMA support is there in general, but this one piece is missing. In short, tcpdump is intended to capture a variety of traffic protocols, and RDMA is one of those protocols which is seeing increased use.

Apparently Fedora has already created an RDMA enabled libpcap. A container based on fedora:latest is able to capture RDMA traffic with tcpdump. Is there maybe something there that could be leveraged?

tags: added: server-triage-discuss
tags: removed: server-triage-discuss
Changed in libpcap (Ubuntu):
status: Incomplete → Triaged
dann frazier (dannf)
Changed in libpcap (Ubuntu):
assignee: nobody → dann frazier (dannf)
status: Triaged → In Progress
Jeremy Bícha (jbicha)
Changed in libpcap (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libpcap - 1.10.4-4ubuntu3

---------------
libpcap (1.10.4-4ubuntu3) noble; urgency=medium

  * Don't require ibverbs on i386

 -- Jeremy Bícha <email address hidden> Fri, 02 Feb 2024 16:41:24 -0500

Changed in libpcap (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.