X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lnet%2Futils%2Flnetconfig%2Fliblnetconfig.c;h=6aaa1a0516b6a643bf6267abea771a4e68e5cff3;hp=d32ce2710ee38e651d56a5e4328c6f86de300c3d;hb=ce8735993473c1055038f7422350c96b092d707d;hpb=4d2ad7dcd6b55a81d3f5b8f832a72edb00b5f302 diff --git a/lnet/utils/lnetconfig/liblnetconfig.c b/lnet/utils/lnetconfig/liblnetconfig.c index d32ce27..6aaa1a0 100644 --- a/lnet/utils/lnetconfig/liblnetconfig.c +++ b/lnet/utils/lnetconfig/liblnetconfig.c @@ -584,17 +584,6 @@ int lustre_lnet_config_route(char *nw, char *gw, int hops, int prio, goto out; } - if (LNET_NETTYP(net) == CIBLND || - LNET_NETTYP(net) == OPENIBLND || - LNET_NETTYP(net) == IIBLND || - LNET_NETTYP(net) == VIBLND) { - snprintf(err_str, - sizeof(err_str), - "\"obselete LNet type '%s'\"", libcfs_lnd2str(net)); - rc = LUSTRE_CFG_RC_BAD_PARAM; - goto out; - } - gateway_nid = libcfs_str2nid(gw); if (gateway_nid == LNET_NID_ANY) { snprintf(err_str, @@ -678,17 +667,6 @@ int lustre_lnet_del_route(char *nw, char *gw, goto out; } - if (LNET_NETTYP(net) == CIBLND || - LNET_NETTYP(net) == OPENIBLND || - LNET_NETTYP(net) == IIBLND || - LNET_NETTYP(net) == VIBLND) { - snprintf(err_str, - sizeof(err_str), - "\"obselete LNet type '%s'\"", libcfs_lnd2str(net)); - rc = LUSTRE_CFG_RC_BAD_PARAM; - goto out; - } - gateway_nid = libcfs_str2nid(gw); if (gateway_nid == LNET_NID_ANY) { snprintf(err_str, @@ -745,17 +723,6 @@ int lustre_lnet_show_route(char *nw, char *gw, int hops, int prio, int detail, goto out; } - if (LNET_NETTYP(net) == CIBLND || - LNET_NETTYP(net) == OPENIBLND || - LNET_NETTYP(net) == IIBLND || - LNET_NETTYP(net) == VIBLND) { - snprintf(err_str, - sizeof(err_str), - "\"obsolete LNet type '%s'\"", - libcfs_lnd2str(net)); - rc = LUSTRE_CFG_RC_BAD_PARAM; - goto out; - } } else { /* show all routes without filtering on net */ net = LNET_NIDNET(LNET_NID_ANY); @@ -3058,35 +3025,32 @@ struct lookup_cmd_hdlr_tbl { }; static struct lookup_cmd_hdlr_tbl lookup_config_tbl[] = { - {"route", handle_yaml_config_route}, - {"net", handle_yaml_config_ni}, - {"ip2nets", handle_yaml_config_ip2nets}, - {"peer", handle_yaml_config_peer}, - {"routing", handle_yaml_config_routing}, - {"buffers", handle_yaml_config_buffers}, - {"numa", handle_yaml_config_numa}, - {NULL, NULL} -}; + { .name = "route", .cb = handle_yaml_config_route }, + { .name = "net", .cb = handle_yaml_config_ni }, + { .name = "ip2nets", .cb = handle_yaml_config_ip2nets }, + { .name = "peer", .cb = handle_yaml_config_peer }, + { .name = "routing", .cb = handle_yaml_config_routing }, + { .name = "buffers", .cb = handle_yaml_config_buffers }, + { .name = "numa", .cb = handle_yaml_config_numa }, + { .name = NULL } }; static struct lookup_cmd_hdlr_tbl lookup_del_tbl[] = { - {"route", handle_yaml_del_route}, - {"net", handle_yaml_del_ni}, - {"peer", handle_yaml_del_peer}, - {"routing", handle_yaml_del_routing}, - {"numa", handle_yaml_del_numa}, - {NULL, NULL} -}; + { .name = "route", .cb = handle_yaml_del_route }, + { .name = "net", .cb = handle_yaml_del_ni }, + { .name = "peer", .cb = handle_yaml_del_peer }, + { .name = "routing", .cb = handle_yaml_del_routing }, + { .name = "numa", .cb = handle_yaml_del_numa }, + { .name = NULL } }; static struct lookup_cmd_hdlr_tbl lookup_show_tbl[] = { - {"route", handle_yaml_show_route}, - {"net", handle_yaml_show_net}, - {"buffers", handle_yaml_show_routing}, - {"routing", handle_yaml_show_routing}, - {"peer", handle_yaml_show_peers}, - {"statistics", handle_yaml_show_stats}, - {"numa", handle_yaml_show_numa}, - {NULL, NULL} -}; + { .name = "route", .cb = handle_yaml_show_route }, + { .name = "net", .cb = handle_yaml_show_net }, + { .name = "buffers", .cb = handle_yaml_show_routing }, + { .name = "routing", .cb = handle_yaml_show_routing }, + { .name = "peer", .cb = handle_yaml_show_peers }, + { .name = "statistics", .cb = handle_yaml_show_stats }, + { .name = "numa", .cb = handle_yaml_show_numa }, + { .name = NULL } }; static cmd_handler_t lookup_fn(char *key, struct lookup_cmd_hdlr_tbl *tbl)