Mellanox / rdmamap

RDMA library for mapping associate netdevice and character devices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

License Go Report Card Build Status Coverage Status

rdmamap

This is golang package that provides map of rdma device with its character and network devices.

It uses sysfs and netlink interfaces provided by kernel to perform this mapping.

Local build and test

You can use go get command:

go get github.com/Mellanox/rdmamap

Example:

package main

import (
    "fmt"
    "github.com/Mellanox/rdmamap"
)

func main() {
	rdmaDevices := rdmamap.GetRdmaDeviceList()
	fmt.Println("Devices: ", rdmaDevices)
  
	for _, dev := range rdmaDevices {
		charDevices := rdmamap.GetRdmaCharDevices(dev)
		fmt.Printf("Rdma device: = %s", dev)
		fmt.Println(" Char devices: = ", charDevices)
	}
}

About

RDMA library for mapping associate netdevice and character devices

License:Apache License 2.0


Languages

Language:Go 86.8%Language:Makefile 13.2%