Whamcloud - gitweb
LU-13837 lnet: Introduce constant for net ID of LNET_NID_ANY
[fs/lustre-release.git] / lnet / lnet / config.c
index bf5deea..746253b 100644 (file)
@@ -692,7 +692,7 @@ lnet_parse_networks(struct list_head *netlist, const char *networks,
                 * At this point the name is properly terminated.
                 */
                net_id = libcfs_str2net(name);
-               if (net_id == LNET_NIDNET(LNET_NID_ANY)) {
+               if (net_id == LNET_NET_ANY) {
                        LCONSOLE_ERROR_MSG(0x113,
                                        "Unrecognised network type\n");
                        str = name;
@@ -1181,7 +1181,7 @@ lnet_parse_route(char *str, int *im_a_router)
 
                        if (ntokens == 1) {
                                net = libcfs_str2net(ltb->ltb_text);
-                               if (net == LNET_NIDNET(LNET_NID_ANY) ||
+                               if (net == LNET_NET_ANY ||
                                    LNET_NETTYP(net) == LOLND)
                                        goto token_error;
                        } else {
@@ -1208,7 +1208,7 @@ lnet_parse_route(char *str, int *im_a_router)
        list_for_each(tmp1, &nets) {
                ltb = list_entry(tmp1, struct lnet_text_buf, ltb_list);
                net = libcfs_str2net(ltb->ltb_text);
-               LASSERT (net != LNET_NIDNET(LNET_NID_ANY));
+               LASSERT(net != LNET_NET_ANY);
 
                list_for_each(tmp2, &gateways) {
                        ltb = list_entry(tmp2, struct lnet_text_buf, ltb_list);
@@ -1419,7 +1419,7 @@ lnet_splitnets(char *source, struct list_head *nets)
                        *sep++ = 0;
 
                net = lnet_netspec2net(tb->ltb_text);
-               if (net == LNET_NIDNET(LNET_NID_ANY)) {
+               if (net == LNET_NET_ANY) {
                        lnet_syntax("ip2nets", source, offset,
                                    strlen(tb->ltb_text));
                        return -EINVAL;