Documentation ¶
Index ¶
- Constants
- type Params
- type Ring
- func (r *Ring) BindToPipelineInputPort(pl *pipeline.Pipeline, portID int, rxq uint16, bsz uint) error
- func (r *Ring) BindToPipelineOutputPort(pl *pipeline.Pipeline, portID int, txq uint16, bsz uint) error
- func (r *Ring) Free() error
- func (r *Ring) Init(name string, params *Params, clean func()) error
- func (r *Ring) Ring() unsafe.Pointer
- func (r *Ring) Size() uint
- type SwxPortRingParams
Constants ¶
View Source
const ( // SingleConsumer specifies that default dequeue operation will exhibit 'single-consumer' behaviour. SingleConsumer uint = C.RING_F_SC_DEQ // SingleProducer specifies that default enqueue operation will exhibit 'single-producer' behaviour. SingleProducer = C.RING_F_SP_ENQ // ExactSize specifies how to handle ring size during Create/Init. Ring is to hold exactly requested number of // entries. Without this flag set, the ring size requested must be a power of 2, and the usable space will be that // size - 1. With the flag, the requested size will be rounded up to the next power of two, but the usable space will // be exactly that requested. Worst case, if a power-of-2 size is requested, half the ring space will be wasted. ExactSize = C.RING_F_EXACT_SZ )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ring ¶
Ring represents a Ring device
func Lookup ¶
Lookup searches a ring from its name in RTE_TAILQ_RING, i.e. among those created with rte_ring_create. Returns a partly initialized ring object
func (*Ring) BindToPipelineInputPort ¶
func (r *Ring) BindToPipelineInputPort(pl *pipeline.Pipeline, portID int, rxq uint16, bsz uint) error
bind to given pipeline input port index. A ring has 1 queue so only queue number 0 is valid.
func (*Ring) BindToPipelineOutputPort ¶
func (r *Ring) BindToPipelineOutputPort(pl *pipeline.Pipeline, portID int, txq uint16, bsz uint) error
bind to given pipeline output port index. A ring has 1 queue so only queue number 0 is valid.
func (*Ring) Free ¶
Free deletes the current Ring record and calls the clean callback function given at init
type SwxPortRingParams ¶
type SwxPortRingParams struct {
// contains filtered or unexported fields
}
func (*SwxPortRingParams) FreeParams ¶
func (e *SwxPortRingParams) FreeParams()
func (*SwxPortRingParams) GetReaderParams ¶
func (e *SwxPortRingParams) GetReaderParams() unsafe.Pointer
func (*SwxPortRingParams) GetWriterParams ¶
func (e *SwxPortRingParams) GetWriterParams() unsafe.Pointer
func (*SwxPortRingParams) PortName ¶
func (e *SwxPortRingParams) PortName() string
func (*SwxPortRingParams) PortType ¶
func (e *SwxPortRingParams) PortType() string
Click to show internal directories.
Click to hide internal directories.