/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
* vim:expandtab:shiftwidth=8:tabstop=8:
*
- * Copyright (C) 2004 Cluster File Systems, Inc.
- * Author: Eric Barton <eric@bartonsoftware.com>
- * Copyright (C) 2006 Myricom, Inc.
- * Author: Myricom, Inc. <help at myri.com>
+ * GPL HEADER START
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 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).
+ *
+ * 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
*
- * This file is part of Lustre, http://www.lustre.org.
+ * 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.
*
- * 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.
+ * GPL HEADER END
+ */
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved
+ * Use is subject to license terms.
*
- * 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.
+ * Copyright (C) 2006 Myricom, Inc.
+ */
+/*
+ * This file is part of Lustre, http://www.lustre.org/
+ * Lustre is a trademark of Sun Microsystems, Inc.
*
- * 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.
+ * lnet/klnds/mxlnd/mxlnd.c
+ *
+ * Author: Eric Barton <eric@bartonsoftware.com>
+ * Author: Scott Atchley <atchley at myri.com>
*/
#include "mxlnd.h"
}
/* mxm_nob */
msg->mxm_cksum = 0;
- msg->mxm_srcnid = lnet_ptlcompat_srcnid(kmxlnd_data.kmx_ni->ni_nid, tx->mxc_nid);
+ msg->mxm_srcnid = kmxlnd_data.kmx_ni->ni_nid;
msg->mxm_srcstamp = kmxlnd_data.kmx_incarnation;
msg->mxm_dstnid = tx->mxc_nid;
/* if it is a new peer, the dststamp will be 0 */
ctx->mxc_nseg = nseg;
sum = 0;
for (i = 0; i < nseg; i++) {
- seg[i].segment_ptr = MX_KVA_TO_U64(iov[first_iov + i].iov_base);
+ seg[i].segment_ptr = MX_PA_TO_U64(virt_to_phys(iov[first_iov + i].iov_base));
seg[i].segment_length = (u32) iov[first_iov + i].iov_len;
if (i == 0) {
seg[i].segment_ptr += (u64) first_iov_offset;
sum += seg[i].segment_length;
}
ctx->mxc_seg_list = seg;
- ctx->mxc_pin_type = MX_PIN_KERNEL;
+ ctx->mxc_pin_type = MX_PIN_PHYSICAL;
#ifdef MX_PIN_FULLPAGES
ctx->mxc_pin_type |= MX_PIN_FULLPAGES;
#endif
seq = msg->mxm_seq;
if (type != MXLND_MSG_CONN_REQ &&
- (!lnet_ptlcompat_matchnid(rx->mxc_nid, msg->mxm_srcnid) ||
- !lnet_ptlcompat_matchnid(kmxlnd_data.kmx_ni->ni_nid, msg->mxm_dstnid))) {
+ (rx->mxc_nid != msg->mxm_srcnid ||
+ kmxlnd_data.kmx_ni->ni_nid != msg->mxm_dstnid)) {
CDEBUG(D_NETERROR, "rx with mismatched NID (type %s) (my nid is "
"0x%llx and rx msg dst is 0x%llx)\n",
mxlnd_msgtype_to_str(type), kmxlnd_data.kmx_ni->ni_nid,
break;
case MXLND_MSG_CONN_REQ:
- if (!lnet_ptlcompat_matchnid(kmxlnd_data.kmx_ni->ni_nid, msg->mxm_dstnid)) {
+ if (kmxlnd_data.kmx_ni->ni_nid != msg->mxm_dstnid) {
CDEBUG(D_NETERROR, "Can't accept %s: bad dst nid %s\n",
libcfs_nid2str(msg->mxm_srcnid),
libcfs_nid2str(msg->mxm_dstnid));
break;
case MXLND_MSG_CONN_ACK:
- if (!lnet_ptlcompat_matchnid(kmxlnd_data.kmx_ni->ni_nid, msg->mxm_dstnid)) {
+ if (kmxlnd_data.kmx_ni->ni_nid != msg->mxm_dstnid) {
CDEBUG(D_NETERROR, "Can't accept CONN_ACK from %s: "
"bad dst nid %s\n", libcfs_nid2str(msg->mxm_srcnid),
libcfs_nid2str(msg->mxm_dstnid));