Mellanox / rshim-user-space

Linux based user-space RSHIM driver for the Mellanox BlueField SoC
Other
24 stars 17 forks source link
bluefield
              BlueField Rshim Host Driver

The rshim driver provides a way to access the rshim resources on the BlueField target from external host machine. The current version implements device files for boot image push and virtual console access. It also creates virtual network interface to connect to the BlueField target and provides a way to access the internal rshim registers.

*) Build

Linux:

Make sure autoconf/automake/pkg-config tools are available. Run bootstrap.sh for the first time to generate the configure file. Then run the ./configure script followed by make & make install to build and install it.

FreeBSD:

Require FreeBSD 12.0+ with packages autoconf, automake, gmake, libepoll-shim, libpciaccess, libpci, pkgconf.

Follow the same steps above to build it. Use 'gmake install' to install it.

*) Usage

rshim -h syntax: rshim [--help|-h] [--backend|-b usb|pcie|pcie_lf] [--device|-d device-name] [--foreground|-f] [--debug-level|-l <0~4>]

*) Device Files

Each rshim target will create a directory /dev/rshim\<N>/ with the following device files. \<N> is the device id, which could be 0, 1, etc.

*) Multiple Boards Support

Multiple boards could connect to the same host machine. Each of them has its own device directory /dev/rshim/. Network subnet needs to be set properly just like any other standard NIC.

*) How to change the MAC address of the ARM side interface

Update the 'PEER_MAC' attribute in the misc file like below. Display the value to confirm it's set. Reboot the device to take effect.

echo "PEER_MAC 00:1a:ca:ff:ff:10" > /dev/rshim\<N\>/misc