Commit 8ea43b5a authored by James Simmons's avatar James Simmons Committed by Greg Kroah-Hartman

staging: lustre: socklnd: change UAPI typedefs to proper structure

The upstream kernel requires proper structures so
convert all the UAPI typedefs in socklnd.h.
Signed-off-by: default avatarJames Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/18506Reviewed-by: default avatarDmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: default avatarDoug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: default avatarJohn L. Hammond <john.hammond@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ccbadf70
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
#define SOCKLND_CONN_ACK SOCKLND_CONN_BULK_IN #define SOCKLND_CONN_ACK SOCKLND_CONN_BULK_IN
typedef struct { struct ksock_hello_msg {
__u32 kshm_magic; /* magic number of socklnd message */ __u32 kshm_magic; /* magic number of socklnd message */
__u32 kshm_version; /* version of socklnd message */ __u32 kshm_version; /* version of socklnd message */
lnet_nid_t kshm_src_nid; /* sender's nid */ lnet_nid_t kshm_src_nid; /* sender's nid */
...@@ -57,9 +57,9 @@ typedef struct { ...@@ -57,9 +57,9 @@ typedef struct {
__u32 kshm_ctype; /* connection type */ __u32 kshm_ctype; /* connection type */
__u32 kshm_nips; /* # IP addrs */ __u32 kshm_nips; /* # IP addrs */
__u32 kshm_ips[0]; /* IP addrs */ __u32 kshm_ips[0]; /* IP addrs */
} WIRE_ATTR ksock_hello_msg_t; } WIRE_ATTR;
typedef struct { struct ksock_lnet_msg {
struct lnet_hdr ksnm_hdr; /* lnet hdr */ struct lnet_hdr ksnm_hdr; /* lnet hdr */
/* /*
...@@ -68,17 +68,17 @@ typedef struct { ...@@ -68,17 +68,17 @@ typedef struct {
* structure definitions. lnet payload will be stored just after * structure definitions. lnet payload will be stored just after
* the body of structure ksock_lnet_msg_t * the body of structure ksock_lnet_msg_t
*/ */
} WIRE_ATTR ksock_lnet_msg_t; } WIRE_ATTR;
typedef struct { struct ksock_msg {
__u32 ksm_type; /* type of socklnd message */ __u32 ksm_type; /* type of socklnd message */
__u32 ksm_csum; /* checksum if != 0 */ __u32 ksm_csum; /* checksum if != 0 */
__u64 ksm_zc_cookies[2]; /* Zero-Copy request/ACK cookie */ __u64 ksm_zc_cookies[2]; /* Zero-Copy request/ACK cookie */
union { union {
ksock_lnet_msg_t lnetmsg;/* lnet message, it's empty if struct ksock_lnet_msg lnetmsg; /* lnet message, it's empty if
* it's NOOP */ * it's NOOP */
} WIRE_ATTR ksm_u; } WIRE_ATTR ksm_u;
} WIRE_ATTR ksock_msg_t; } WIRE_ATTR;
#define KSOCK_MSG_NOOP 0xC0 /* ksm_u empty */ #define KSOCK_MSG_NOOP 0xC0 /* ksm_u empty */
#define KSOCK_MSG_LNET 0xC1 /* lnet msg */ #define KSOCK_MSG_LNET 0xC1 /* lnet msg */
......
...@@ -1038,7 +1038,7 @@ ksocknal_create_conn(lnet_ni_t *ni, struct ksock_route *route, ...@@ -1038,7 +1038,7 @@ ksocknal_create_conn(lnet_ni_t *ni, struct ksock_route *route,
struct ksock_peer *peer = NULL; struct ksock_peer *peer = NULL;
struct ksock_peer *peer2; struct ksock_peer *peer2;
struct ksock_sched *sched; struct ksock_sched *sched;
ksock_hello_msg_t *hello; struct ksock_hello_msg *hello;
int cpt; int cpt;
struct ksock_tx *tx; struct ksock_tx *tx;
struct ksock_tx *txtmp; struct ksock_tx *txtmp;
...@@ -1077,7 +1077,7 @@ ksocknal_create_conn(lnet_ni_t *ni, struct ksock_route *route, ...@@ -1077,7 +1077,7 @@ ksocknal_create_conn(lnet_ni_t *ni, struct ksock_route *route,
conn->ksnc_tx_carrier = NULL; conn->ksnc_tx_carrier = NULL;
atomic_set(&conn->ksnc_tx_nob, 0); atomic_set(&conn->ksnc_tx_nob, 0);
LIBCFS_ALLOC(hello, offsetof(ksock_hello_msg_t, LIBCFS_ALLOC(hello, offsetof(struct ksock_hello_msg,
kshm_ips[LNET_MAX_INTERFACES])); kshm_ips[LNET_MAX_INTERFACES]));
if (!hello) { if (!hello) {
rc = -ENOMEM; rc = -ENOMEM;
...@@ -1341,7 +1341,7 @@ ksocknal_create_conn(lnet_ni_t *ni, struct ksock_route *route, ...@@ -1341,7 +1341,7 @@ ksocknal_create_conn(lnet_ni_t *ni, struct ksock_route *route,
rc = ksocknal_send_hello(ni, conn, peerid.nid, hello); rc = ksocknal_send_hello(ni, conn, peerid.nid, hello);
} }
LIBCFS_FREE(hello, offsetof(ksock_hello_msg_t, LIBCFS_FREE(hello, offsetof(struct ksock_hello_msg,
kshm_ips[LNET_MAX_INTERFACES])); kshm_ips[LNET_MAX_INTERFACES]));
/* /*
...@@ -1423,7 +1423,7 @@ ksocknal_create_conn(lnet_ni_t *ni, struct ksock_route *route, ...@@ -1423,7 +1423,7 @@ ksocknal_create_conn(lnet_ni_t *ni, struct ksock_route *route,
failed_1: failed_1:
if (hello) if (hello)
LIBCFS_FREE(hello, offsetof(ksock_hello_msg_t, LIBCFS_FREE(hello, offsetof(struct ksock_hello_msg,
kshm_ips[LNET_MAX_INTERFACES])); kshm_ips[LNET_MAX_INTERFACES]));
LIBCFS_FREE(conn, sizeof(*conn)); LIBCFS_FREE(conn, sizeof(*conn));
......
...@@ -287,7 +287,7 @@ struct ksock_tx { /* transmit packet */ ...@@ -287,7 +287,7 @@ struct ksock_tx { /* transmit packet */
lnet_msg_t *tx_lnetmsg; /* lnet message for lnet_finalize() lnet_msg_t *tx_lnetmsg; /* lnet message for lnet_finalize()
*/ */
unsigned long tx_deadline; /* when (in jiffies) tx times out */ unsigned long 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 */ int tx_desc_size; /* size of this descriptor */
union { union {
struct { struct {
...@@ -369,7 +369,7 @@ struct ksock_conn { ...@@ -369,7 +369,7 @@ struct ksock_conn {
*/ */
void *ksnc_cookie; /* rx lnet_finalize passthru arg 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 * V2.x message takes the
* whole struct * whole struct
* V1.x message is a bare * V1.x message is a bare
...@@ -474,16 +474,16 @@ struct ksock_proto { ...@@ -474,16 +474,16 @@ struct ksock_proto {
int pro_version; int pro_version;
/* handshake function */ /* handshake function */
int (*pro_send_hello)(struct ksock_conn *, ksock_hello_msg_t *); int (*pro_send_hello)(struct ksock_conn *, struct ksock_hello_msg *);
/* handshake function */ /* handshake function */
int (*pro_recv_hello)(struct ksock_conn *, ksock_hello_msg_t *, int); int (*pro_recv_hello)(struct ksock_conn *, struct ksock_hello_msg *, int);
/* message pack */ /* message pack */
void (*pro_pack)(struct ksock_tx *); void (*pro_pack)(struct ksock_tx *);
/* message unpack */ /* message unpack */
void (*pro_unpack)(ksock_msg_t *); void (*pro_unpack)(struct ksock_msg *);
/* queue tx on the connection */ /* queue tx on the connection */
struct ksock_tx *(*pro_queue_tx_msg)(struct ksock_conn *, struct ksock_tx *); struct ksock_tx *(*pro_queue_tx_msg)(struct ksock_conn *, struct ksock_tx *);
...@@ -691,9 +691,9 @@ int ksocknal_scheduler(void *arg); ...@@ -691,9 +691,9 @@ int ksocknal_scheduler(void *arg);
int ksocknal_connd(void *arg); int ksocknal_connd(void *arg);
int ksocknal_reaper(void *arg); int ksocknal_reaper(void *arg);
int ksocknal_send_hello(lnet_ni_t *ni, struct ksock_conn *conn, int ksocknal_send_hello(lnet_ni_t *ni, struct ksock_conn *conn,
lnet_nid_t peer_nid, ksock_hello_msg_t *hello); lnet_nid_t peer_nid, struct ksock_hello_msg *hello);
int ksocknal_recv_hello(lnet_ni_t *ni, struct ksock_conn *conn, int ksocknal_recv_hello(lnet_ni_t *ni, struct ksock_conn *conn,
ksock_hello_msg_t *hello, lnet_process_id_t *id, struct ksock_hello_msg *hello, lnet_process_id_t *id,
__u64 *incarnation); __u64 *incarnation);
void ksocknal_read_callback(struct ksock_conn *conn); void ksocknal_read_callback(struct ksock_conn *conn);
void ksocknal_write_callback(struct ksock_conn *conn); void ksocknal_write_callback(struct ksock_conn *conn);
......
...@@ -695,7 +695,7 @@ void ...@@ -695,7 +695,7 @@ void
ksocknal_queue_tx_locked(struct ksock_tx *tx, struct ksock_conn *conn) ksocknal_queue_tx_locked(struct ksock_tx *tx, struct ksock_conn *conn)
{ {
struct ksock_sched *sched = conn->ksnc_scheduler; struct ksock_sched *sched = conn->ksnc_scheduler;
ksock_msg_t *msg = &tx->tx_msg; struct ksock_msg *msg = &tx->tx_msg;
struct ksock_tx *ztx = NULL; struct ksock_tx *ztx = NULL;
int bufnob = 0; int bufnob = 0;
...@@ -1072,9 +1072,9 @@ ksocknal_new_packet(struct ksock_conn *conn, int nob_to_skip) ...@@ -1072,9 +1072,9 @@ ksocknal_new_packet(struct ksock_conn *conn, int nob_to_skip)
conn->ksnc_rx_iov = (struct kvec *)&conn->ksnc_rx_iov_space; conn->ksnc_rx_iov = (struct kvec *)&conn->ksnc_rx_iov_space;
conn->ksnc_rx_iov[0].iov_base = &conn->ksnc_msg; conn->ksnc_rx_iov[0].iov_base = &conn->ksnc_msg;
conn->ksnc_rx_nob_wanted = offsetof(ksock_msg_t, ksm_u); conn->ksnc_rx_nob_wanted = offsetof(struct ksock_msg, ksm_u);
conn->ksnc_rx_nob_left = offsetof(ksock_msg_t, ksm_u); conn->ksnc_rx_nob_left = offsetof(struct ksock_msg, ksm_u);
conn->ksnc_rx_iov[0].iov_len = offsetof(ksock_msg_t, ksm_u); conn->ksnc_rx_iov[0].iov_len = offsetof(struct ksock_msg, ksm_u);
break; break;
case KSOCK_PROTO_V1: case KSOCK_PROTO_V1:
...@@ -1232,12 +1232,12 @@ ksocknal_process_receive(struct ksock_conn *conn) ...@@ -1232,12 +1232,12 @@ ksocknal_process_receive(struct ksock_conn *conn)
} }
conn->ksnc_rx_state = SOCKNAL_RX_LNET_HEADER; conn->ksnc_rx_state = SOCKNAL_RX_LNET_HEADER;
conn->ksnc_rx_nob_wanted = sizeof(ksock_lnet_msg_t); conn->ksnc_rx_nob_wanted = sizeof(struct ksock_lnet_msg);
conn->ksnc_rx_nob_left = sizeof(ksock_lnet_msg_t); conn->ksnc_rx_nob_left = sizeof(struct ksock_lnet_msg);
conn->ksnc_rx_iov = (struct kvec *)&conn->ksnc_rx_iov_space; conn->ksnc_rx_iov = (struct kvec *)&conn->ksnc_rx_iov_space;
conn->ksnc_rx_iov[0].iov_base = &conn->ksnc_msg.ksm_u.lnetmsg; conn->ksnc_rx_iov[0].iov_base = &conn->ksnc_msg.ksm_u.lnetmsg;
conn->ksnc_rx_iov[0].iov_len = sizeof(ksock_lnet_msg_t); conn->ksnc_rx_iov[0].iov_len = sizeof(struct ksock_lnet_msg);
conn->ksnc_rx_niov = 1; conn->ksnc_rx_niov = 1;
conn->ksnc_rx_kiov = NULL; conn->ksnc_rx_kiov = NULL;
...@@ -1633,7 +1633,7 @@ void ksocknal_write_callback(struct ksock_conn *conn) ...@@ -1633,7 +1633,7 @@ void ksocknal_write_callback(struct ksock_conn *conn)
} }
static struct ksock_proto * static struct ksock_proto *
ksocknal_parse_proto_version(ksock_hello_msg_t *hello) ksocknal_parse_proto_version(struct ksock_hello_msg *hello)
{ {
__u32 version = 0; __u32 version = 0;
...@@ -1664,7 +1664,7 @@ ksocknal_parse_proto_version(ksock_hello_msg_t *hello) ...@@ -1664,7 +1664,7 @@ ksocknal_parse_proto_version(ksock_hello_msg_t *hello)
struct lnet_magicversion *hmv = (struct lnet_magicversion *)hello; struct lnet_magicversion *hmv = (struct lnet_magicversion *)hello;
BUILD_BUG_ON(sizeof(struct lnet_magicversion) != BUILD_BUG_ON(sizeof(struct lnet_magicversion) !=
offsetof(ksock_hello_msg_t, kshm_src_nid)); offsetof(struct ksock_hello_msg, kshm_src_nid));
if (hmv->version_major == cpu_to_le16(KSOCK_PROTO_V1_MAJOR) && if (hmv->version_major == cpu_to_le16(KSOCK_PROTO_V1_MAJOR) &&
hmv->version_minor == cpu_to_le16(KSOCK_PROTO_V1_MINOR)) hmv->version_minor == cpu_to_le16(KSOCK_PROTO_V1_MINOR))
...@@ -1676,7 +1676,7 @@ ksocknal_parse_proto_version(ksock_hello_msg_t *hello) ...@@ -1676,7 +1676,7 @@ ksocknal_parse_proto_version(ksock_hello_msg_t *hello)
int int
ksocknal_send_hello(lnet_ni_t *ni, struct ksock_conn *conn, ksocknal_send_hello(lnet_ni_t *ni, struct ksock_conn *conn,
lnet_nid_t peer_nid, ksock_hello_msg_t *hello) lnet_nid_t peer_nid, struct ksock_hello_msg *hello)
{ {
/* CAVEAT EMPTOR: this byte flips 'ipaddrs' */ /* CAVEAT EMPTOR: this byte flips 'ipaddrs' */
struct ksock_net *net = (struct ksock_net *)ni->ni_data; struct ksock_net *net = (struct ksock_net *)ni->ni_data;
...@@ -1714,7 +1714,7 @@ ksocknal_invert_type(int type) ...@@ -1714,7 +1714,7 @@ ksocknal_invert_type(int type)
int int
ksocknal_recv_hello(lnet_ni_t *ni, struct ksock_conn *conn, ksocknal_recv_hello(lnet_ni_t *ni, struct ksock_conn *conn,
ksock_hello_msg_t *hello, lnet_process_id_t *peerid, struct ksock_hello_msg *hello, lnet_process_id_t *peerid,
__u64 *incarnation) __u64 *incarnation)
{ {
/* Return < 0 fatal error /* Return < 0 fatal error
......
...@@ -287,11 +287,11 @@ ksocknal_match_tx(struct ksock_conn *conn, struct ksock_tx *tx, int nonblk) ...@@ -287,11 +287,11 @@ ksocknal_match_tx(struct ksock_conn *conn, struct ksock_tx *tx, int nonblk)
if (!tx || !tx->tx_lnetmsg) { if (!tx || !tx->tx_lnetmsg) {
/* noop packet */ /* noop packet */
nob = offsetof(ksock_msg_t, ksm_u); nob = offsetof(struct ksock_msg, ksm_u);
} else { } else {
nob = tx->tx_lnetmsg->msg_len + nob = tx->tx_lnetmsg->msg_len +
((conn->ksnc_proto == &ksocknal_protocol_v1x) ? ((conn->ksnc_proto == &ksocknal_protocol_v1x) ?
sizeof(struct lnet_hdr) : sizeof(ksock_msg_t)); sizeof(struct lnet_hdr) : sizeof(struct ksock_msg));
} }
/* default checking for typed connection */ /* default checking for typed connection */
...@@ -325,9 +325,9 @@ ksocknal_match_tx_v3(struct ksock_conn *conn, struct ksock_tx *tx, int nonblk) ...@@ -325,9 +325,9 @@ ksocknal_match_tx_v3(struct ksock_conn *conn, struct ksock_tx *tx, int nonblk)
int nob; int nob;
if (!tx || !tx->tx_lnetmsg) if (!tx || !tx->tx_lnetmsg)
nob = offsetof(ksock_msg_t, ksm_u); nob = offsetof(struct ksock_msg, ksm_u);
else else
nob = tx->tx_lnetmsg->msg_len + sizeof(ksock_msg_t); nob = tx->tx_lnetmsg->msg_len + sizeof(struct ksock_msg);
switch (conn->ksnc_type) { switch (conn->ksnc_type) {
default: default:
...@@ -456,7 +456,7 @@ ksocknal_handle_zcack(struct ksock_conn *conn, __u64 cookie1, __u64 cookie2) ...@@ -456,7 +456,7 @@ ksocknal_handle_zcack(struct ksock_conn *conn, __u64 cookie1, __u64 cookie2)
} }
static int static int
ksocknal_send_hello_v1(struct ksock_conn *conn, ksock_hello_msg_t *hello) ksocknal_send_hello_v1(struct ksock_conn *conn, struct ksock_hello_msg *hello)
{ {
struct socket *sock = conn->ksnc_sock; struct socket *sock = conn->ksnc_sock;
struct lnet_hdr *hdr; struct lnet_hdr *hdr;
...@@ -531,7 +531,7 @@ ksocknal_send_hello_v1(struct ksock_conn *conn, ksock_hello_msg_t *hello) ...@@ -531,7 +531,7 @@ ksocknal_send_hello_v1(struct ksock_conn *conn, ksock_hello_msg_t *hello)
} }
static int static int
ksocknal_send_hello_v2(struct ksock_conn *conn, ksock_hello_msg_t *hello) ksocknal_send_hello_v2(struct ksock_conn *conn, struct ksock_hello_msg *hello)
{ {
struct socket *sock = conn->ksnc_sock; struct socket *sock = conn->ksnc_sock;
int rc; int rc;
...@@ -549,7 +549,7 @@ ksocknal_send_hello_v2(struct ksock_conn *conn, ksock_hello_msg_t *hello) ...@@ -549,7 +549,7 @@ ksocknal_send_hello_v2(struct ksock_conn *conn, ksock_hello_msg_t *hello)
LNET_UNLOCK(); LNET_UNLOCK();
} }
rc = lnet_sock_write(sock, hello, offsetof(ksock_hello_msg_t, kshm_ips), rc = lnet_sock_write(sock, hello, offsetof(struct ksock_hello_msg, kshm_ips),
lnet_acceptor_timeout()); lnet_acceptor_timeout());
if (rc) { if (rc) {
CNETERR("Error %d sending HELLO hdr to %pI4h/%d\n", CNETERR("Error %d sending HELLO hdr to %pI4h/%d\n",
...@@ -573,7 +573,7 @@ ksocknal_send_hello_v2(struct ksock_conn *conn, ksock_hello_msg_t *hello) ...@@ -573,7 +573,7 @@ ksocknal_send_hello_v2(struct ksock_conn *conn, ksock_hello_msg_t *hello)
} }
static int static int
ksocknal_recv_hello_v1(struct ksock_conn *conn, ksock_hello_msg_t *hello, ksocknal_recv_hello_v1(struct ksock_conn *conn, struct ksock_hello_msg *hello,
int timeout) int timeout)
{ {
struct socket *sock = conn->ksnc_sock; struct socket *sock = conn->ksnc_sock;
...@@ -649,7 +649,7 @@ ksocknal_recv_hello_v1(struct ksock_conn *conn, ksock_hello_msg_t *hello, ...@@ -649,7 +649,7 @@ ksocknal_recv_hello_v1(struct ksock_conn *conn, ksock_hello_msg_t *hello,
} }
static int static int
ksocknal_recv_hello_v2(struct ksock_conn *conn, ksock_hello_msg_t *hello, ksocknal_recv_hello_v2(struct ksock_conn *conn, struct ksock_hello_msg *hello,
int timeout) int timeout)
{ {
struct socket *sock = conn->ksnc_sock; struct socket *sock = conn->ksnc_sock;
...@@ -662,8 +662,8 @@ ksocknal_recv_hello_v2(struct ksock_conn *conn, ksock_hello_msg_t *hello, ...@@ -662,8 +662,8 @@ ksocknal_recv_hello_v2(struct ksock_conn *conn, ksock_hello_msg_t *hello,
conn->ksnc_flip = 1; conn->ksnc_flip = 1;
rc = lnet_sock_read(sock, &hello->kshm_src_nid, rc = lnet_sock_read(sock, &hello->kshm_src_nid,
offsetof(ksock_hello_msg_t, kshm_ips) - offsetof(struct ksock_hello_msg, kshm_ips) -
offsetof(ksock_hello_msg_t, kshm_src_nid), offsetof(struct ksock_hello_msg, kshm_src_nid),
timeout); timeout);
if (rc) { if (rc) {
CERROR("Error %d reading HELLO from %pI4h\n", CERROR("Error %d reading HELLO from %pI4h\n",
...@@ -738,15 +738,15 @@ ksocknal_pack_msg_v2(struct ksock_tx *tx) ...@@ -738,15 +738,15 @@ ksocknal_pack_msg_v2(struct ksock_tx *tx)
LASSERT(tx->tx_msg.ksm_type != KSOCK_MSG_NOOP); LASSERT(tx->tx_msg.ksm_type != KSOCK_MSG_NOOP);
tx->tx_msg.ksm_u.lnetmsg.ksnm_hdr = tx->tx_lnetmsg->msg_hdr; tx->tx_msg.ksm_u.lnetmsg.ksnm_hdr = tx->tx_lnetmsg->msg_hdr;
tx->tx_iov[0].iov_len = sizeof(ksock_msg_t); tx->tx_iov[0].iov_len = sizeof(struct ksock_msg);
tx->tx_nob = sizeof(ksock_msg_t) + tx->tx_lnetmsg->msg_len; tx->tx_nob = sizeof(struct ksock_msg) + tx->tx_lnetmsg->msg_len;
tx->tx_resid = sizeof(ksock_msg_t) + tx->tx_lnetmsg->msg_len; tx->tx_resid = sizeof(struct ksock_msg) + tx->tx_lnetmsg->msg_len;
} else { } else {
LASSERT(tx->tx_msg.ksm_type == KSOCK_MSG_NOOP); LASSERT(tx->tx_msg.ksm_type == KSOCK_MSG_NOOP);
tx->tx_iov[0].iov_len = offsetof(ksock_msg_t, ksm_u.lnetmsg.ksnm_hdr); tx->tx_iov[0].iov_len = offsetof(struct ksock_msg, ksm_u.lnetmsg.ksnm_hdr);
tx->tx_nob = offsetof(ksock_msg_t, ksm_u.lnetmsg.ksnm_hdr); tx->tx_nob = offsetof(struct ksock_msg, ksm_u.lnetmsg.ksnm_hdr);
tx->tx_resid = offsetof(ksock_msg_t, ksm_u.lnetmsg.ksnm_hdr); tx->tx_resid = offsetof(struct ksock_msg, ksm_u.lnetmsg.ksnm_hdr);
} }
/* /*
* Don't checksum before start sending, because packet can be * Don't checksum before start sending, because packet can be
...@@ -755,7 +755,7 @@ ksocknal_pack_msg_v2(struct ksock_tx *tx) ...@@ -755,7 +755,7 @@ ksocknal_pack_msg_v2(struct ksock_tx *tx)
} }
static void static void
ksocknal_unpack_msg_v1(ksock_msg_t *msg) ksocknal_unpack_msg_v1(struct ksock_msg *msg)
{ {
msg->ksm_csum = 0; msg->ksm_csum = 0;
msg->ksm_type = KSOCK_MSG_LNET; msg->ksm_type = KSOCK_MSG_LNET;
...@@ -764,7 +764,7 @@ ksocknal_unpack_msg_v1(ksock_msg_t *msg) ...@@ -764,7 +764,7 @@ ksocknal_unpack_msg_v1(ksock_msg_t *msg)
} }
static void static void
ksocknal_unpack_msg_v2(ksock_msg_t *msg) ksocknal_unpack_msg_v2(struct ksock_msg *msg)
{ {
return; /* Do nothing */ return; /* Do nothing */
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment