16 #define NETFRONT_NUM_TX_DESC 16 19 #define NETFRONT_NUM_RX_DESC 32 32 #define NETFRONT_RX_FILL 18 112 unsigned int fill_level;
128 return ( ring->
count - netfront_ring_fill ( ring ) );
140 return ( netfront_ring_fill ( ring ) >= ring->
count );
152 return ( netfront_ring_fill ( ring ) == 0 );
192 #define tx_sring tx.sring.tx 195 #define rx_sring rx.sring.rx struct net_device * netdev
Network device.
netif_rx_sring_t * rx
Receive shared ring.
const char * ref_key
Shared ring grant reference key.
unsigned int id_cons
Buffer ID ring consumer counter.
struct list_head rx_partial
Partial receive I/O buffer list.
grant_ref_t ref
Shared ring grant reference.
static const char * ref_key
static const char grant_ref_t unsigned int struct io_buffer grant_ref_t uint8_t * ids
struct io_buffer * rx_iobufs[NETFRONT_NUM_RX_DESC]
Receive I/O buffers.
netfront_ref_index
Grant reference indices.
Total number of grant references required.
uint8_t rx_ids[NETFRONT_NUM_RX_DESC]
Receive I/O buffer IDs.
A doubly-linked list entry (or list head)
#define NETFRONT_NUM_TX_DESC
Number of transmit ring entries.
struct evtchn_send event
Event channel.
grant_ref_t * refs
Grant references, indexed by buffer ID.
union netfront_ring::@86 sring
Shared ring.
#define NETFRONT_NUM_RX_DESC
Number of receive ring entries.
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
Receive ring grant reference index.
Receive descriptor grant reference base index.
uint8_t * ids
Buffer ID ring.
size_t count
Maximum number of used descriptors.
static const char grant_ref_t unsigned int struct io_buffer grant_ref_t * refs
netif_tx_sring_t * tx
Transmit shared ring.
struct io_buffer * tx_iobufs[NETFRONT_NUM_TX_DESC]
Transmit I/O buffers.
static const char grant_ref_t unsigned int struct io_buffer ** iobufs
Transmit descriptor grant reference base index.
grant_ref_t refs[NETFRONT_REF_COUNT]
Grant references.
static const char grant_ref_t unsigned int count
static __attribute__((always_inline)) void netfront_init_ring(struct netfront_ring *ring
Initialise descriptor ring.
uint8_t tx_ids[NETFRONT_NUM_TX_DESC]
Transmit I/O buffer IDs.
A netfront descriptor ring.
struct io_buffer ** iobufs
I/O buffers, indexed by buffer ID.
struct netfront_ring rx
Receive ring.
netif_tx_front_ring_t tx_fring
Transmit front ring.
unsigned int id_prod
Buffer ID ring producer counter.
struct list_head list
List of netfront NICs.
netif_rx_front_ring_t rx_fring
Receive front ring.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
static const char grant_ref_t ref
struct xen_device * xendev
Xen device.
struct netfront_ring tx
Transmit ring.
Transmit ring grant reference index.