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
b=19139
[fs/lustre-release.git]
/
lnet
/
utils
/
portals.c
diff --git
a/lnet/utils/portals.c
b/lnet/utils/portals.c
index
96d5a5e
..
e50037f
100644
(file)
--- a/
lnet/utils/portals.c
+++ b/
lnet/utils/portals.c
@@
-1,7
+1,7
@@
/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
* vim:expandtab:shiftwidth=8:tabstop=8:
*
/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
* vim:expandtab:shiftwidth=8:tabstop=8:
*
- * Copyright
(C) 2001, 2002 Cluster File Systems, Inc
.
+ * Copyright
2008 Sun Microsystems, Inc. All rights reserved
.
*
* This file is part of Portals, http://www.sf.net/projects/lustre/
*
*
* This file is part of Portals, http://www.sf.net/projects/lustre/
*
@@
-20,37
+20,10
@@
*
*/
*
*/
-#include <stdio.h>
-#include <sys/types.h>
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-#include <sys/socket.h>
-#ifdef HAVE_NETINET_TCP_H
-#include <netinet/tcp.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
-#ifndef _IOWR
-#include "ioctl.h"
-#endif
-#include <errno.h>
-#include <unistd.h>
-#include <time.h>
-#include <stdarg.h>
-#ifdef HAVE_ENDIAN_H
-#include <endian.h>
-#endif
-
-#include <libcfs/portals_utils.h>
+#include <libcfs/libcfsutil.h>
#include <lnet/api-support.h>
#include <lnet/lnetctl.h>
#include <lnet/socklnd.h>
#include <lnet/api-support.h>
#include <lnet/lnetctl.h>
#include <lnet/socklnd.h>
-#include "parser.h"
unsigned int libcfs_debug;
unsigned int libcfs_printk = D_CANTMASK;
unsigned int libcfs_debug;
unsigned int libcfs_printk = D_CANTMASK;
@@
-813,6
+786,10
@@
jt_ptl_print_connections (int argc, char **argv)
printf ("%-20s [%d]\n",
libcfs_nid2str(data.ioc_nid),
data.ioc_u32[0] /* device id */);
printf ("%-20s [%d]\n",
libcfs_nid2str(data.ioc_nid),
data.ioc_u32[0] /* device id */);
+ } else if (g_net_is_compatible (NULL, O2IBLND, 0)) {
+ printf ("%s mtu %d\n",
+ libcfs_nid2str(data.ioc_nid),
+ data.ioc_u32[0]); /* path MTU */
} else {
printf ("%s\n", libcfs_nid2str(data.ioc_nid));
}
} else {
printf ("%s\n", libcfs_nid2str(data.ioc_nid));
}
@@
-1433,17
+1410,18
@@
get_cycles_per_usec ()
return (1000.0);
}
return (1000.0);
}
+#define LWT_MAX_CPUS (32)
+
int
jt_ptl_lwt(int argc, char **argv)
{
int
jt_ptl_lwt(int argc, char **argv)
{
- const int lwt_max_cpus = 32;
int ncpus;
int totalspace;
int nevents_per_cpu;
lwt_event_t *events;
int ncpus;
int totalspace;
int nevents_per_cpu;
lwt_event_t *events;
- lwt_event_t *cpu_event[
lwt_max_cpus
+ 1];
- lwt_event_t *next_event[
lwt_max_cpus
];
- lwt_event_t *first_event[
lwt_max_cpus
];
+ lwt_event_t *cpu_event[
LWT_MAX_CPUS
+ 1];
+ lwt_event_t *next_event[
LWT_MAX_CPUS
];
+ lwt_event_t *first_event[
LWT_MAX_CPUS
];
int cpu;
lwt_event_t *e;
int rc;
int cpu;
lwt_event_t *e;
int rc;
@@
-1485,9
+1463,9
@@
jt_ptl_lwt(int argc, char **argv)
if (lwt_snapshot(NULL, &ncpus, &totalspace, NULL, 0) != 0)
return (-1);
if (lwt_snapshot(NULL, &ncpus, &totalspace, NULL, 0) != 0)
return (-1);
- if (ncpus >
lwt_max_cpus
) {
+ if (ncpus >
LWT_MAX_CPUS
) {
fprintf(stderr, "Too many cpus: %d (%d)\n",
fprintf(stderr, "Too many cpus: %d (%d)\n",
- ncpus,
lwt_max_cpus
);
+ ncpus,
LWT_MAX_CPUS
);
return (-1);
}
return (-1);
}