[openib-general] [PATCH][SDP][21/22] Remove use of leading underscores in static names in sdp_send.c
Tom Duffy
Tom.Duffy at Sun.COM
Mon Feb 28 14:03:34 PST 2005
Signed-off-by: Tom Duffy <tduffy at sun.com>
Index: drivers/infiniband/ulp/sdp/sdp_send.c
===================================================================
--- drivers/infiniband/ulp/sdp/sdp_send.c (revision 1929)
+++ drivers/infiniband/ulp/sdp/sdp_send.c (working copy)
@@ -39,9 +39,9 @@
*/
/*
- * _sdp_send_buff_post - Post a buffer send on a SDP connection
+ * 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_opt *conn, struct sdpc_buff *buff)
{
struct ib_send_wr send_param = { NULL };
struct ib_send_wr *bad_wr;
@@ -65,7 +65,7 @@ static int _sdp_send_buff_post(struct sd
/*
* endian swap
*/
- _sdp_msg_cpu_to_net_bsdh(buff->bsdh_hdr);
+ sdp_msg_cpu_to_net_bsdh(buff->bsdh_hdr);
/*
* OOB processing. If there is a single OOB byte in flight then the
* pending flag is set as early as possible. IF a second OOB byte
@@ -180,10 +180,9 @@ done:
*/
/*
- * _sdp_send_data_buff_post - Post data for buffered transmission
+ * sdp_send_data_buff_post - Post data for buffered transmission
*/
-static int _sdp_send_data_buff_post(struct sdp_opt *conn,
- struct sdpc_buff *buff)
+static int sdp_send_data_buff_post(struct sdp_opt *conn, struct sdpc_buff *buff)
{
struct sdpc_advt *advt;
int result;
@@ -278,7 +277,7 @@ static int _sdp_send_data_buff_post(stru
/*
* transmision time
*/
- result = _sdp_send_buff_post(conn, buff);
+ result = sdp_send_buff_post(conn, buff);
if (result < 0) {
sdp_dbg_warn(conn, "Error <%d> posting send data buffer",
result);
@@ -291,10 +290,9 @@ error:
}
/*
- * _sdp_send_data_buff_snk - Post data for buffered transmission
+ * 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_opt *conn, struct sdpc_buff *buff)
{
struct ib_send_wr send_param = { NULL };
struct ib_send_wr *bad_wr;
@@ -428,10 +426,9 @@ error:
}
/*
- * _sdp_send_data_iocb_snk - process a zcopy write advert in the data path
+ * 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_opt *conn, struct sdpc_iocb *iocb)
{
struct ib_send_wr send_param = { NULL };
struct ib_send_wr *bad_wr;
@@ -554,10 +551,9 @@ error:
}
/*
- * _sdp_send_data_iocb_src - send a zcopy read advert in the data path
+ * 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_opt *conn, struct sdpc_iocb *iocb)
{
struct msg_hdr_srcah *src_ah;
struct sdpc_buff *buff;
@@ -669,7 +665,7 @@ static int _sdp_send_data_iocb_src(struc
/*
* map, copy, unmap.
*/
- addr = __sdp_kmap(iocb->page_array[pos]);
+ addr = sdp_kmap(iocb->page_array[pos]);
if (!addr) {
result = -ENOMEM;
goto error;
@@ -677,7 +673,7 @@ static int _sdp_send_data_iocb_src(struc
memcpy(buff->tail, (addr + off), len);
- __sdp_kunmap(iocb->page_array[pos]);
+ sdp_kunmap(iocb->page_array[pos]);
/*
* update pointers
*/
@@ -693,11 +689,11 @@ static int _sdp_send_data_iocb_src(struc
/*
* endian swap of extended header
*/
- _sdp_msg_cpu_to_net_srcah(src_ah);
+ sdp_msg_cpu_to_net_srcah(src_ah);
/*
* queue/send SrcAvail message
*/
- result = _sdp_send_buff_post(conn, buff);
+ result = sdp_send_buff_post(conn, buff);
if (result < 0) {
sdp_dbg_warn(conn, "Error <%d> posting SrcAvail for IOCB <%d>",
result, iocb->key);
@@ -719,11 +715,10 @@ drop:
}
/*
- * _sdp_send_iocb_buff_write - write part of an iocb into a SDP buffer
+ * sdp_send_iocb_buff_write - write part of an iocb into a SDP buffer
*/
-static int _sdp_send_iocb_buff_write(struct sdpc_iocb *iocb,
- struct sdpc_buff *buff)
-
+static int sdp_send_iocb_buff_write(struct sdpc_iocb *iocb,
+ struct sdpc_buff *buff)
{
unsigned long copy = 0;
unsigned long offset;
@@ -741,7 +736,7 @@ static int _sdp_send_iocb_buff_write(str
/*
* map correct page of iocb
*/
- addr = __sdp_kmap(iocb->page_array[counter]);
+ addr = sdp_kmap(iocb->page_array[counter]);
if (!addr)
break;
@@ -760,17 +755,16 @@ static int _sdp_send_iocb_buff_write(str
offset += copy;
offset &= (~PAGE_MASK);
- __sdp_kunmap(iocb->page_array[counter++]);
+ sdp_kunmap(iocb->page_array[counter++]);
}
return 0;
}
/*
- * _sdp_send_data_iocb_buff - write multiple SDP buffers from an iocb
+ * 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_opt *conn, struct sdpc_iocb *iocb)
{
struct sdpc_buff *buff;
int result;
@@ -781,7 +775,7 @@ static int _sdp_send_data_iocb_buff(stru
/*
* loop through queued buffers and copy them to the destination
*/
- copy = min(__sdp_inet_write_space(conn, 0), iocb->len);
+ copy = min(sdp_inet_write_space(conn, 0), iocb->len);
while (copy > 0 &&
conn->r_recv_bf > 2 &&
@@ -810,7 +804,7 @@ static int _sdp_send_data_iocb_buff(stru
/*
* TODO: need to be checking OOB here.
*/
- result =_sdp_send_iocb_buff_write(iocb, buff);
+ result =sdp_send_iocb_buff_write(iocb, buff);
if (result < 0) {
sdp_dbg_warn(conn, "Error <%d> copy from IOCB <%d>.",
result, iocb->key);
@@ -825,7 +819,7 @@ static int _sdp_send_data_iocb_buff(stru
* transmision time. An update of send_pipe is not needed,
* since the IOCB queue took care of the increment.
*/
- result = _sdp_send_buff_post(conn, buff);
+ result = sdp_send_buff_post(conn, buff);
if (result < 0) {
sdp_dbg_warn(conn, "Error <%d> send queue buff post",
result);
@@ -841,9 +835,9 @@ error:
}
/*
- * _sdp_send_data_iocb - Post IOCB data for transmission
+ * 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_opt *conn, struct sdpc_iocb *iocb)
{
int result = ENOBUFS;
@@ -858,7 +852,7 @@ static int _sdp_send_data_iocb(struct sd
* determin if we are sending Buffered, Source or Sink.
*/
if (sdp_advt_q_size(&conn->snk_pend) > 0) {
- result = _sdp_send_data_iocb_snk(conn, iocb);
+ result = sdp_send_data_iocb_snk(conn, iocb);
if (!result) {
/*
* IOCB completely processed. Otherwise we allow the
@@ -890,7 +884,7 @@ static int _sdp_send_data_iocb(struct sd
if (conn->src_zthresh > iocb->len ||
conn->send_mode == SDP_MODE_BUFF ||
(iocb->flags & SDP_IOCB_F_BUFF)) {
- result = _sdp_send_data_iocb_buff(conn, iocb);
+ result = sdp_send_data_iocb_buff(conn, iocb);
if (!result) {
/*
* complete this IOCB
@@ -911,7 +905,7 @@ static int _sdp_send_data_iocb(struct sd
goto done;
}
- result = _sdp_send_data_iocb_src(conn, iocb);
+ result = sdp_send_data_iocb_src(conn, iocb);
if (!result) {
/*
* queue IOCB
@@ -931,10 +925,10 @@ done:
}
/*
- * _sdp_send_data_queue_test - send data buffer if conditions are met
+ * sdp_send_data_queue_test - send data buffer if conditions are met
*/
-static int _sdp_send_data_queue_test(struct sdp_opt *conn,
- struct sdpc_desc *element)
+static int sdp_send_data_queue_test(struct sdp_opt *conn,
+ struct sdpc_desc *element)
{
int result;
@@ -948,23 +942,23 @@ static int _sdp_send_data_queue_test(str
return ENOBUFS;
if (element->type == SDP_DESC_TYPE_IOCB)
- return _sdp_send_data_iocb(conn, (struct sdpc_iocb *)element);
+ return sdp_send_data_iocb(conn, (struct sdpc_iocb *)element);
if (!sdp_advt_q_look(&conn->snk_pend) ||
(((struct sdpc_buff *)element)->flags & SDP_BUFF_F_OOB_PRES))
- result = _sdp_send_data_buff_post(conn,
+ result = sdp_send_data_buff_post(conn,
(struct sdpc_buff *)element);
else
- result = _sdp_send_data_buff_snk(conn,
+ result = sdp_send_data_buff_snk(conn,
(struct sdpc_buff *)element);
return result;
}
/*
- * _sdp_send_data_queue_flush - Flush data from send queue, to send post
+ * 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_opt *conn)
{
struct sdpc_desc *element;
int result = 0;
@@ -978,7 +972,7 @@ static int _sdp_send_data_queue_flush(st
element = sdp_desc_q_look_head(&conn->send_queue);
SDP_EXPECT((element));
- result = _sdp_send_data_queue_test(conn, element);
+ result = sdp_send_data_queue_test(conn, element);
if (!result)
continue;
/*
@@ -1004,10 +998,9 @@ static int _sdp_send_data_queue_flush(st
}
/*
- * _sdp_send_data_queue - send using the data queue if necessary
+ * 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_opt *conn, struct sdpc_desc *element)
{
int result = 0;
@@ -1019,7 +1012,7 @@ static int _sdp_send_data_queue(struct s
* value of zero is a successful transmission
*/
if (sdp_desc_q_size(&conn->send_queue) > 0 ||
- (result = _sdp_send_data_queue_test(conn, element)) > 0) {
+ (result = sdp_send_data_queue_test(conn, element)) > 0) {
result = sdp_desc_q_put_tail(&conn->send_queue, element);
if (result < 0) {
sdp_dbg_warn(conn, "Error <%d> queueing data for send",
@@ -1054,9 +1047,9 @@ done:
}
/*
- * _sdp_send_data_buff_get - get an appropriate write buffer for send
+ * 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_opt *conn)
{
struct sdpc_buff *buff;
@@ -1079,12 +1072,11 @@ static inline struct sdpc_buff *_sdp_sen
}
/*
- * _sdp_send_data_buff_put - place a buffer into the send queue
+ * sdp_send_data_buff_put - place a buffer into the send queue
*/
-static inline int _sdp_send_data_buff_put(struct sdp_opt *conn,
- struct sdpc_buff *buff,
- int size,
- int urg)
+static inline int sdp_send_data_buff_put(struct sdp_opt *conn,
+ struct sdpc_buff *buff, int size,
+ int urg)
{
int result = 0;
int expect;
@@ -1119,7 +1111,7 @@ static inline int _sdp_send_data_buff_pu
/*
* finally send the data buffer
*/
- result = _sdp_send_data_queue(conn, (struct sdpc_desc *) buff);
+ result = sdp_send_data_queue(conn, (struct sdpc_desc *) buff);
if (result < 0) {
sdp_dbg_warn(conn, "Error <%d> buffer to SEND queue.",
result);
@@ -1137,10 +1129,9 @@ static inline int _sdp_send_data_buff_pu
*/
/*
- * _sdp_send_ctrl_buff_test - determine if it's OK to post a control msg
+ * 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_opt *conn, struct sdpc_buff *buff)
{
int result = 0;
@@ -1152,7 +1143,7 @@ static int _sdp_send_ctrl_buff_test(stru
/*
* post the control buffer
*/
- result = _sdp_send_buff_post(conn, buff);
+ result = sdp_send_buff_post(conn, buff);
if (result < 0) {
sdp_dbg_warn(conn, "Error <%d> posting control send", result);
goto error;
@@ -1164,9 +1155,9 @@ error:
}
/*
- * _sdp_send_ctrl_buff_flush - Flush control buffers, to send post
+ * 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_opt *conn)
{
struct sdpc_desc *element;
int result = 0;
@@ -1179,8 +1170,8 @@ static int _sdp_send_ctrl_buff_flush(str
element = sdp_desc_q_look_head(&conn->send_ctrl);
SDP_EXPECT((element));
- result = _sdp_send_ctrl_buff_test(conn,
- (struct sdpc_buff *)element);
+ result = sdp_send_ctrl_buff_test(conn,
+ (struct sdpc_buff *)element);
if (!result)
continue;
@@ -1201,10 +1192,10 @@ static int _sdp_send_ctrl_buff_flush(str
}
/*
- * _sdp_send_ctrl_buff_buffered - Send a buffered control message
+ * sdp_send_ctrl_buff_buffered - Send a buffered control message
*/
-static int _sdp_send_ctrl_buff_buffered(struct sdp_opt *conn,
- struct sdpc_buff *buff)
+static int sdp_send_ctrl_buff_buffered(struct sdp_opt *conn,
+ struct sdpc_buff *buff)
{
int result = 0;
@@ -1212,7 +1203,7 @@ static int _sdp_send_ctrl_buff_buffered(
* Either post a send, or buffer the packet in the tx queue
*/
if (sdp_desc_q_size(&conn->send_ctrl) > 0 ||
- (result = _sdp_send_ctrl_buff_test(conn, buff)) > 0) {
+ (result = sdp_send_ctrl_buff_test(conn, buff)) > 0) {
/*
* save the buffer for later flushing into the post queue.
*/
@@ -1237,12 +1228,9 @@ error:
}
/*
- * _sdp_send_ctrl_buff - Create and Send a buffered control message
+ * 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_opt *conn, u8 mid, int se, int sig)
{
int result = 0;
struct sdpc_buff *buff;
@@ -1282,7 +1270,7 @@ static int _sdp_send_ctrl_buff(struct sd
/*
* Either post a send, or buffer the packet in the tx queue
*/
- result = _sdp_send_ctrl_buff_buffered(conn, buff);
+ result = sdp_send_ctrl_buff_buffered(conn, buff);
if (result < 0) {
sdp_dbg_warn(conn, "Error <%d> posting control message",
result);
@@ -1294,9 +1282,9 @@ error:
}
/*
- * _sdp_send_ctrl_disconnect - Send a disconnect request
+ * do_send_ctrl_disconnect - Send a disconnect request
*/
-static int _sdp_send_ctrl_disconnect(struct sdp_opt *conn)
+static int do_send_ctrl_disconnect(struct sdp_opt *conn)
{
int result = 0;
struct sdpc_buff *buff;
@@ -1330,7 +1318,7 @@ static int _sdp_send_ctrl_disconnect(str
/*
* send
*/
- result = _sdp_send_ctrl_buff_buffered(conn, buff);
+ result = sdp_send_ctrl_buff_buffered(conn, buff);
if (result < 0) {
sdp_dbg_warn(conn, "Error <%d> posting control message",
result);
@@ -1360,7 +1348,7 @@ int sdp_send_ctrl_disconnect(struct sdp_
if (!(conn->flags & SDP_CONN_F_DIS_HOLD) &&
!sdp_desc_q_size(&conn->send_queue) &&
!conn->src_sent)
- result = _sdp_send_ctrl_disconnect(conn);
+ result = do_send_ctrl_disconnect(conn);
else {
sdp_dbg_ctrl(conn, "defer disconnect <%d:%d> <%08x>",
sdp_desc_q_size(&conn->send_queue),
@@ -1392,7 +1380,7 @@ int sdp_send_ctrl_ack(struct sdp_opt *co
conn->l_advt_bf > 2))
return 0;
- return _sdp_send_ctrl_buff(conn, SDP_MID_DATA, 0, 0);
+ return sdp_send_ctrl_buff(conn, SDP_MID_DATA, 0, 0);
}
/*
@@ -1400,7 +1388,7 @@ int sdp_send_ctrl_ack(struct sdp_opt *co
*/
int sdp_send_ctrl_send_sm(struct sdp_opt *conn)
{
- return _sdp_send_ctrl_buff(conn, SDP_MID_SEND_SM, 1, 1);
+ return sdp_send_ctrl_buff(conn, SDP_MID_SEND_SM, 1, 1);
}
/*
@@ -1408,7 +1396,7 @@ int sdp_send_ctrl_send_sm(struct sdp_opt
*/
int sdp_send_ctrl_src_cancel(struct sdp_opt *conn)
{
- return _sdp_send_ctrl_buff(conn, SDP_MID_SRC_CANCEL, 1, 1);
+ return sdp_send_ctrl_buff(conn, SDP_MID_SRC_CANCEL, 1, 1);
}
/*
@@ -1416,7 +1404,7 @@ int sdp_send_ctrl_src_cancel(struct sdp_
*/
int sdp_send_ctrl_snk_cancel(struct sdp_opt *conn)
{
- return _sdp_send_ctrl_buff(conn, SDP_MID_SNK_CANCEL, 1, 1);
+ return sdp_send_ctrl_buff(conn, SDP_MID_SNK_CANCEL, 1, 1);
}
/*
@@ -1424,7 +1412,7 @@ int sdp_send_ctrl_snk_cancel(struct sdp_
*/
int sdp_send_ctrl_snk_cancel_ack(struct sdp_opt *conn)
{
- return _sdp_send_ctrl_buff(conn, SDP_MID_SNK_CANCEL_ACK, 1, 1);
+ return sdp_send_ctrl_buff(conn, SDP_MID_SNK_CANCEL_ACK, 1, 1);
}
/*
@@ -1435,7 +1423,7 @@ int sdp_send_ctrl_abort(struct sdp_opt *
/*
* send
*/
- return _sdp_send_ctrl_buff(conn, SDP_MID_ABORT_CONN, 1, 1);
+ return sdp_send_ctrl_buff(conn, SDP_MID_ABORT_CONN, 1, 1);
}
/*
@@ -1474,11 +1462,11 @@ int sdp_send_ctrl_resize_buff_ack(struct
/*
* endian swap of extended header
*/
- _sdp_msg_cpu_to_net_crbah(crbah);
+ sdp_msg_cpu_to_net_crbah(crbah);
/*
* Either post a send, or buffer the packet in the tx queue
*/
- result = _sdp_send_ctrl_buff_buffered(conn, buff);
+ result = sdp_send_ctrl_buff_buffered(conn, buff);
if (result < 0) {
sdp_dbg_warn(conn, "Error <%d> posting control message",
result);
@@ -1543,11 +1531,11 @@ int sdp_send_ctrl_rdma_rd(struct sdp_opt
/*
* endian swap of extended header
*/
- _sdp_msg_cpu_to_net_rrch(rrch);
+ sdp_msg_cpu_to_net_rrch(rrch);
/*
* Either post a send, or buffer the packet in the tx queue
*/
- result = _sdp_send_ctrl_buff_buffered(conn, buff);
+ result = sdp_send_ctrl_buff_buffered(conn, buff);
if (result < 0) {
sdp_dbg_warn(conn, "Error <%d> posting control message",
result);
@@ -1600,11 +1588,11 @@ int sdp_send_ctrl_rdma_wr(struct sdp_opt
/*
* endian swap of extended header
*/
- _sdp_msg_cpu_to_net_rwch(rwch);
+ sdp_msg_cpu_to_net_rwch(rwch);
/*
* Either post a send, or buffer the packet in the tx queue
*/
- result = _sdp_send_ctrl_buff_buffered(conn, buff);
+ result = sdp_send_ctrl_buff_buffered(conn, buff);
if (result < 0) {
sdp_dbg_warn(conn, "Error <%d> posting control message",
result);
@@ -1618,10 +1606,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_opt *conn, u32 size, u32 rkey, u64 addr)
{
struct msg_hdr_snkah *snkah;
struct sdpc_buff *buff;
@@ -1665,11 +1650,11 @@ int sdp_send_ctrl_snk_avail(struct sdp_o
/*
* endian swap of extended header
*/
- _sdp_msg_cpu_to_net_snkah(snkah);
+ sdp_msg_cpu_to_net_snkah(snkah);
/*
* Either post a send, or buffer the packet in the tx queue
*/
- result = _sdp_send_ctrl_buff_buffered(conn, buff);
+ result = sdp_send_ctrl_buff_buffered(conn, buff);
if (result < 0) {
sdp_dbg_warn(conn, "Error <%d> posting control message",
result);
@@ -1751,11 +1736,11 @@ int sdp_send_ctrl_mode_ch(struct sdp_opt
/*
* endian swap of extended header
*/
- _sdp_msg_cpu_to_net_mch(mch);
+ sdp_msg_cpu_to_net_mch(mch);
/*
* Either post a send, or buffer the packet in the tx queue
*/
- result = _sdp_send_ctrl_buff_buffered(conn, buff);
+ result = sdp_send_ctrl_buff_buffered(conn, buff);
if (result < 0) {
sdp_dbg_warn(conn, "Error <%d> posting control message",
result);
@@ -1771,9 +1756,9 @@ error:
*/
/*
- * _sdp_write_src_lookup - lookup function for cancelation
+ * sdp_write_src_lookup - lookup function for cancelation
*/
-static int _sdp_write_src_lookup(struct sdpc_desc *element, void *arg)
+static int sdp_write_src_lookup(struct sdpc_desc *element, void *arg)
{
struct sdpc_iocb *iocb = (struct sdpc_iocb *) element;
struct kiocb *req = (struct kiocb *)arg;
@@ -1785,9 +1770,9 @@ static int _sdp_write_src_lookup(struct
}
/*
- * _sdp_inet_write_cancel - cancel an IO operation
+ * sdp_inet_write_cancel - cancel an IO operation
*/
-static int _sdp_inet_write_cancel(struct kiocb *req, struct io_event *ev)
+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;
@@ -1817,7 +1802,7 @@ static int _sdp_inet_write_cancel(struct
* whether this is a read or write.
*/
iocb = (struct sdpc_iocb *)sdp_desc_q_lookup(&conn->send_queue,
- _sdp_write_src_lookup,
+ sdp_write_src_lookup,
req);
if (iocb) {
/*
@@ -1867,7 +1852,7 @@ static int _sdp_inet_write_cancel(struct
* already in flight.
*/
iocb = (struct sdpc_iocb *)sdp_desc_q_lookup(&conn->w_snk,
- _sdp_write_src_lookup,
+ sdp_write_src_lookup,
req);
if (iocb) {
@@ -1927,9 +1912,9 @@ done:
}
/*
- * _sdp_send_flush_advt - Flush passive sink advertisments
+ * 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_opt *conn)
{
struct sdpc_advt *advt;
int result;
@@ -1977,7 +1962,7 @@ int sdp_send_flush(struct sdp_opt *conn)
* Priority goes to control messages, and we need to follow the
* send credit utilization rules.
*/
- result = _sdp_send_ctrl_buff_flush(conn);
+ result = sdp_send_ctrl_buff_flush(conn);
if (result < 0) {
sdp_dbg_warn(conn, "Error <%d> flushing control", result);
goto done;
@@ -1985,7 +1970,7 @@ int sdp_send_flush(struct sdp_opt *conn)
/*
* data flush
*/
- result = _sdp_send_data_queue_flush(conn);
+ result = sdp_send_data_queue_flush(conn);
if (result < 0) {
sdp_dbg_warn(conn, "Error <%d> flushing data queue", result);
goto done;
@@ -1994,7 +1979,7 @@ int sdp_send_flush(struct sdp_opt *conn)
* Sink advertisment flush.
*/
if (sdp_advt_q_size(&conn->snk_pend) > 0) {
- result = _sdp_send_flush_advt(conn);
+ result = sdp_send_flush_advt(conn);
if (result < 0) {
sdp_dbg_warn(conn,
"Error <%d> flushing sink advertisments",
@@ -2006,7 +1991,7 @@ int sdp_send_flush(struct sdp_opt *conn)
* disconnect flush
*/
if (SDP_ST_MASK_DIS_PEND & conn->state) {
- result = sdp_send_ctrl_disconnect(conn);
+ result = do_send_ctrl_disconnect(conn);
if (result < 0) {
sdp_dbg_warn(conn, "Error <%d> flushing disconnect",
result);
@@ -2026,9 +2011,7 @@ done:
/*
* sdp_inet_send - send data from user space to the network
*/
-int sdp_inet_send(struct kiocb *req,
- struct socket *sock,
- struct msghdr *msg,
+int sdp_inet_send(struct kiocb *req, struct socket *sock, struct msghdr *msg,
size_t size)
{
struct sock *sk;
@@ -2088,8 +2071,8 @@ int sdp_inet_send(struct kiocb *req,
* observed...) use a different threshold for urgent
* data to allow some space for sending.
*/
- while (__sdp_inet_write_space(conn, oob) > 0) {
- buff = _sdp_send_data_buff_get(conn);
+ while (sdp_inet_write_space(conn, oob) > 0) {
+ buff = sdp_send_data_buff_get(conn);
if (!buff) {
result = -ENOMEM;
goto done;
@@ -2097,7 +2080,7 @@ int sdp_inet_send(struct kiocb *req,
copy = min((size_t)(buff->end - buff->tail),
(size_t)(size - copied));
- copy = min(copy, __sdp_inet_write_space(conn, oob));
+ copy = min(copy, sdp_inet_write_space(conn, oob));
#ifndef _SDP_DATA_PATH_NULL
result = memcpy_fromiovec(buff->tail,
@@ -2113,9 +2096,9 @@ int sdp_inet_send(struct kiocb *req,
SDP_CONN_STAT_SEND_INC(conn, copy);
- result = _sdp_send_data_buff_put(conn, buff, copy,
- ((copied ==
- size) ? oob : 0));
+ result = sdp_send_data_buff_put(conn, buff, copy,
+ ((copied ==
+ size) ? oob : 0));
if (result < 0)
goto done;
@@ -2186,7 +2169,7 @@ skip: /* entry point for IOCB based tran
clear_bit(SOCK_ASYNC_NOSPACE, &sk->sk_socket->flags);
sdp_conn_unlock(conn);
- if (__sdp_inet_write_space(conn, oob) <= 0)
+ if (sdp_inet_write_space(conn, oob) <= 0)
timeout = schedule_timeout(timeout);
sdp_conn_lock(conn);
@@ -2213,7 +2196,7 @@ skip: /* entry point for IOCB based tran
iocb->key = req->ki_key;
iocb->addr = (unsigned long)msg->msg_iov->iov_base;
- req->ki_cancel = _sdp_inet_write_cancel;
+ req->ki_cancel = sdp_inet_write_cancel;
result = sdp_iocb_lock(iocb);
if (result < 0) {
@@ -2228,7 +2211,7 @@ skip: /* entry point for IOCB based tran
conn->send_pipe += iocb->len;
- result = _sdp_send_data_queue(conn, (struct sdpc_desc *)iocb);
+ result = sdp_send_data_queue(conn, (struct sdpc_desc *)iocb);
if (result < 0) {
sdp_dbg_warn(conn, "Error <%d> queueing write IOCB",
result);
More information about the general
mailing list