ib

package module
v0.0.0-...-60b286d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2015 License: Apache-2.0 Imports: 14 Imported by: 0

README

#ib

The ib package contains library functions to perform Infiniband communication in go in Linux.

Godocs

Dependencies: github.com/jsgilmore/mount github.com/jsgilmore/shm

Documentation

Index

Constants

View Source
const (
	IBV_ACCESS_LOCAL_WRITE  = C.IBV_ACCESS_LOCAL_WRITE
	IBV_ACCESS_REMOTE_WRITE = C.IBV_ACCESS_REMOTE_WRITE
)
View Source
const (
	POLLIN    = 0x1
	POLLPRI   = 0x2
	POLLOUT   = 0x4
	POLLRDHUP = 0x2000
	POLLERR   = 0x8
	POLLHUP   = 0x10
	POLLNVAL  = 0x20
)
View Source
const (
	RLIM_INFINITY     = -0x1
	RLIMIT_AS         = 0x9
	RLIMIT_CORE       = 0x4
	RLIMIT_CPU        = 0x0
	RLIMIT_DATA       = 0x2
	RLIMIT_FSIZE      = 0x1
	RLIMIT_MEMLOCK    = 0x8
	RLIMIT_MSGQUEUE   = 0xc
	RLIMIT_NICE       = 0xd
	RLIMIT_NOFILE     = 0x7
	RLIMIT_NPROC      = 0x6
	RLIMIT_RSS        = 0x5
	RLIMIT_RTPRIO     = 0xe
	RLIMIT_SIGPENDING = 0xb
	RLIMIT_STACK      = 0x3
)

Variables

This section is empty.

Functions

func CreateBuffers

func CreateBuffers() (messages []*MemoryRegion, meta *MemoryRegion)

func Initialize

func Initialize()

func InterfaceAddrs

func InterfaceAddrs() []net.Addr

func Poll

func Poll(fds []Pollfd, timeout int64) (n int, err error)

func SetupOptional

func SetupOptional() bool

Types

type Interface

type Interface struct {
	// contains filtered or unexported fields
}

func InterfaceForAddr

func InterfaceForAddr(addr net.Addr) *Interface

func (*Interface) Active

func (iface *Interface) Active() bool

func (*Interface) Lid

func (iface *Interface) Lid() uint16

func (*Interface) NewQueuePair

func (iface *Interface) NewQueuePair(cqe int) (QueuePair, error)

type MemoryRegion

type MemoryRegion struct {
	// contains filtered or unexported fields
}

func AllocateMemory

func AllocateMemory(size int) (*MemoryRegion, error)

func RegisterMemory

func RegisterMemory(buf []byte) (*MemoryRegion, error)

func (*MemoryRegion) Bytes

func (mr *MemoryRegion) Bytes() []byte

func (*MemoryRegion) Close

func (mr *MemoryRegion) Close() error

func (*MemoryRegion) Len

func (mr *MemoryRegion) Len() int

func (*MemoryRegion) Ptr

func (mr *MemoryRegion) Ptr() unsafe.Pointer

func (*MemoryRegion) RemoteKey

func (mr *MemoryRegion) RemoteKey(pd *C.struct_ibv_pd) uint32

func (*MemoryRegion) String

func (this *MemoryRegion) String() string

type Pollfd

type Pollfd struct {
	Fd      int32
	Events  int16
	Revents int16
}

type QPAttr

type QPAttr struct {
	// contains filtered or unexported fields
}

type QueuePair

type QueuePair interface {
	Qpn() uint32
	Psn() uint32
	Reset() error
	Init() error
	ReadyToReceive(destLid uint16, destQpn, destPsn uint32) error
	ReadyToSend() error
	Error() error
	Close() error
	PostSend(mr *MemoryRegion) error
	PostSendImm(imm uint32, mr *MemoryRegion) error
	PostReceive(mr *MemoryRegion) error
	PostWrite(mr *MemoryRegion, remoteAddr uint64, rkey uint32) error
	PostKeepalive() error
	Setup(destLid uint16, destQpn, destPsn uint32, messages []*MemoryRegion) error
	Poll(nsec int64) (*WorkCompletion, error)
	Query() *QPAttr
	Sending() bool
}

type RCConn

type RCConn struct {
	// contains filtered or unexported fields
}

func DialRC

func DialRC(laddr, raddr *net.TCPAddr) (*RCConn, error)

func NewRCConn

func NewRCConn(iface *Interface, qp QueuePair, timeout int64, keepalive bool) *RCConn

func NewRCConnFromNetConn

func NewRCConnFromNetConn(c net.Conn) (*RCConn, error)

func (*RCConn) Close

func (this *RCConn) Close() error

func (*RCConn) LocalAddr

func (c *RCConn) LocalAddr() net.Addr

func (*RCConn) Read

func (this *RCConn) Read(mr *MemoryRegion) error

Reading on both ends of the connection will not return an error.

func (*RCConn) ReadMeta

func (this *RCConn) ReadMeta(mr *MemoryRegion, meta []byte) error

func (*RCConn) ReadPooled

func (this *RCConn) ReadPooled(mrChan <-chan *MemoryRegion) (*MemoryRegion, error)

func (*RCConn) RemoteAddr

func (c *RCConn) RemoteAddr() net.Addr

func (*RCConn) SetTimeout

func (c *RCConn) SetTimeout(nsec int64)

func (*RCConn) Setup

func (c *RCConn) Setup(destLid uint16, destQpn, destPsn uint32) error

func (*RCConn) Write

func (this *RCConn) Write(mr *MemoryRegion) error

Writing on both ends of the connection will return an error.

func (*RCConn) WriteMeta

func (this *RCConn) WriteMeta(mr *MemoryRegion, meta []byte) error

func (*RCConn) WriteMetaStart

func (this *RCConn) WriteMetaStart() error

func (*RCConn) WriteTimeoutFatal

func (c *RCConn) WriteTimeoutFatal(v bool)

type RCListener

type RCListener struct {
	// contains filtered or unexported fields
}

func ListenRC

func ListenRC(laddr *net.TCPAddr) (*RCListener, error)

func (*RCListener) Accept

func (this *RCListener) Accept() (*RCConn, error)

func (*RCListener) Addr

func (this *RCListener) Addr() net.Addr

func (*RCListener) Close

func (this *RCListener) Close() error

type Rlimit

type Rlimit struct {
	Cur uint64
	Max uint64
}

func Getrlimit

func Getrlimit(resource int) (rlim Rlimit, err error)

type WorkCompletion

type WorkCompletion struct {
	// contains filtered or unexported fields
}

func (*WorkCompletion) ImmData

func (wc *WorkCompletion) ImmData() uint32

func (*WorkCompletion) Keepalive

func (wc *WorkCompletion) Keepalive() bool

func (*WorkCompletion) MemoryRegion

func (wc *WorkCompletion) MemoryRegion() *MemoryRegion

func (*WorkCompletion) Receive

func (wc *WorkCompletion) Receive() bool

func (*WorkCompletion) Send

func (wc *WorkCompletion) Send() bool

func (*WorkCompletion) String

func (wc *WorkCompletion) String() string

func (*WorkCompletion) Success

func (wc *WorkCompletion) Success() bool

func (*WorkCompletion) Write

func (wc *WorkCompletion) Write() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL