iPXE
drivers
infiniband
mlx_utils
mlx_lib
mlx_mtu
mlx_mtu.h
Go to the documentation of this file.
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_ */
mlx_get_max_mtu
mlx_status mlx_get_max_mtu(IN mlx_utils *utils, IN mlx_uint8 port_num, OUT mlx_uint32 *max_mtu)
Definition:
mlx_mtu.c:27
mlx_mtu::reserved1
mlx_uint32 reserved1
Definition:
mlx_mtu.h:31
mlx_mtu::local_port
mlx_uint32 local_port
Definition:
mlx_mtu.h:32
mlx_mtu::admin_mtu
mlx_uint32 admin_mtu
Definition:
mlx_mtu.h:39
mlx_uint32
uint32_t mlx_uint32
Definition:
mlx_types_priv.h:34
mlx_utils
Definition:
mlx_utils.h:44
mlx_mtu::reserved2
mlx_uint32 reserved2
Definition:
mlx_mtu.h:33
OUT
#define OUT
Definition:
mlx_utils.h:29
mlx_mtu::reserved4
mlx_uint32 reserved4
Definition:
mlx_mtu.h:38
mlx_mtu::reserved5
mlx_uint32 reserved5
Definition:
mlx_mtu.h:41
mlx_mtu::reserved3
mlx_uint32 reserved3
Definition:
mlx_mtu.h:35
mlx_mtu
Definition:
mlx_mtu.h:30
mlx_mtu::oper_mtu
mlx_uint32 oper_mtu
Definition:
mlx_mtu.h:42
IN
#define IN
Definition:
mlx_utils.h:28
port_num
__be16 port_num
Definition:
CIB_PRM.h:31
mlx_uint8
uint8_t mlx_uint8
Definition:
mlx_types_priv.h:32
mlx_mtu::max_mtu
mlx_uint32 max_mtu
Definition:
mlx_mtu.h:36
mlx_status
int mlx_status
Definition:
mlx_types_priv.h:30
mlx_set_admin_mtu
mlx_status mlx_set_admin_mtu(IN mlx_utils *utils, IN mlx_uint8 port_num, IN mlx_uint32 admin_mtu)
Definition:
mlx_mtu.c:63
FILE_LICENCE
FILE_LICENCE(GPL2_OR_LATER)
Generated by
1.8.15