FEMU  原版 master 7e238cc
FEMU: Accurate, Scalable and Extensible NVMe SSD Emulator (FAST'18)
rte_ring结构体 参考

#include <rte_ring.h>

rte_ring 的协作图:

成员变量

char name [RTE_NAMESIZE]
 
int flags
 
uint32_t size
 
uint32_t mask
 
uint32_t capacity
 
struct rte_ring_headtail prod
 
struct rte_ring_headtail cons
 

详细描述

An RTE ring structure.

The producer and the consumer have a head and a tail index. The particularity of these index is that they are not between 0 and size(ring). These indexes are between 0 and 2^32, and we mask their value when we access the ring[] field. Thanks to this assumption, we can do subtractions between 2 index values in a modulo-32bit base: that's why the overflow of the indexes is not a problem.

结构体成员变量说明

◆ capacity

uint32_t rte_ring::capacity

Usable size of ring

◆ cons

struct rte_ring_headtail rte_ring::cons

Ring consumer status.

◆ flags

int rte_ring::flags

Flags supplied at creation. Memzone, if any, containing the rte_ring

◆ mask

uint32_t rte_ring::mask

Mask (size-1) of ring.

◆ name

char rte_ring::name[RTE_NAMESIZE]

◆ prod

struct rte_ring_headtail rte_ring::prod

Ring producer status.

◆ size

uint32_t rte_ring::size

Size of ring.


该结构体的文档由以下文件生成: