Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-6142 socklnd: change UAPI typedefs to proper structure
[fs/lustre-release.git]
/
lnet
/
klnds
/
socklnd
/
socklnd_proto.c
diff --git
a/lnet/klnds/socklnd/socklnd_proto.c
b/lnet/klnds/socklnd/socklnd_proto.c
index
6ea8494
..
12165a3
100644
(file)
--- a/
lnet/klnds/socklnd/socklnd_proto.c
+++ b/
lnet/klnds/socklnd/socklnd_proto.c
@@
-282,11
+282,11
@@
ksocknal_match_tx(ksock_conn_t *conn, ksock_tx_t *tx, int nonblk)
if (tx == NULL || tx->tx_lnetmsg == NULL) {
/* noop packet */
if (tx == NULL || tx->tx_lnetmsg == NULL) {
/* noop packet */
-
nob = offsetof(ksock_msg_t
, ksm_u);
+
nob = offsetof(struct ksock_msg
, ksm_u);
} else {
nob = tx->tx_lnetmsg->msg_len +
((conn->ksnc_proto == &ksocknal_protocol_v1x) ?
} else {
nob = tx->tx_lnetmsg->msg_len +
((conn->ksnc_proto == &ksocknal_protocol_v1x) ?
-
sizeof(lnet_hdr_t) : sizeof(ksock_msg_t
));
+
sizeof(lnet_hdr_t) : sizeof(struct ksock_msg
));
}
/* default checking for typed connection */
}
/* default checking for typed connection */
@@
-320,9
+320,9
@@
ksocknal_match_tx_v3(ksock_conn_t *conn, ksock_tx_t *tx, int nonblk)
int nob;
if (tx == NULL || tx->tx_lnetmsg == NULL)
int nob;
if (tx == NULL || tx->tx_lnetmsg == NULL)
-
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) {
default:
switch (conn->ksnc_type) {
default:
@@
-449,7
+449,7
@@
ksocknal_handle_zcack(ksock_conn_t *conn, __u64 cookie1, __u64 cookie2)
}
static int
}
static int
-ksocknal_send_hello_v1 (ksock_conn_t *conn,
ksock_hello_msg_t
*hello)
+ksocknal_send_hello_v1 (ksock_conn_t *conn,
struct ksock_hello_msg
*hello)
{
struct socket *sock = conn->ksnc_sock;
lnet_hdr_t *hdr;
{
struct socket *sock = conn->ksnc_sock;
lnet_hdr_t *hdr;
@@
-523,7
+523,7
@@
out:
}
static int
}
static int
-ksocknal_send_hello_v2 (ksock_conn_t *conn,
ksock_hello_msg_t
*hello)
+ksocknal_send_hello_v2 (ksock_conn_t *conn,
struct ksock_hello_msg
*hello)
{
struct socket *sock = conn->ksnc_sock;
int rc;
{
struct socket *sock = conn->ksnc_sock;
int rc;
@@
-541,7
+541,7
@@
ksocknal_send_hello_v2 (ksock_conn_t *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());
if (rc != 0) {
lnet_acceptor_timeout());
if (rc != 0) {
@@
-566,7
+566,7
@@
ksocknal_send_hello_v2 (ksock_conn_t *conn, ksock_hello_msg_t *hello)
}
static int
}
static int
-ksocknal_recv_hello_v1(ksock_conn_t *conn,
ksock_hello_msg_t
*hello,int timeout)
+ksocknal_recv_hello_v1(ksock_conn_t *conn,
struct ksock_hello_msg
*hello,int timeout)
{
struct socket *sock = conn->ksnc_sock;
lnet_hdr_t *hdr;
{
struct socket *sock = conn->ksnc_sock;
lnet_hdr_t *hdr;
@@
-642,7
+642,7
@@
out:
}
static int
}
static int
-ksocknal_recv_hello_v2(ksock_conn_t *conn,
ksock_hello_msg_t
*hello,
+ksocknal_recv_hello_v2(ksock_conn_t *conn,
struct ksock_hello_msg
*hello,
int timeout)
{
struct socket *sock = conn->ksnc_sock;
int timeout)
{
struct socket *sock = conn->ksnc_sock;
@@
-655,8
+655,8
@@
ksocknal_recv_hello_v2(ksock_conn_t *conn, ksock_hello_msg_t *hello,
conn->ksnc_flip = 1;
rc = lnet_sock_read(sock, &hello->kshm_src_nid,
conn->ksnc_flip = 1;
rc = lnet_sock_read(sock, &hello->kshm_src_nid,
-
offsetof(ksock_hello_msg_t
, kshm_ips) -
-
offsetof(ksock_hello_msg_t
, kshm_src_nid),
+
offsetof(struct ksock_hello_msg
, kshm_ips) -
+
offsetof(struct ksock_hello_msg
, kshm_src_nid),
timeout);
if (rc != 0) {
CERROR("Error %d reading HELLO from %pI4h\n",
timeout);
if (rc != 0) {
CERROR("Error %d reading HELLO from %pI4h\n",
@@
-730,19
+730,19
@@
ksocknal_pack_msg_v2(ksock_tx_t *tx)
LASSERT(tx->tx_msg.ksm_type != KSOCK_MSG_NOOP);
tx->tx_msg.ksm_u.lnetmsg.ksnm_hdr = tx->tx_lnetmsg->msg_hdr;
LASSERT(tx->tx_msg.ksm_type != KSOCK_MSG_NOOP);
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_resid = tx->tx_nob = sizeof(ksock_msg_t
) + tx->tx_lnetmsg->msg_len;
+
tx->tx_iov[0].iov_len = sizeof(struct ksock_msg
);
+
tx->tx_resid = tx->tx_nob = sizeof(struct ksock_msg
) + tx->tx_lnetmsg->msg_len;
} else {
LASSERT(tx->tx_msg.ksm_type == KSOCK_MSG_NOOP);
} else {
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_resid = tx->tx_nob = 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_resid = tx->tx_nob = offsetof(struct ksock_msg
, ksm_u.lnetmsg.ksnm_hdr);
}
/* Don't checksum before start sending, because packet can be piggybacked with ACK */
}
static void
}
/* Don't checksum before start sending, because packet can be piggybacked with ACK */
}
static void
-ksocknal_unpack_msg_v1(
ksock_msg_t
*msg)
+ksocknal_unpack_msg_v1(
struct ksock_msg
*msg)
{
msg->ksm_csum = 0;
msg->ksm_type = KSOCK_MSG_LNET;
{
msg->ksm_csum = 0;
msg->ksm_type = KSOCK_MSG_LNET;
@@
-750,7
+750,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 */
}