Whamcloud - gitweb
LU-13004 lnet: remove the 'struct kvec' arg from lnd_send
[fs/lustre-release.git] / lnet / lnet / lo.c
index eaa06fb..31e2b66 100644 (file)
@@ -22,6 +22,8 @@
 /*
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
+ *
+ * Copyright (c) 2017, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -43,35 +45,16 @@ lolnd_send(struct lnet_ni *ni, void *private, struct lnet_msg *lntmsg)
 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);
        }
@@ -101,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,