# define libcfs_kmem_dec(ptr, size) do {} while (0)
#endif /* LIBCFS_DEBUG */
+#ifndef LIBCFS_VMALLOC_SIZE
#define LIBCFS_VMALLOC_SIZE (2 << CFS_PAGE_SHIFT) /* 2 pages */
+#endif
#define LIBCFS_ALLOC_GFP(ptr, size, mask) \
do { \
lnet_nid_t libcfs_str2nid(const char *str);
int libcfs_str2anynid(lnet_nid_t *nid, const char *str);
char *libcfs_id2str(lnet_process_id_t id);
+int libcfs_str2server(char *name, int *type, __u32 *idx, char **endptr);
int cfs_iswhite(char c);
void cfs_free_nidlist(cfs_list_t *list);
int cfs_parse_nidlist(char *str, int len, cfs_list_t *list);
int cfs_match_nid(lnet_nid_t nid, cfs_list_t *list);
+/** \addtogroup lnet_addr
+ * @{ */
/* how an LNET NID encodes net:address */
+/** extract the address part of an lnet_nid_t */
#define LNET_NIDADDR(nid) ((__u32)((nid) & 0xffffffff))
+/** extract the network part of an lnet_nid_t */
#define LNET_NIDNET(nid) ((__u32)(((nid) >> 32)) & 0xffffffff)
+/** make an lnet_nid_t from a network part and an address part */
#define LNET_MKNID(net,addr) ((((__u64)(net))<<32)|((__u64)(addr)))
/* how net encodes type:number */
#define LNET_NETNUM(net) ((net) & 0xffff)
#define LNET_NETTYP(net) (((net) >> 16) & 0xffff)
#define LNET_MKNET(typ,num) ((((__u32)(typ))<<16)|((__u32)(num)))
+/** @} lnet_addr */
/* max value for numeric network address */
#define MAX_NUMERIC_VALUE 0xffffffff
+
/* implication */
#define ergo(a, b) (!(a) || (b))
/* logical equivalence */
# define CFS_CURRENT_TIME time(0)
#endif
+/* Server types */
+#define SVTYPE_MDT 0x0001
+#define SVTYPE_OST 0x0002
+#define SVTYPE_MGS 0x0004
+#define SVTYPE_ALL 0x0008
+
/* --------------------------------------------------------------------
* Light-weight trace
* Support for temporary event tracing with minimal Heisenberg effect.