Skip to content

Commit ede6b77

Browse files
authored
Fix rdma UT (#3146)
1 parent 9934c39 commit ede6b77

File tree

2 files changed

+167
-94
lines changed

2 files changed

+167
-94
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
runs:
2+
using: "composite"
3+
steps:
4+
- run: |
5+
KERNEL_VERSION=$(uname -r | cut -d '-' -f 1)
6+
KERNEL_NAME="linux-${KERNEL_VERSION%'.0'}"
7+
DOWNLOAD_LINK="https://cdn.kernel.org/pub/linux/kernel/v${KERNEL_VERSION%%.*}.x/${KERNEL_NAME}.tar.xz"
8+
ETHERNET_CARD=$(ip link | awk -F ": " '$0 !~ "lo|vir|wl|^[^0-9]"{print $2;getline}' | head -1)
9+
echo "kernel version is ${KERNEL_VERSION}, download link is ${DOWNLOAD_LINK}, ethernet card is ${ETHERNET_CARD}"
10+
wget -q $DOWNLOAD_LINK -O /tmp/$KERNEL_NAME.tar.xz
11+
tar xf /tmp/$KERNEL_NAME.tar.xz --directory=/tmp
12+
RXE_PATH="/tmp/$KERNEL_NAME/drivers/infiniband/sw/rxe"
13+
sed 's/$(CONFIG_RDMA_RXE)/m/g' $RXE_PATH/Makefile > $RXE_PATH/Kbuild
14+
make -C /lib/modules/$(uname -r)/build M=$RXE_PATH modules -j
15+
sudo modprobe ib_core
16+
sudo modprobe rdma_ucm
17+
sudo insmod $RXE_PATH/rdma_rxe.ko
18+
sudo rdma link add rxe_0 type rxe netdev $ETHERNET_CARD
19+
rdma link
20+
shell: bash

0 commit comments

Comments
 (0)