X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lnet%2Finclude%2Flnet%2Fptllnd_wire.h;h=845a53260702cffeb32b2a7ff322500581c9e467;hp=e5b54108a426aa9e10b48aa23564d61037686a27;hb=413b6c2e365cf3ff986611e20dd77186ed25a3ac;hpb=ed88907a96ba81d3558e71ade9def98bdc785169 diff --git a/lnet/include/lnet/ptllnd_wire.h b/lnet/include/lnet/ptllnd_wire.h index e5b5410..845a532 100644 --- a/lnet/include/lnet/ptllnd_wire.h +++ b/lnet/include/lnet/ptllnd_wire.h @@ -1,21 +1,44 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: +/* + * GPL HEADER START * - * Copyright (C) 2005 Cluster File Systems, Inc. All rights reserved. - * Author: PJ Kirner + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 only, + * as published by the Free Software Foundation. * - * This file is confidential source code owned by Cluster File Systems. - * No viewing, modification, compilation, redistribution, or any other - * form of use is permitted except through a signed license agreement. + * This program 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 version 2 for more details (a copy is included + * in the LICENSE file that accompanied this code). * - * If you have not signed such an agreement, then you have no rights to - * this file. Please destroy it immediately and contact CFS. + * You should have received a copy of the GNU General Public License + * version 2 along with this program; If not, see + * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + * + * GPL HEADER END + */ +/* + * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. + * Use is subject to license terms. + */ +/* + * This file is part of Lustre, http://www.lustre.org/ + * Lustre is a trademark of Sun Microsystems, Inc. + * + * lnet/include/lnet/ptllnd_wire.h + * + * Author: PJ Kirner */ +/* Minimum buffer size that any peer will post to receive ptllnd messages */ +#define PTLLND_MIN_BUFFER_SIZE 256 + /************************************************************************ * Tunable defaults that {u,k}lnds/ptllnd should have in common. */ @@ -23,11 +46,17 @@ #define PTLLND_PORTAL 9 /* The same portal PTLPRC used when talking to cray portals */ #define PTLLND_PID 9 /* The Portals PID */ #define PTLLND_PEERCREDITS 8 /* concurrent sends to 1 peer */ -#define PTLLND_MAX_MSG_SIZE 512 /* Maximum message size */ + +/* Default buffer size for kernel ptllnds (guaranteed eager) */ +#define PTLLND_MAX_KLND_MSG_SIZE 512 + +/* Default buffer size for catamount ptllnds (not guaranteed eager) - large + * enough to avoid RDMA for anything sent while control is not in liblustre */ +#define PTLLND_MAX_ULND_MSG_SIZE 512 /************************************************************************ - * Portals LNS Wire message format. + * Portals LND Wire message format. * These are sent in sender's byte order (i.e. receiver flips). */ @@ -77,6 +106,9 @@ typedef struct } kptl_msg_t; +/* kptl_msg_t::ptlm_credits is only a __u8 */ +#define PTLLND_MSG_MAX_CREDITS ((typeof(((kptl_msg_t*) 0)->ptlm_credits)) -1) + #define PTLLND_MSG_MAGIC LNET_PROTO_PTL_MAGIC #define PTLLND_MSG_VERSION 0x04 @@ -90,4 +122,3 @@ typedef struct #define PTLLND_MSG_TYPE_NOOP 0x04 #define PTLLND_MSG_TYPE_HELLO 0x05 #define PTLLND_MSG_TYPE_NAK 0x06 -