[golan] Add Connect-IB, ConnectX-4 and ConnectX-4 Lx (Infiniband) support
[ipxe.git] / src / drivers / infiniband / mlx_utils / mlx_lib / mlx_vmac / mlx_vmac.h
1 #ifndef MLX_VMAC_H_
2 #define MLX_VMAC_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
25 #include "../../include/public/mlx_utils.h"
26
27 struct mlx_vmac_query_virt_mac {
28 mlx_uint32 reserved0 :30;
29 mlx_uint32 mac_aux_v :1;
30 mlx_uint32 virtual_mac_en :1;
31 mlx_uint32 parmanent_mac_high :16;
32 mlx_uint32 reserved1 :16;
33 mlx_uint32 parmanent_mac_low :32;
34 mlx_uint32 virtual_mac_high :16;
35 mlx_uint32 Reserved2 :16;
36 mlx_uint32 virtual_mac_low :32;
37 };
38
39 struct mlx_vmac_set_virt_mac {
40 mlx_uint32 Reserved0 :30;
41 mlx_uint32 mac_aux_v :1;
42 mlx_uint32 virtual_mac_en :1;
43 mlx_uint32 reserved1 :32;
44 mlx_uint32 reserved2 :32;
45 mlx_uint32 virtual_mac_high;
46 mlx_uint32 virtual_mac_low;
47 };
48
49 mlx_status
50 mlx_vmac_query_virt_mac (
51 IN mlx_utils *utils,
52 OUT struct mlx_vmac_query_virt_mac *virt_mac
53 );
54
55 mlx_status
56 mlx_vmac_set_virt_mac (
57 IN mlx_utils *utils,
58 OUT struct mlx_vmac_set_virt_mac *virt_mac
59 );
60 #endif /* MLX_VMAC_H_ */