iPXE
mlx_nodnic_data_structures.h
Go to the documentation of this file.
1#ifndef NODNIC_NODNICDATASTRUCTURES_H_
2#define NODNIC_NODNICDATASTRUCTURES_H_
3
4/*
5 * Copyright (C) 2015 Mellanox Technologies Ltd.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of the
10 * License, or any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 * 02110-1301, USA.
21 */
22
23FILE_LICENCE ( GPL2_OR_LATER );
24
26
27/* todo: fix coding convention */
28#define NODNIC_MEMORY_ALIGN 0x1000
29
30#define NODNIC_MAX_MAC_FILTERS 5
31#define NODNIC_MAX_MGID_FILTERS 4
32
36typedef struct _nodnic_qp nodnic_qp;
37typedef struct _nodnic_cq nodnic_cq;
38typedef struct _nodnic_eq nodnic_eq;
41
42/* NODNIC Port states
43 * Bit 0 - port open/close
44 * Bit 1 - port is [not] in disabling DMA
45 * 0 - closed and not disabling DMA
46 * 1 - opened and not disabling DMA
47 * 3 - opened and disabling DMA
48 */
49#define NODNIC_PORT_OPENED 0b00000001
50#define NODNIC_PORT_DISABLING_DMA 0b00000010
51
56
57
70
71
72#define RECV_WQE_SIZE 16
73#define NODNIC_WQBB_SIZE 64
74/** A nodnic send wqbb */
78
86 /** Work queue entries */
87 /* TODO: add to memory entity */
90 /** Size of work queue */
92 /** Next work queue entry index
93 *
94 * This is the index of the next entry to be filled (i.e. the
95 * first empty entry). This value is not bounded by num_wqes;
96 * users must logical-AND with (num_wqes-1) to generate an
97 * array index.
98 */
104};
105
110
111
121
131
154
155#ifdef DEVICE_CX3
156/* This is the structure of the data in the scratchpad
157 * Read/Write data from/to its field using PCI accesses only */
158typedef struct _nodnic_port_data_flow_gw nodnic_port_data_flow_gw;
159struct _nodnic_port_data_flow_gw {
160 mlx_uint32 send_doorbell;
161 mlx_uint32 recv_doorbell;
163 mlx_uint32 armcq_cq_ci_dword;
164 mlx_uint32 dma_en;
165} __attribute__ ((packed));
166#endif
167
174
195
222
227
230} __attribute ( ( packed ) );
231#endif /* STUB_NODNIC_NODNICDATASTRUCTURES_H_ */
pseudo_bit_t value[0x00020]
Definition arbel.h:2
pseudo_bit_t reserved2[0x00005]
Definition arbel.h:13
long index
Definition bigint.h:65
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define __attribute__(x)
Definition compiler.h:10
struct _nodnic_device_priv nodnic_device_priv
struct _nodnic_qp_db nodnic_qp_db
struct _nodnic_port_priv nodnic_port_priv
struct _nodnic_qp nodnic_qp
struct _nodnic_device_capabilites nodnic_device_capabilites
struct _nodnic_arm_cq_db nodnic_arm_cq_db
#define NODNIC_WQBB_SIZE
struct _nodnic_uar_priv nodnic_uar
struct _nodnic_cq nodnic_cq
@ NODNIC_PORT_TYPE_UNKNOWN
struct _nodnic_eq nodnic_eq
uint16_t mlx_uint16
uint32_t mlx_uint32
size_t mlx_size
uint64_t mlx_uint64
unsigned long mlx_physical_address
void mlx_void
int mlx_status
uint8_t mlx_boolean
uint8_t mlx_uint8
#define IN
Definition mlx_utils.h:28
struct tx_ring_info __attribute
mlx_void * cq_virt
cq entries
struct nodnic_doorbell arm_cq_doorbell
mlx_physical_address cq_physical
nodnic_hardware_format hardware_format
nodnic_device_capabilites device_cap
mlx_physical_address eq_physical
nodnic_arm_cq_db * arm_cq_doorbell_record
mlx_status(* recv_doorbell)(IN nodnic_port_priv *port_priv, IN struct nodnic_ring *ring, IN mlx_uint16 index)
mlx_status(* set_dma)(IN nodnic_port_priv *port_priv, IN mlx_boolean value)
mlx_status(* send_doorbell)(IN nodnic_port_priv *port_priv, IN struct nodnic_ring *ring, IN mlx_uint16 index)
nodnic_device_priv * device
struct nodnic_send_ring send
struct nodnic_recv_ring receive
nodnic_queue_pair_type type
mlx_physical_address doorbell_physical
nodnic_qp_db * qp_doorbell_record
struct nodnic_ring nodnic_ring
struct nodnic_doorbell send_doorbell
mlx_physical_address wqe_physical
Work queue entries.
mlx_size wq_size
Size of work queue.
mlx_uint32 num_wqes
Next work queue entry index.
struct nodnic_doorbell recv_doorbell
struct nodnic_ring nodnic_ring
struct nodnic_send_wqbb * wqe_virt
mlx_uint8 force_align[NODNIC_WQBB_SIZE]