Documentation
¶
Overview ¶
Package cryptodev contains bindings of DPDK crypto device.
Index ¶
- Constants
- type Config
- type CryptoDev
- type Op
- type OpStatus
- type OpVector
- type QueuePair
- func (qp *QueuePair) CopyToC(ptr unsafe.Pointer)
- func (qp *QueuePair) DequeueBurst(ops OpVector) int
- func (qp *QueuePair) Dev() *CryptoDev
- func (qp *QueuePair) EnqueueBurst(ops OpVector) int
- func (qp *QueuePair) ID() int
- func (qp *QueuePair) PrepareSha256(op *Op, m *pktmbuf.Packet, offset, length int, output unsafe.Pointer)
- type VDevConfig
Constants ¶
const ( OpStatusNew = C.RTE_CRYPTO_OP_STATUS_NOT_PROCESSED OpStatusSuccess = C.RTE_CRYPTO_OP_STATUS_SUCCESS )
OpStatus values.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CryptoDev ¶
type CryptoDev struct {
// contains filtered or unexported fields
}
CryptoDev represents a crypto device.
func CreateVDev ¶
func CreateVDev(cfg VDevConfig) (cd *CryptoDev, e error)
CreateVDev creates a virtual crypto device.
func (*CryptoDev) QueuePairs ¶
QueuePairs returns a list of queue pair.
type Op ¶
type Op struct {
// contains filtered or unexported fields
}
Op represents a crypto operation.
type OpStatus ¶
type OpStatus C.enum_rte_crypto_op_status
OpStatus indicates crypto operation status.
type QueuePair ¶
type QueuePair struct {
// contains filtered or unexported fields
}
QueuePair represents a crypto device queue pair.
func (*QueuePair) DequeueBurst ¶
DequeueBurst retrieves a burst of completed crypto operations.
func (*QueuePair) EnqueueBurst ¶
EnqueueBurst submits a burst of crypto operations.
func (*QueuePair) PrepareSha256 ¶
func (qp *QueuePair) PrepareSha256(op *Op, m *pktmbuf.Packet, offset, length int, output unsafe.Pointer)
PrepareSha256 prepares a SHA256 digest generation operation.
m[offset:offset+length] is the input to SHA256 digest function. output must have 32 bytes in C memory.
type VDevConfig ¶
type VDevConfig struct { Config // Socket is the preferred NUMA socket. Socket eal.NumaSocket // Drivers contains preferred drivers. Default is openssl. Drivers []string }
VDevConfig configures a virtual crypto device.