From 274779f2f7cd3d398b697390fc287a27939844e3 Mon Sep 17 00:00:00 2001 From: pschwan Date: Sun, 2 Mar 2003 05:19:27 +0000 Subject: [PATCH] merge 0.5.20.3 b_devel into b_io (ready to land) --- lustre/liblustre/Makefile.am | 6 +++--- lustre/liblustre/libtest.c | 19 +++++++++++-------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/lustre/liblustre/Makefile.am b/lustre/liblustre/Makefile.am index 584dea7..c761a22 100644 --- a/lustre/liblustre/Makefile.am +++ b/lustre/liblustre/Makefile.am @@ -5,10 +5,10 @@ CFLAGS:=-g -O2 -I$(top_srcdir)/utils -I$(PORTALS)/include -I$(srcdir)/../includ KFLAGS:= CPPFLAGS = $(HAVE_LIBREADLINE) -LIBS= +LIBS= +LLIBS= ../lov/liblov.a ../obdecho/libobdecho.a ../osc/libosc.a ../ldlm/libldlm.a ../ptlrpc/libptlrpc.a ../obdclass/liblustreclass.a -libtest_LDADD := $(LIBREADLINE) ../lov/liblov.a ../obdecho/libobdecho.a ../osc/libosc.a ../ldlm/libldlm.a \ - ../ptlrpc/libptlrpc.a ../obdclass/liblustreclass.a \ +libtest_LDADD := $(LIBREADLINE) $(LLIBS) \ $(PORTALS)/user/procbridge/libprocbridge.a $(PORTALS)/user/tcpnal/libtcpnal.a \ $(PORTALS)/user/util/libtcpnalutil.a $(PORTALS)/user/$(PORTALS)/api/libptlapi.a \ $(PORTALS)/lib/libptllib.a -lptlctl -lpthread -lefence diff --git a/lustre/liblustre/libtest.c b/lustre/liblustre/libtest.c index fd5bb20..fce75c0 100644 --- a/lustre/liblustre/libtest.c +++ b/lustre/liblustre/libtest.c @@ -1,4 +1,7 @@ #include +#include +#include +#include #include /* needed for ptpctl.h */ #include /* needed for parse_dump */ @@ -44,13 +47,15 @@ void init_current(int argc, char **argv) } +extern ptl_nid_t tcpnal_mynid; + int init_lib_portals(struct pingcli_args *args) { int rc; PtlInit(); - - rc = PtlNIInit(procbridge_interface, 0, 0, args->mynid, &tcpnal_ni); + tcpnal_mynid = args->mynid; + rc = PtlNIInit(procbridge_interface, 0, 0, 0, &tcpnal_ni); if (rc != 0) { CERROR("ksocknal: PtlNIInit failed: error %d\n", rc); PtlFini(); @@ -79,7 +84,7 @@ int lib_ioctl(int dev_id, int opc, void * ptr) return (0); } -int main(int arc, char **argv) +int main(int argc, char **argv) { struct pingcli_args *args; args= malloc(sizeof(*args)); @@ -88,12 +93,10 @@ int main(int arc, char **argv) exit(1); } - args->mynid = atoi(argv[1]); - args->nid = atoi(argv[2]); - args->port = 9999; - args->count = atoi(argv[3]); - args->size = atoi(argv[4]); + args->mynid = ntohl (inet_addr (argv[1])); + INIT_LIST_HEAD(&ocus.ocus_conns); + init_current(argc, argv); init_obdclass(); init_lib_portals(args); ptlrpc_init(); -- 1.8.3.1