/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
* vim:expandtab:shiftwidth=8:tabstop=8:
*
- * Copyright (C) 2001, 2002 Cluster File Systems, Inc.
- * Author: Maxim Patlasov <maxim@clusterfs.com>
+ * GPL HEADER START
*
- * This file is part of the Lustre file system, http://www.lustre.org
- * Lustre is a trademark of Cluster File Systems, Inc.
+ * 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
+ *
+ * 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 2008 Sun Microsystems, Inc. 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/ulnds/socklnd/handlers.c
+ *
+ * Author: Maxim Patlasov <maxim@clusterfs.com>
*/
#include "usocklnd.h"
#include <unistd.h>
-#include <syscall.h>
+#include <sys/syscall.h>
int
usocklnd_notifier_handler(int fd)
if (conn->uc_flip) {
__swab32s(&conn->uc_rx_msg.ksm_type);
__swab32s(&conn->uc_rx_msg.ksm_csum);
- __swab64s(&conn->uc_rx_msg.ksm_zc_req_cookie);
- __swab64s(&conn->uc_rx_msg.ksm_zc_ack_cookie);
+ __swab64s(&conn->uc_rx_msg.ksm_zc_cookies[0]);
+ __swab64s(&conn->uc_rx_msg.ksm_zc_cookies[1]);
}
/* we never send packets for wich zc-acking is required */
if (conn->uc_rx_msg.ksm_type != KSOCK_MSG_LNET ||
- conn->uc_rx_msg.ksm_zc_ack_cookie != 0) {
+ conn->uc_rx_msg.ksm_zc_cookies[1] != 0) {
conn->uc_errored = 1;
return -EPROTO;
}
lnet_finalize(conn->uc_peer->up_ni, conn->uc_rx_lnetmsg, 0);
- cookie = conn->uc_rx_msg.ksm_zc_req_cookie;
+ cookie = conn->uc_rx_msg.ksm_zc_cookies[0];
if (cookie != 0)
rc = usocklnd_handle_zc_req(conn->uc_peer, cookie);
list_del(&tx->tx_list);
/* already piggybacked or partially send */
- if (tx->tx_msg.ksm_zc_ack_cookie ||
+ if (tx->tx_msg.ksm_zc_cookies[1] != 0 ||
tx->tx_resid != tx->tx_nob)
return tx;
}
if (tx != NULL)
/* piggyback the zc-ack cookie */
- tx->tx_msg.ksm_zc_ack_cookie = zc_ack->zc_cookie;
+ tx->tx_msg.ksm_zc_cookies[1] = zc_ack->zc_cookie;
else
/* cannot piggyback, need noop */
tx = usocklnd_create_noop_tx(zc_ack->zc_cookie);