iPXE
|
Xen netfront driver. More...
Go to the source code of this file.
Data Structures | |
struct | netfront_ring |
A netfront descriptor ring. More... | |
struct | netfront_nic |
A netfront NIC. More... | |
Macros | |
#define | NETFRONT_NUM_TX_DESC 16 |
Number of transmit ring entries. More... | |
#define | NETFRONT_NUM_RX_DESC 32 |
Number of receive ring entries. More... | |
#define | NETFRONT_RX_FILL 18 |
Receive ring fill level. More... | |
#define | tx_sring tx.sring.tx |
Transmit shared ring field. More... | |
#define | rx_sring rx.sring.rx |
Receive shared ring field. More... | |
Enumerations | |
enum | netfront_ref_index { NETFRONT_REF_TX_RING = 0, NETFRONT_REF_TX_BASE, NETFRONT_REF_RX_RING = ( NETFRONT_REF_TX_BASE + NETFRONT_NUM_TX_DESC ), NETFRONT_REF_RX_BASE, NETFRONT_REF_COUNT = ( NETFRONT_REF_RX_BASE + NETFRONT_NUM_RX_DESC ) } |
Grant reference indices. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static | __attribute__ ((always_inline)) void netfront_init_ring(struct netfront_ring *ring |
Initialise descriptor ring. More... | |
Variables | |
static const char * | ref_key |
static const char grant_ref_t | ref = ref |
static const char grant_ref_t unsigned int | count = count |
static const char grant_ref_t unsigned int struct io_buffer ** | iobufs = iobufs |
static const char grant_ref_t unsigned int struct io_buffer grant_ref_t * | refs = refs |
static const char grant_ref_t unsigned int struct io_buffer grant_ref_t uint8_t * | ids |
Xen netfront driver.
Definition in file netfront.h.
#define NETFRONT_NUM_TX_DESC 16 |
Number of transmit ring entries.
Definition at line 16 of file netfront.h.
#define NETFRONT_NUM_RX_DESC 32 |
Number of receive ring entries.
Definition at line 19 of file netfront.h.
#define NETFRONT_RX_FILL 18 |
Receive ring fill level.
The xen-netback driver from kernels 3.18 to 4.2 inclusive have a bug (CA-163395) which prevents packet reception if fewer than 18 receive descriptors are available. This was fixed in upstream kernel commit d5d4852 ("xen-netback: require fewer guest Rx slots when not using GSO").
We provide 18 receive descriptors to avoid unpleasant silent failures on these kernel versions.
Definition at line 32 of file netfront.h.
#define tx_sring tx.sring.tx |
Transmit shared ring field.
Definition at line 192 of file netfront.h.
#define rx_sring rx.sring.rx |
Receive shared ring field.
Definition at line 195 of file netfront.h.
enum netfront_ref_index |
Grant reference indices.
Definition at line 35 of file netfront.h.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
inlinestatic |
Initialise descriptor ring.
Check whether or not descriptor ring is empty.
Check whether or not descriptor ring is full.
Calculate descriptor ring remaining space.
Calculate descriptor ring fill level.
ring | Descriptor ring |
ref_key | Shared ring grant reference key |
ref | Shared ring grant reference |
count | Maxium number of used descriptors |
iobufs | I/O buffers |
refs | I/O buffer grant references |
ids | Buffer IDs |
ring | Descriptor ring |
fill | Fill level |
ring | Descriptor ring |
space | Number of unused entries |
ring | Descriptor ring |
is_full | Ring is full |
ring | Descriptor ring |
is_empty | Ring is empty |
Definition at line 110 of file netfront.h.
References assert(), count, netfront_ring::id_cons, and netfront_ring::id_prod.
const char* ref_key |
Definition at line 91 of file netfront.h.
static grant_ref_t ref = ref |
Definition at line 91 of file netfront.h.
Referenced by netfront_push(), xengrant_alloc(), and xengrant_free().
ring count = count |
Definition at line 91 of file netfront.h.
Referenced by __attribute__().
ring iobufs = iobufs |
Definition at line 93 of file netfront.h.
ring refs = refs |
Definition at line 93 of file netfront.h.
Referenced by xengrant_alloc(), and xengrant_free().
ring ids |
Definition at line 94 of file netfront.h.