Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/actions/install-soft-RoCE/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
runs:
using: "composite"
steps:
- run: |
KERNEL_VERSION=$(uname -r | cut -d '-' -f 1)
KERNEL_NAME="linux-${KERNEL_VERSION%'.0'}"
DOWNLOAD_LINK="https://cdn.kernel.org/pub/linux/kernel/v${KERNEL_VERSION%%.*}.x/${KERNEL_NAME}.tar.xz"
ETHERNET_CARD=$(ip link | awk -F ": " '$0 !~ "lo|vir|wl|^[^0-9]"{print $2;getline}' | head -1)
echo "kernel version is ${KERNEL_VERSION}, download link is ${DOWNLOAD_LINK}, ethernet card is ${ETHERNET_CARD}"
wget -q $DOWNLOAD_LINK -O /tmp/$KERNEL_NAME.tar.xz
tar xf /tmp/$KERNEL_NAME.tar.xz --directory=/tmp
RXE_PATH="/tmp/$KERNEL_NAME/drivers/infiniband/sw/rxe"
sed 's/$(CONFIG_RDMA_RXE)/m/g' $RXE_PATH/Makefile > $RXE_PATH/Kbuild
make -C /lib/modules/$(uname -r)/build M=$RXE_PATH modules -j
sudo modprobe ib_core
sudo modprobe rdma_ucm
sudo insmod $RXE_PATH/rdma_rxe.ko
sudo rdma link add rxe_0 type rxe netdev $ETHERNET_CARD
rdma link
shell: bash
Loading
Loading