* GPL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright (c) 2011, Whamcloud, Inc.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
* between getting its string and using it.
*/
-#define LNET_NIDSTR_COUNT 128 /* # of nidstrings */
-#define LNET_NIDSTR_SIZE 32 /* size of each one (see below for usage) */
-
static char libcfs_nidstrings[LNET_NIDSTR_COUNT][LNET_NIDSTR_SIZE];
static int libcfs_nidstring_idx = 0;
# define NIDSTR_LOCK(f) cfs_spin_lock_irqsave(&libcfs_nidstring_lock, f)
# define NIDSTR_UNLOCK(f) cfs_spin_unlock_irqrestore(&libcfs_nidstring_lock, f)
#else
-# define NIDSTR_LOCK(f) (f=0) /* avoid unused var warnings */
-# define NIDSTR_UNLOCK(f) (f=0)
+# define NIDSTR_LOCK(f) (f=sizeof(f)) /* avoid set-but-unused warnings */
+# define NIDSTR_UNLOCK(f) (f=sizeof(f))
#endif
static char *
/* .nf_str2addr */ libcfs_num_str2addr,
/* .nf_parse_addrlist*/ libcfs_num_parse,
/* .nf_match_addr*/ libcfs_num_match},
+ {/* .nf_type */ GNILND,
+ /* .nf_name */ "gni",
+ /* .nf_modname */ "kgnilnd",
+ /* .nf_addr2str */ libcfs_decnum_addr2str,
+ /* .nf_str2addr */ libcfs_num_str2addr,
+ /* .nf_parse_addrlist*/ libcfs_num_parse,
+ /* .nf_match_addr*/ libcfs_num_match},
/* placeholder for net0 alias. It MUST BE THE LAST ENTRY */
{/* .nf_type */ -1},
};
int nob;
if (nid == LNET_NID_ANY)
- return "LNET_NID_ANY";
+ return "<?>";
nf = libcfs_lnd2netstrfns(lnd);
str = libcfs_next_nidstring();
* <number> '-' <number> '/' <number>
* <net> :== <netname> | <netname><number>
* <netname> :== "lo" | "tcp" | "o2ib" | "cib" | "openib" | "iib" |
- * "vib" | "ra" | "elan" | "gm" | "mx" | "ptl"
+ * "vib" | "ra" | "elan" | "mx" | "ptl"
* \endverbatim
*/