Documentation
¶
Overview ¶
Package rdmanl provides a client for RDMA netlink (NETLINK_RDMA) in pure Go.
Index ¶
- type BindQPReq
- type CMID
- type CMIDReq
- type CQ
- type CQReq
- type Chardev
- type ChardevReq
- type Config
- type Conn
- func (c *Conn) BindQP(req BindQPReq) (uint32, error)
- func (c *Conn) CMID(req CMIDReq) (CMID, error)
- func (c *Conn) CMIDs(req CMIDReq) ([]CMID, error)
- func (c *Conn) CQ(req CQReq) (CQ, error)
- func (c *Conn) CQs(req CQReq) ([]CQ, error)
- func (c *Conn) Chardev(req ChardevReq) (Chardev, error)
- func (c *Conn) Close() error
- func (c *Conn) Context(req ContextReq) (Context, error)
- func (c *Conn) Contexts(req ContextReq) ([]Context, error)
- func (c *Conn) CounterMode(req CounterModeReq) (CounterConfig, error)
- func (c *Conn) CounterStatus(req CounterStatusReq) ([]CounterStatus, error)
- func (c *Conn) Counters(req CountersReq) ([]Counter, error)
- func (c *Conn) DelDev(req DelDevReq) error
- func (c *Conn) DelLink(req DelLinkReq) error
- func (c *Conn) Device(req DeviceReq) (Device, error)
- func (c *Conn) Devices() ([]Device, error)
- func (c *Conn) EnableCounters(req EnableCountersReq) error
- func (c *Conn) FRMRPools(req FRMRPoolsReq) ([]FRMRPool, error)
- func (c *Conn) MR(req MRReq) (MR, error)
- func (c *Conn) MRCounter(req MRCounterReq) (MRCounters, error)
- func (c *Conn) MRCounters(req MRCounterReq) ([]MRCounters, error)
- func (c *Conn) MRs(req MRReq) ([]MR, error)
- func (c *Conn) Monitor() (*Monitor, error)
- func (c *Conn) NewDev(req NewDevReq) error
- func (c *Conn) NewLink(req NewLinkReq) error
- func (c *Conn) PD(req PDReq) (PD, error)
- func (c *Conn) PDs(req PDReq) ([]PD, error)
- func (c *Conn) Port(req PortReq) (Port, error)
- func (c *Conn) Ports(req PortReq) ([]Port, error)
- func (c *Conn) QP(req QPReq) (QP, error)
- func (c *Conn) QPCounter(req QPCounterReq) (QPCounter, error)
- func (c *Conn) QPCounters(req QPCounterReq) ([]QPCounter, error)
- func (c *Conn) QPs(req QPReq) ([]QP, error)
- func (c *Conn) RawCQ(req CQReq) ([]byte, error)
- func (c *Conn) RawCQs(req CQReq) ([][]byte, error)
- func (c *Conn) RawMR(req MRReq) ([]byte, error)
- func (c *Conn) RawMRs(req MRReq) ([][]byte, error)
- func (c *Conn) RawQP(req QPReq) ([]byte, error)
- func (c *Conn) RawQPs(req QPReq) ([][]byte, error)
- func (c *Conn) RawSRQ(req SRQReq) ([]byte, error)
- func (c *Conn) RawSRQs(req SRQReq) ([][]byte, error)
- func (c *Conn) Rename(req RenameReq) error
- func (c *Conn) Resources(req ResourcesReq) ([]ResourceCount, error)
- func (c *Conn) SRQ(req SRQReq) (SRQ, error)
- func (c *Conn) SRQs(req SRQReq) ([]SRQ, error)
- func (c *Conn) SetAutoCounterMode(req SetAutoCounterModeReq) error
- func (c *Conn) SetDim(req SetDimReq) error
- func (c *Conn) SetFRMRAgingPeriod(req SetFRMRAgingPeriodReq) error
- func (c *Conn) SetFRMRPinnedHandles(req SetFRMRPinnedHandlesReq) error
- func (c *Conn) SetNetNS(req SetNetNSReq) error
- func (c *Conn) SetNetNSMode(req SetNetNSModeReq) error
- func (c *Conn) SetPrivilegedQKeyMode(req SetPrivilegedQKeyModeReq) error
- func (c *Conn) Sys() (Sys, error)
- func (c *Conn) UnbindQP(req UnbindQPReq) error
- type Context
- type ContextReq
- type Counter
- type CounterConfig
- type CounterMask
- type CounterMode
- type CounterModeReq
- type CounterStatus
- type CounterStatusReq
- type CountersReq
- type DelDevReq
- type DelLinkReq
- type DevType
- type Device
- type DeviceReq
- type Driver
- type EnableCountersReq
- type Event
- type EventType
- type FRMRKey
- type FRMRPool
- type FRMRPoolsReq
- type MR
- type MRCounterReq
- type MRCounters
- type MRReq
- type Monitor
- type NameAssignType
- type NewDevReq
- type NewLinkReq
- type PD
- type PDReq
- type Port
- type PortReq
- type PrintType
- type QP
- type QPCounter
- type QPCounterReq
- type QPRange
- type QPReq
- type RenameReq
- type ResourceCount
- type ResourcesReq
- type SRQ
- type SRQReq
- type SetAutoCounterModeReq
- type SetDimReq
- type SetFRMRAgingPeriodReq
- type SetFRMRPinnedHandlesReq
- type SetNetNSModeReq
- type SetNetNSReq
- type SetPrivilegedQKeyModeReq
- type Sys
- type UnbindQPReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BindQPReq ¶
A BindQPReq binds the QP LQPN of a port to the counter CounterID, or to a new counter if CounterID is nil.
type CMID ¶
type CMID struct {
// Port, or 0 until the ID is bound to one
Port uint32
ID uint32
// Port space, enum rdma_ucm_port_space, and state, enum rdma_cm_state
PortSpace uint32
State uint8
// Its QP, if it has one: number and type, enum ib_qp_type
QPN *uint32
QPType *uint8
// Source and destination addresses, for IPv4 and IPv6
Src netip.AddrPort
Dst netip.AddrPort
// Process of a user ID, or the module of a kernel ID
PID uint32
KernName string
Driver []Driver
}
A CMID is an RDMA CM ID.
type CMIDReq ¶
type CMIDReq struct {
DevIndex uint32
// The port: a filter for CMIDs, if not 0; required for CMID
PortIndex uint32
CMIDN uint32
// Whether to include RDMA CM IDs only drivers use
DriverDetails bool
}
A CMIDReq asks for the RDMA CM IDs of a device, or for one RDMA CM ID by its number: CMIDs uses DriverDetails, CMID uses CMIDN.
type CQ ¶
type CQ struct {
ID uint32
// Number of entries
CQE uint32
// Number of QPs and other objects using it
Users uint64
// Whether it uses adaptive moderation (DIM)
Dim bool
// How a kernel CQ is polled, enum ib_poll_context
PollCtx *uint8
// User context of a user CQ
CtxN *uint32
// Process of a user CQ, or the module of a kernel CQ
PID uint32
KernName string
Driver []Driver
}
A CQ is a completion queue.
type CQReq ¶
type CQReq struct {
DevIndex uint32
CQN uint32
// Whether to include CQs only drivers use
DriverDetails bool
}
A CQReq asks for the CQs of a device, or for one CQ by its number: CQs uses DriverDetails, CQ uses CQN.
type Chardev ¶
type Chardev struct {
// Name under /dev/infiniband, such as "uverbs0"
Name string
// ABI revision
ABI uint64
// Device number (dev_t)
Dev uint64
// Driver of the device, enum rdma_driver_id; only for "uverbs"
DriverID uint32
}
A Chardev is a character device of a device, such as its uverbs device.
type ChardevReq ¶
type ChardevReq struct {
DevIndex *uint32
// The port, from 1, or 0 for the device itself
PortIndex uint32
ChardevType string
}
A ChardevReq asks for the character device of the type ChardevType, such as "uverbs", "umad" or "rdma_cm": of the device DevIndex, of its port PortIndex, or of no device if DevIndex is nil.
type Config ¶
type Config struct {
// NetNS is the network namespace to operate in. If 0, the current
// network namespace is used.
NetNS int
}
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
A Conn is a connection to RDMA netlink.
func (*Conn) BindQP ¶
BindQP binds a QP to a counter and returns the counter's ID, like "rdma statistic qp bind".
func (*Conn) Chardev ¶
func (c *Conn) Chardev(req ChardevReq) (Chardev, error)
Chardev returns a character device.
func (*Conn) Context ¶
func (c *Conn) Context(req ContextReq) (Context, error)
Context returns a user context of a device.
func (*Conn) Contexts ¶
func (c *Conn) Contexts(req ContextReq) ([]Context, error)
Contexts returns the user contexts of a device, like "rdma resource show ctx".
func (*Conn) CounterMode ¶
func (c *Conn) CounterMode(req CounterModeReq) (CounterConfig, error)
CounterMode returns how the QPs of a port are bound to counters, like "rdma statistic qp mode".
func (*Conn) CounterStatus ¶
func (c *Conn) CounterStatus(req CounterStatusReq) ([]CounterStatus, error)
CounterStatus returns the status of the counters of a port, like "rdma statistic mode supported".
func (*Conn) Counters ¶
func (c *Conn) Counters(req CountersReq) ([]Counter, error)
Counters returns the counters of a port, like "rdma statistic show".
func (*Conn) DelLink ¶
func (c *Conn) DelLink(req DelLinkReq) error
DelLink deletes a software device, like "rdma link delete".
func (*Conn) EnableCounters ¶
func (c *Conn) EnableCounters(req EnableCountersReq) error
EnableCounters enables optional counters, like "rdma statistic set".
func (*Conn) FRMRPools ¶
func (c *Conn) FRMRPools(req FRMRPoolsReq) ([]FRMRPool, error)
FRMRPools returns the FRMR pools of a device.
func (*Conn) MRCounter ¶
func (c *Conn) MRCounter(req MRCounterReq) (MRCounters, error)
MRCounter returns the counters of an MR.
func (*Conn) MRCounters ¶
func (c *Conn) MRCounters(req MRCounterReq) ([]MRCounters, error)
MRCounters returns the counters of the MRs of a device, like "rdma statistic mr show".
func (*Conn) Monitor ¶
Monitor starts receiving events, on a socket of its own. No event after Monitor returns is missed.
func (*Conn) NewLink ¶
func (c *Conn) NewLink(req NewLinkReq) error
NewLink adds a software device, like "rdma link add".
func (*Conn) QPCounter ¶
func (c *Conn) QPCounter(req QPCounterReq) (QPCounter, error)
QPCounter returns a counter QPs are bound to.
func (*Conn) QPCounters ¶
func (c *Conn) QPCounters(req QPCounterReq) ([]QPCounter, error)
QPCounters returns the counters QPs of a device are bound to, like "rdma statistic qp show".
func (*Conn) RawCQs ¶
RawCQs returns the CQs of a device in the driver's format, for drivers that have one, such as mlx5.
func (*Conn) RawMRs ¶
RawMRs returns the MRs of a device in the driver's format, for drivers that have one, such as mlx5.
func (*Conn) RawQPs ¶
RawQPs returns the QPs of a device in the driver's format, for drivers that have one, such as mlx5.
func (*Conn) RawSRQs ¶
RawSRQs returns the SRQs of a device in the driver's format, for drivers that have one, such as mlx5.
func (*Conn) Resources ¶
func (c *Conn) Resources(req ResourcesReq) ([]ResourceCount, error)
Resources returns how many objects of each kind a device has, like "rdma resource show".
func (*Conn) SetAutoCounterMode ¶
func (c *Conn) SetAutoCounterMode(req SetAutoCounterModeReq) error
SetAutoCounterMode sets the automatic counter mode, like "rdma statistic qp set link auto".
func (*Conn) SetDim ¶
SetDim turns adaptive moderation on or off, like "rdma dev set adaptive-moderation".
func (*Conn) SetFRMRAgingPeriod ¶
func (c *Conn) SetFRMRAgingPeriod(req SetFRMRAgingPeriodReq) error
SetFRMRAgingPeriod sets the aging period of a device's FRMR pools.
func (*Conn) SetFRMRPinnedHandles ¶
func (c *Conn) SetFRMRPinnedHandles(req SetFRMRPinnedHandlesReq) error
SetFRMRPinnedHandles pins handles in an FRMR pool.
func (*Conn) SetNetNS ¶
func (c *Conn) SetNetNS(req SetNetNSReq) error
SetNetNS moves a device to another network namespace, like "rdma dev set netns". It needs the exclusive network namespace mode.
func (*Conn) SetNetNSMode ¶
func (c *Conn) SetNetNSMode(req SetNetNSModeReq) error
SetNetNSMode sets the network namespace mode, like "rdma system set netns".
func (*Conn) SetPrivilegedQKeyMode ¶
func (c *Conn) SetPrivilegedQKeyMode(req SetPrivilegedQKeyModeReq) error
SetPrivilegedQKeyMode sets the privileged Q_Key mode, like "rdma system set privileged-qkey".
func (*Conn) UnbindQP ¶
func (c *Conn) UnbindQP(req UnbindQPReq) error
UnbindQP unbinds a QP from a counter, like "rdma statistic qp unbind".
type ContextReq ¶
type ContextReq struct {
DevIndex uint32
CtxN uint32
// Whether to include user contexts only drivers use
DriverDetails bool
}
A ContextReq asks for the user contexts of a device, or for one user context by its number: Contexts uses DriverDetails, Context uses CtxN.
type CounterConfig ¶
type CounterConfig struct {
Mode CounterMode
// With CounterModeAuto: the criteria, and whether per-opcode counters
// are on
Mask CounterMask
Opcounters bool
}
A CounterConfig is how the QPs of a port are bound to counters.
type CounterMask ¶
type CounterMask uint32
CounterMask is the criteria by which CounterModeAuto groups QPs.
https://github.com/torvalds/linux/blob/v7.3/include/uapi/rdma/rdma_netlink.h#L649
const ( CounterMaskQPType CounterMask = 1 << 0 // RDMA_COUNTER_MASK_QP_TYPE CounterMaskPID CounterMask = 1 << 1 // RDMA_COUNTER_MASK_PID )
type CounterMode ¶
type CounterMode uint32
CounterMode is how QPs are bound to counters.
https://github.com/torvalds/linux/blob/v7.3/include/uapi/rdma/rdma_netlink.h#L624
const ( CounterModeNone CounterMode = 0 // RDMA_COUNTER_MODE_NONE CounterModeAuto CounterMode = 1 // RDMA_COUNTER_MODE_AUTO CounterModeManual CounterMode = 2 // RDMA_COUNTER_MODE_MANUAL )
type CounterModeReq ¶
A CounterModeReq asks how the QPs of a port are bound to counters.
type CounterStatus ¶
type CounterStatus struct {
Name string
// Index, for EnableCounters
Index uint32
Optional bool
Enabled bool
}
A CounterStatus tells whether a counter of a port is optional, and enabled.
type CounterStatusReq ¶
A CounterStatusReq asks which counters of a port are optional, and enabled.
type CountersReq ¶
A CountersReq asks for the counters of a port.
type DelLinkReq ¶
type DelLinkReq struct {
DevIndex uint32
}
A DelLinkReq deletes a software device.
type DevType ¶
type DevType uint8
DevType is the type of a sub-device.
https://github.com/torvalds/linux/blob/v7.3/include/uapi/rdma/rdma_netlink.h#L655
const ( // A sub-device for subnet management (QP0) of its parent. DevTypeSMI DevType = 1 // RDMA_DEVICE_TYPE_SMI )
type Device ¶
type Device struct {
Index uint32
// Name, such as "mlx5_0" or "rxe0"
Name string
// Number of ports; they are numbered from 1
Ports uint32
// Capabilities, enum ib_device_cap_flags
CapFlags uint64
// Firmware version, if the device has firmware
FWVersion string
// Node and system image GUIDs, in host byte order
NodeGUID uint64
SysImageGUID uint64
// Node type, enum rdma_node_type
NodeType uint8
// Whether CQs use adaptive moderation (DIM)
Dim bool
// Protocol, such as "ib", "roce", "iw" or "opa"
Protocol string
// Type and parent of a sub-device; zero for other devices
Type DevType
ParentName string
// How the device got its name
NameAssignType NameAssignType
}
A Device is an RDMA device.
type Driver ¶
type Driver struct {
Name string
PrintType *PrintType
String *string
S32 *int32
U32 *uint32
S64 *int64
U64 *uint64
}
A Driver is a driver-specific attribute of an object, such as the hardware number of an mlx5 QP: a name, and a value of one of the types.
https://github.com/torvalds/linux/blob/v7.3/include/uapi/rdma/rdma_netlink.h#L482
type EnableCountersReq ¶
An EnableCountersReq enables the optional counters of a port with the indices Indices, and disables the others. The kernel takes a list of indices, not of counters; an empty list disables them all.
type Event ¶
type Event struct {
Type EventType
// The device: for every event but EventNetdevRename
DevIndex uint32
DevName string
// The port and its netdev: for netdev events
Port uint32
NdevIndex uint32
NdevName string
}
An Event is a change to the devices of a network namespace.
type EventType ¶
type EventType uint8
EventType is the kind of a monitoring event.
https://github.com/torvalds/linux/blob/v7.3/include/uapi/rdma/rdma_netlink.h#L668
const ( EventRegister EventType = 0 // RDMA_REGISTER_EVENT: a device was added EventUnregister EventType = 1 // RDMA_UNREGISTER_EVENT: a device was removed EventNetdevAttach EventType = 2 // RDMA_NETDEV_ATTACH_EVENT: a netdev was attached to a port EventNetdevDetach EventType = 3 // RDMA_NETDEV_DETACH_EVENT: a netdev was detached from a port EventRename EventType = 4 // RDMA_RENAME_EVENT: a device was renamed EventNetdevRename EventType = 5 // RDMA_NETDEV_RENAME_EVENT: the netdev of a port was renamed )
type FRMRKey ¶
type FRMRKey struct {
ATS bool
AccessFlags uint32
VendorKey uint64
NumDMABlocks uint64
// Set for pools the kernel uses internally; it can't be set in
// SetFRMRPinnedHandles
KernelVendorKey uint64
}
An FRMRKey identifies a pool of fast-registration MRs: the kind of MRs it holds.
https://github.com/torvalds/linux/blob/v7.3/include/uapi/rdma/rdma_netlink.h#L596
type FRMRPool ¶
type FRMRPool struct {
Key FRMRKey
// Handles in the pool
QueueHandles uint32
// The most handles in use at once, and those in use now
MaxInUse uint64
InUse uint64
// Handles kept from aging out
PinnedHandles uint32
}
An FRMRPool is a pool of fast-registration MRs the kernel keeps for a device.
type FRMRPoolsReq ¶
type FRMRPoolsReq struct {
DevIndex uint32
// Whether to include the pools of keys only the kernel uses
DriverDetails bool
}
An FRMRPoolsReq asks for the FRMR pools of a device.
type MR ¶
type MR struct {
ID uint32
// Length in bytes
Length uint64
// Keys, for privileged connections (CAP_NET_ADMIN) only
RKey *uint32
LKey *uint32
// PD of a user MR
PDN *uint32
// Process of a user MR, or the module of a kernel MR
PID uint32
KernName string
Driver []Driver
}
An MR is a memory region.
type MRCounterReq ¶
type MRCounterReq struct {
DevIndex uint32
MRN uint32
// Whether to include MRs only drivers use
DriverDetails bool
}
An MRCounterReq asks for the counters of the MRs of a device, or of one MR: MRCounters uses DriverDetails, MRCounter uses MRN.
type MRCounters ¶
MRCounters are the counters of an MR, for drivers that count per MR.
type MRReq ¶
type MRReq struct {
DevIndex uint32
MRN uint32
// Whether to include MRs only drivers use
DriverDetails bool
}
An MRReq asks for the MRs of a device, or for one MR by its number: MRs uses DriverDetails, MR uses MRN.
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
A Monitor receives the events of the devices of a network namespace, like "rdma monitor".
type NameAssignType ¶
type NameAssignType uint8
NameAssignType tells how a device got its name.
https://github.com/torvalds/linux/blob/v7.3/include/uapi/rdma/rdma_netlink.h#L660
const ( NameAssignTypeUnknown NameAssignType = 0 // RDMA_NAME_ASSIGN_TYPE_UNKNOWN NameAssignTypeUser NameAssignType = 1 // RDMA_NAME_ASSIGN_TYPE_USER )
type NewDevReq ¶
A NewDevReq adds a sub-device named DevName of the type DevType to the device DevIndex.
type NewLinkReq ¶
A NewLinkReq adds a software device named DevName of the link type LinkType, such as "rxe" or "siw", on the netdev NdevName.
type PD ¶
type PD struct {
ID uint32
// Number of objects in it
Users uint64
// Keys, for privileged connections (CAP_NET_ADMIN) only
LocalDMALKey *uint32
UnsafeGlobalRKey *uint32
// User context of a user PD
CtxN *uint32
// Process of a user PD, or the module of a kernel PD
PID uint32
KernName string
Driver []Driver
}
A PD is a protection domain.
type PDReq ¶
type PDReq struct {
DevIndex uint32
PDN uint32
// Whether to include PDs only drivers use
DriverDetails bool
}
A PDReq asks for the PDs of a device, or for one PD by its number: PDs uses DriverDetails, PD uses PDN.
type Port ¶
type Port struct {
DevIndex uint32
DevName string
// Port number, from 1
Index uint32
// Logical and physical state, enum ib_port_state and
// ib_port_phys_state
State uint8
PhysState uint8
// Netdev of a RoCE or iWARP port, if it has one
NdevIndex uint32
NdevName string
// InfiniBand ports only: capabilities (CapabilityMask, then
// CapabilityMask2 above bit 32), subnet prefix in host byte order, LIDs
// and LID mask control
CapFlags uint64
SubnetPrefix uint64
LID uint32
SMLID uint32
LMC uint8
}
A Port is a port of a device.
type PortReq ¶
A PortReq asks for the ports of a device, or for one of them: Ports lists them all, Port uses PortIndex.
type PrintType ¶
type PrintType uint8
PrintType tells how to show the value of a Driver.
https://github.com/torvalds/linux/blob/v7.3/include/uapi/rdma/rdma_netlink.h#L318
type QP ¶
type QP struct {
// Port, or 0 until the QP is bound to one
Port uint32
QPN uint32
// Type and state, enum ib_qp_type and ib_qp_state
Type uint8
State uint8
// RC and UC QPs only: the remote QP number and the receive queue PSN
RemoteQPN *uint32
RQPSN *uint32
SQPSN uint32
// RC, UC and XRC QPs only: path migration state, enum ib_mig_state
PathMigState *uint8
// Subtype of a driver QP
Subtype string
// PD of a user QP
PDN *uint32
// Process of a user QP, or the module of a kernel QP
PID uint32
KernName string
Driver []Driver
}
A QP is a queue pair.
type QPCounter ¶
type QPCounter struct {
Port uint32
ID uint32
Mode CounterMode
// The QP type and process it counts, with CounterModeAuto
QPType *uint8
PID uint32
KernName string
// The QPs bound to it
QPs []uint32
Counters []Counter
}
A QPCounter is a counter QPs are bound to.
type QPCounterReq ¶
type QPCounterReq struct {
DevIndex uint32
// The port: a filter for QPCounters, if not 0; required for QPCounter
PortIndex uint32
CounterID uint32
// Whether to include counters only drivers use
DriverDetails bool
}
A QPCounterReq asks for the counters QPs of a device are bound to, or for one of them: QPCounters uses DriverDetails, QPCounter uses CounterID.
type QPReq ¶
type QPReq struct {
DevIndex uint32
// The port: a filter for QPs, if not 0; required for QP
PortIndex uint32
LQPN uint32
// Whether to include QPs only drivers use
DriverDetails bool
}
A QPReq asks for the QPs of a device, or for one QP by its number: QPs uses DriverDetails, QP uses LQPN.
type ResourceCount ¶
type ResourceCount struct {
// Kind, such as "qp", "cq", "mr" or "pd"
Name string
Curr uint64
// The most the device supports, or 0 if it has no limit
Max uint64
}
A ResourceCount is how many objects of one kind a device has.
type ResourcesReq ¶
type ResourcesReq struct {
DevIndex uint32
// Whether to count objects only drivers use
DriverDetails bool
}
A ResourcesReq asks how many objects of each kind a device has.
type SRQ ¶
type SRQ struct {
ID uint32
// Type, enum ib_srq_type
Type uint8
PDN uint32
// CQ of an XRC SRQ
CQN *uint32
// QPs using it, as ranges of QP numbers
QPs []QPRange
// Process of a user SRQ, or the module of a kernel SRQ
PID uint32
KernName string
Driver []Driver
}
An SRQ is a shared receive queue.
type SRQReq ¶
type SRQReq struct {
DevIndex uint32
SRQN uint32
// Whether to include SRQs only drivers use
DriverDetails bool
}
An SRQReq asks for the SRQs of a device, or for one SRQ by its number: SRQs uses DriverDetails, SRQ uses SRQN.
type SetAutoCounterModeReq ¶
type SetAutoCounterModeReq struct {
DevIndex uint32
PortIndex uint32
Mask CounterMask
Opcounters bool
}
A SetAutoCounterModeReq binds new QPs of a port to counters automatically: a counter for each group of QPs with the same criteria of Mask. A Mask of 0 stops it. Opcounters turns per-opcode counters on.
type SetFRMRAgingPeriodReq ¶
A SetFRMRAgingPeriodReq sets how many seconds an unused FRMR handle of a device stays in its pool.
type SetFRMRPinnedHandlesReq ¶
A SetFRMRPinnedHandlesReq keeps PinnedHandles handles of the pool of Key from aging out.
type SetNetNSModeReq ¶
type SetNetNSModeReq struct {
}
A SetNetNSModeReq sets whether devices are shared by all network namespaces, rather than each belonging to one.
type SetNetNSReq ¶
A SetNetNSReq moves a device to the network namespace of the file descriptor NetNSFD, and names it DevName there, unless DevName is empty.
type SetPrivilegedQKeyModeReq ¶
type SetPrivilegedQKeyModeReq struct {
PrivilegedQKey bool
}
A SetPrivilegedQKeyModeReq sets whether only privileged processes may use privileged Q_Keys.
type Sys ¶
type Sys struct {
// each belonging to one
NetNSShared bool
// Whether only privileged processes may use privileged Q_Keys
PrivilegedQKey bool
// Whether the kernel sends monitoring events (see Monitor)
Monitor bool
// Whether pinned memory is copied on fork, rather than shared
CopyOnFork bool
}
Sys is the settings of the RDMA subsystem.