X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lnet%2Flnet%2Flo.c;h=82b723ce37f719cc5aff21d7234ee3bfeaa1b64f;hb=96a0c378c2e0a0c8f7e21404252e66944e163100;hp=a11ecddb08349ae92e609e93a91adcc3ee93d9bc;hpb=ccabce23bd9e366c345c852f565766a799f61238;p=fs%2Flustre-release.git diff --git a/lnet/lnet/lo.c b/lnet/lnet/lo.c index a11ecdd..82b723c 100644 --- a/lnet/lnet/lo.c +++ b/lnet/lnet/lo.c @@ -27,7 +27,6 @@ */ /* * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. */ #define DEBUG_SUBSYSTEM S_LNET @@ -39,41 +38,23 @@ lolnd_send(struct lnet_ni *ni, void *private, struct lnet_msg *lntmsg) LASSERT(!lntmsg->msg_routing); LASSERT(!lntmsg->msg_target_is_router); - return lnet_parse(ni, &lntmsg->msg_hdr, ni->ni_nid, lntmsg, 0); + return lnet_parse(ni, &lntmsg->msg_hdr, + lnet_nid_to_nid4(&ni->ni_nid), lntmsg, 0); } static int lolnd_recv(struct lnet_ni *ni, void *private, struct lnet_msg *lntmsg, int delayed, unsigned int niov, - struct kvec *iov, lnet_kiov_t *kiov, + struct bio_vec *kiov, unsigned int offset, unsigned int mlen, unsigned int rlen) { struct lnet_msg *sendmsg = private; - if (lntmsg != NULL) { /* not discarding */ - if (sendmsg->msg_iov != NULL) { - if (iov != NULL) - lnet_copy_iov2iov(niov, iov, offset, - sendmsg->msg_niov, - sendmsg->msg_iov, - sendmsg->msg_offset, mlen); - else - lnet_copy_iov2kiov(niov, kiov, offset, - sendmsg->msg_niov, - sendmsg->msg_iov, - sendmsg->msg_offset, mlen); - } else { - if (iov != NULL) - lnet_copy_kiov2iov(niov, iov, offset, - sendmsg->msg_niov, - sendmsg->msg_kiov, - sendmsg->msg_offset, mlen); - else - lnet_copy_kiov2kiov(niov, kiov, offset, - sendmsg->msg_niov, - sendmsg->msg_kiov, - sendmsg->msg_offset, mlen); - } + if (lntmsg) { /* not discarding */ + lnet_copy_kiov2kiov(niov, kiov, offset, + sendmsg->msg_niov, + sendmsg->msg_kiov, + sendmsg->msg_offset, mlen); lnet_finalize(lntmsg, 0); } @@ -103,11 +84,7 @@ lolnd_startup(struct lnet_ni *ni) return (0); } -struct lnet_lnd the_lolnd = { - .lnd_list = { - .next = &the_lolnd.lnd_list, - .prev = &the_lolnd.lnd_list - }, +const struct lnet_lnd the_lolnd = { .lnd_type = LOLND, .lnd_startup = lolnd_startup, .lnd_shutdown = lolnd_shutdown,