Documentation ¶
Overview ¶
Package device provides an interface for interacting with DSA/IAA devices.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompletionRecordHeader ¶
type CompletionRecordHeader struct { ComplexStatus uint8 // Status. ErrorCode uint8 // ErrorCode. Rsvd uint16 // Reserved. BytesCompleted uint32 // Bytes completed. }
CompletionRecordHeader represents the completion record header.
func (*CompletionRecordHeader) Status ¶
func (c *CompletionRecordHeader) Status() uint8
Status return header's status
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context represents the context of the device.
func CreateContext ¶
func CreateContext(typ config.DeviceType) *Context
CreateContext creates a new context instance given the device type.
func (*Context) MaxTransferSize ¶
MaxTransferSize is the max transfer size supported by device.
func (*Context) SetMaxTransferSize ¶
SetMaxTransferSize set the maxTransferSize, the method only used for test.
func (*Context) Submit ¶
func (c *Context) Submit(desc uintptr, comp *CompletionRecordHeader) uint8
Submit submits a new request with the given descriptor and completion record header.
func (*Context) SubmitBusyPoll ¶
func (c *Context) SubmitBusyPoll(desc uintptr, comp *CompletionRecordHeader) uint8
SubmitBusyPoll submits a new quick request with the given descriptor and completion record header. This method may cause higher CPU cost.