Whamcloud - gitweb
LU-6245 libcfs: remove cfs_fs_time handling
[fs/lustre-release.git] / lnet / selftest / rpc.h
index 25a37d0..db8aad8 100644 (file)
@@ -26,6 +26,8 @@
 /*
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
+ *
+ * Copyright (c) 2012, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -63,8 +65,6 @@ typedef enum {
         SRPC_MSG_JOIN_REPLY     = 17,
 } srpc_msg_type_t;
 
-#include <libcfs/libcfs_pack.h>
-
 /* CAVEAT EMPTOR:
  * All srpc_*_reqst_t's 1st field must be matchbits of reply buffer,
  * and 2nd field matchbits of bulk buffer if any.
@@ -181,7 +181,7 @@ typedef struct {
        __u16                   blk_flags;
        /** data length */
        __u32                   blk_len;
-       /** reserved: offset */
+       /** bulk offset */
        __u32                   blk_offset;
 } WIRE_ATTR test_bulk_req_v1_t;
 
@@ -221,7 +221,7 @@ typedef struct {
         __u32                   pnr_magic;
         __u32                   pnr_seq;
         __u64                   pnr_time_sec;
-        __u64                   pnr_time_usec;
+       __u64                   pnr_time_nsec;
 } WIRE_ATTR srpc_ping_reqst_t;
 
 typedef struct {
@@ -282,15 +282,15 @@ typedef struct srpc_msg {
         }     msg_body;
 } WIRE_ATTR srpc_msg_t;
 
-#include <libcfs/libcfs_unpack.h>
-
 static inline void
 srpc_unpack_msg_hdr(srpc_msg_t *msg)
 {
        if (msg->msg_magic == SRPC_MSG_MAGIC)
                return; /* no flipping needed */
 
-       __swab32s(&msg->msg_magic);
+       /* We do not swap the magic number here as it is needed to
+          determine whether the body needs to be swapped. */
+       /* __swab32s(&msg->msg_magic); */
        __swab32s(&msg->msg_type);
        __swab32s(&msg->msg_version);
        __swab32s(&msg->msg_ses_feats);