|
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. | |
| #define | NETFRONT_NUM_RX_DESC 32 |
| Number of receive ring entries. | |
| #define | NETFRONT_RX_FILL 18 |
| Receive ring fill level. | |
| #define | tx_sring tx.sring.tx |
| Transmit shared ring field. | |
| #define | rx_sring rx.sring.rx |
| Receive shared ring field. | |
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) | |
| FILE_SECBOOT (PERMITTED) | |
| static | __attribute__ ((always_inline)) void netfront_init_ring(struct netfront_ring *ring |
| Initialise descriptor ring. | |
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 17 of file netfront.h.
Referenced by netfront_probe().
| #define NETFRONT_NUM_RX_DESC 32 |
Number of receive ring entries.
Definition at line 20 of file netfront.h.
Referenced by netfront_probe().
| #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 33 of file netfront.h.
Referenced by netfront_refill_rx().
| #define tx_sring tx.sring.tx |
Transmit shared ring field.
Definition at line 193 of file netfront.h.
| #define rx_sring rx.sring.rx |
Receive shared ring field.
Definition at line 196 of file netfront.h.
| enum netfront_ref_index |
Grant reference indices.
Definition at line 36 of file netfront.h.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
|
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 111 of file netfront.h.
References assert, count, netfront_ring::id_cons, and netfront_ring::id_prod.
| const char* ref_key |
Definition at line 92 of file netfront.h.
| grant_ref_t ref = ref |
Definition at line 93 of file netfront.h.
Referenced by netfront_push(), xengrant_alloc(), and xengrant_free().
| ring count = count |
Definition at line 93 of file netfront.h.
| ring iobufs = iobufs |
Definition at line 94 of file netfront.h.
| ring refs = refs |
Definition at line 94 of file netfront.h.
Referenced by xengrant_alloc(), and xengrant_free().
| ring ids |
Definition at line 95 of file netfront.h.