16 #define ENA_BAR_SIZE 16384 19 #define ENA_ALIGN 4096 22 #define ENA_AQ_COUNT 2 25 #define ENA_ACQ_COUNT 2 28 #define ENA_AENQ_COUNT 2 31 #define ENA_TX_COUNT 16 34 #define ENA_RX_COUNT 128 37 #define ENA_RX_FILL 16 40 #define ENA_BASE_LO 0x0 43 #define ENA_BASE_HI 0x4 46 #define ENA_CAPS( count, size ) ( ( (size) << 16 ) | ( (count) << 0 ) ) 49 #define ENA_AQ_BASE 0x10 52 #define ENA_AQ_CAPS 0x18 55 #define ENA_ACQ_BASE 0x20 58 #define ENA_ACQ_CAPS 0x28 61 #define ENA_AQ_DB 0x2c 64 #define ENA_ADMIN_MAX_WAIT_MS 5000 67 #define ENA_AENQ_CAPS 0x34 70 #define ENA_AENQ_BASE 0x38 74 #define ENA_CTRL_RESET 0x00000001UL 77 #define ENA_RESET_MAX_WAIT_MS 1000 81 #define ENA_STAT_RESET 0x00000008UL 96 #define ENA_AQ_PHASE 0x01 115 #define ENA_ACQ_PHASE 0x01 118 #define ENA_DEVICE_ATTRIBUTES 1 143 #define ENA_AENQ_CONFIG 26 154 #define ENA_HOST_ATTRIBUTES 28 204 #define ENA_HOST_INFO_TYPE_IPXE 5 225 #define ENA_HOST_INFO_VERSION_WTF 0x00000002UL 228 #define ENA_HOST_INFO_SPEC_2_0 0x0200 249 #define ENA_CREATE_SQ 1 298 #define ENA_DESTROY_SQ 2 319 #define ENA_CREATE_CQ 3 343 #define ENA_MSIX_NONE 0xffffffffUL 362 #define ENA_DESTROY_CQ 4 381 #define ENA_GET_FEATURE 8 408 #define ENA_SET_FEATURE 9 429 #define ENA_GET_STATS 11 450 #define ENA_STATS_TYPE_BASIC 0 453 #define ENA_STATS_SCOPE_ETH 1 456 #define ENA_DEVICE_MINE 0xffff 589 #define ENA_SQE_PHASE 0x01 592 #define ENA_SQE_FIRST 0x04 595 #define ENA_SQE_LAST 0x08 598 #define ENA_SQE_CPL 0x10 615 #define ENA_TX_CQE_ID(id) ( (id) >> 2 ) 632 #define ENA_CQE_PHASE 0x01 uint8_t reserved_b[2]
Reserved.
Destroy completion queue response.
uint8_t reserved_a[12]
Reserved.
struct ena_aq aq
Admin queue.
uint16_t id
Completion queue identifier.
uint32_t intr
Interrupt unmask register offset.
struct ena_tx_sqe * tx
Transmit submission queue entries.
uint8_t reserved[3]
Reserved.
struct ena_qp rx
Receive queue.
struct ena_acq_header header
Header.
struct ena_aq_header header
Header.
uint8_t reserved[2]
Reserved.
uint8_t mac[ETH_ALEN]
MAC address.
#define ENA_RX_COUNT
Number of receive queue entries.
uint64_t info
Host info base address.
uint8_t reserved_a
Reserved.
uint8_t rx_ids[ENA_RX_COUNT]
Receive buffer IDs.
Create completion queue request.
uint8_t mask
Actual number of entries minus one.
uint8_t reserved_a
Reserved.
uint8_t reserved_b[8]
Reserved.
size_t len
Total length of entries.
static unsigned int unsigned int unsigned int size_t uint8_t * ids
unsigned int doorbell
Doorbell register offset.
uint8_t count
Number of entries.
struct ena_aq_header header
Header.
unsigned int prod
Producer counter.
uint16_t id
Completion queue identifier.
uint8_t reserved[2]
Reserved.
uint64_t linux_features
Linux network device features.
struct ena_tx_cqe * tx
Transmit completion queue entries.
Create submission queue response.
uint8_t size
Entry size (in 32-bit words)
uint32_t doorbell
Doorbell register offset.
uint8_t reserved_a[3]
Reserved.
struct ena_get_stats_rsp get_stats
Get statistics.
Transmit submission queue entry.
struct ena_qp tx
Transmit queue.
uint8_t reserved[2]
Reserved.
struct ena_set_feature_req set_feature
Set feature.
uint16_t count
Number of entries.
union ena_sq::@39 sqe
Entries.
struct ena_aenq aenq
Async event notification queue.
Transmit completion queue entry.
unsigned long long uint64_t
uint8_t id
Request identifier.
union ena_cq::@40 cqe
Entries.
uint32_t features
Supported features.
uint16_t count
Number of entries.
uint8_t direction
Direction.
struct ena_acq_header header
Header.
static unsigned int unsigned int unsigned int max
uint64_t rx_drops
Receive drop count.
uint8_t size
Entry size (in 32-bit words)
Destroy completion queue request.
uint32_t llq_desc
LLQ descriptor ring offset.
uint8_t reserved_a[4]
Reserved.
uint32_t doorbell
Doorbell register offset.
uint32_t features
Supported features.
uint16_t spec
ENA specification version.
struct ena_aq_header header
Header.
struct ena_aq_header header
Header.
#define ENA_TX_COUNT
Number of transmit queue entries.
uint64_t address
Base address.
unsigned int doorbell
Doorbell register offset.
struct ena_aq_header header
Header.
uint32_t dist
Operating system distribution (numeric)
uint8_t tx_ids[ENA_TX_COUNT]
Transmit buffer IDs.
uint32_t debug_len
Debug area size.
uint32_t llq_data
LLQ header offset.
uint32_t enabled
Bitmask of enabled AENQ groups (host -> device)
struct ena_destroy_sq_rsp destroy_sq
Destroy submission queue.
uint8_t reserved[2]
Reserved.
size_t len
Total length of entries.
struct ena_get_feature_rsp get_feature
Get feature.
uint16_t id
Request identifier.
uint16_t group
Type of event.
struct ena_acq_header header
Header.
uint64_t writeback
Writeback address.
uint8_t reserved
Reserved.
uint8_t reserved_a[2]
Reserved.
uint64_t tx_packets
Transmit packet count.
uint16_t id
Request identifier.
uint8_t id
Feature identifier.
uint16_t cpus
Number of CPUs.
uint16_t cons
Consumer index.
uint8_t reserved_b[2]
Reserved.
union ena_aq_req * req
Requests.
uint64_t address
Base address.
uint16_t cq_id
Completion queue identifier.
ena_sq_policy
Submission queue policy.
unsigned int cons
Consumer counter.
unsigned int cons
Consumer counter.
uint8_t size
Entry size (in 32-bit words)
uint16_t count
Number of entries.
uint16_t busdevfn
PCI bus:dev.fn address.
struct ena_aenq_event * evt
Events.
uint64_t debug
Debug area base address.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
uint8_t id
Feature identifier.
struct ena_get_stats_req get_stats
Get statistics.
uint32_t supported
Bitmask of supported AENQ groups (device -> host)
uint16_t count
Actual number of entries.
struct ena_create_cq_req create_cq
Create completion queue.
struct ena_destroy_cq_req destroy_cq
Destroy completion queue.
Create completion queue response.
uint8_t direction
Direction.
Create submission queue request.
struct ena_rx_cqe * rx
Receive completion queue entries.
struct ena_cq cq
Completion queue.
uint32_t vector
MSI-X vector.
struct ena_aq_header header
Header.
Destroy submission queue response.
struct ena_acq_header header
Header.
struct ena_acq_header header
Header.
uint16_t id
Completion queue identifier.
uint8_t reserved_b[2]
Reserved.
struct ena_host_attributes host
Host attributes.
uint8_t actual
Actual number of entries.
Destroy submission queue request.
struct ena_create_cq_rsp create_cq
Create completion queue.
ena_sq_direction
Submission queue direction.
uint32_t node
NUMA node register offset.
uint8_t requested
Requested number of entries.
struct ena_acq acq
Admin completion queue.
Async event notification queue config.
uint32_t version
Driver version.
struct ena_create_sq_rsp create_sq
Create submission queue.
uint8_t reserved_b[3]
Reserved.
uint16_t id
Submission queue identifier.
struct io_buffer * rx_iobuf[ENA_RX_COUNT]
Receive I/O buffers, indexed by buffer ID.
uint8_t reserved_a
Reserved.
Async event notification queue event.
uint8_t reserved_b[8]
Reserved.
uint8_t intr
Interrupts enabled.
uint8_t max
Maximum fill level.
struct ena_acq_header header
Header.
uint16_t syndrome
ID of event.
struct ena_get_feature_req get_feature
Get feature.
struct ena_host_info * info
Host info.
struct ena_sq sq
Submission queue.
uint64_t rx_bytes
Receive byte count.
uint32_t version
Device version.
uint16_t id
Request identifier.
Receive submission queue entry.
Receive completion queue entry.
uint8_t direction
Direction.
Admin completion queue response.
uint32_t physical
Physical address width.
Async event notification queue.
union ena_acq_rsp * rsp
Responses.
uint64_t tx_bytes
Transmit byte count.
uint16_t id
Submission queue identifier.
struct ena_acq_header header
Header.
char dist_str[128]
Operating system distribution (string)
uint64_t timestamp
Timestamp.
uint16_t id
Submission queue identifier.
char kernel_str[32]
Kernel version (string)
struct ena_destroy_sq_req destroy_sq
Destroy submission queue.
struct ena_rx_sqe * rx
Receive submission queue entries.
uint8_t fill
Fill level (limited to completion queue size)
uint32_t kernel
Kernel version (numeric)
uint8_t reserved[2]
Reserved.
struct ena_aq_header header
Header.
struct ena_aq_header header
Header.
unsigned int prod
Producer counter.
struct io_buffer * tx_iobuf[ENA_TX_COUNT]
Transmit I/O buffers, indexed by buffer ID.
uint64_t rx_packets
Receive packet count.
struct ena_aenq_config aenq
Async event notification queue config.
union ena_feature __attribute__
struct ena_destroy_cq_rsp destroy_cq
Destroy completion queue.
uint8_t direction
Direction.
struct ena_create_sq_req create_sq
Create submission queue.
uint16_t device
Device ID.
uint32_t implementation
Implementation.
uint8_t data[48]
Additional event data.
uint32_t type
Operating system type.