mbox series

[0/3] Add the support of tun to RXE

Message ID 20250119172831.3123110-1-yanjun.zhu@linux.dev (mailing list archive)
Headers show
Series Add the support of tun to RXE | expand

Message

Zhu Yanjun Jan. 19, 2025, 5:28 p.m. UTC
Currently the tun device can work well with SIW while it can not work well
with SoftROCE.

The RXE device can be attached to the tun device with the command "rdma
link add ...". But when running rping command over this RXE device, some
error will occur.

The following bash script can verify this patch series.

"
ip tuntap add mode tun tun0
ip -4 a
ip addr add 1.1.1.1/24 dev tun0
ip link set tun0 up
ip -4 a
rdma link add rxe0 type rxe netdev tun0
rdma link
rping -s -a 1.1.1.1&
dmesg -c
rping -c -a 1.1.1.1 -d -v -C 3
rdma link del rxe0
rdma link
ip addr del 1.1.1.1/24 dev tun0
ip tuntap del mode tun tun0
modprobe -v -r tun
"

In the above script, a tun device is added and an ip address is configured
on it. Then a RXE device is attached to this tun device. A rping test is
executed with this RXE device. It should be successful with this patchset.
Finally all the RXE device and tun device should be released after the
rping command is executed.

Without this patch series, when running "rping -c -a ..." command, the
following errors will appear.

"
...
created cm_id 0x556b45faf2a0
cma_event type RDMA_CM_EVENT_ADDR_ERROR cma_id 0x556b45faf2a0 (parent)
cma event RDMA_CM_EVENT_ADDR_ERROR, error -19
waiting for addr/route resolution state 1
destroy cm_id 0x556b45faf2a0
"

Zhu Yanjun (3):
  RDMA/rxe: Replace netdev dev addr with raw_gid
  RDMA/rxe: Add query_gid support
  RDMA/rxe: Make rping work with tun device

 drivers/infiniband/core/cma.c         | 24 +++++++++++++++++++-----
 drivers/infiniband/sw/rxe/rxe.c       | 15 +++++++++++++--
 drivers/infiniband/sw/rxe/rxe_verbs.c | 15 ++++++++++++++-
 drivers/infiniband/sw/rxe/rxe_verbs.h |  4 +++-
 4 files changed, 49 insertions(+), 9 deletions(-)