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

staging: lustre: socklnd: remove typedefs

Remove all remaining typedefs in socklnd driver.
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8d9de3f4
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#include "socklnd.h" #include "socklnd.h"
int int
ksocknal_lib_get_conn_addrs(ksock_conn_t *conn) ksocknal_lib_get_conn_addrs(struct ksock_conn *conn)
{ {
int rc = lnet_sock_getaddr(conn->ksnc_sock, 1, &conn->ksnc_ipaddr, int rc = lnet_sock_getaddr(conn->ksnc_sock, 1, &conn->ksnc_ipaddr,
&conn->ksnc_port); &conn->ksnc_port);
...@@ -60,7 +60,7 @@ ksocknal_lib_get_conn_addrs(ksock_conn_t *conn) ...@@ -60,7 +60,7 @@ ksocknal_lib_get_conn_addrs(ksock_conn_t *conn)
} }
int int
ksocknal_lib_zc_capable(ksock_conn_t *conn) ksocknal_lib_zc_capable(struct ksock_conn *conn)
{ {
int caps = conn->ksnc_sock->sk->sk_route_caps; int caps = conn->ksnc_sock->sk->sk_route_caps;
...@@ -75,7 +75,7 @@ ksocknal_lib_zc_capable(ksock_conn_t *conn) ...@@ -75,7 +75,7 @@ ksocknal_lib_zc_capable(ksock_conn_t *conn)
} }
int int
ksocknal_lib_send_iov(ksock_conn_t *conn, ksock_tx_t *tx) ksocknal_lib_send_iov(struct ksock_conn *conn, struct ksock_tx *tx)
{ {
struct socket *sock = conn->ksnc_sock; struct socket *sock = conn->ksnc_sock;
int nob; int nob;
...@@ -118,7 +118,7 @@ ksocknal_lib_send_iov(ksock_conn_t *conn, ksock_tx_t *tx) ...@@ -118,7 +118,7 @@ ksocknal_lib_send_iov(ksock_conn_t *conn, ksock_tx_t *tx)
} }
int int
ksocknal_lib_send_kiov(ksock_conn_t *conn, ksock_tx_t *tx) ksocknal_lib_send_kiov(struct ksock_conn *conn, struct ksock_tx *tx)
{ {
struct socket *sock = conn->ksnc_sock; struct socket *sock = conn->ksnc_sock;
lnet_kiov_t *kiov = tx->tx_kiov; lnet_kiov_t *kiov = tx->tx_kiov;
...@@ -187,7 +187,7 @@ ksocknal_lib_send_kiov(ksock_conn_t *conn, ksock_tx_t *tx) ...@@ -187,7 +187,7 @@ ksocknal_lib_send_kiov(ksock_conn_t *conn, ksock_tx_t *tx)
} }
void void
ksocknal_lib_eager_ack(ksock_conn_t *conn) ksocknal_lib_eager_ack(struct ksock_conn *conn)
{ {
int opt = 1; int opt = 1;
struct socket *sock = conn->ksnc_sock; struct socket *sock = conn->ksnc_sock;
...@@ -203,7 +203,7 @@ ksocknal_lib_eager_ack(ksock_conn_t *conn) ...@@ -203,7 +203,7 @@ ksocknal_lib_eager_ack(ksock_conn_t *conn)
} }
int int
ksocknal_lib_recv_iov(ksock_conn_t *conn) ksocknal_lib_recv_iov(struct ksock_conn *conn)
{ {
#if SOCKNAL_SINGLE_FRAG_RX #if SOCKNAL_SINGLE_FRAG_RX
struct kvec scratch; struct kvec scratch;
...@@ -309,7 +309,7 @@ ksocknal_lib_kiov_vmap(lnet_kiov_t *kiov, int niov, ...@@ -309,7 +309,7 @@ ksocknal_lib_kiov_vmap(lnet_kiov_t *kiov, int niov,
} }
int int
ksocknal_lib_recv_kiov(ksock_conn_t *conn) ksocknal_lib_recv_kiov(struct ksock_conn *conn)
{ {
#if SOCKNAL_SINGLE_FRAG_RX || !SOCKNAL_RISK_KMAP_DEADLOCK #if SOCKNAL_SINGLE_FRAG_RX || !SOCKNAL_RISK_KMAP_DEADLOCK
struct kvec scratch; struct kvec scratch;
...@@ -393,7 +393,7 @@ ksocknal_lib_recv_kiov(ksock_conn_t *conn) ...@@ -393,7 +393,7 @@ ksocknal_lib_recv_kiov(ksock_conn_t *conn)
} }
void void
ksocknal_lib_csum_tx(ksock_tx_t *tx) ksocknal_lib_csum_tx(struct ksock_tx *tx)
{ {
int i; int i;
__u32 csum; __u32 csum;
...@@ -432,7 +432,7 @@ ksocknal_lib_csum_tx(ksock_tx_t *tx) ...@@ -432,7 +432,7 @@ ksocknal_lib_csum_tx(ksock_tx_t *tx)
} }
int int
ksocknal_lib_get_conn_tunables(ksock_conn_t *conn, int *txmem, int *rxmem, int *nagle) ksocknal_lib_get_conn_tunables(struct ksock_conn *conn, int *txmem, int *rxmem, int *nagle)
{ {
struct socket *sock = conn->ksnc_sock; struct socket *sock = conn->ksnc_sock;
int len; int len;
...@@ -562,7 +562,7 @@ ksocknal_lib_setup_sock(struct socket *sock) ...@@ -562,7 +562,7 @@ ksocknal_lib_setup_sock(struct socket *sock)
} }
void void
ksocknal_lib_push_conn(ksock_conn_t *conn) ksocknal_lib_push_conn(struct ksock_conn *conn)
{ {
struct sock *sk; struct sock *sk;
struct tcp_sock *tp; struct tcp_sock *tp;
...@@ -599,7 +599,7 @@ ksocknal_lib_push_conn(ksock_conn_t *conn) ...@@ -599,7 +599,7 @@ ksocknal_lib_push_conn(ksock_conn_t *conn)
static void static void
ksocknal_data_ready(struct sock *sk) ksocknal_data_ready(struct sock *sk)
{ {
ksock_conn_t *conn; struct ksock_conn *conn;
/* interleave correctly with closing sockets... */ /* interleave correctly with closing sockets... */
LASSERT(!in_irq()); LASSERT(!in_irq());
...@@ -619,7 +619,7 @@ ksocknal_data_ready(struct sock *sk) ...@@ -619,7 +619,7 @@ ksocknal_data_ready(struct sock *sk)
static void static void
ksocknal_write_space(struct sock *sk) ksocknal_write_space(struct sock *sk)
{ {
ksock_conn_t *conn; struct ksock_conn *conn;
int wspace; int wspace;
int min_wpace; int min_wpace;
...@@ -663,14 +663,14 @@ ksocknal_write_space(struct sock *sk) ...@@ -663,14 +663,14 @@ ksocknal_write_space(struct sock *sk)
} }
void void
ksocknal_lib_save_callback(struct socket *sock, ksock_conn_t *conn) ksocknal_lib_save_callback(struct socket *sock, struct ksock_conn *conn)
{ {
conn->ksnc_saved_data_ready = sock->sk->sk_data_ready; conn->ksnc_saved_data_ready = sock->sk->sk_data_ready;
conn->ksnc_saved_write_space = sock->sk->sk_write_space; conn->ksnc_saved_write_space = sock->sk->sk_write_space;
} }
void void
ksocknal_lib_set_callback(struct socket *sock, ksock_conn_t *conn) ksocknal_lib_set_callback(struct socket *sock, struct ksock_conn *conn)
{ {
sock->sk->sk_user_data = conn; sock->sk->sk_user_data = conn;
sock->sk->sk_data_ready = ksocknal_data_ready; sock->sk->sk_data_ready = ksocknal_data_ready;
...@@ -678,7 +678,7 @@ ksocknal_lib_set_callback(struct socket *sock, ksock_conn_t *conn) ...@@ -678,7 +678,7 @@ ksocknal_lib_set_callback(struct socket *sock, ksock_conn_t *conn)
} }
void void
ksocknal_lib_reset_callback(struct socket *sock, ksock_conn_t *conn) ksocknal_lib_reset_callback(struct socket *sock, struct ksock_conn *conn)
{ {
/* /*
* Remove conn's network callbacks. * Remove conn's network callbacks.
...@@ -697,10 +697,10 @@ ksocknal_lib_reset_callback(struct socket *sock, ksock_conn_t *conn) ...@@ -697,10 +697,10 @@ ksocknal_lib_reset_callback(struct socket *sock, ksock_conn_t *conn)
} }
int int
ksocknal_lib_memory_pressure(ksock_conn_t *conn) ksocknal_lib_memory_pressure(struct ksock_conn *conn)
{ {
int rc = 0; int rc = 0;
ksock_sched_t *sched; struct ksock_sched *sched;
sched = conn->ksnc_scheduler; sched = conn->ksnc_scheduler;
spin_lock_bh(&sched->kss_lock); spin_lock_bh(&sched->kss_lock);
......
...@@ -139,7 +139,7 @@ module_param(protocol, int, 0644); ...@@ -139,7 +139,7 @@ module_param(protocol, int, 0644);
MODULE_PARM_DESC(protocol, "protocol version"); MODULE_PARM_DESC(protocol, "protocol version");
#endif #endif
ksock_tunables_t ksocknal_tunables; struct ksock_tunables ksocknal_tunables;
int ksocknal_tunables_init(void) int ksocknal_tunables_init(void)
{ {
......
...@@ -38,8 +38,8 @@ ...@@ -38,8 +38,8 @@
* pro_match_tx() : Called holding glock * pro_match_tx() : Called holding glock
*/ */
static ksock_tx_t * static struct ksock_tx *
ksocknal_queue_tx_msg_v1(ksock_conn_t *conn, ksock_tx_t *tx_msg) ksocknal_queue_tx_msg_v1(struct ksock_conn *conn, struct ksock_tx *tx_msg)
{ {
/* V1.x, just enqueue it */ /* V1.x, just enqueue it */
list_add_tail(&tx_msg->tx_list, &conn->ksnc_tx_queue); list_add_tail(&tx_msg->tx_list, &conn->ksnc_tx_queue);
...@@ -47,9 +47,9 @@ ksocknal_queue_tx_msg_v1(ksock_conn_t *conn, ksock_tx_t *tx_msg) ...@@ -47,9 +47,9 @@ ksocknal_queue_tx_msg_v1(ksock_conn_t *conn, ksock_tx_t *tx_msg)
} }
void void
ksocknal_next_tx_carrier(ksock_conn_t *conn) ksocknal_next_tx_carrier(struct ksock_conn *conn)
{ {
ksock_tx_t *tx = conn->ksnc_tx_carrier; struct ksock_tx *tx = conn->ksnc_tx_carrier;
/* Called holding BH lock: conn->ksnc_scheduler->kss_lock */ /* Called holding BH lock: conn->ksnc_scheduler->kss_lock */
LASSERT(!list_empty(&conn->ksnc_tx_queue)); LASSERT(!list_empty(&conn->ksnc_tx_queue));
...@@ -66,10 +66,10 @@ ksocknal_next_tx_carrier(ksock_conn_t *conn) ...@@ -66,10 +66,10 @@ ksocknal_next_tx_carrier(ksock_conn_t *conn)
} }
static int static int
ksocknal_queue_tx_zcack_v2(ksock_conn_t *conn, ksocknal_queue_tx_zcack_v2(struct ksock_conn *conn,
ksock_tx_t *tx_ack, __u64 cookie) struct ksock_tx *tx_ack, __u64 cookie)
{ {
ksock_tx_t *tx = conn->ksnc_tx_carrier; struct ksock_tx *tx = conn->ksnc_tx_carrier;
LASSERT(!tx_ack || LASSERT(!tx_ack ||
tx_ack->tx_msg.ksm_type == KSOCK_MSG_NOOP); tx_ack->tx_msg.ksm_type == KSOCK_MSG_NOOP);
...@@ -112,10 +112,10 @@ ksocknal_queue_tx_zcack_v2(ksock_conn_t *conn, ...@@ -112,10 +112,10 @@ ksocknal_queue_tx_zcack_v2(ksock_conn_t *conn,
return 1; return 1;
} }
static ksock_tx_t * static struct ksock_tx *
ksocknal_queue_tx_msg_v2(ksock_conn_t *conn, ksock_tx_t *tx_msg) ksocknal_queue_tx_msg_v2(struct ksock_conn *conn, struct ksock_tx *tx_msg)
{ {
ksock_tx_t *tx = conn->ksnc_tx_carrier; struct ksock_tx *tx = conn->ksnc_tx_carrier;
/* /*
* Enqueue tx_msg: * Enqueue tx_msg:
...@@ -149,10 +149,10 @@ ksocknal_queue_tx_msg_v2(ksock_conn_t *conn, ksock_tx_t *tx_msg) ...@@ -149,10 +149,10 @@ ksocknal_queue_tx_msg_v2(ksock_conn_t *conn, ksock_tx_t *tx_msg)
} }
static int static int
ksocknal_queue_tx_zcack_v3(ksock_conn_t *conn, ksocknal_queue_tx_zcack_v3(struct ksock_conn *conn,
ksock_tx_t *tx_ack, __u64 cookie) struct ksock_tx *tx_ack, __u64 cookie)
{ {
ksock_tx_t *tx; struct ksock_tx *tx;
if (conn->ksnc_type != SOCKLND_CONN_ACK) if (conn->ksnc_type != SOCKLND_CONN_ACK)
return ksocknal_queue_tx_zcack_v2(conn, tx_ack, cookie); return ksocknal_queue_tx_zcack_v2(conn, tx_ack, cookie);
...@@ -267,7 +267,7 @@ ksocknal_queue_tx_zcack_v3(ksock_conn_t *conn, ...@@ -267,7 +267,7 @@ ksocknal_queue_tx_zcack_v3(ksock_conn_t *conn,
} }
static int static int
ksocknal_match_tx(ksock_conn_t *conn, ksock_tx_t *tx, int nonblk) ksocknal_match_tx(struct ksock_conn *conn, struct ksock_tx *tx, int nonblk)
{ {
int nob; int nob;
...@@ -311,7 +311,7 @@ ksocknal_match_tx(ksock_conn_t *conn, ksock_tx_t *tx, int nonblk) ...@@ -311,7 +311,7 @@ ksocknal_match_tx(ksock_conn_t *conn, ksock_tx_t *tx, int nonblk)
} }
static int static int
ksocknal_match_tx_v3(ksock_conn_t *conn, ksock_tx_t *tx, int nonblk) ksocknal_match_tx_v3(struct ksock_conn *conn, struct ksock_tx *tx, int nonblk)
{ {
int nob; int nob;
...@@ -355,18 +355,18 @@ ksocknal_match_tx_v3(ksock_conn_t *conn, ksock_tx_t *tx, int nonblk) ...@@ -355,18 +355,18 @@ ksocknal_match_tx_v3(ksock_conn_t *conn, ksock_tx_t *tx, int nonblk)
/* (Sink) handle incoming ZC request from sender */ /* (Sink) handle incoming ZC request from sender */
static int static int
ksocknal_handle_zcreq(ksock_conn_t *c, __u64 cookie, int remote) ksocknal_handle_zcreq(struct ksock_conn *c, __u64 cookie, int remote)
{ {
ksock_peer_t *peer = c->ksnc_peer; struct ksock_peer *peer = c->ksnc_peer;
ksock_conn_t *conn; struct ksock_conn *conn;
ksock_tx_t *tx; struct ksock_tx *tx;
int rc; int rc;
read_lock(&ksocknal_data.ksnd_global_lock); read_lock(&ksocknal_data.ksnd_global_lock);
conn = ksocknal_find_conn_locked(peer, NULL, !!remote); conn = ksocknal_find_conn_locked(peer, NULL, !!remote);
if (conn) { if (conn) {
ksock_sched_t *sched = conn->ksnc_scheduler; struct ksock_sched *sched = conn->ksnc_scheduler;
LASSERT(conn->ksnc_proto->pro_queue_tx_zcack); LASSERT(conn->ksnc_proto->pro_queue_tx_zcack);
...@@ -399,12 +399,12 @@ ksocknal_handle_zcreq(ksock_conn_t *c, __u64 cookie, int remote) ...@@ -399,12 +399,12 @@ ksocknal_handle_zcreq(ksock_conn_t *c, __u64 cookie, int remote)
/* (Sender) handle ZC_ACK from sink */ /* (Sender) handle ZC_ACK from sink */
static int static int
ksocknal_handle_zcack(ksock_conn_t *conn, __u64 cookie1, __u64 cookie2) ksocknal_handle_zcack(struct ksock_conn *conn, __u64 cookie1, __u64 cookie2)
{ {
ksock_peer_t *peer = conn->ksnc_peer; struct ksock_peer *peer = conn->ksnc_peer;
ksock_tx_t *tx; struct ksock_tx *tx;
ksock_tx_t *temp; struct ksock_tx *temp;
ksock_tx_t *tmp; struct ksock_tx *tmp;
LIST_HEAD(zlist); LIST_HEAD(zlist);
int count; int count;
...@@ -446,7 +446,7 @@ ksocknal_handle_zcack(ksock_conn_t *conn, __u64 cookie1, __u64 cookie2) ...@@ -446,7 +446,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(struct ksock_conn *conn, ksock_hello_msg_t *hello)
{ {
struct socket *sock = conn->ksnc_sock; struct socket *sock = conn->ksnc_sock;
lnet_hdr_t *hdr; lnet_hdr_t *hdr;
...@@ -521,7 +521,7 @@ ksocknal_send_hello_v1(ksock_conn_t *conn, ksock_hello_msg_t *hello) ...@@ -521,7 +521,7 @@ ksocknal_send_hello_v1(ksock_conn_t *conn, ksock_hello_msg_t *hello)
} }
static int static int
ksocknal_send_hello_v2(ksock_conn_t *conn, ksock_hello_msg_t *hello) ksocknal_send_hello_v2(struct ksock_conn *conn, ksock_hello_msg_t *hello)
{ {
struct socket *sock = conn->ksnc_sock; struct socket *sock = conn->ksnc_sock;
int rc; int rc;
...@@ -563,7 +563,7 @@ ksocknal_send_hello_v2(ksock_conn_t *conn, ksock_hello_msg_t *hello) ...@@ -563,7 +563,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, ksocknal_recv_hello_v1(struct ksock_conn *conn, ksock_hello_msg_t *hello,
int timeout) int timeout)
{ {
struct socket *sock = conn->ksnc_sock; struct socket *sock = conn->ksnc_sock;
...@@ -639,7 +639,7 @@ ksocknal_recv_hello_v1(ksock_conn_t *conn, ksock_hello_msg_t *hello, ...@@ -639,7 +639,7 @@ ksocknal_recv_hello_v1(ksock_conn_t *conn, ksock_hello_msg_t *hello,
} }
static int static int
ksocknal_recv_hello_v2(ksock_conn_t *conn, ksock_hello_msg_t *hello, int timeout) ksocknal_recv_hello_v2(struct ksock_conn *conn, ksock_hello_msg_t *hello, int timeout)
{ {
struct socket *sock = conn->ksnc_sock; struct socket *sock = conn->ksnc_sock;
int rc; int rc;
...@@ -705,7 +705,7 @@ ksocknal_recv_hello_v2(ksock_conn_t *conn, ksock_hello_msg_t *hello, int timeout ...@@ -705,7 +705,7 @@ ksocknal_recv_hello_v2(ksock_conn_t *conn, ksock_hello_msg_t *hello, int timeout
} }
static void static void
ksocknal_pack_msg_v1(ksock_tx_t *tx) ksocknal_pack_msg_v1(struct ksock_tx *tx)
{ {
/* V1.x has no KSOCK_MSG_NOOP */ /* V1.x has no KSOCK_MSG_NOOP */
LASSERT(tx->tx_msg.ksm_type != KSOCK_MSG_NOOP); LASSERT(tx->tx_msg.ksm_type != KSOCK_MSG_NOOP);
...@@ -719,7 +719,7 @@ ksocknal_pack_msg_v1(ksock_tx_t *tx) ...@@ -719,7 +719,7 @@ ksocknal_pack_msg_v1(ksock_tx_t *tx)
} }
static void static void
ksocknal_pack_msg_v2(ksock_tx_t *tx) ksocknal_pack_msg_v2(struct ksock_tx *tx)
{ {
tx->tx_iov[0].iov_base = &tx->tx_msg; tx->tx_iov[0].iov_base = &tx->tx_msg;
...@@ -755,7 +755,7 @@ ksocknal_unpack_msg_v2(ksock_msg_t *msg) ...@@ -755,7 +755,7 @@ ksocknal_unpack_msg_v2(ksock_msg_t *msg)
return; /* Do nothing */ return; /* Do nothing */
} }
ksock_proto_t ksocknal_protocol_v1x = { struct ksock_proto ksocknal_protocol_v1x = {
.pro_version = KSOCK_PROTO_V1, .pro_version = KSOCK_PROTO_V1,
.pro_send_hello = ksocknal_send_hello_v1, .pro_send_hello = ksocknal_send_hello_v1,
.pro_recv_hello = ksocknal_recv_hello_v1, .pro_recv_hello = ksocknal_recv_hello_v1,
...@@ -768,7 +768,7 @@ ksock_proto_t ksocknal_protocol_v1x = { ...@@ -768,7 +768,7 @@ ksock_proto_t ksocknal_protocol_v1x = {
.pro_match_tx = ksocknal_match_tx .pro_match_tx = ksocknal_match_tx
}; };
ksock_proto_t ksocknal_protocol_v2x = { struct ksock_proto ksocknal_protocol_v2x = {
.pro_version = KSOCK_PROTO_V2, .pro_version = KSOCK_PROTO_V2,
.pro_send_hello = ksocknal_send_hello_v2, .pro_send_hello = ksocknal_send_hello_v2,
.pro_recv_hello = ksocknal_recv_hello_v2, .pro_recv_hello = ksocknal_recv_hello_v2,
...@@ -781,7 +781,7 @@ ksock_proto_t ksocknal_protocol_v2x = { ...@@ -781,7 +781,7 @@ ksock_proto_t ksocknal_protocol_v2x = {
.pro_match_tx = ksocknal_match_tx .pro_match_tx = ksocknal_match_tx
}; };
ksock_proto_t ksocknal_protocol_v3x = { struct ksock_proto ksocknal_protocol_v3x = {
.pro_version = KSOCK_PROTO_V3, .pro_version = KSOCK_PROTO_V3,
.pro_send_hello = ksocknal_send_hello_v2, .pro_send_hello = ksocknal_send_hello_v2,
.pro_recv_hello = ksocknal_recv_hello_v2, .pro_recv_hello = ksocknal_recv_hello_v2,
......
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