Whamcloud - gitweb
LU-6142 socklnd: change UAPI typedefs to proper structure
[fs/lustre-release.git] / lnet / klnds / socklnd / socklnd.h
index f02003a..4e89053 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  *
- * Copyright (c) 2011, 2013, Intel Corporation.
+ * Copyright (c) 2011, 2016, Intel Corporation.
  *
  *   Author: Zach Brown <zab@zabbo.net>
  *   Author: Peter J. Braam <braam@clusterfs.com>
@@ -31,9 +31,6 @@
 #define DEBUG_PORTAL_ALLOC
 #define DEBUG_SUBSYSTEM S_LND
 
-#ifdef HAVE_COMPAT_RDMA
-#include <linux/compat-2.6.h>
-#endif
 #include <linux/crc32.h>
 #include <linux/errno.h>
 #include <linux/if.h>
        tcp_sendpage(sk, page, offset, size, flags)
 #endif /* HAVE_TCP_SENDPAGE_USE_SOCKET */
 
+#ifndef NETIF_F_CSUM_MASK
+# define NETIF_F_CSUM_MASK NETIF_F_ALL_CSUM
+#endif
+
 /* assume one thread for each connection type */
 #define SOCKNAL_NSCHEDS                3
 #define SOCKNAL_NSCHEDS_HIGH   (SOCKNAL_NSCHEDS << 1)
@@ -287,7 +288,7 @@ typedef struct                                  /* transmit packet */
        struct ksock_conn *tx_conn;        /* owning conn */
         lnet_msg_t    *tx_lnetmsg;     /* lnet message for lnet_finalize() */
         cfs_time_t     tx_deadline;    /* when (in jiffies) tx times out */
-        ksock_msg_t    tx_msg;         /* socklnd message buffer */
+       struct ksock_msg    tx_msg;         /* socklnd message buffer */
         int            tx_desc_size;   /* size of this descriptor */
         union {
                 struct {
@@ -357,7 +358,7 @@ typedef struct ksock_conn
         ksock_rxiovspace_t    ksnc_rx_iov_space;/* space for frag descriptors */
         __u32                 ksnc_rx_csum;     /* partial checksum for incoming data */
         void                 *ksnc_cookie;      /* rx lnet_finalize passthru arg */
-        ksock_msg_t           ksnc_msg;         /* incoming message buffer:
+       struct ksock_msg           ksnc_msg;         /* incoming message buffer:
                                                  * V2.x message takes the
                                                  * whole struct
                                                  * V1.x message is a bare
@@ -451,10 +452,10 @@ extern ksock_tunables_t ksocknal_tunables;
 typedef struct ksock_proto
 {
         int           pro_version;                                              /* version number of protocol */
-        int         (*pro_send_hello)(ksock_conn_t *, ksock_hello_msg_t *);     /* handshake function */
-        int         (*pro_recv_hello)(ksock_conn_t *, ksock_hello_msg_t *, int);/* handshake function */
+       int         (*pro_send_hello)(ksock_conn_t *, struct ksock_hello_msg *);     /* handshake function */
+       int         (*pro_recv_hello)(ksock_conn_t *, struct ksock_hello_msg *, int);/* handshake function */
         void        (*pro_pack)(ksock_tx_t *);                                  /* message pack */
-        void        (*pro_unpack)(ksock_msg_t *);                               /* message unpack */
+       void        (*pro_unpack)(struct ksock_msg *);                          /* message unpack */
         ksock_tx_t *(*pro_queue_tx_msg)(ksock_conn_t *, ksock_tx_t *);          /* queue tx on the connection */
         int         (*pro_queue_tx_zcack)(ksock_conn_t *, ksock_tx_t *, __u64); /* queue ZC ack on the connection */
         int         (*pro_handle_zcreq)(ksock_conn_t *, __u64, int);            /* handle ZC request */
@@ -653,11 +654,11 @@ extern int ksocknal_new_packet (ksock_conn_t *conn, int skip);
 extern int ksocknal_scheduler (void *arg);
 extern int ksocknal_connd (void *arg);
 extern int ksocknal_reaper (void *arg);
-extern int ksocknal_send_hello (lnet_ni_t *ni, ksock_conn_t *conn,
-                                lnet_nid_t peer_nid, ksock_hello_msg_t *hello);
-extern int ksocknal_recv_hello (lnet_ni_t *ni, ksock_conn_t *conn,
-                                ksock_hello_msg_t *hello, lnet_process_id_t *id,
-                                __u64 *incarnation);
+extern int ksocknal_send_hello(lnet_ni_t *ni, ksock_conn_t *conn,
+                               lnet_nid_t peer_nid, struct ksock_hello_msg *hello);
+extern int ksocknal_recv_hello(lnet_ni_t *ni, ksock_conn_t *conn,
+                              struct ksock_hello_msg *hello, lnet_process_id_t *id,
+                              __u64 *incarnation);
 extern void ksocknal_read_callback(ksock_conn_t *conn);
 extern void ksocknal_write_callback(ksock_conn_t *conn);