From bdd77c653ff536295267db1f86bf17fdb5c66293 Mon Sep 17 00:00:00 2001 From: eeb Date: Wed, 21 Sep 2005 16:54:30 +0000 Subject: [PATCH] * Added lnet/ulnds/ptllnd * Changed userspace LNET to register all LNDs it has been linked with and construct the default set of networks from them. * Added support for userspace LNET config via environment variables LNET_NETWORKS and LNET_ROUTES. They work just like the kernel module parameters. --- lnet/autoconf/lustre-lnet.m4 | 1 + lnet/include/lnet/lib-lnet.h | 22 +++-- lnet/lnet/api-ni.c | 192 +++++++++++++++++++++++++++++------------- lnet/lnet/config.c | 15 ++-- lnet/lnet/router.c | 98 +++++---------------- lnet/ulnds/.cvsignore | 1 - lnet/ulnds/Makefile.in | 1 + lnet/ulnds/autoMakefile.am | 2 +- lnet/ulnds/ptllnd/.cvsignore | 3 + lnet/ulnds/ptllnd/Makefile.am | 12 +++ lnet/ulnds/ptllnd/ptllnd.c | 48 +++++++++++ lnet/ulnds/ptllnd/ptllnd.h | 38 +++++++++ lnet/ulnds/ptllnd/ptllnd_cb.c | 43 ++++++++++ 13 files changed, 326 insertions(+), 150 deletions(-) create mode 100644 lnet/ulnds/ptllnd/.cvsignore create mode 100644 lnet/ulnds/ptllnd/Makefile.am create mode 100644 lnet/ulnds/ptllnd/ptllnd.c create mode 100644 lnet/ulnds/ptllnd/ptllnd.h create mode 100644 lnet/ulnds/ptllnd/ptllnd_cb.c diff --git a/lnet/autoconf/lustre-lnet.m4 b/lnet/autoconf/lustre-lnet.m4 index 139985c..61333ab 100644 --- a/lnet/autoconf/lustre-lnet.m4 +++ b/lnet/autoconf/lustre-lnet.m4 @@ -868,6 +868,7 @@ lnet/tests/autoMakefile lnet/ulnds/Makefile lnet/ulnds/autoMakefile lnet/ulnds/socklnd/Makefile +lnet/ulnds/ptllnd/Makefile lnet/utils/Makefile ]) case $lb_target_os in diff --git a/lnet/include/lnet/lib-lnet.h b/lnet/include/lnet/lib-lnet.h index 5065258..6ad03f0 100644 --- a/lnet/include/lnet/lib-lnet.h +++ b/lnet/include/lnet/lib-lnet.h @@ -434,6 +434,16 @@ lnet_nid2peerhash (lnet_nid_t nid) extern lnd_t the_lolnd; extern lnet_ni_t *lnet_loni; +#ifndef __KERNEL__ +#define LNET_REGISTER_LND_IF_PRESENT(lnd) \ +do { \ + extern lnd_t lnd __attribute__ ((weak, alias("the_lolnd"))); \ + \ + if (&(lnd) != &the_lolnd) \ + lnet_register_lnd(&(lnd)); \ +} while (0) +#endif + extern lnet_ni_t *lnet_net2ni_locked (__u32 net); static inline lnet_ni_t * lnet_net2ni (__u32 net) @@ -450,13 +460,14 @@ lnet_net2ni (__u32 net) int lnet_notify(lnet_ni_t *ni, lnet_nid_t peer, int alive, time_t when); int lnet_distance(lnet_nid_t nid, int *order); int lnet_add_route(__u32 net, unsigned int hops, lnet_nid_t gateway_nid); -int lnet_del_route (__u32 net, lnet_nid_t gw_nid); -int lnet_get_route (int idx, __u32 *net, __u32 *hops, - lnet_nid_t *gateway, __u32 *alive); +int lnet_del_route(__u32 net, lnet_nid_t gw_nid); +void lnet_destroy_routes(void); +int lnet_get_route(int idx, __u32 *net, __u32 *hops, + lnet_nid_t *gateway, __u32 *alive); void lnet_proc_init(void); void lnet_proc_fini(void); -int lnet_router_init(void); -void lnet_router_fini(void); +int lnet_alloc_rtrpools(void); +void lnet_free_rtrpools(void); lnet_remotenet_t *lnet_find_net_locked (__u32 net); int lnet_islocalnid(lnet_nid_t nid); @@ -562,6 +573,7 @@ int lnet_accept(lnet_ni_t *blind_ni, struct socket *sock, __u32 magic); int lnet_acceptor_timeout(void); int lnet_acceptor_port(void); #endif + int lnet_acceptor_start(void); void lnet_acceptor_stop(void); diff --git a/lnet/lnet/api-ni.c b/lnet/lnet/api-ni.c index 3992fab..4353bd5 100644 --- a/lnet/lnet/api-ni.c +++ b/lnet/lnet/api-ni.c @@ -22,16 +22,94 @@ #define DEBUG_SUBSYSTEM S_PORTALS #include +lnet_t the_lnet; /* THE state of the network */ + +#ifdef __KERNEL__ + #define DEFAULT_NETWORKS "tcp" static char *networks = DEFAULT_NETWORKS; CFS_MODULE_PARM(networks, "s", charp, 0444, "local networks (default='"DEFAULT_NETWORKS"')"); +static char *routes = ""; +CFS_MODULE_PARM(routes, "s", charp, 0444, + "routes to non-local networks"); + static char *portals_compatibility = "none"; CFS_MODULE_PARM(portals_compatibility, "s", charp, 0444, "wire protocol compatibility: 'strong'|'weak'|'none'"); -lnet_t the_lnet; /* THE state of the network */ +char * +lnet_get_routes(void) +{ + return routes; +} + +char * +lnet_get_networks(void) +{ + return networks; +} + +#else + +char * +lnet_get_routes(void) +{ + char *str = getenv("LNET_ROUTES"); + + return (str == NULL) ? "" : str; +} + +char * +lnet_get_networks (void) +{ + static char default_networks[256]; + char *str; + char *sep; + int len; + int nob; + struct list_head *tmp; + + str = getenv ("LNET_NETWORKS"); + if (str != NULL) + return str; + + /* In userland, the default 'networks=' is the list of known net types */ + + len = sizeof(default_networks); + str = default_networks; + *str = 0; + sep = ""; + + list_for_each (tmp, &the_lnet.ln_lnds) { + lnd_t *lnd = list_entry(tmp, lnd_t, lnd_list); + + nob = snprintf(str, len, "%s%s", sep, + libcfs_lnd2str(lnd->lnd_type)); + len -= nob; + if (len < 0) { + /* overflowed the string; leave it where it was */ + *str = 0; + break; + } + + str += nob; + sep = ","; + } + + return default_networks; +} + +void lnet_proc_init(void) +{ +} + +void lnet_proc_fini(void) +{ +} + +#endif void lnet_assert_wire_constants (void) { @@ -152,7 +230,7 @@ lnet_register_lnd (lnd_t *lnd) LASSERT (libcfs_isknown_lnd(lnd->lnd_type)); LASSERT (lnet_find_lnd_by_type(lnd->lnd_type) == NULL); - list_add (&lnd->lnd_list, &the_lnet.ln_lnds); + list_add_tail (&lnd->lnd_list, &the_lnet.ln_lnds); lnd->lnd_refcount = 0; if (lnd->lnd_type != LOLND) @@ -390,7 +468,6 @@ lnet_init(lnet_pid_t requested_pid) { int rc = 0; int i; - ENTRY; LASSERT (the_lnet.ln_refcount == 0); @@ -402,9 +479,9 @@ lnet_init(lnet_pid_t requested_pid) the_lnet.ln_pid |= LNET_PID_USERFLAG; #endif - rc = lnet_descriptor_setup (); + rc = lnet_descriptor_setup(); if (rc != 0) - goto out; + goto failed0; memset(&the_lnet.ln_counters, 0, sizeof(the_lnet.ln_counters)); @@ -421,11 +498,15 @@ lnet_init(lnet_pid_t requested_pid) rc = lnet_setup_handle_hash (); if (rc != 0) - goto out; + goto failed0; rc = lnet_create_peer_table(); if (rc != 0) - goto out; + goto failed1; + + rc = lnet_alloc_rtrpools(); + if (rc != 0) + goto failed2; the_lnet.ln_nportals = MAX_PORTALS; PORTAL_ALLOC(the_lnet.ln_portals, @@ -433,20 +514,23 @@ lnet_init(lnet_pid_t requested_pid) sizeof(*the_lnet.ln_portals)); if (the_lnet.ln_portals == NULL) { rc = -ENOMEM; - goto out; + goto failed3; } for (i = 0; i < the_lnet.ln_nportals; i++) CFS_INIT_LIST_HEAD(&(the_lnet.ln_portals[i])); - out: - if (rc != 0) { - lnet_destroy_peer_table(); - lnet_cleanup_handle_hash(); - lnet_descriptor_cleanup(); - } - - RETURN (rc); + return 0; + + failed3: + lnet_free_rtrpools(); + failed2: + lnet_destroy_peer_table(); + failed1: + lnet_cleanup_handle_hash(); + failed0: + lnet_descriptor_cleanup(); + return rc; } int @@ -508,15 +592,11 @@ lnet_fini (void) PORTAL_FREE(the_lnet.ln_portals, the_lnet.ln_nportals * sizeof(*the_lnet.ln_portals)); + lnet_free_rtrpools(); lnet_destroy_peer_table(); lnet_cleanup_handle_hash(); lnet_descriptor_cleanup(); -#ifndef __KERNEL__ - pthread_mutex_destroy(&the_lnet.ln_mutex); - pthread_cond_destroy(&the_lnet.ln_cond); -#endif - return (0); } @@ -721,7 +801,7 @@ lnet_startup_lndnis (void) int retry; INIT_LIST_HEAD(&nilist); - rc = lnet_parse_networks(&nilist, networks); + rc = lnet_parse_networks(&nilist, lnet_get_networks()); if (rc != 0) goto failed; @@ -823,10 +903,6 @@ lnet_startup_lndnis (void) return -ENETDOWN; } -#ifndef __KERNEL__ -extern lnd_t the_tcplnd; -#endif - int LNetInit(void) { @@ -842,14 +918,6 @@ LNetInit(void) cfs_waitq_init (&the_lnet.ln_waitq); init_mutex(&the_lnet.ln_lnd_mutex); init_mutex(&the_lnet.ln_api_mutex); -#else - pthread_mutex_init(&the_lnet.ln_mutex, NULL); - pthread_cond_init(&the_lnet.ln_cond, NULL); - pthread_mutex_init(&the_lnet.ln_lnd_mutex, NULL); - pthread_mutex_init(&the_lnet.ln_api_mutex, NULL); -#endif - - the_lnet.ln_init = 1; if (!strcmp(portals_compatibility, "none")) { the_lnet.ln_ptlcompat = 0; @@ -865,14 +933,23 @@ LNetInit(void) return -1; } - /* NALs in separate modules register themselves when their module - * loads, and unregister themselves when their module is unloaded. - * Otherwise they are plugged in explicitly here... */ + /* All LNDs apart from the LOLND are in separate modules. They + * register themselves when their module loads, and unregister + * themselves when their module is unloaded. */ +#else + pthread_mutex_init(&the_lnet.ln_mutex, NULL); + pthread_cond_init(&the_lnet.ln_cond, NULL); + pthread_mutex_init(&the_lnet.ln_lnd_mutex, NULL); + pthread_mutex_init(&the_lnet.ln_api_mutex, NULL); - lnet_register_lnd (&the_lolnd); -#ifndef __KERNEL__ - lnet_register_lnd (&the_tcplnd); + /* Register all LNDs that have been loaded + * NB the order here determines default 'networks=' order */ + LNET_REGISTER_LND_IF_PRESENT(the_ptllnd); + LNET_REGISTER_LND_IF_PRESENT(the_tcplnd); #endif + lnet_register_lnd(&the_lolnd); + + the_lnet.ln_init = 1; return 0; } @@ -882,28 +959,23 @@ LNetFini(void) LASSERT (the_lnet.ln_init); LASSERT (the_lnet.ln_refcount == 0); - /* See comment where the_tcplnd registers itself */ -#ifndef __KERNEL__ - lnet_unregister_lnd(&the_tcplnd); -#endif +#ifdef __KERNEL__ + /* LNDs unregister themselves when their module unloads */ lnet_unregister_lnd(&the_lolnd); - LASSERT (list_empty(&the_lnet.ln_lnds)); +#else + while (!list_empty(&the_lnet.ln_lnds)) + lnet_unregister_lnd(list_entry(the_lnet.ln_lnds.next, + lnd_t, lnd_list)); - the_lnet.ln_init = 0; - - -} - -#ifndef __KERNEL__ -void lnet_proc_init(void) -{ -} + pthread_mutex_destroy(&the_lnet.ln_api_mutex); + pthread_mutex_destroy(&the_lnet.ln_lnd_mutex); + pthread_cond_destroy(&the_lnet.ln_cond); + pthread_mutex_destroy(&the_lnet.ln_mutex); +#endif -void lnet_proc_fini(void) -{ + the_lnet.ln_init = 0; } -#endif int LNetNIInit(lnet_pid_t requested_pid) @@ -930,7 +1002,7 @@ LNetNIInit(lnet_pid_t requested_pid) goto out; } - rc = lnet_router_init(); + rc = lnet_parse_routes(lnet_get_routes()); if (rc != 0) { lnet_shutdown_lndnis(); lnet_fini(); @@ -939,7 +1011,7 @@ LNetNIInit(lnet_pid_t requested_pid) rc = lnet_acceptor_start(); if (rc != 0) { - lnet_router_fini(); + lnet_destroy_routes(); lnet_shutdown_lndnis(); lnet_fini(); goto out; @@ -966,7 +1038,7 @@ LNetNIFini() if (the_lnet.ln_refcount == 0) { lnet_proc_fini(); lnet_acceptor_stop(); - lnet_router_fini(); + lnet_destroy_routes(); lnet_shutdown_lndnis(); lnet_fini(); } diff --git a/lnet/lnet/config.c b/lnet/lnet/config.c index 2487187..56a5669 100644 --- a/lnet/lnet/config.c +++ b/lnet/lnet/config.c @@ -141,7 +141,7 @@ lnet_new_ni(__u32 net, struct list_head *nilist) /* zero counters/flags, NULL pointers... */ memset(ni, 0, sizeof(*ni)); - /* NAL will fill in the address part of the NID */ + /* LND will fill in the address part of the NID */ ni->ni_nid = PTL_MKNID(net, 0); CFS_INIT_LIST_HEAD(&ni->ni_txq); @@ -187,7 +187,7 @@ lnet_parse_networks(struct list_head *nilist, char *networks) int niface; char *iface; - /* NB we don't check interface conflicts here; it's the NALs + /* NB we don't check interface conflicts here; it's the LNDs * responsibility (if it cares at all) */ if (bracket == NULL || @@ -202,10 +202,12 @@ lnet_parse_networks(struct list_head *nilist, char *networks) if (net == PTL_NIDNET(LNET_NID_ANY)) { lnet_syntax("networks", networks, str - tokens, strlen(str)); + LCONSOLE_ERROR("Unrecognised network type\n"); goto failed; } - if (lnet_new_ni(net, nilist) == NULL) + if (PTL_NETTYP(net) != LOLND && /* loopback is implicit */ + lnet_new_ni(net, nilist) == NULL) goto failed; str = comma; @@ -285,10 +287,7 @@ lnet_parse_networks(struct list_head *nilist, char *networks) } } - if (list_empty(nilist)) { - LCONSOLE_ERROR("No networks specified\n"); - goto failed; - } + LASSERT (!list_empty(nilist)); return 0; failed: @@ -732,7 +731,7 @@ lnet_set_ip_niaddr (lnet_ni_t *ni) int i; int rc; - /* Convenience for NALs that use the IP address of a local interface as + /* Convenience for LNDs that use the IP address of a local interface as * the local address part of their NID */ if (ni->ni_interfaces[0] != NULL) { diff --git a/lnet/lnet/router.c b/lnet/lnet/router.c index 54f87f6..ddb04c9 100644 --- a/lnet/lnet/router.c +++ b/lnet/lnet/router.c @@ -29,10 +29,6 @@ static int forwarding = 0; CFS_MODULE_PARM(forwarding, "i", int, 0444, "Boolean: set non-zero to forward between networks"); -static char *routes = ""; -CFS_MODULE_PARM(routes, "s", charp, 0444, - "routes to non-local networks"); - static int tiny_router_buffers = 512; CFS_MODULE_PARM(tiny_router_buffers, "i", int, 0444, "# of 0 payload messages to buffer in the router"); @@ -180,6 +176,17 @@ lnet_notify (lnet_ni_t *ni, lnet_nid_t gateway_nid, int alive, time_t when) return (0); } +EXPORT_SYMBOL(lnet_notify); + +#else + +int +lnet_notify (lnet_ni_t *ni, lnet_nid_t gateway_nid, int alive, time_t when) +{ + return -EOPNOTSUPP; +} + +#endif lnet_remotenet_t * lnet_find_net_locked (__u32 net) @@ -413,6 +420,12 @@ lnet_del_route (__u32 net, lnet_nid_t gw_nid) return rc; } +void +lnet_destroy_routes (void) +{ + lnet_del_route(PTL_NIDNET(LNET_NID_ANY), LNET_NID_ANY); +} + int lnet_get_route (int idx, __u32 *net, __u32 *hops, lnet_nid_t *gateway, __u32 *alive) @@ -445,6 +458,8 @@ lnet_get_route (int idx, __u32 *net, __u32 *hops, return -ENOENT; } +#ifdef __KERNEL + void lnet_destory_rtrbuf(lnet_rtrbuf_t *rb, int npages) { @@ -621,85 +636,18 @@ lnet_alloc_rtrpools(void) return rc; } - -void -lnet_router_fini (void) -{ - lnet_del_route(PTL_NIDNET(LNET_NID_ANY), LNET_NID_ANY); - lnet_free_rtrpools(); -} - -int -lnet_router_init (void) -{ - int rc; - - rc = lnet_alloc_rtrpools(); - if (rc != 0) - return rc; - - rc = lnet_parse_routes(routes); - if (rc != 0) { - lnet_del_route(PTL_NIDNET(LNET_NID_ANY), LNET_NID_ANY); - lnet_free_rtrpools(); - return rc; - } - - return 0; -} - -EXPORT_SYMBOL(lnet_notify); - #else -int -lnet_add_route (__u32 net, unsigned int hops, lnet_nid_t gateway) -{ - return -EOPNOTSUPP; -} - -int -lnet_del_route (__u32 net, lnet_nid_t gw_nid) -{ - return -EOPNOTSUPP; -} - -int -lnet_get_route (int idx, __u32 *net, __u32 *hops, - lnet_nid_t *gateway, __u32 *alive) -{ - return -ENOENT; -} - -lnet_remotenet_t * -lnet_find_net_locked (__u32 net) -{ - return NULL; -} - -int -lnet_distance(lnet_nid_t nid, int *orderp) -{ - if (!lnet_islocalnet(PTL_NIDNET(nid), orderp)) - return -ENETUNREACH; - - return 0; -} - -int -lnet_notify (lnet_ni_t *ni, lnet_nid_t gateway_nid, int alive, time_t when) -{ - return -EOPNOTSUPP; -} - void -lnet_router_fini (void) +lnet_free_rtrpools (void) { } int -lnet_router_init (void) +lnet_alloc_rtrpools (void) { + /* No userspace routing */ + the_lnet.ln_routing = 0; return 0; } diff --git a/lnet/ulnds/.cvsignore b/lnet/ulnds/.cvsignore index 036598e..2711a44 100644 --- a/lnet/ulnds/.cvsignore +++ b/lnet/ulnds/.cvsignore @@ -1,5 +1,4 @@ .deps Makefile -Makefile.in autoMakefile autoMakefile.in diff --git a/lnet/ulnds/Makefile.in b/lnet/ulnds/Makefile.in index f7737a6..5ea8eed 100644 --- a/lnet/ulnds/Makefile.in +++ b/lnet/ulnds/Makefile.in @@ -1,4 +1,5 @@ subdir-m += socklnd +subdir-m += ptllnd @INCLUDE_RULES@ diff --git a/lnet/ulnds/autoMakefile.am b/lnet/ulnds/autoMakefile.am index 2b0d7b9..0e7fa4c2 100644 --- a/lnet/ulnds/autoMakefile.am +++ b/lnet/ulnds/autoMakefile.am @@ -3,4 +3,4 @@ # This code is issued under the GNU General Public License. # See the file COPYING in this distribution -SUBDIRS = socklnd +SUBDIRS = socklnd ptllnd diff --git a/lnet/ulnds/ptllnd/.cvsignore b/lnet/ulnds/ptllnd/.cvsignore new file mode 100644 index 0000000..e995588 --- /dev/null +++ b/lnet/ulnds/ptllnd/.cvsignore @@ -0,0 +1,3 @@ +.deps +Makefile +Makefile.in diff --git a/lnet/ulnds/ptllnd/Makefile.am b/lnet/ulnds/ptllnd/Makefile.am new file mode 100644 index 0000000..06aa566 --- /dev/null +++ b/lnet/ulnds/ptllnd/Makefile.am @@ -0,0 +1,12 @@ + +if BUILD_PTLLND +if LIBLUSTRE +noinst_LIBRARIES = libptllnd.a +noinst_HEADERS = ptllnd.h +libptllnd_a_SOURCES = ptllnd.c ptllnd_cb.c +libptllnd_a_CPPFLAGS= $(LLCPPFLAGS) +# I need $(PTLNDCPPLFLAGS) to be AFTER $(CPPFLAGS) +# Adding them into $(AM_CFLAGS) seems wrong, but lets me get on.. +libptllnd_a_CFLAGS= $(PTLLNDCPPFLAGS) $(LLCFLAGS) +endif +endif diff --git a/lnet/ulnds/ptllnd/ptllnd.c b/lnet/ulnds/ptllnd/ptllnd.c new file mode 100644 index 0000000..6e40ea7 --- /dev/null +++ b/lnet/ulnds/ptllnd/ptllnd.c @@ -0,0 +1,48 @@ +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: + * + * Copyright (C) 2005 Cluster File Systems, Inc. + * Author: Eric Barton + * + * This file is part of Lustre, http://www.lustre.org. + * + * Lustre is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General Public + * License as published by the Free Software Foundation. + * + * Lustre is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Lustre; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +#include "ptllnd.h" + +lnd_t the_ptllnd = { + .lnd_type = PTLLND, + .lnd_startup = ptllnd_startup, + .lnd_shutdown = ptllnd_shutdown, + .lnd_send = ptllnd_send, + .lnd_recv = ptllnd_recv, + .lnd_eager_recv = ptllnd_eager_recv, +}; + + +void ptllnd_shutdown(struct lnet_ni *ni) +{ +} + +int ptllnd_startup(struct lnet_ni *ni) +{ + /* could get limits from portals I guess... */ + ni->ni_maxtxcredits = + ni->ni_peertxcredits = 1000; + + return 0; +} + diff --git a/lnet/ulnds/ptllnd/ptllnd.h b/lnet/ulnds/ptllnd/ptllnd.h new file mode 100644 index 0000000..9efd8b0 --- /dev/null +++ b/lnet/ulnds/ptllnd/ptllnd.h @@ -0,0 +1,38 @@ +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: + * + * Copyright (C) 2005 Cluster File Systems, Inc. + * Author: Eric Barton + * + * This file is part of Lustre, http://www.lustre.org. + * + * Lustre is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General Public + * License as published by the Free Software Foundation. + * + * Lustre is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Lustre; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +#define DEBUG_SUBSYSTEM S_NAL + +#include + +#include + +extern int ptllnd_startup(struct lnet_ni *ni); +extern void ptllnd_shutdown(struct lnet_ni *ni); +extern int ptllnd_send(struct lnet_ni *ni, void *private, lnet_msg_t *msg); +extern int ptllnd_recv(struct lnet_ni *ni, void *private, lnet_msg_t *msg, + int delayed, unsigned int niov, + struct iovec *iov, lnet_kiov_t *kiov, + unsigned int offset, unsigned int mlen, unsigned int rlen); +extern int ptllnd_eager_recv(struct lnet_ni *ni, void *private, lnet_msg_t *msg, + void **new_privatep); diff --git a/lnet/ulnds/ptllnd/ptllnd_cb.c b/lnet/ulnds/ptllnd/ptllnd_cb.c new file mode 100644 index 0000000..f5ceb33 --- /dev/null +++ b/lnet/ulnds/ptllnd/ptllnd_cb.c @@ -0,0 +1,43 @@ +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: + * + * Copyright (C) 2005 Cluster File Systems, Inc. + * Author: Eric Barton + * + * This file is part of Lustre, http://www.lustre.org. + * + * Lustre is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General Public + * License as published by the Free Software Foundation. + * + * Lustre is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Lustre; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +#include "ptllnd.h" + +int pltlnd_send(struct lnet_ni *ni, void *private, lnet_msg_t *msg) +{ + return -EIO; +} + +int pltlnd_recv(struct lnet_ni *ni, void *private, lnet_msg_t *msg, + int delayed, unsigned int niov, + struct iovec *iov, lnet_kiov_t *kiov, + unsigned int offset, unsigned int mlen, unsigned int rlen) +{ + return -EIO; +} + +int ptllnd_eager_recv(struct lnet_ni *ni, void *private, lnet_msg_t *msg, + void **new_privatep) +{ + return -EIO; +} -- 1.8.3.1