4 #define RDS_TCP_PORT 16385
6 struct rds_tcp_incoming {
7 struct rds_incoming ti_inc;
8 struct sk_buff_head ti_skb_list;
11 struct rds_tcp_connection {
13 struct list_head t_tcp_node;
14 struct rds_connection *conn;
15 struct socket *t_sock;
16 void *t_orig_write_space;
17 void *t_orig_data_ready;
18 void *t_orig_state_change;
20 struct rds_tcp_incoming *t_tinc;
21 size_t t_tinc_hdr_rem;
22 size_t t_tinc_data_rem;
24 /* XXX error report? */
25 struct work_struct t_conn_w;
26 struct work_struct t_send_w;
27 struct work_struct t_down_w;
28 struct work_struct t_recv_w;
30 /* for info exporting only */
31 struct list_head t_list_item;
33 u32 t_last_expected_una;
37 struct rds_tcp_statistics {
38 uint64_t s_tcp_data_ready_calls;
39 uint64_t s_tcp_write_space_calls;
40 uint64_t s_tcp_sndbuf_full;
41 uint64_t s_tcp_connect_raced;
42 uint64_t s_tcp_listen_closed_stale;
46 void rds_tcp_tune(struct socket *sock);
47 void rds_tcp_nonagle(struct socket *sock);
48 void rds_tcp_set_callbacks(struct socket *sock, struct rds_connection *conn);
49 void rds_tcp_restore_callbacks(struct socket *sock,
50 struct rds_tcp_connection *tc);
51 u32 rds_tcp_snd_nxt(struct rds_tcp_connection *tc);
52 u32 rds_tcp_snd_una(struct rds_tcp_connection *tc);
53 u64 rds_tcp_map_seq(struct rds_tcp_connection *tc, u32 seq);
54 extern struct rds_transport rds_tcp_transport;
57 int rds_tcp_conn_connect(struct rds_connection *conn);
58 void rds_tcp_conn_shutdown(struct rds_connection *conn);
59 void rds_tcp_state_change(struct sock *sk);
62 int rds_tcp_listen_init(void);
63 void rds_tcp_listen_stop(void);
64 void rds_tcp_listen_data_ready(struct sock *sk);
67 int rds_tcp_recv_init(void);
68 void rds_tcp_recv_exit(void);
69 void rds_tcp_data_ready(struct sock *sk);
70 int rds_tcp_recv(struct rds_connection *conn);
71 void rds_tcp_inc_free(struct rds_incoming *inc);
72 int rds_tcp_inc_copy_to_user(struct rds_incoming *inc, struct iov_iter *to);
75 void rds_tcp_xmit_prepare(struct rds_connection *conn);
76 void rds_tcp_xmit_complete(struct rds_connection *conn);
77 int rds_tcp_xmit(struct rds_connection *conn, struct rds_message *rm,
78 unsigned int hdr_off, unsigned int sg, unsigned int off);
79 void rds_tcp_write_space(struct sock *sk);
82 DECLARE_PER_CPU(struct rds_tcp_statistics, rds_tcp_stats);
83 #define rds_tcp_stats_inc(member) rds_stats_inc_which(rds_tcp_stats, member)
84 unsigned int rds_tcp_stats_info_copy(struct rds_info_iterator *iter,