iPXE
mlx_port.h
Go to the documentation of this file.
1 #ifndef NODNIC_PORT_H_
2 #define NODNIC_PORT_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 
23 FILE_LICENCE ( GPL2_OR_LATER );
24 
26 
27 #define NODNIC_PORT_MAC_FILTERS_OFFSET 0x10
28 
29 typedef enum {
47 #ifdef DEVICE_CX3
48  nodnic_port_option_crspace_en,
49 #endif
54 
60 };
61 
66 };
67 
68 
69 typedef enum {
75 
78  IN nodnic_port_priv *port_priv,
80  );
81 
84  IN nodnic_port_priv *port_priv,
86  );
87 
90  IN nodnic_port_priv *port_priv,
93  );
94 
97  IN nodnic_port_priv *port_priv,
100  );
101 
104  IN nodnic_port_priv *port_priv,
105  IN mlx_size cq_size,
106  OUT nodnic_cq **cq
107  );
108 
111  IN nodnic_port_priv *port_priv,
112  IN nodnic_cq *cq
113  );
114 
117  IN nodnic_port_priv *port_priv,
119  IN mlx_size send_wq_size,
120  IN mlx_uint32 send_wqe_num,
121  IN mlx_size receive_wq_size,
122  IN mlx_uint32 recv_wqe_num,
123  OUT nodnic_qp **qp
124  );
125 
128  IN nodnic_port_priv *port_priv,
130  IN nodnic_qp *qp
131  );
134  IN nodnic_port_priv *port_priv,
135  IN struct nodnic_ring *ring,
137  );
140  IN nodnic_port_priv *port_priv,
141  IN struct nodnic_ring *ring,
143  );
146  IN nodnic_port_priv *port_priv,
147  OUT mlx_uint64 *cq_size
148  );
149 
152  IN nodnic_port_priv *port_priv,
153  IN mlx_uint8 log_eq_size
154  );
157  IN nodnic_port_priv *port_priv
158  );
159 
162  IN nodnic_port_priv *port_priv,
164  );
165 
168  IN nodnic_port_priv *port_priv,
170  );
173  IN nodnic_port_priv *port_priv,
175  );
176 
179  IN nodnic_port_priv *port_priv,
181  );
184  IN nodnic_device_priv *device_priv,
185  IN nodnic_port_priv *port_priv,
186  IN mlx_uint8 port_index
187  );
188 
191  IN nodnic_port_priv *port_priv,
193  );
194 
197  IN nodnic_port_priv *port_priv,
199  );
200 
203  IN nodnic_port_priv *port_priv
204  );
205 
208  IN nodnic_port_priv *port_priv
209  );
210 
213  IN nodnic_port_priv *port_priv
214  );
215 
218  IN nodnic_port_priv *port_priv
219  );
220 
223  IN nodnic_port_priv *port_priv,
224  OUT mlx_boolean *reset_needed
225  );
226 
229  IN nodnic_port_priv *port_priv,
230  OUT mlx_boolean *change_event
231  );
234  IN nodnic_port_priv *port_priv
235  );
236 
239  IN nodnic_device_priv *device_priv,
240  IN nodnic_port_priv *port_priv
241  );
242 #endif /* STUB_NODNIC_PORT_H_ */
uint8_t mlx_boolean
mlx_status nodnic_port_allocate_eq(IN nodnic_port_priv *port_priv, IN mlx_uint8 log_eq_size)
Definition: mlx_port.c:915
FILE_LICENCE(GPL2_OR_LATER)
mlx_status nodnic_port_get_state(IN nodnic_port_priv *port_priv, OUT nodnic_port_state *state)
Definition: mlx_port.c:88
mlx_status nodnic_port_close(IN nodnic_port_priv *port_priv)
Definition: mlx_port.c:1255
__be32 in[4]
Definition: CIB_PRM.h:35
uint8_t state
State.
Definition: eth_slow.h:47
mlx_status nodnic_port_create_qp(IN nodnic_port_priv *port_priv, IN nodnic_queue_pair_type type, IN mlx_size send_wq_size, IN mlx_uint32 send_wqe_num, IN mlx_size receive_wq_size, IN mlx_uint32 recv_wqe_num, OUT nodnic_qp **qp)
Definition: mlx_port.c:585
uint8_t type
Type.
Definition: ena.h:16
uint8_t mac[ETH_ALEN]
MAC address.
Definition: ena.h:24
mlx_status nodnic_port_free_eq(IN nodnic_port_priv *port_priv)
Definition: mlx_port.c:968
__be32 qpn
Definition: CIB_PRM.h:29
mlx_uint32 send_offset
Definition: mlx_port.h:64
mlx_status nodnic_port_add_mac_filter(IN nodnic_port_priv *port_priv, IN mlx_mac_address mac)
Definition: mlx_port.c:992
mlx_status nodnic_port_read_port_management_change_event(IN nodnic_port_priv *port_priv, OUT mlx_boolean *change_event)
Definition: mlx_port.c:238
uint32_t mlx_uint32
mlx_uint32 mask
Definition: mlx_port.h:59
nodnic_port_state
Definition: mlx_port.h:69
#define OUT
Definition: mlx_utils.h:29
mlx_status nodnic_port_enable_dma(IN nodnic_port_priv *port_priv)
Definition: mlx_port.c:1275
mlx_status nodnic_port_disable_dma(IN nodnic_port_priv *port_priv)
Definition: mlx_port.c:1295
mlx_uint8 align
Definition: mlx_port.h:58
A long option, as used for getopt_long()
Definition: getopt.h:24
mlx_status nodnic_port_create_cq(IN nodnic_port_priv *port_priv, IN mlx_size cq_size, OUT nodnic_cq **cq)
Definition: mlx_port.c:360
mlx_status nodnic_port_init(IN nodnic_port_priv *port_priv)
Definition: mlx_port.c:1235
__be32 out[4]
Definition: CIB_PRM.h:36
mlx_status nodnic_port_get_type(IN nodnic_port_priv *port_priv, OUT nodnic_port_type *type)
Definition: mlx_port.c:105
mlx_status nodnic_port_thin_init(IN nodnic_device_priv *device_priv, IN nodnic_port_priv *port_priv, IN mlx_uint8 port_index)
Definition: mlx_port.c:1315
mlx_status nodnic_port_add_mgid_filter(IN nodnic_port_priv *port_priv, IN mlx_mac_address mac)
mlx_uint32 offset
Definition: mlx_port.h:57
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
nodnic_port_option
Definition: mlx_port.h:29
mlx_status nodnic_port_update_ring_doorbell(IN nodnic_port_priv *port_priv, IN struct nodnic_ring *ring, IN mlx_uint16 index)
Definition: mlx_port.c:874
mlx_status nodnic_port_destroy_cq(IN nodnic_port_priv *port_priv, IN nodnic_cq *cq)
Definition: mlx_port.c:426
mlx_status nodnic_port_query(IN nodnic_port_priv *port_priv, IN nodnic_port_option option, OUT mlx_uint32 *out)
Definition: mlx_port.c:126
mlx_uint32 recv_offset
Definition: mlx_port.h:65
mlx_status nodnic_port_get_cq_size(IN nodnic_port_priv *port_priv, OUT mlx_uint64 *cq_size)
Definition: mlx_port.c:899
size_t mlx_size
mlx_status nodnic_port_read_reset_needed(IN nodnic_port_priv *port_priv, OUT mlx_boolean *reset_needed)
Definition: mlx_port.c:221
Definition: mlx_port.h:62
nodnic_queue_pair_type type
Definition: mlx_port.h:63
mlx_status nodnic_port_set(IN nodnic_port_priv *port_priv, IN nodnic_port_option option, IN mlx_uint32 in)
Definition: mlx_port.c:155
uint16_t mlx_uint16
#define IN
Definition: mlx_utils.h:28
nodnic_port_option option
Definition: mlx_port.h:56
mlx_status nodnic_port_destroy_qp(IN nodnic_port_priv *port_priv, IN nodnic_queue_pair_type type, IN nodnic_qp *qp)
Definition: mlx_port.c:726
struct arbelprm_qp_db_record qp
Definition: arbel.h:13
uint8_t mlx_uint8
mlx_status nodnic_port_set_promisc_multicast(IN nodnic_port_priv *port_priv, IN mlx_boolean value)
Definition: mlx_port.c:1220
int mlx_status
mlx_status nodnic_port_set_send_uar_offset(IN nodnic_port_priv *port_priv)
Definition: mlx_port.c:197
mlx_status nodnic_port_remove_mgid_filter(IN nodnic_port_priv *port_priv, IN mlx_mac_address mac)
mlx_status nodnic_port_get_qpn(IN nodnic_port_priv *port_priv, IN struct nodnic_ring *ring, OUT mlx_uint32 *qpn)
Definition: mlx_port.c:796
mlx_status nodnic_port_set_promisc(IN nodnic_port_priv *port_priv, IN mlx_boolean value)
Definition: mlx_port.c:1205
uint64_t mlx_uint64
Definition: mlx_port.h:55
mlx_status nodnic_port_update_tx_db_func(IN nodnic_device_priv *device_priv, IN nodnic_port_priv *port_priv)
uint64_t index
Index of the first segment within the content.
Definition: pccrc.h:21
mlx_status nodnic_port_remove_mac_filter(IN nodnic_port_priv *port_priv, IN mlx_mac_address mac)
Definition: mlx_port.c:1073