4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library.
23 * Copyright (c) 2014, 2016, Intel Corporation.
26 * Author: Amir Shehata <amir.shehata@intel.com>
32 #include <libcfs/libcfs_ioctl.h>
33 #include <lnet/types.h>
35 #define MAX_NUM_SHOW_ENTRIES 32
36 #define LNET_MAX_STR_LEN 128
37 #define LNET_MAX_SHOW_NUM_CPT 128
38 #define LNET_UNDEFINED_HOPS ((__u32) -1)
41 * To allow for future enhancements to extend the tunables
42 * add a hdr to this structure, so that the version can be set
43 * and checked for backwards compatibility. Newer versions of LNet
44 * can still work with older versions of lnetctl. The restriction is
45 * that the structure can be added to and not removed from in order
46 * to not invalidate older lnetctl utilities. Moreover, the order of
47 * fields must remain the same, and new fields appended to the structure
49 * That said all existing LND tunables will be added in this structure
50 * to avoid future changes.
52 struct lnet_ioctl_config_lnd_cmn_tunables {
54 __s32 lct_peer_timeout;
55 __s32 lct_peer_tx_credits;
56 __s32 lct_peer_rtr_credits;
57 __s32 lct_max_tx_credits;
60 struct lnet_ioctl_config_o2iblnd_tunables {
62 __u32 lnd_peercredits_hiw;
63 __u32 lnd_map_on_demand;
64 __u32 lnd_concurrent_sends;
65 __u32 lnd_fmr_pool_size;
66 __u32 lnd_fmr_flush_trigger;
71 struct lnet_lnd_tunables {
73 struct lnet_ioctl_config_o2iblnd_tunables lnd_o2ib;
77 struct lnet_ioctl_config_lnd_tunables {
78 struct lnet_ioctl_config_lnd_cmn_tunables lt_cmn;
79 struct lnet_lnd_tunables lt_tun;
82 struct lnet_ioctl_net_config {
83 char ni_interfaces[LNET_MAX_INTERFACES][LNET_MAX_STR_LEN];
85 __u32 ni_cpts[LNET_MAX_SHOW_NUM_CPT];
89 #define LNET_TINY_BUF_IDX 0
90 #define LNET_SMALL_BUF_IDX 1
91 #define LNET_LARGE_BUF_IDX 2
93 /* # different router buffer pools */
94 #define LNET_NRBPOOLS (LNET_LARGE_BUF_IDX + 1)
96 struct lnet_ioctl_pool_cfg {
102 } pl_pools[LNET_NRBPOOLS];
106 struct lnet_ioctl_config_data {
107 struct libcfs_ioctl_hdr cfg_hdr;
121 char net_intf[LNET_MAX_STR_LEN];
122 __s32 net_peer_timeout;
123 __s32 net_peer_tx_credits;
124 __s32 net_peer_rtr_credits;
125 __s32 net_max_tx_credits;
126 __u32 net_cksum_algo;
127 __u32 net_interface_count;
140 struct lnet_ioctl_element_stats {
147 * lnet_ioctl_config_ni
148 * This structure describes an NI configuration. There are multiple components
149 * when configuring an NI: Net, Interfaces, CPT list and LND tunables
150 * A network is passed as a string to the DLC and translated using
152 * An interface is the name of the system configured interface
154 * CPT is the list of CPTS LND tunables are passed in the lic_bulk area
156 struct lnet_ioctl_config_ni {
157 struct libcfs_ioctl_hdr lic_cfg_hdr;
159 char lic_ni_intf[LNET_MAX_INTERFACES][LNET_MAX_STR_LEN];
160 char lic_legacy_ip2nets[LNET_MAX_STR_LEN];
161 __u32 lic_cpts[LNET_MAX_SHOW_NUM_CPT];
164 __u32 lic_tcp_bonding;
171 struct lnet_peer_ni_credit_info {
172 char cr_aliveness[LNET_MAX_STR_LEN];
174 __s32 cr_ni_peer_tx_credits;
175 __s32 cr_peer_tx_credits;
176 __s32 cr_peer_min_tx_credits;
177 __u32 cr_peer_tx_qnob;
178 __s32 cr_peer_rtr_credits;
179 __s32 cr_peer_min_rtr_credits;
183 struct lnet_ioctl_peer {
184 struct libcfs_ioctl_hdr pr_hdr;
190 struct lnet_peer_ni_credit_info pr_peer_credits;
194 struct lnet_ioctl_peer_cfg {
195 struct libcfs_ioctl_hdr prcfg_hdr;
196 lnet_nid_t prcfg_prim_nid;
197 lnet_nid_t prcfg_cfg_nid;
203 struct lnet_ioctl_numa_range {
204 struct libcfs_ioctl_hdr nr_hdr;
208 struct lnet_ioctl_lnet_stats {
209 struct libcfs_ioctl_hdr st_hdr;
210 struct lnet_counters st_cntrs;
213 #endif /* LNET_DLC_H */