Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-13029 lnet: fix asym routing with multi-hop
[fs/lustre-release.git]
/
lnet
/
utils
/
lnetconfig
/
liblnetconfig.c
diff --git
a/lnet/utils/lnetconfig/liblnetconfig.c
b/lnet/utils/lnetconfig/liblnetconfig.c
index
da8424e
..
4a64e6e
100644
(file)
--- a/
lnet/utils/lnetconfig/liblnetconfig.c
+++ b/
lnet/utils/lnetconfig/liblnetconfig.c
@@
-1011,6
+1011,9
@@
int lustre_lnet_show_route(char *nw, char *gw, int hops, int prio, int detail,
goto out;
for (i = 0;; i++) {
goto out;
for (i = 0;; i++) {
+ __u32 rt_alive;
+ __u32 rt_multi_hop;
+
LIBCFS_IOC_INIT_V2(data, cfg_hdr);
data.cfg_count = i;
LIBCFS_IOC_INIT_V2(data, cfg_hdr);
data.cfg_count = i;
@@
-1073,12
+1076,22
@@
int lustre_lnet_show_route(char *nw, char *gw, int hops, int prio, int detail,
cfg_route.rtr_sensitivity) == NULL)
goto out;
cfg_route.rtr_sensitivity) == NULL)
goto out;
+ rt_alive = data.cfg_config_u.cfg_route.rtr_flags &
+ LNET_RT_ALIVE;
+ rt_multi_hop = data.cfg_config_u.cfg_route.rtr_flags &
+ LNET_RT_MULTI_HOP;
+
if (!backup &&
cYAML_create_string(item, "state",
if (!backup &&
cYAML_create_string(item, "state",
- data.cfg_config_u.cfg_route.
- rtr_flags ?
+ rt_alive ?
"up" : "down") == NULL)
goto out;
"up" : "down") == NULL)
goto out;
+
+ if (!backup &&
+ cYAML_create_string(item, "type",
+ rt_multi_hop?
+ "multi-hop" : "single-hop") == NULL)
+ goto out;
}
}
}
}