[openib-general] [PATCHv3] SDP: rename sdp_opt to sdp_sock

Tom Duffy tduffy at sun.com
Wed Jun 29 15:59:30 PDT 2005


This patch renames the sdp_opt struct sdp_sock as this is what all the
other socket classes do.  Against r2751.

Signed-off-by: Tom Duffy <tduffy at sun.com>

Index: linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_write.c
===================================================================
--- linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_write.c	(revision 2751)
+++ linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_write.c	(working copy)
@@ -42,7 +42,7 @@
 /*
  * sdp_event_write - RDMA write event handler
  */
-int sdp_event_write(struct sdp_opt *conn, struct ib_wc *comp)
+int sdp_event_write(struct sdp_sock *conn, struct ib_wc *comp)
 {
 	struct sdpc_iocb *iocb;
 	struct sdpc_buff *buff;
Index: linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_rcvd.c
===================================================================
--- linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_rcvd.c	(revision 2751)
+++ linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_rcvd.c	(working copy)
@@ -38,7 +38,7 @@
 /*
  * Specific MID handler functions. (RECV)
  */
-static int sdp_rcvd_disconnect(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_disconnect(struct sdp_sock *conn, struct sdpc_buff *buff)
 {
 	struct sock *sk;
 	int result = 0;
@@ -102,7 +102,7 @@ error:
 	return result;
 }
 
-static int sdp_rcvd_abort(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_abort(struct sdp_sock *conn, struct sdpc_buff *buff)
 {
 	int result = 0;
 
@@ -126,7 +126,7 @@ static int sdp_rcvd_abort(struct sdp_opt
 	return result;
 }
 
-static int sdp_rcvd_send_sm(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_send_sm(struct sdp_sock *conn, struct sdpc_buff *buff)
 {
 	struct sdpc_iocb *iocb;
 
@@ -167,7 +167,7 @@ static int sdp_rcvd_send_sm(struct sdp_o
 	return 0;
 }
 
-static int sdp_rcvd_rdma_wr(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_rdma_wr(struct sdp_sock *conn, struct sdpc_buff *buff)
 {
 	struct msg_hdr_rwch *rwch;
 	struct sdpc_iocb *iocb;
@@ -217,7 +217,7 @@ static int sdp_rcvd_rdma_wr(struct sdp_o
 	return 0;
 }
 
-static int sdp_rcvd_rdma_rd(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_rdma_rd(struct sdp_sock *conn, struct sdpc_buff *buff)
 {
 	struct msg_hdr_rrch *rrch;
 	struct sdpc_iocb *iocb;
@@ -288,7 +288,7 @@ static int sdp_rcvd_rdma_rd(struct sdp_o
 	return 0;
 }
 
-static int sdp_rcvd_mode_change(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_mode_change(struct sdp_sock *conn, struct sdpc_buff *buff)
 {
 	struct msg_hdr_mch *mch;
 	int result;
@@ -384,7 +384,7 @@ error:
 	return result;
 }
 
-static int sdp_rcvd_src_cancel(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_src_cancel(struct sdp_sock *conn, struct sdpc_buff *buff)
 {
 	struct sdpc_advt *advt;
 	int result;
@@ -473,7 +473,7 @@ done:
 	return result;
 }
 
-static int sdp_rcvd_snk_cancel(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_snk_cancel(struct sdp_sock *conn, struct sdpc_buff *buff)
 {
 	struct sdpc_advt *advt;
 	s32 counter;
@@ -546,7 +546,7 @@ done:
 /*
  * sdp_rcvd_snk_cancel_ack - sink cancel confirmantion
  */
-static int sdp_rcvd_snk_cancel_ack(struct sdp_opt *conn,
+static int sdp_rcvd_snk_cancel_ack(struct sdp_sock *conn,
 				   struct sdpc_buff *buff)
 {
 	struct sdpc_iocb *iocb;
@@ -576,7 +576,7 @@ static int sdp_rcvd_snk_cancel_ack(struc
 /*
  * sdp_rcvd_resize_buff_ack - buffer size change request
  */
-static int sdp_rcvd_resize_buff_ack(struct sdp_opt *conn,
+static int sdp_rcvd_resize_buff_ack(struct sdp_sock *conn,
 				    struct sdpc_buff *buff)
 {
 	struct msg_hdr_crbh *crbh;
@@ -606,7 +606,7 @@ error:
 	return result;
 }
 
-static int sdp_rcvd_suspend(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_suspend(struct sdp_sock *conn, struct sdpc_buff *buff)
 {
 	struct msg_hdr_sch *sch;
 
@@ -618,12 +618,12 @@ static int sdp_rcvd_suspend(struct sdp_o
 	return 0;
 }
 
-static int sdp_rcvd_suspend_ack(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_suspend_ack(struct sdp_sock *conn, struct sdpc_buff *buff)
 {
 	return 0;
 }
 
-static int sdp_rcvd_snk_avail(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_snk_avail(struct sdp_sock *conn, struct sdpc_buff *buff)
 {
 	struct msg_hdr_snkah *snkah;
 	struct sdpc_advt *advt;
@@ -748,7 +748,7 @@ consume:
 	return result;
 }
 
-static int sdp_rcvd_src_avail(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_src_avail(struct sdp_sock *conn, struct sdpc_buff *buff)
 {
 	struct msg_hdr_srcah *srcah;
 	struct sdpc_advt *advt;
@@ -917,7 +917,7 @@ done:
 /*
  * sdp_rcvd_data - SDP data message event received
  */
-static int sdp_rcvd_data(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_data(struct sdp_sock *conn, struct sdpc_buff *buff)
 {
 	int ret_val;
 
@@ -962,7 +962,7 @@ static int sdp_rcvd_data(struct sdp_opt 
 /*
  * sdp_rcvd_unsupported - Valid messages we're not expecting
  */
-static int sdp_rcvd_unsupported(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_rcvd_unsupported(struct sdp_sock *conn, struct sdpc_buff *buff)
 {
 	/*
 	 * Since the gateway only initates RDMA's but is never a target, and
@@ -1026,7 +1026,7 @@ static sdp_event_cb_func recv_event_func
 /*
  * sdp_event_recv - recv event demultiplexing into sdp messages
  */
-int sdp_event_recv(struct sdp_opt *conn, struct ib_wc *comp)
+int sdp_event_recv(struct sdp_sock *conn, struct ib_wc *comp)
 {
 	sdp_event_cb_func dispatch_func;
 	struct sdpc_buff *buff;
Index: linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_inet.c
===================================================================
--- linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_inet.c	(revision 2751)
+++ linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_inet.c	(working copy)
@@ -130,7 +130,7 @@ MODULE_PARM_DESC(sdp_debug_level,
  */
 void sdp_inet_wake_send(struct sock *sk)
 {
-	struct sdp_opt *conn = sdp_sk(sk);
+	struct sdp_sock *conn = sdp_sk(sk);
 
 	if (sk->sk_socket && test_bit(SOCK_NOSPACE, &sk->sk_socket->flags) &&
 	    sdp_inet_writable(conn)) {
@@ -151,7 +151,7 @@ void sdp_inet_wake_send(struct sock *sk)
 /*
  * sdp_inet_disconnect - disconnect a connection
  */
-static int sdp_inet_disconnect(struct sdp_opt *conn)
+static int sdp_inet_disconnect(struct sdp_sock *conn)
 {
 	struct sock *sk;
 	int result = 0;
@@ -235,7 +235,7 @@ error:
  */
 static int sdp_inet_release(struct socket *sock)
 {
-	struct sdp_opt *conn;
+	struct sdp_sock *conn;
 	struct sock *sk = sock->sk;
 	int  result;
 	long timeout;
@@ -365,7 +365,7 @@ static int sdp_inet_bind(struct socket *
 {
 	struct sockaddr_in *addr = (struct sockaddr_in *)uaddr;
 	struct sock *sk;
-	struct sdp_opt *conn;
+	struct sdp_sock *conn;
 	unsigned int addr_result = RTN_UNSPEC;
 	u16 bind_port;
 	int result;
@@ -457,7 +457,7 @@ static int sdp_inet_connect(struct socke
 {
 	struct sockaddr_in *addr = (struct sockaddr_in *)uaddr;
 	struct sock *sk;
-	struct sdp_opt *conn;
+	struct sdp_sock *conn;
 	long timeout;
 	int result;
 
@@ -620,7 +620,7 @@ done:
 static int sdp_inet_listen(struct socket *sock, int backlog)
 {
 	struct sock *sk;
-	struct sdp_opt *conn;
+	struct sdp_sock *conn;
 	int result;
 
 	sk = sock->sk;
@@ -679,8 +679,8 @@ static int sdp_inet_accept(struct socket
 {
 	struct sock *listen_sk;
 	struct sock *accept_sk = NULL;
-	struct sdp_opt *listen_conn;
-	struct sdp_opt *accept_conn = NULL;
+	struct sdp_sock *listen_conn;
+	struct sdp_sock *accept_conn = NULL;
 	int result;
 	long timeout;
 
@@ -807,7 +807,7 @@ static int sdp_inet_getname(struct socke
 {
 	struct sockaddr_in *addr = (struct sockaddr_in *)uaddr;
 	struct sock *sk;
-	struct sdp_opt *conn;
+	struct sdp_sock *conn;
 
 	sk = sock->sk;
 	conn = sdp_sk(sk);
@@ -842,7 +842,7 @@ static unsigned int sdp_inet_poll(struct
 				  poll_table *wait)
 {
 	struct sock *sk;
-	struct sdp_opt *conn;
+	struct sdp_sock *conn;
 	unsigned int mask = 0;
 
 	/*
@@ -931,7 +931,7 @@ static int sdp_inet_ioctl(struct socket 
 			  unsigned long arg)
 {
 	struct sock *sk;
-	struct sdp_opt *conn;
+	struct sdp_sock *conn;
 	struct sdpc_buff *buff;
 	int result = 0;
 	int value;
@@ -1054,7 +1054,7 @@ static int sdp_inet_setopt(struct socket
 			   char __user *optval, int optlen)
 {
 	struct sock *sk;
-	struct sdp_opt *conn;
+	struct sdp_sock *conn;
 	int value;
 	int result = 0;
 
@@ -1119,7 +1119,7 @@ static int sdp_inet_getopt(struct socket
 			   char __user *optval, int __user *optlen)
 {
 	struct sock *sk;
-	struct sdp_opt *conn;
+	struct sdp_sock *conn;
 	int value;
 	int len;
 
@@ -1180,7 +1180,7 @@ static int sdp_inet_getopt(struct socket
 static int sdp_inet_shutdown(struct socket *sock, int flag)
 {
 	int result = 0;
-	struct sdp_opt *conn;
+	struct sdp_sock *conn;
 
 	conn = sdp_sk(sock->sk);
 
@@ -1267,7 +1267,7 @@ static struct proto_ops lnx_stream_ops =
  */
 static int sdp_inet_create(struct socket *sock, int protocol)
 {
-	struct sdp_opt *conn;
+	struct sdp_sock *conn;
 
 	sdp_dbg_ctrl(NULL, "SOCKET: type <%d> proto <%d> state <%u:%08lx>",
 		     sock->type, protocol, sock->state, sock->flags);
@@ -1320,7 +1320,7 @@ static struct net_proto_family sdp_proto
 struct proto sdp_sk_proto = {
 	.name		= "SDP",
 	.owner		= THIS_MODULE,
-	.obj_size	= sizeof(struct sdp_opt),
+	.obj_size	= sizeof(struct sdp_sock),
 };
 
 /*
Index: linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_proto.h
===================================================================
--- linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_proto.h	(revision 2751)
+++ linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_proto.h	(working copy)
@@ -108,11 +108,11 @@ int sdp_proc_dump_buff_pool(char *buffer
 /*
  * Wall between userspace protocol and SDP protocol proper
  */
-void sdp_conn_abort(struct sdp_opt *conn);
+void sdp_conn_abort(struct sdp_sock *conn);
 
-void sdp_conn_inet_error(struct sdp_opt *conn, int error);
+void sdp_conn_inet_error(struct sdp_sock *conn, int error);
 
-int sdp_recv_buff(struct sdp_opt *conn, struct sdpc_buff *buff);
+int sdp_recv_buff(struct sdp_sock *conn, struct sdpc_buff *buff);
 
 /*
  * Zcopy advertisment managment
@@ -166,7 +166,7 @@ void sdp_iocb_q_cancel(struct sdpc_iocb_
 
 void sdp_iocb_q_remove(struct sdpc_iocb *iocb);
 
-int sdp_iocb_register(struct sdpc_iocb *iocb, struct sdp_opt *conn);
+int sdp_iocb_register(struct sdpc_iocb *iocb, struct sdp_sock *conn);
 
 void sdp_iocb_release(struct sdpc_iocb *iocb);
 
@@ -258,13 +258,13 @@ int sdp_proc_dump_device(char *buffer,
 			 off_t start_index,
 			 long *end_index);
 
-int sdp_conn_table_remove(struct sdp_opt *conn);
+int sdp_conn_table_remove(struct sdp_sock *conn);
 
-struct sdp_opt *sdp_conn_table_lookup(s32 entry);
+struct sdp_sock *sdp_conn_table_lookup(s32 entry);
 
-struct sdp_opt *sdp_conn_alloc(int priority);
+struct sdp_sock *sdp_conn_alloc(int priority);
 
-int sdp_conn_alloc_ib(struct sdp_opt *conn,
+int sdp_conn_alloc_ib(struct sdp_sock *conn,
 		      struct ib_device *device, 
 		      u8 hw_port,
 		      u16 pkey);
@@ -274,39 +274,39 @@ void sdp_inet_wake_send(struct sock *sk)
 /*
  * port/queue managment
  */
-void sdp_inet_accept_q_put(struct sdp_opt *listen_conn,
-			   struct sdp_opt *accept_conn);
+void sdp_inet_accept_q_put(struct sdp_sock *listen_conn,
+			   struct sdp_sock *accept_conn);
 
-struct sdp_opt *sdp_inet_accept_q_get(struct sdp_opt *listen_conn);
+struct sdp_sock *sdp_inet_accept_q_get(struct sdp_sock *listen_conn);
 
-int sdp_inet_accept_q_remove(struct sdp_opt *accept_conn);
+int sdp_inet_accept_q_remove(struct sdp_sock *accept_conn);
 
-int sdp_inet_listen_start(struct sdp_opt *listen_conn);
+int sdp_inet_listen_start(struct sdp_sock *listen_conn);
 
-int sdp_inet_listen_stop(struct sdp_opt *listen_conn);
+int sdp_inet_listen_stop(struct sdp_sock *listen_conn);
 
-struct sdp_opt *sdp_inet_listen_lookup(u32 addr, u16 port);
+struct sdp_sock *sdp_inet_listen_lookup(u32 addr, u16 port);
 
-int sdp_inet_port_get(struct sdp_opt *conn, u16 port);
+int sdp_inet_port_get(struct sdp_sock *conn, u16 port);
 
-int sdp_inet_port_put(struct sdp_opt *conn);
+int sdp_inet_port_put(struct sdp_sock *conn);
 
-void sdp_inet_port_inherit(struct sdp_opt *parent, struct sdp_opt *child);
+void sdp_inet_port_inherit(struct sdp_sock *parent, struct sdp_sock *child);
 
 /*
  * active connect functions
  */
-int sdp_cm_connect(struct sdp_opt *conn);
+int sdp_cm_connect(struct sdp_sock *conn);
 
 int sdp_cm_rep_handler(struct ib_cm_id *cm_id,
 		       struct ib_cm_event *event,
-		       struct sdp_opt *conn);
+		       struct sdp_sock *conn);
 
-void sdp_cm_actv_error(struct sdp_opt *conn, int error);
+void sdp_cm_actv_error(struct sdp_sock *conn, int error);
 /*
  * passive connect functions
  */
-int sdp_cm_pass_establish(struct sdp_opt *conn);
+int sdp_cm_pass_establish(struct sdp_sock *conn);
 
 int sdp_cm_req_handler(struct ib_cm_id *cm_id,
 		       struct ib_cm_event *event);
@@ -314,36 +314,36 @@ int sdp_cm_req_handler(struct ib_cm_id *
 /*
  * post functions
  */
-int sdp_recv_flush(struct sdp_opt *conn);
+int sdp_recv_flush(struct sdp_sock *conn);
 
-int sdp_send_flush(struct sdp_opt *conn);
+int sdp_send_flush(struct sdp_sock *conn);
 
-int sdp_send_ctrl_ack(struct sdp_opt *conn);
+int sdp_send_ctrl_ack(struct sdp_sock *conn);
 
-int sdp_send_ctrl_disconnect(struct sdp_opt *conn);
+int sdp_send_ctrl_disconnect(struct sdp_sock *conn);
 
-int sdp_send_ctrl_abort(struct sdp_opt *conn);
+int sdp_send_ctrl_abort(struct sdp_sock *conn);
 
-int sdp_send_ctrl_send_sm(struct sdp_opt *conn);
+int sdp_send_ctrl_send_sm(struct sdp_sock *conn);
 
-int sdp_send_ctrl_snk_avail(struct sdp_opt *conn,
+int sdp_send_ctrl_snk_avail(struct sdp_sock *conn,
 			    u32 size, 
 			    u32 rkey,
 			    u64 addr);
 
-int sdp_send_ctrl_resize_buff_ack(struct sdp_opt *conn, u32 size);
+int sdp_send_ctrl_resize_buff_ack(struct sdp_sock *conn, u32 size);
 
-int sdp_send_ctrl_rdma_rd(struct sdp_opt *conn, s32 size);
+int sdp_send_ctrl_rdma_rd(struct sdp_sock *conn, s32 size);
 
-int sdp_send_ctrl_rdma_wr(struct sdp_opt *conn, u32 size);
+int sdp_send_ctrl_rdma_wr(struct sdp_sock *conn, u32 size);
 
-int sdp_send_ctrl_mode_ch(struct sdp_opt *conn, u8 mode);
+int sdp_send_ctrl_mode_ch(struct sdp_sock *conn, u8 mode);
 
-int sdp_send_ctrl_src_cancel(struct sdp_opt *conn);
+int sdp_send_ctrl_src_cancel(struct sdp_sock *conn);
 
-int sdp_send_ctrl_snk_cancel(struct sdp_opt *conn);
+int sdp_send_ctrl_snk_cancel(struct sdp_sock *conn);
 
-int sdp_send_ctrl_snk_cancel_ack(struct sdp_opt *conn);
+int sdp_send_ctrl_snk_cancel_ack(struct sdp_sock *conn);
 
 /*
  * inet functions
@@ -352,20 +352,20 @@ int sdp_send_ctrl_snk_cancel_ack(struct 
 /*
  * event functions
  */
-int sdp_cq_event_locked(struct ib_wc *comp, struct sdp_opt *conn);
+int sdp_cq_event_locked(struct ib_wc *comp, struct sdp_sock *conn);
 
 void sdp_cq_event_handler(struct ib_cq *cq, void *arg);
 
 int sdp_cm_event_handler(struct ib_cm_id *cm_id,
 			 struct ib_cm_event *event);
 
-int sdp_event_recv(struct sdp_opt *conn, struct ib_wc *comp);
+int sdp_event_recv(struct sdp_sock *conn, struct ib_wc *comp);
 
-int sdp_event_send(struct sdp_opt *conn, struct ib_wc *comp);
+int sdp_event_send(struct sdp_sock *conn, struct ib_wc *comp);
 
-int sdp_event_read(struct sdp_opt *conn, struct ib_wc *comp);
+int sdp_event_read(struct sdp_sock *conn, struct ib_wc *comp);
 
-int sdp_event_write(struct sdp_opt *conn, struct ib_wc *comp);
+int sdp_event_write(struct sdp_sock *conn, struct ib_wc *comp);
 
 /*
  * DATA transport
@@ -381,11 +381,11 @@ int sdp_inet_recv(struct kiocb *iocb,
 		  size_t size, 
 		  int    flags);
 
-void sdp_iocb_q_cancel_all_read(struct sdp_opt *conn, ssize_t error);
+void sdp_iocb_q_cancel_all_read(struct sdp_sock *conn, ssize_t error);
 
-void sdp_iocb_q_cancel_all_write(struct sdp_opt *conn, ssize_t error);
+void sdp_iocb_q_cancel_all_write(struct sdp_sock *conn, ssize_t error);
 
-void sdp_iocb_q_cancel_all(struct sdp_opt *conn, ssize_t error);
+void sdp_iocb_q_cancel_all(struct sdp_sock *conn, ssize_t error);
 
 /*
  * link address information
@@ -415,7 +415,7 @@ void sdp_link_addr_cleanup(void);
 /*
  * Event handling function, demultiplexed base on Message ID
  */
-typedef int (*sdp_event_cb_func)(struct sdp_opt *conn, 
+typedef int (*sdp_event_cb_func)(struct sdp_sock *conn, 
 				 struct sdpc_buff *buff);
 
 /*
@@ -450,7 +450,7 @@ extern int sdp_debug_level;
 
 #define sdp_conn_dbg(level, type, conn, format, arg...) \
         do { \
-                struct sdp_opt *x = (conn); \
+                struct sdp_sock *x = (conn); \
                 if (x) { \
                         sdp_dbg_out(level, type, \
                                       "<%d> <%04x> " format,  \
@@ -524,7 +524,7 @@ do {                                    
 /*
  * sdp_inet_write_space - writable space on send side
  */
-static inline int sdp_inet_write_space(struct sdp_opt *conn, int urg)
+static inline int sdp_inet_write_space(struct sdp_sock *conn, int urg)
 {
 	int size;
 	/*
@@ -547,7 +547,7 @@ static inline int sdp_inet_write_space(s
 /*
  * sdp_inet_writable - return non-zero if socket is writable
  */
-static inline int sdp_inet_writable(struct sdp_opt *conn)
+static inline int sdp_inet_writable(struct sdp_sock *conn)
 {
 	if (conn->send_buf > 0)
 		return (sdp_inet_write_space(conn, 0) <
@@ -559,7 +559,7 @@ static inline int sdp_inet_writable(stru
 /*
  * sdp_conn_stat_dump - dump stats to the log
  */
-static inline void sdp_conn_stat_dump(struct sdp_opt *conn)
+static inline void sdp_conn_stat_dump(struct sdp_sock *conn)
 {
 #ifdef _SDP_CONN_STATS_REC
 	int counter;
@@ -581,7 +581,7 @@ static inline void sdp_conn_stat_dump(st
 /*
  * sdp_conn_state_dump - dump state information to the log
  */
-static inline void sdp_conn_state_dump(struct sdp_opt *conn)
+static inline void sdp_conn_state_dump(struct sdp_sock *conn)
 {
 #ifdef _SDP_CONN_STATE_REC
 	int counter;
Index: linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_read.c
===================================================================
--- linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_read.c	(revision 2751)
+++ linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_read.c	(working copy)
@@ -42,7 +42,7 @@
 /*
  * sdp_event_read_advt - RDMA read event handler for source advertisments
  */
-static int sdp_event_read_advt(struct sdp_opt *conn, struct ib_wc *comp)
+static int sdp_event_read_advt(struct sdp_sock *conn, struct ib_wc *comp)
 {
 	struct sdpc_advt *advt;
 	int result;
@@ -106,7 +106,7 @@ error:
 /*
  * sdp_event_read - RDMA read event handler
  */
-int sdp_event_read(struct sdp_opt *conn, struct ib_wc *comp)
+int sdp_event_read(struct sdp_sock *conn, struct ib_wc *comp)
 {
 	struct sdpc_iocb *iocb;
 	struct sdpc_buff *buff;
Index: linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_send.c
===================================================================
--- linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_send.c	(revision 2751)
+++ linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_send.c	(working copy)
@@ -42,7 +42,7 @@
 /*
  * sdp_send_buff_post - Post a buffer send on a SDP connection
  */
-static int sdp_send_buff_post(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_send_buff_post(struct sdp_sock *conn, struct sdpc_buff *buff)
 {
 	struct ib_send_wr send_param = { NULL };
 	struct ib_send_wr *bad_wr;
@@ -178,7 +178,7 @@ done:
 /*
  * sdp_send_data_buff_post - Post data for buffered transmission
  */
-static int sdp_send_data_buff_post(struct sdp_opt *conn,
+static int sdp_send_data_buff_post(struct sdp_sock *conn,
 				   struct sdpc_buff *buff)
 {
 	int result;
@@ -282,7 +282,7 @@ static int sdp_send_data_buff_post(struc
 /*
  * sdp_send_data_buff_snk - Post data for buffered transmission
  */
-static int sdp_send_data_buff_snk(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_send_data_buff_snk(struct sdp_sock *conn, struct sdpc_buff *buff)
 {
 	struct ib_send_wr send_param = { NULL };
 	struct ib_send_wr *bad_wr;
@@ -407,7 +407,7 @@ error:
 /*
  * sdp_send_data_iocb_snk - process a zcopy write advert in the data path
  */
-static int sdp_send_data_iocb_snk(struct sdp_opt *conn, struct sdpc_iocb *iocb)
+static int sdp_send_data_iocb_snk(struct sdp_sock *conn, struct sdpc_iocb *iocb)
 {
 	struct ib_send_wr send_param = { NULL };
 	struct ib_send_wr *bad_wr;
@@ -521,7 +521,7 @@ error:
 /*
  * sdp_send_data_iocb_src - send a zcopy read advert in the data path
  */
-static int sdp_send_data_iocb_src(struct sdp_opt *conn, struct sdpc_iocb *iocb)
+static int sdp_send_data_iocb_src(struct sdp_sock *conn, struct sdpc_iocb *iocb)
 {
 	struct msg_hdr_srcah *src_ah;
 	struct sdpc_buff *buff;
@@ -737,7 +737,7 @@ static int sdp_send_iocb_buff_write(stru
 /*
  * sdp_send_data_iocb_buff - write multiple SDP buffers from an iocb
  */
-static int sdp_send_data_iocb_buff(struct sdp_opt *conn, struct sdpc_iocb *iocb)
+static int sdp_send_data_iocb_buff(struct sdp_sock *conn, struct sdpc_iocb *iocb)
 {
 	struct sdpc_buff *buff;
 	int result;
@@ -805,7 +805,7 @@ error:
 /*
  * sdp_send_data_iocb - Post IOCB data for transmission
  */
-static int sdp_send_data_iocb(struct sdp_opt *conn, struct sdpc_iocb *iocb)
+static int sdp_send_data_iocb(struct sdp_sock *conn, struct sdpc_iocb *iocb)
 {
 	int result = ENOBUFS;
 
@@ -883,7 +883,7 @@ done:
 /*
  * sdp_send_data_queue_test - send data buffer if conditions are met
  */
-static int sdp_send_data_queue_test(struct sdp_opt *conn,
+static int sdp_send_data_queue_test(struct sdp_sock *conn,
 				    struct sdpc_desc *element)
 {
 	int result;
@@ -914,7 +914,7 @@ static int sdp_send_data_queue_test(stru
 /*
  * sdp_send_data_queue_flush - Flush data from send queue, to send post
  */
-static int sdp_send_data_queue_flush(struct sdp_opt *conn)
+static int sdp_send_data_queue_flush(struct sdp_sock *conn)
 {
 	struct sdpc_desc *element;
 	int result = 0;
@@ -941,7 +941,7 @@ static int sdp_send_data_queue_flush(str
 /*
  * sdp_send_data_queue - send using the data queue if necessary
  */
-static int sdp_send_data_queue(struct sdp_opt *conn, struct sdpc_desc *element)
+static int sdp_send_data_queue(struct sdp_sock *conn, struct sdpc_desc *element)
 {
 	int result = 0;
 
@@ -986,7 +986,7 @@ done:
 /*
  * sdp_send_data_buff_get - get an appropriate write buffer for send
  */
-static inline struct sdpc_buff *sdp_send_data_buff_get(struct sdp_opt *conn)
+static inline struct sdpc_buff *sdp_send_data_buff_get(struct sdp_sock *conn)
 {
 	struct sdpc_buff *buff;
 
@@ -1011,7 +1011,7 @@ static inline struct sdpc_buff *sdp_send
 /*
  * sdp_send_data_buff_put - place a buffer into the send queue
  */
-static inline int sdp_send_data_buff_put(struct sdp_opt *conn,
+static inline int sdp_send_data_buff_put(struct sdp_sock *conn,
 					 struct sdpc_buff *buff, int size,
 					 int urg)
 {
@@ -1066,7 +1066,7 @@ static inline int sdp_send_data_buff_put
 /*
  * sdp_send_ctrl_buff_test - determine if it's OK to post a control msg
  */
-static int sdp_send_ctrl_buff_test(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_send_ctrl_buff_test(struct sdp_sock *conn, struct sdpc_buff *buff)
 {
 	int result = 0;
 
@@ -1092,7 +1092,7 @@ error:
 /*
  * sdp_send_ctrl_buff_flush - Flush control buffers, to send post
  */
-static int sdp_send_ctrl_buff_flush(struct sdp_opt *conn)
+static int sdp_send_ctrl_buff_flush(struct sdp_sock *conn)
 {
 	struct sdpc_desc *element;
 	int result = 0;
@@ -1119,7 +1119,7 @@ static int sdp_send_ctrl_buff_flush(stru
 /*
  * sdp_send_ctrl_buff_buffered - Send a buffered control message
  */
-static int sdp_send_ctrl_buff_buffered(struct sdp_opt *conn,
+static int sdp_send_ctrl_buff_buffered(struct sdp_sock *conn,
 				       struct sdpc_buff *buff)
 {
 	int result = 0;
@@ -1149,7 +1149,7 @@ error:
 /*
  * sdp_send_ctrl_buff - Create and Send a buffered control message
  */
-static int sdp_send_ctrl_buff(struct sdp_opt *conn, u8 mid, int se, int sig)
+static int sdp_send_ctrl_buff(struct sdp_sock *conn, u8 mid, int se, int sig)
 {
 	int result = 0;
 	struct sdpc_buff *buff;
@@ -1201,7 +1201,7 @@ static int sdp_send_ctrl_buff(struct sdp
 /*
  * do_send_ctrl_disconnect - Send a disconnect request
  */
-static int do_send_ctrl_disconnect(struct sdp_opt *conn)
+static int do_send_ctrl_disconnect(struct sdp_sock *conn)
 {
 	int result = 0;
 	struct sdpc_buff *buff;
@@ -1247,7 +1247,7 @@ error:
 /*
  * sdp_send_ctrl_disconnect - potentially send a disconnect request
  */
-int sdp_send_ctrl_disconnect(struct sdp_opt *conn)
+int sdp_send_ctrl_disconnect(struct sdp_sock *conn)
 {
 	int result = 0;
 	/*
@@ -1270,7 +1270,7 @@ int sdp_send_ctrl_disconnect(struct sdp_
 /*
  * sdp_send_ctrl_ack - Send a gratuitous Ack
  */
-int sdp_send_ctrl_ack(struct sdp_opt *conn)
+int sdp_send_ctrl_ack(struct sdp_sock *conn)
 {
 	/*
 	 * The gratuitous ack is not really and ack, but an update of the
@@ -1292,7 +1292,7 @@ int sdp_send_ctrl_ack(struct sdp_opt *co
 /*
  * sdp_send_ctrl_send_sm - Send a request for buffered mode
  */
-int sdp_send_ctrl_send_sm(struct sdp_opt *conn)
+int sdp_send_ctrl_send_sm(struct sdp_sock *conn)
 {
 	return sdp_send_ctrl_buff(conn, SDP_MID_SEND_SM, 1, 1);
 }
@@ -1300,7 +1300,7 @@ int sdp_send_ctrl_send_sm(struct sdp_opt
 /*
  * sdp_send_ctrl_src_cancel - Send a source cancel
  */
-int sdp_send_ctrl_src_cancel(struct sdp_opt *conn)
+int sdp_send_ctrl_src_cancel(struct sdp_sock *conn)
 {
 	return sdp_send_ctrl_buff(conn, SDP_MID_SRC_CANCEL, 1, 1);
 }
@@ -1308,7 +1308,7 @@ int sdp_send_ctrl_src_cancel(struct sdp_
 /*
  * sdp_send_ctrl_snk_cancel - Send a sink cancel
  */
-int sdp_send_ctrl_snk_cancel(struct sdp_opt *conn)
+int sdp_send_ctrl_snk_cancel(struct sdp_sock *conn)
 {
 	return sdp_send_ctrl_buff(conn, SDP_MID_SNK_CANCEL, 1, 1);
 }
@@ -1316,7 +1316,7 @@ int sdp_send_ctrl_snk_cancel(struct sdp_
 /*
  * sdp_send_ctrl_snk_cancel_ack - Send an ack for a sink cancel
  */
-int sdp_send_ctrl_snk_cancel_ack(struct sdp_opt *conn)
+int sdp_send_ctrl_snk_cancel_ack(struct sdp_sock *conn)
 {
 	return sdp_send_ctrl_buff(conn, SDP_MID_SNK_CANCEL_ACK, 1, 1);
 }
@@ -1324,7 +1324,7 @@ int sdp_send_ctrl_snk_cancel_ack(struct 
 /*
  * sdp_send_ctrl_abort - Send an abort message
  */
-int sdp_send_ctrl_abort(struct sdp_opt *conn)
+int sdp_send_ctrl_abort(struct sdp_sock *conn)
 {
 	/*
 	 * send
@@ -1335,7 +1335,7 @@ int sdp_send_ctrl_abort(struct sdp_opt *
 /*
  * sdp_send_ctrl_resize_buff_ack - Send an ack for a buffer size change
  */
-int sdp_send_ctrl_resize_buff_ack(struct sdp_opt *conn, u32 size)
+int sdp_send_ctrl_resize_buff_ack(struct sdp_sock *conn, u32 size)
 {
 	struct msg_hdr_crbah *crbah;
 	struct sdpc_buff *buff;
@@ -1386,7 +1386,7 @@ error:
 /*
  * sdp_send_ctrl_rdma_rd - Send an rdma read completion
  */
-int sdp_send_ctrl_rdma_rd(struct sdp_opt *conn, s32 size)
+int sdp_send_ctrl_rdma_rd(struct sdp_sock *conn, s32 size)
 {
 	struct msg_hdr_rrch *rrch;
 	struct sdpc_buff *buff;
@@ -1455,7 +1455,7 @@ error:
 /*
  * sdp_send_ctrl_rdma_wr - Send an rdma write completion
  */
-int sdp_send_ctrl_rdma_wr(struct sdp_opt *conn, u32 size)
+int sdp_send_ctrl_rdma_wr(struct sdp_sock *conn, u32 size)
 {
 	struct msg_hdr_rwch *rwch;
 	struct sdpc_buff *buff;
@@ -1512,7 +1512,7 @@ error:
 /*
  * sdp_send_ctrl_snk_avail - Send a sink available message
  */
-int sdp_send_ctrl_snk_avail(struct sdp_opt *conn, u32 size, u32 rkey, u64 addr)
+int sdp_send_ctrl_snk_avail(struct sdp_sock *conn, u32 size, u32 rkey, u64 addr)
 {
 	struct msg_hdr_snkah *snkah;
 	struct sdpc_buff *buff;
@@ -1573,7 +1573,7 @@ error:
 /*
  * sdp_send_ctrl_mode_ch - Send a mode change command
  */
-int sdp_send_ctrl_mode_ch(struct sdp_opt *conn, u8 mode)
+int sdp_send_ctrl_mode_ch(struct sdp_sock *conn, u8 mode)
 {
 	struct msg_hdr_mch *mch;
 	struct sdpc_buff *buff;
@@ -1679,7 +1679,7 @@ static int sdp_write_src_lookup(struct s
 static int sdp_inet_write_cancel(struct kiocb *req, struct io_event *ev)
 {
 	struct sock_iocb *si = kiocb_to_siocb(req);
-	struct sdp_opt   *conn;
+	struct sdp_sock   *conn;
 	struct sdpc_iocb *iocb;
 	int result = 0;
 
@@ -1812,7 +1812,7 @@ done:
 /*
  * sdp_send_flush_advt - Flush passive sink advertisments
  */
-static int sdp_send_flush_advt(struct sdp_opt *conn)
+static int sdp_send_flush_advt(struct sdp_sock *conn)
 {
 	struct sdpc_advt *advt;
 	int result;
@@ -1850,7 +1850,7 @@ static int sdp_send_flush_advt(struct sd
 /*
  * sdp_send_flush - Flush buffers from send queue, in to send post
  */
-int sdp_send_flush(struct sdp_opt *conn)
+int sdp_send_flush(struct sdp_sock *conn)
 {
 	struct sock *sk;
 	int result = 0;
@@ -1914,7 +1914,7 @@ int sdp_inet_send(struct kiocb *req, str
 		  size_t size)
 {
 	struct sock      *sk;
-	struct sdp_opt   *conn;
+	struct sdp_sock   *conn;
 	struct sdpc_buff *buff;
 	struct sdpc_iocb *iocb;
 	int result = 0;
Index: linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_conn.c
===================================================================
--- linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_conn.c	(revision 2751)
+++ linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_conn.c	(working copy)
@@ -74,7 +74,7 @@ static u32 sdp_psn_generate(void)
         return psn;
 }
 
-void sdp_conn_inet_error(struct sdp_opt *conn, int error)
+void sdp_conn_inet_error(struct sdp_sock *conn, int error)
 {
 	struct sock *sk;
 
@@ -100,7 +100,7 @@ void sdp_conn_inet_error(struct sdp_opt 
 	sk->sk_error_report(sk);
 }
 
-void sdp_conn_abort(struct sdp_opt *conn)
+void sdp_conn_abort(struct sdp_sock *conn)
 {
 	int result;
 	int error = -ECONNRESET;
@@ -176,10 +176,10 @@ void sdp_conn_abort(struct sdp_opt *conn
 /*
  * sdp_inet_accept_q_put - put a conn into a listen conn's accept Q.
  */
-void sdp_inet_accept_q_put(struct sdp_opt *listen_conn,
-			   struct sdp_opt *accept_conn)
+void sdp_inet_accept_q_put(struct sdp_sock *listen_conn,
+			   struct sdp_sock *accept_conn)
 {
-	struct sdp_opt *next_conn;
+	struct sdp_sock *next_conn;
 
 	BUG_ON(listen_conn->parent);
 	BUG_ON(accept_conn->parent);
@@ -203,10 +203,10 @@ void sdp_inet_accept_q_put(struct sdp_op
 /*
  * sdp_inet_accept_q_get - get a conn from a listen conn's accept Q.
  */
-struct sdp_opt *sdp_inet_accept_q_get(struct sdp_opt *listen_conn)
+struct sdp_sock *sdp_inet_accept_q_get(struct sdp_sock *listen_conn)
 {
-	struct sdp_opt *prev_conn;
-	struct sdp_opt *accept_conn;
+	struct sdp_sock *prev_conn;
+	struct sdp_sock *accept_conn;
 
 	if (listen_conn->parent ||
 	    !listen_conn->accept_next ||
@@ -242,10 +242,10 @@ struct sdp_opt *sdp_inet_accept_q_get(st
 /*
  * sdp_inet_accept_q_remove - remove a conn from a conn's accept Q.
  */
-int sdp_inet_accept_q_remove(struct sdp_opt *accept_conn)
+int sdp_inet_accept_q_remove(struct sdp_sock *accept_conn)
 {
-	struct sdp_opt *next_conn;
-	struct sdp_opt *prev_conn;
+	struct sdp_sock *next_conn;
+	struct sdp_sock *prev_conn;
 
 	if (!accept_conn->parent)
 		return -EFAULT;
@@ -279,7 +279,7 @@ int sdp_inet_accept_q_remove(struct sdp_
 /*
  * sdp_inet_listen_start - start listening for new connections on a socket
  */
-int sdp_inet_listen_start(struct sdp_opt *conn)
+int sdp_inet_listen_start(struct sdp_sock *conn)
 {
 	unsigned long flags;
 
@@ -312,9 +312,9 @@ int sdp_inet_listen_start(struct sdp_opt
 /*
  * sdp_inet_listen_stop - stop listening for new connections on a socket
  */
-int sdp_inet_listen_stop(struct sdp_opt *listen_conn)
+int sdp_inet_listen_stop(struct sdp_sock *listen_conn)
 {
-	struct sdp_opt *accept_conn;
+	struct sdp_sock *accept_conn;
 	unsigned long flags;
 
 	if (listen_conn->state != SDP_CONN_ST_LISTEN) {
@@ -365,9 +365,9 @@ int sdp_inet_listen_stop(struct sdp_opt 
 /*
  * sdp_inet_listen_lookup - lookup a connection in the listen list
  */
-struct sdp_opt *sdp_inet_listen_lookup(u32 addr, u16 port)
+struct sdp_sock *sdp_inet_listen_lookup(u32 addr, u16 port)
 {
-	struct sdp_opt *conn;
+	struct sdp_sock *conn;
 	unsigned long flags;
 	/*
 	 * table lock
@@ -390,11 +390,11 @@ struct sdp_opt *sdp_inet_listen_lookup(u
 /*
  * sdp_inet_port_get - bind a socket to a port.
  */
-int sdp_inet_port_get(struct sdp_opt *conn, u16 port)
+int sdp_inet_port_get(struct sdp_sock *conn, u16 port)
 {
 	struct sock *sk;
 	struct sock *srch;
-	struct sdp_opt *look;
+	struct sdp_sock *look;
 	s32 counter;
 	s32 low_port;
 	s32 top_port;
@@ -512,7 +512,7 @@ done:
 /*
  * sdp_inet_port_put - unbind a socket from a port.
  */
-int sdp_inet_port_put(struct sdp_opt *conn)
+int sdp_inet_port_put(struct sdp_sock *conn)
 {
 	unsigned long flags;
 
@@ -541,7 +541,7 @@ int sdp_inet_port_put(struct sdp_opt *co
 /*
  * sdp_inet_port_inherit - inherit a port from another socket (accept)
  */
-void sdp_inet_port_inherit(struct sdp_opt *parent, struct sdp_opt *child)
+void sdp_inet_port_inherit(struct sdp_sock *parent, struct sdp_sock *child)
 {
 	unsigned long flags;
 
@@ -568,7 +568,7 @@ void sdp_inet_port_inherit(struct sdp_op
 /*
  * sdp_conn_table_insert - insert a connection into the connection table
  */
-static int sdp_conn_table_insert(struct sdp_opt *conn)
+static int sdp_conn_table_insert(struct sdp_sock *conn)
 {
 	u32 counter;
 	int result = -ENOMEM;
@@ -612,7 +612,7 @@ static int sdp_conn_table_insert(struct 
 /*
  * sdp_conn_table_remove - remove a connection from the connection table
  */
-int sdp_conn_table_remove(struct sdp_opt *conn)
+int sdp_conn_table_remove(struct sdp_sock *conn)
 {
 	int result = 0;
 	unsigned long flags;
@@ -649,9 +649,9 @@ done:
 /*
  * sdp_conn_table_lookup - look up connection in the connection table
  */
-struct sdp_opt *sdp_conn_table_lookup(s32 entry)
+struct sdp_sock *sdp_conn_table_lookup(s32 entry)
 {
-	struct sdp_opt *conn;
+	struct sdp_sock *conn;
 	unsigned long flags;
 	/*
 	 * lock table
@@ -699,7 +699,7 @@ static void sdp_desc_q_cancel_iocb(struc
 	}
 }
 
-void sdp_iocb_q_cancel_all_read(struct sdp_opt *conn, ssize_t error)
+void sdp_iocb_q_cancel_all_read(struct sdp_sock *conn, ssize_t error)
 {
 	sdp_iocb_q_cancel(&conn->r_pend, SDP_IOCB_F_ALL, error);
 	sdp_iocb_q_cancel(&conn->r_snk, SDP_IOCB_F_ALL, error);
@@ -707,7 +707,7 @@ void sdp_iocb_q_cancel_all_read(struct s
 	sdp_desc_q_cancel_iocb(&conn->r_src, error);
 }
 
-void sdp_iocb_q_cancel_all_write(struct sdp_opt *conn, ssize_t error)
+void sdp_iocb_q_cancel_all_write(struct sdp_sock *conn, ssize_t error)
 {
 	sdp_iocb_q_cancel(&conn->w_src, SDP_IOCB_F_ALL, error);
 
@@ -715,7 +715,7 @@ void sdp_iocb_q_cancel_all_write(struct 
 	sdp_desc_q_cancel_iocb(&conn->w_snk, error);
 }
 
-void sdp_iocb_q_cancel_all(struct sdp_opt *conn, ssize_t error)
+void sdp_iocb_q_cancel_all(struct sdp_sock *conn, ssize_t error)
 {
 	sdp_iocb_q_cancel_all_read(conn, error);
 	sdp_iocb_q_cancel_all_write(conn, error);
@@ -728,7 +728,7 @@ void sdp_iocb_q_cancel_all(struct sdp_op
 /*
  * sdp_conn_destruct - final destructor for connection.
  */
-void sdp_conn_destruct(struct sdp_opt *conn)
+void sdp_conn_destruct(struct sdp_sock *conn)
 {
 	int dump = 0;
 	int result;
@@ -840,7 +840,7 @@ void sdp_conn_destruct(struct sdp_opt *c
 /*
  * sdp_conn_internal_lock - lock the connection (use only from macro)
  */
-void sdp_conn_internal_lock(struct sdp_opt *conn, unsigned long *flags)
+void sdp_conn_internal_lock(struct sdp_sock *conn, unsigned long *flags)
 {
 	DECLARE_WAITQUEUE(wait, current);
 	unsigned long f = *flags;
@@ -864,7 +864,7 @@ void sdp_conn_internal_lock(struct sdp_o
 /*
  * sdp_conn_relock - test the connection (use only from macro)
  */
-void sdp_conn_relock(struct sdp_opt *conn)
+void sdp_conn_relock(struct sdp_sock *conn)
 {
 	unsigned long flags;
 	struct ib_wc entry;
@@ -928,7 +928,7 @@ void sdp_conn_relock(struct sdp_opt *con
 /*
  * sdp_conn_cq_drain - drain one of the the connection's CQs
  */
-int sdp_conn_cq_drain(struct ib_cq *cq, struct sdp_opt *conn)
+int sdp_conn_cq_drain(struct ib_cq *cq, struct sdp_sock *conn)
 {
 	struct ib_wc entry;
 	int result;
@@ -980,7 +980,7 @@ int sdp_conn_cq_drain(struct ib_cq *cq, 
 /*
  * sdp_conn_internal_unlock - lock the connection (use only from macro)
  */
-void sdp_conn_internal_unlock(struct sdp_opt *conn)
+void sdp_conn_internal_unlock(struct sdp_sock *conn)
 {
 	int calls = 0;
 	/*
@@ -998,7 +998,7 @@ void sdp_conn_internal_unlock(struct sdp
 /*
  * sdp_conn_lock_init - initialize connection lock
  */
-static void sdp_conn_lock_init(struct sdp_opt *conn)
+static void sdp_conn_lock_init(struct sdp_sock *conn)
 {
 	spin_lock_init(&(conn->lock.slock));
 	conn->lock.users = 0;
@@ -1009,7 +1009,7 @@ static void sdp_conn_lock_init(struct sd
 /*
  * sdp_conn_alloc_ib - allocate IB structures for a new connection.
  */
-int sdp_conn_alloc_ib(struct sdp_opt *conn, struct ib_device *device,
+int sdp_conn_alloc_ib(struct sdp_sock *conn, struct ib_device *device,
 		      u8 hw_port, u16 pkey)
 {
 	struct ib_qp_init_attr *init_attr;
@@ -1184,9 +1184,9 @@ extern struct proto sdp_sk_proto;
 /*
  * sdp_conn_alloc - allocate a new socket, and init.
  */
-struct sdp_opt *sdp_conn_alloc(int priority)
+struct sdp_sock *sdp_conn_alloc(int priority)
 {
-	struct sdp_opt *conn;
+	struct sdp_sock *conn;
 	struct sock *sk;
 	int result;
 
@@ -1377,7 +1377,7 @@ error:
 int sdp_proc_dump_conn_main(char *buffer, int max_size, off_t start_index, 
 			    long *end_index)
 {
-	struct sdp_opt *conn;
+	struct sdp_sock *conn;
 	off_t counter = 0;
 	int   offset = 0;
 	u64   s_guid;
@@ -1482,7 +1482,7 @@ int sdp_proc_dump_conn_data(char *buffer
 			    long *end_index)
 {
 	struct sock *sk;
-	struct sdp_opt *conn;
+	struct sdp_sock *conn;
 	off_t counter = 0;
 	int   offset = 0;
 	unsigned long flags;
@@ -1575,7 +1575,7 @@ done:
 int sdp_proc_dump_conn_rdma(char *buffer, int max_size, off_t start_index,
 			    long *end_index)
 {
-	struct sdp_opt *conn;
+	struct sdp_sock *conn;
 	off_t counter = 0;
 	int   offset = 0;
 	unsigned long flags;
@@ -1652,7 +1652,7 @@ done:
 int sdp_proc_dump_conn_sopt(char *buffer, int max_size, off_t start_index,
 			    long *end_index)
 {
-	struct sdp_opt *conn;
+	struct sdp_sock *conn;
 	off_t counter = 0;
 	int   offset = 0;
 	unsigned long flags;
@@ -1970,7 +1970,7 @@ int sdp_conn_table_init(int proto_family
 		goto error_size;
 	}
 
-	byte_size = conn_size * sizeof(struct sdp_opt *);
+	byte_size = conn_size * sizeof(struct sdp_sock *);
 	page_size = (byte_size >> 12) + ((0xfff & byte_size) > 0 ? 1 : 0);
 	for (dev_root_s.sk_ordr = 0;
 	     (1 << dev_root_s.sk_ordr) < page_size; dev_root_s.sk_ordr++) ;
@@ -2042,7 +2042,7 @@ void sdp_conn_table_clear(void)
 {
 	sdp_dbg_init("Deleting connection tables.");
 #if 0
-	struct sdp_opt *conn;
+	struct sdp_sock *conn;
 	/*
 	 * drain all the connections
 	 */
Index: linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_actv.c
===================================================================
--- linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_actv.c	(revision 2751)
+++ linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_actv.c	(working copy)
@@ -38,7 +38,7 @@
 /*
  * Connection establishment functions
  */
-void sdp_cm_actv_error(struct sdp_opt *conn, int error)
+void sdp_cm_actv_error(struct sdp_sock *conn, int error)
 {
 	int result;
 	struct sock *sk;
@@ -104,7 +104,7 @@ void sdp_cm_actv_error(struct sdp_opt *c
 /*
  * sdp_cm_actv_establish - process an accepted connection request.
  */
-static int sdp_cm_actv_establish(struct sdp_opt *conn)
+static int sdp_cm_actv_establish(struct sdp_sock *conn)
 {
 	struct ib_qp_attr *qp_attr;
 	int attr_mask = 0;
@@ -262,7 +262,7 @@ static int sdp_cm_hello_ack_check(struct
  * sdp_cm_rep_handler - handler for active connection open completion
  */
 int sdp_cm_rep_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event,
-		       struct sdp_opt *conn)
+		       struct sdp_sock *conn)
 {
 	struct sdp_msg_hello_ack *hello_ack;
 	int result = -ECONNRESET;
@@ -342,7 +342,7 @@ static void sdp_cm_path_complete(u64 id,
 {
 	struct ib_cm_req_param param;
 	struct sdp_msg_hello *hello_msg;
-	struct sdp_opt *conn = (struct sdp_opt *) arg;
+	struct sdp_sock *conn = (struct sdp_sock *) arg;
 	struct sdpc_buff *buff;
 	int result = 0;
 	/*
@@ -512,7 +512,7 @@ done:
 /*
  * sdp_cm_connect - initiate a SDP connection with a hello message.
  */
-int sdp_cm_connect(struct sdp_opt *conn)
+int sdp_cm_connect(struct sdp_sock *conn)
 {
 	int result;
 	/*
Index: linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_recv.c
===================================================================
--- linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_recv.c	(revision 2751)
+++ linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_recv.c	(working copy)
@@ -42,7 +42,7 @@
 /*
  * sdp_post_recv_buff - post a single buffers for data recv
  */
-static int sdp_post_recv_buff(struct sdp_opt *conn)
+static int sdp_post_recv_buff(struct sdp_sock *conn)
 {
 	struct ib_recv_wr receive_param = { NULL };
 	struct ib_recv_wr *bad_wr;
@@ -111,7 +111,7 @@ error:
 /*
  * sdp_post_rdma_buff - post a single buffers for rdma read on a conn
  */
-static int sdp_post_rdma_buff(struct sdp_opt *conn)
+static int sdp_post_rdma_buff(struct sdp_sock *conn)
 {
 	struct ib_send_wr send_param = { NULL };
 	struct ib_send_wr *bad_wr;
@@ -202,7 +202,7 @@ drop:
 /*
  * sdp_post_rdma_iocb_src - post a iocb for rdma read on a conn
  */
-static int sdp_post_rdma_iocb_src(struct sdp_opt *conn)
+static int sdp_post_rdma_iocb_src(struct sdp_sock *conn)
 {
 	struct ib_send_wr send_param = { NULL };
 	struct ib_send_wr *bad_wr;
@@ -311,7 +311,7 @@ error:
 /*
  * sdp_post_rdma_iocb_snk - post a iocb for rdma read on a conn
  */
-static int sdp_post_rdma_iocb_snk(struct sdp_opt *conn)
+static int sdp_post_rdma_iocb_snk(struct sdp_sock *conn)
 {
 	struct sdpc_iocb *iocb;
 	int result = 0;
@@ -379,7 +379,7 @@ error:
 /*
  * sdp_post_rdma - post a rdma based requests for a connection
  */
-static int sdp_post_rdma(struct sdp_opt *conn)
+static int sdp_post_rdma(struct sdp_sock *conn)
 {
 	int result = 0;
 
@@ -458,7 +458,7 @@ done:
 /*
  * sdp_recv_flush - post a certain number of buffers on a connection
  */
-int sdp_recv_flush(struct sdp_opt *conn)
+int sdp_recv_flush(struct sdp_sock *conn)
 {
 	int result = 0;
 	int counter;
@@ -625,7 +625,7 @@ static int sdp_read_buff_iocb(struct sdp
 /*
  * sdp_recv_buff_iocb_active - Ease AIO read pending pressure
  */
-static int sdp_recv_buff_iocb_active(struct sdp_opt *conn,
+static int sdp_recv_buff_iocb_active(struct sdp_sock *conn,
 				     struct sdpc_buff *buff)
 {
 	struct sdpc_iocb *iocb;
@@ -671,7 +671,7 @@ static int sdp_recv_buff_iocb_active(str
 /*
  * sdp_recv_buff_iocb_pending - Ease AIO read pending pressure
  */
-static int sdp_recv_buff_iocb_pending(struct sdp_opt *conn,
+static int sdp_recv_buff_iocb_pending(struct sdp_sock *conn,
 				      struct sdpc_buff *buff)
 {
 	struct sdpc_iocb *iocb;
@@ -725,7 +725,7 @@ static int sdp_recv_buff_iocb_pending(st
 /*
  * sdp_recv_buff - Process a new buffer based on queue type
  */
-int sdp_recv_buff(struct sdp_opt *conn, struct sdpc_buff *buff)
+int sdp_recv_buff(struct sdp_sock *conn, struct sdpc_buff *buff)
 {
 	int result;
 	int buffered;
@@ -835,7 +835,7 @@ static int sdp_read_src_lookup(struct sd
 static int sdp_inet_read_cancel(struct kiocb *req, struct io_event *ev)
 {
 	struct sock_iocb *si = kiocb_to_siocb(req);
-	struct sdp_opt   *conn;
+	struct sdp_sock   *conn;
 	struct sdpc_iocb *iocb;
 	int result = 0;
 
@@ -992,7 +992,7 @@ static int sdp_inet_recv_urg_trav(struct
 static int sdp_inet_recv_urg(struct sock *sk, struct msghdr *msg, int size,
 			     int flags)
 {
-	struct sdp_opt *conn;
+	struct sdp_sock *conn;
 	struct sdpc_buff *buff;
 	int result = 0;
 	u8 value;
@@ -1061,7 +1061,7 @@ int sdp_inet_recv(struct kiocb  *req, st
 		  size_t size, int flags)
 {
 	struct sock      *sk;
-	struct sdp_opt   *conn;
+	struct sdp_sock   *conn;
 	struct sdpc_iocb *iocb;
 	struct sdpc_buff *buff;
 	struct sdpc_buff *head = NULL;
Index: linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_conn.h
===================================================================
--- linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_conn.h	(revision 2751)
+++ linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_conn.h	(working copy)
@@ -109,12 +109,12 @@ enum sdp_mode {
  */
 #define SDP_MSG_EVENT_TABLE_SIZE 0x20
 
-static inline struct sdp_opt *sdp_sk(struct sock *sk)
+static inline struct sdp_sock *sdp_sk(struct sock *sk)
 {
-	return (struct sdp_opt *)sk;
+	return (struct sdp_sock *)sk;
 }
 
-static inline struct sock *sk_sdp(struct sdp_opt *conn)
+static inline struct sock *sk_sdp(struct sdp_sock *conn)
 {
 	return (struct sock *)conn;
 }
@@ -176,9 +176,9 @@ struct sdp_conn_lock {
 /*
  * SDP Connection structure.
  */
-struct sdp_opt {
+struct sdp_sock {
 	/*
-	 * inet_sock must be first member of sdp_opt
+	 * inet_sock must be first member of sdp_sock
 	 * NOTE: this depends on inet_sock having struct sock as its
 	 * first member
 	 */
@@ -336,17 +336,17 @@ struct sdp_opt {
 	/*
 	 * table managment
 	 */
-	struct sdp_opt *lstn_next;    /* next conn in the chain */
-	struct sdp_opt **lstn_p_next; /* previous next conn in the chain */
+	struct sdp_sock *lstn_next;    /* next conn in the chain */
+	struct sdp_sock **lstn_p_next; /* previous next conn in the chain */
 
-	struct sdp_opt *bind_next;    /* next conn in the chain */
-	struct sdp_opt **bind_p_next; /* previous next conn in the chain */
+	struct sdp_sock *bind_next;    /* next conn in the chain */
+	struct sdp_sock **bind_p_next; /* previous next conn in the chain */
 	/*
 	 * listen/accept managment
 	 */
-	struct sdp_opt *parent;      /* listening socket queuing. */
-	struct sdp_opt *accept_next; /* sockets waiting for acceptance. */
-	struct sdp_opt *accept_prev; /* sockets waiting for acceptance. */
+	struct sdp_sock *parent;      /* listening socket queuing. */
+	struct sdp_sock *accept_next; /* sockets waiting for acceptance. */
+	struct sdp_sock *accept_prev; /* sockets waiting for acceptance. */
 	/*
 	 * OS info
 	 */
@@ -427,18 +427,18 @@ struct sdp_opt {
 /*
  * SDP connection lock
  */
-extern void sdp_conn_internal_lock(struct sdp_opt *conn, unsigned long *flags);
-extern void sdp_conn_internal_unlock(struct sdp_opt *conn);
-extern void sdp_conn_relock(struct sdp_opt *conn);
-extern void sdp_conn_destruct(struct sdp_opt *conn);
-extern int sdp_conn_cq_drain(struct ib_cq *cq, struct sdp_opt *conn);
+extern void sdp_conn_internal_lock(struct sdp_sock *conn, unsigned long *flags);
+extern void sdp_conn_internal_unlock(struct sdp_sock *conn);
+extern void sdp_conn_relock(struct sdp_sock *conn);
+extern void sdp_conn_destruct(struct sdp_sock *conn);
+extern int sdp_conn_cq_drain(struct ib_cq *cq, struct sdp_sock *conn);
 
 #define SDP_CONN_LOCK_IRQ(conn, flags) \
         spin_lock_irqsave(&((conn)->lock.slock), flags)
 #define SDP_CONN_UNLOCK_IRQ(conn, flags) \
         spin_unlock_irqrestore(&((conn)->lock.slock), flags)
 
-static inline void sdp_conn_lock(struct sdp_opt *conn)
+static inline void sdp_conn_lock(struct sdp_sock *conn)
 {
 	unsigned long flags;
 
@@ -454,7 +454,7 @@ static inline void sdp_conn_lock(struct 
 	spin_unlock_irqrestore(&(conn->lock.slock), flags);
 }
 
-static inline void sdp_conn_unlock(struct sdp_opt *conn)
+static inline void sdp_conn_unlock(struct sdp_sock *conn)
 {
 	unsigned long flags;
 
@@ -473,12 +473,12 @@ static inline void sdp_conn_unlock(struc
 /*
  * connection reference counting.
  */
-static inline void sdp_conn_hold(struct sdp_opt *conn)
+static inline void sdp_conn_hold(struct sdp_sock *conn)
 {
 	atomic_inc(&conn->refcnt);
 }
 
-static inline void sdp_conn_put(struct sdp_opt *conn)
+static inline void sdp_conn_put(struct sdp_sock *conn)
 {
 	if (atomic_dec_and_test(&conn->refcnt))
 		sdp_conn_destruct(conn);
Index: linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_pass.c
===================================================================
--- linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_pass.c	(revision 2751)
+++ linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_pass.c	(working copy)
@@ -38,7 +38,7 @@
 /*
  * handle incoming passive connection establishment. (RTU)
  */
-int sdp_cm_pass_establish(struct sdp_opt *conn)
+int sdp_cm_pass_establish(struct sdp_sock *conn)
 {
         struct ib_qp_attr *qp_attr;
 	int attr_mask = 0;
@@ -102,7 +102,7 @@ done:
 /*
  * Functions to handle incoming passive connection requests. (REQ)
  */
-static int sdp_cm_accept(struct sdp_opt *conn)
+static int sdp_cm_accept(struct sdp_sock *conn)
 {
 	struct ib_cm_rep_param param;
 	struct sdp_msg_hello_ack *hello_ack;
@@ -231,8 +231,8 @@ error:
 	return result;
 }
 
-static void sdp_cm_listen_inherit(struct sdp_opt *parent,
-				  struct sdp_opt *child)
+static void sdp_cm_listen_inherit(struct sdp_sock *parent,
+				  struct sdp_sock *child)
 {
 	struct sock *psk;
 	struct sock *csk;
@@ -350,8 +350,8 @@ static int sdp_cm_hello_check(struct sdp
 int sdp_cm_req_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event)
 {
 	struct sdp_msg_hello *msg_hello = event->private_data;
-	struct sdp_opt *listen_conn;
-	struct sdp_opt *conn;
+	struct sdp_sock *listen_conn;
+	struct sdp_sock *conn;
 	struct sock *sk;
 	int result;
 	u16 port;
Index: linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_sent.c
===================================================================
--- linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_sent.c	(revision 2751)
+++ linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_sent.c	(working copy)
@@ -39,7 +39,7 @@
  * Specific MID handler functions. (SEND)
  */
 
-static int sdp_sent_disconnect(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_sent_disconnect(struct sdp_sock *conn, struct sdpc_buff *buff)
 {
 	int result;
 
@@ -95,7 +95,7 @@ error:
 	return result;
 }
 
-static int sdp_sent_abort(struct sdp_opt *conn, struct sdpc_buff *buff)
+static int sdp_sent_abort(struct sdp_sock *conn, struct sdpc_buff *buff)
 {
 	int result;
 
@@ -115,7 +115,7 @@ static int sdp_sent_abort(struct sdp_opt
 /*
  * sdp_event_send - send event handler
  */
-int sdp_event_send(struct sdp_opt *conn, struct ib_wc *comp)
+int sdp_event_send(struct sdp_sock *conn, struct ib_wc *comp)
 {
 	struct sdpc_buff *head = NULL;
 	struct sdpc_buff *buff;
Index: linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_iocb.c
===================================================================
--- linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_iocb.c	(revision 2751)
+++ linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_iocb.c	(working copy)
@@ -413,7 +413,7 @@ static void sdp_mem_lock_cleanup(void)
 /*
  * sdp_iocb_register - register an IOCBs memory for advertisment
  */
-int sdp_iocb_register(struct sdpc_iocb *iocb, struct sdp_opt *conn)
+int sdp_iocb_register(struct sdpc_iocb *iocb, struct sdp_sock *conn)
 {
 	int result;
 
+https://openib.org/tiki/tiki-index.php?page=SDPTodoList
Index: linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_event.c
===================================================================
--- linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_event.c	(revision 2751)
+++ linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_event.c	(working copy)
@@ -42,7 +42,7 @@
 /*
  * sdp_cq_event_locked - main per QP event handler
  */
-int sdp_cq_event_locked(struct ib_wc *comp, struct sdp_opt *conn)
+int sdp_cq_event_locked(struct ib_wc *comp, struct sdp_sock *conn)
 {
 	int result = 0;
 
@@ -127,7 +127,7 @@ done:
 void sdp_cq_event_handler(struct ib_cq *cq, void *arg)
 {
 	s32 hashent = (unsigned long)arg;
-	struct sdp_opt *conn;
+	struct sdp_sock *conn;
 	u16 event;
 	unsigned long flags;
 
@@ -183,7 +183,7 @@ void sdp_cq_event_handler(struct ib_cq *
 	sdp_conn_put(conn);
 }
 
-static void sdp_cm_to_error(struct sdp_opt *conn)
+static void sdp_cm_to_error(struct sdp_sock *conn)
 {
 	sdp_conn_inet_error(conn, -ECONNRESET);
 	conn->cm_id = NULL;
@@ -194,7 +194,7 @@ static void sdp_cm_to_error(struct sdp_o
  */
 
 static int sdp_cm_idle(struct ib_cm_id *cm_id, struct ib_cm_event *event,
-		       struct sdp_opt *conn)
+		       struct sdp_sock *conn)
 {
 	sdp_dbg_ctrl(conn, "CM IDLE. commID <%08x> event <%d> status <%d>",
 		     cm_id->local_id, event->event, event->param.send_status);
@@ -234,7 +234,7 @@ static int sdp_cm_idle(struct ib_cm_id *
 
 static int sdp_cm_established(struct ib_cm_id *cm_id,
 			      struct ib_cm_event *event,
-			      struct sdp_opt *conn)
+			      struct sdp_sock *conn)
 {
 	int result = 0;
 
@@ -292,7 +292,7 @@ error:
 }
 
 static int sdp_cm_dreq_rcvd(struct ib_cm_id *cm_id, struct ib_cm_event *event,
-			    struct sdp_opt *conn)
+			    struct sdp_sock *conn)
 {
 	int result = 0;
 
@@ -313,7 +313,7 @@ static int sdp_cm_dreq_rcvd(struct ib_cm
  * sdp_cm_timewait - handler for connection Time Wait completion
  */
 static int sdp_cm_timewait(struct ib_cm_id *cm_id, struct ib_cm_event *event,
-			   struct sdp_opt *conn)
+			   struct sdp_sock *conn)
 {
 	int result = 0;
 
@@ -381,7 +381,7 @@ static int sdp_cm_timewait(struct ib_cm_
 int sdp_cm_event_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event)
 {
 	s32 hashent = (unsigned long)cm_id->context;
-	struct sdp_opt *conn = NULL;
+	struct sdp_sock *conn = NULL;
 	int result = 0;
 
 	sdp_dbg_ctrl(NULL, "CM state <%d> event <%d> commID <%08x> ID <%d>",
Index: linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_dev.h
===================================================================
--- linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_dev.h	(revision 2751)
+++ linux-2.6.12-openib/drivers/infiniband/ulp/sdp/sdp_dev.h	(working copy)
@@ -182,12 +182,12 @@ struct sdev_root {
 	u32 sk_ordr;  /* order size of region. */
 	u32 sk_rover; /* next potential available space. */
 	u32 sk_entry; /* number of socket table entries. */
-	struct sdp_opt **sk_array;	/* array of sockets. */
+	struct sdp_sock **sk_array;	/* array of sockets. */
 	/*
 	 * connection managment
 	 */
-	struct sdp_opt *listen_list;	/* list of listening connections */
-	struct sdp_opt *bind_list;	/* connections bound to a port. */
+	struct sdp_sock *listen_list;	/* list of listening connections */
+	struct sdp_sock *bind_list;	/* connections bound to a port. */
 	/*
 	 * list locks
 	 */




More information about the general mailing list