[build] Ensure build ID is deterministic
[ipxe.git] / src / drivers / infiniband / mlx_utils / mlx_lib / mlx_mtu / mlx_mtu.h
1 #ifndef MLX_MTU_H_
2 #define MLX_MTU_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 #include "../../mlx_lib/mlx_reg_access/mlx_reg_access.h"
27
28 #define BYTE_TO_BIT 0x8
29
30 struct mlx_mtu {
31 mlx_uint32 reserved1 :16;
32 mlx_uint32 local_port :8;
33 mlx_uint32 reserved2 :8;
34 /* -------------- */
35 mlx_uint32 reserved3 :16;
36 mlx_uint32 max_mtu :16;
37 /* -------------- */
38 mlx_uint32 reserved4 :16;
39 mlx_uint32 admin_mtu :16;
40 /* -------------- */
41 mlx_uint32 reserved5 :16;
42 mlx_uint32 oper_mtu :16;
43 };
44
45 mlx_status
46 mlx_get_max_mtu(
47 IN mlx_utils *utils,
48 IN mlx_uint8 port_num,
49 OUT mlx_uint32 *max_mtu
50 );
51
52 mlx_status
53 mlx_set_admin_mtu(
54 IN mlx_utils *utils,
55 IN mlx_uint8 port_num,
56 IN mlx_uint32 admin_mtu
57 );
58 #endif /* MLX_MTU_H_ */