/* The ENA buffer length fields is 16 bit long. So when PAGE_SIZE == 64kB the * driver passes 0. * Since the max packet size the ENA handles is ~9kB limit the buffer length to * 16kB.
*/ #if PAGE_SIZE > SZ_16K #define ENA_PAGE_SIZE (_AC(SZ_16K, UL)) #else #define ENA_PAGE_SIZE PAGE_SIZE #endif
/* The number of tx packet completions that will be handled each NAPI poll * cycle is ring_size / ENA_TX_POLL_BUDGET_DIVIDER.
*/ #define ENA_TX_POLL_BUDGET_DIVIDER 4
/* Refill Rx queue when number of required descriptors is above * QUEUE_SIZE / ENA_RX_REFILL_THRESH_DIVIDER or ENA_RX_REFILL_THRESH_PACKET
*/ #define ENA_RX_REFILL_THRESH_DIVIDER 8 #define ENA_RX_REFILL_THRESH_PACKET 256
/* Number of queues to check for missing queues per timer service */ #define ENA_MONITORED_TX_QUEUES 4 /* Max timeout packets before device reset */ #define MAX_NUM_OF_TIMEOUTED_PACKETS 128
/* ENA device should send keep alive msg every 1 sec. * We wait for 6 sec just to be on the safe side.
*/ #define ENA_DEVICE_KALIVE_TIMEOUT (6 * HZ) #define ENA_MAX_NO_INTERRUPT_ITERATIONS 3
struct ena_tx_buffer { union { struct sk_buff *skb; /* XDP buffer structure which is used for sending packets in * the xdp queues
*/ struct xdp_frame *xdpf;
}; /* num of ena desc for this specific skb * (includes data desc and metadata desc)
*/
u32 tx_descs; /* num of buffers used by this skb */
u32 num_of_bufs;
/* Total size of all buffers in bytes */
u32 total_tx_size;
/* Indicate if bufs[0] map the linear data of the skb. */
u8 map_linear_data;
/* Used for detect missing tx packets to limit the number of prints */
u8 print_once; /* Save the last jiffies to detect missing tx packets * * sets to non zero value on ena_start_xmit and set to zero on * napi and timer_Service_routine. * * while this value is not protected by lock, * a given packet is not expected to be handled by ena_start_xmit * and by napi/timer_service at the same time.
*/ unsignedlong last_jiffies; struct ena_com_buf bufs[ENA_PKT_MAX_BUFS];
} ____cacheline_aligned;
struct ena_ring { /* Holds the empty requests for TX/RX * out of order completions
*/
u16 *free_ids;
union { struct ena_tx_buffer *tx_buffer_info; struct ena_rx_buffer *rx_buffer_info;
};
/* cache ptr to avoid using the adapter */ struct device *dev; struct pci_dev *pdev; struct napi_struct *napi; struct net_device *netdev; struct ena_com_dev *ena_dev; struct ena_adapter *adapter; struct ena_com_io_cq *ena_com_io_cq; struct ena_com_io_sq *ena_com_io_sq; struct bpf_prog *xdp_bpf_prog; struct xdp_rxq_info xdp_rxq;
spinlock_t xdp_tx_lock; /* synchronize XDP TX/Redirect traffic */ /* Used for rx queues only to point to the xdp tx ring, to * which traffic should be redirected from this rx ring.
*/ struct ena_ring *xdp_ring;
/* large_llq_header_enabled is used for two purposes: * 1. Indicates that large LLQ has been requested. * 2. Indicates whether large LLQ is set or not after device * initialization / configuration.
*/ bool large_llq_header_enabled; bool large_llq_header_supported;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.