+/* Immediate data */
+typedef struct
+{
+ lnet_hdr_t kqim_hdr; /* LNET header */
+ char kqim_payload[0]; /* piggy-backed payload */
+} WIRE_ATTR kqswnal_immediate_msg_t;
+
+/* RDMA request */
+typedef struct
+{
+ lnet_hdr_t kqrm_hdr; /* LNET header */
+ kqswnal_remotemd_t kqrm_rmd; /* peer's buffer */
+} WIRE_ATTR kqswnal_rdma_msg_t;
+
+typedef struct
+{
+ __u32 kqm_magic; /* I'm a qswlnd message */
+ __u16 kqm_version; /* this is my version number */
+ __u16 kqm_type; /* msg type */
+#if KQSW_CKSUM
+ __u32 kqm_cksum; /* crc32 checksum */
+ __u32 kqm_nob; /* original msg length */
+#endif
+ union {
+ kqswnal_immediate_msg_t immediate;
+ kqswnal_rdma_msg_t rdma;
+ } WIRE_ATTR kqm_u;
+} WIRE_ATTR kqswnal_msg_t;
+
+#if KQSW_CKSUM /* enable checksums ? */
+# include <linux/crc32.h>
+static inline __u32 kqswnal_csum(__u32 crc, unsigned char const *p, size_t len)
+{
+#if 1
+ return crc32_le(crc, p, len);
+#else
+ while (len-- > 0)
+ crc = ((crc + 0x100) & ~0xff) | ((crc + *p++) & 0xff) ;
+ return crc;
+#endif
+}
+# define QSWLND_PROTO_VERSION 0xbeef
+#else
+# define QSWLND_PROTO_VERSION 1
+#endif
+
+#define QSWLND_MSG_IMMEDIATE 0
+#define QSWLND_MSG_RDMA 1
+
+typedef union {
+ EP_STATUSBLK ep_statusblk;
+ struct {
+ __u32 status;
+ __u32 magic;
+ __u32 version;
+ union {
+ struct {
+ __u32 len;
+ __u32 cksum;
+ } WIRE_ATTR get;
+ } WIRE_ATTR u;
+ } WIRE_ATTR msg;
+} kqswnal_rpc_reply_t;
+
+typedef struct kqswnal_rx