[openib-general] [PATCH][SDP][29/33] Fix comment style in sdp_send.c
Tom Duffy
Tom.Duffy at Sun.COM
Thu Feb 17 14:13:27 PST 2005
Signed-off-by: Tom Duffy <tduffy at sun.com>
--- drivers/infiniband/ulp/sdp-orig/sdp_send.c 2005-02-14 13:58:45.860001000 -0800
+++ drivers/infiniband/ulp/sdp/sdp_send.c 2005-02-17 11:38:10.806001000 -0800
@@ -1,35 +1,46 @@
/*
- This software is available to you under a choice of one of two
- licenses. You may choose to be licensed under the terms of the GNU
- General Public License (GPL) Version 2, available at
- <http://www.fsf.org/copyleft/gpl.html>, or the OpenIB.org BSD
- license, available in the LICENSE.TXT file accompanying this
- software. These details are also available at
- <http://openib.org/license.html>.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-
- Copyright (c) 2005 Topspin Communications. All rights reserved.
-
- $Id: sdp_send.c 836 2004-09-14 20:50:32Z roland $
-*/
+ * Copyright (c) 2005 Topspin Communications. All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses. You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
#include "sdp_main.h"
-/* --------------------------------------------------------------------- */
-/* */
-/* COMMON functions */
-/* */
-/* --------------------------------------------------------------------- */
-/* ========================================================================= */
-/*.._sdp_send_buff_post -- Post a buffer send on a SDP connection. */
+/*
+ * COMMON functions
+ */
+
+/*
+ * _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)
{
struct ib_send_wr send_param = { NULL };
@@ -187,14 +198,13 @@ done:
return result;
} /* _sdp_send_buff_post */
-/* --------------------------------------------------------------------- */
-/* */
-/* DATA functions */
-/* */
-/* --------------------------------------------------------------------- */
+/*
+ * DATA functions
+ */
-/* ========================================================================= */
-/*.._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)
{
@@ -317,8 +327,9 @@ error:
return result;
} /* _sdp_send_data_buff_post */
-/* ========================================================================= */
-/*.._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)
{
@@ -467,8 +478,9 @@ error:
return result;
} /* _sdp_send_data_buff_snk */
-/* ========================================================================= */
-/*.._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)
{
@@ -601,8 +613,9 @@ error:
return result;
} /* _sdp_send_data_iocb_snk */
-/* ========================================================================= */
-/*.._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)
{
@@ -789,8 +802,9 @@ drop:
return result;
} /* _sdp_send_data_iocb_src */
-/* ========================================================================= */
-/*.._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)
@@ -840,8 +854,9 @@ static int _sdp_send_iocb_buff_write(str
return 0;
} /* _sdp_send_iocb_buff_write */
-/* ========================================================================= */
-/*.._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)
{
@@ -921,8 +936,9 @@ error:
return result;
} /* _sdp_send_data_iocb_buff */
-/* ========================================================================= */
-/*.._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)
{
int result = ENOBUFS;
@@ -1037,8 +1053,9 @@ done:
return result;
} /* _sdp_send_data_iocb */
-/* ========================================================================= */
-/*.._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)
{
@@ -1077,8 +1094,9 @@ static int _sdp_send_data_queue_test(str
return result;
} /* _sdp_send_data_queue_test */
-/* ========================================================================= */
-/*.._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)
{
struct sdpc_desc *element;
@@ -1125,8 +1143,9 @@ static int _sdp_send_data_queue_flush(st
return result;
} /* _sdp_send_data_queue_flush */
-/* ========================================================================= */
-/*.._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)
{
@@ -1182,8 +1201,9 @@ done:
return result;
} /* _sdp_send_data_queue */
-/* ========================================================================= */
-/*.._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)
{
@@ -1210,8 +1230,9 @@ static __inline__ struct sdpc_buff *_sdp
return buff;
} /* _sdp_send_data_buff_get */
-/* ========================================================================= */
-/*.._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,
@@ -1271,13 +1292,13 @@ static __inline__ int _sdp_send_data_buf
return result;
} /* _sdp_send_data_buff_put */
-/* --------------------------------------------------------------------- */
-/* */
-/* CONTROL functions */
-/* */
-/* --------------------------------------------------------------------- */
-/* ========================================================================= */
-/*.._sdp_send_ctrl_buff_test -- determine if it's OK to post a control msg */
+/*
+ * CONTROL functions
+ */
+
+/*
+ * _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)
{
@@ -1308,8 +1329,9 @@ error:
return result;
} /* _sdp_send_ctrl_buff_test */
-/* ========================================================================= */
-/*.._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)
{
struct sdpc_desc *element;
@@ -1350,8 +1372,9 @@ static int _sdp_send_ctrl_buff_flush(str
return result;
} /* _sdp_send_ctrl_buff_flush */
-/* ========================================================================= */
-/*.._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)
{
@@ -1389,8 +1412,9 @@ error:
return result;
} /* _sdp_send_ctrl_buff_buffered */
-/* ========================================================================= */
-/*.._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,
@@ -1456,8 +1480,9 @@ error:
return result;
} /* _sdp_send_ctrl_buff */
-/* ========================================================================= */
-/*.._sdp_send_ctrl_disconnect -- Send a disconnect request. */
+/*
+ * _sdp_send_ctrl_disconnect - Send a disconnect request
+ */
static int _sdp_send_ctrl_disconnect(struct sdp_opt *conn)
{
int result = 0;
@@ -1507,8 +1532,9 @@ error:
return result;
} /* _sdp_send_ctrl_disconnect */
-/* ========================================================================= */
-/*..sdp_send_ctrl_disconnect -- potentially send a disconnect request. */
+/*
+ * sdp_send_ctrl_disconnect - potentially send a disconnect request
+ */
int sdp_send_ctrl_disconnect(struct sdp_opt *conn)
{
int result;
@@ -1545,8 +1571,9 @@ int sdp_send_ctrl_disconnect(struct sdp_
return result;
} /* sdp_send_ctrl_disconnect */
-/* ========================================================================= */
-/*..sdp_send_ctrl_ack -- Send a gratuitous Ack. */
+/*
+ * sdp_send_ctrl_ack - Send a gratuitous Ack
+ */
int sdp_send_ctrl_ack(struct sdp_opt *conn)
{
SDP_CHECK_NULL(conn, -EINVAL);
@@ -1569,36 +1596,41 @@ int sdp_send_ctrl_ack(struct sdp_opt *co
return _sdp_send_ctrl_buff(conn, SDP_MID_DATA, 0, 0);
} /* sdp_send_ctrl_ack */
-/* ========================================================================= */
-/*..sdp_send_ctrl_send_sm -- Send a request for buffered mode. */
+/*
+ * sdp_send_ctrl_send_sm - Send a request for buffered mode
+ */
int sdp_send_ctrl_send_sm(struct sdp_opt *conn)
{
return _sdp_send_ctrl_buff(conn, SDP_MID_SEND_SM, 1, 1);
} /* sdp_send_ctrl_send_sm */
-/* ========================================================================= */
-/*..sdp_send_ctrl_src_cancel -- Send a source cancel */
+/*
+ * sdp_send_ctrl_src_cancel - Send a source cancel
+ */
int sdp_send_ctrl_src_cancel(struct sdp_opt *conn)
{
return _sdp_send_ctrl_buff(conn, SDP_MID_SRC_CANCEL, 1, 1);
} /* sdp_send_ctrl_src_cancel */
-/* ========================================================================= */
-/*..sdp_send_ctrl_snk_cancel -- Send a sink cancel */
+/*
+ * sdp_send_ctrl_snk_cancel - Send a sink cancel
+ */
int sdp_send_ctrl_snk_cancel(struct sdp_opt *conn)
{
return _sdp_send_ctrl_buff(conn, SDP_MID_SNK_CANCEL, 1, 1);
} /* sdp_send_ctrl_snk_cancel */
-/* ========================================================================= */
-/*..sdp_send_ctrl_snk_cancel_ack -- Send an ack for a sink cancel */
+/*
+ * sdp_send_ctrl_snk_cancel_ack - Send an ack for a sink cancel
+ */
int sdp_send_ctrl_snk_cancel_ack(struct sdp_opt *conn)
{
return _sdp_send_ctrl_buff(conn, SDP_MID_SNK_CANCEL_ACK, 1, 1);
} /* sdp_send_ctrl_snk_cancel_ack */
-/* ========================================================================= */
-/*..sdp_send_ctrl_abort -- Send an abort message. */
+/*
+ * sdp_send_ctrl_abort - Send an abort message
+ */
int sdp_send_ctrl_abort(struct sdp_opt *conn)
{
SDP_CHECK_NULL(conn, -EINVAL);
@@ -1608,8 +1640,9 @@ int sdp_send_ctrl_abort(struct sdp_opt *
return _sdp_send_ctrl_buff(conn, SDP_MID_ABORT_CONN, 1, 1);
} /* sdp_send_ctrl_abort */
-/* ========================================================================= */
-/*..sdp_send_ctrl_resize_buff_ack -- Send an ack for a buffer size change */
+/*
+ * 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)
{
struct msg_hdr_crbah *crbah;
@@ -1661,8 +1694,9 @@ error:
return result;
} /* sdp_send_ctrl_resize_buff_ack */
-/* ========================================================================= */
-/*..sdp_send_ctrl_rdma_rd -- Send an rdma read completion */
+/*
+ * sdp_send_ctrl_rdma_rd - Send an rdma read completion
+ */
int sdp_send_ctrl_rdma_rd(struct sdp_opt *conn, s32 size)
{
struct msg_hdr_rrch *rrch;
@@ -1733,8 +1767,9 @@ error:
return result;
} /* sdp_send_ctrl_rdma_rd */
-/* ========================================================================= */
-/*..sdp_send_ctrl_rdma_wr -- Send an rdma write completion */
+/*
+ * sdp_send_ctrl_rdma_wr - Send an rdma write completion
+ */
int sdp_send_ctrl_rdma_wr(struct sdp_opt *conn, u32 size)
{
struct msg_hdr_rwch *rwch;
@@ -1792,8 +1827,9 @@ error:
return result;
} /* sdp_send_ctrl_rdma_wr */
-/* ========================================================================= */
-/*..sdp_send_ctrl_snk_avail -- Send a sink available message */
+/*
+ * sdp_send_ctrl_snk_avail - Send a sink available message
+ */
int sdp_send_ctrl_snk_avail(struct sdp_opt *conn,
u32 size,
u32 rkey,
@@ -1861,8 +1897,9 @@ error:
return result;
} /* sdp_send_ctrl_snk_avail */
-/* ========================================================================= */
-/*..sdp_send_ctrl_mode_ch -- Send a mode change command */
+/*
+ * sdp_send_ctrl_mode_ch - Send a mode change command
+ */
int sdp_send_ctrl_mode_ch(struct sdp_opt *conn, u8 mode)
{
struct msg_hdr_mch *mch;
@@ -1955,13 +1992,13 @@ error:
return result;
} /* sdp_send_ctrl_mode_ch */
-/* --------------------------------------------------------------------- */
-/* */
-/* GENERAL functions */
-/* */
-/* --------------------------------------------------------------------- */
-/* ========================================================================= */
-/*.._sdp_write_src_lookup -- lookup function for cancelation */
+/*
+ * GENERAL functions
+ */
+
+/*
+ * _sdp_write_src_lookup - lookup function for cancelation
+ */
static int _sdp_write_src_lookup(struct sdpc_desc *element, void *arg)
{
struct sdpc_iocb *iocb = (struct sdpc_iocb *) element;
@@ -1979,8 +2016,9 @@ static int _sdp_write_src_lookup(struct
}
} /* _sdp_write_src_lookup */
-/* ========================================================================= */
-/*.._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)
{
struct sock_iocb *si = kiocb_to_siocb(req);
@@ -2137,8 +2175,9 @@ done:
return result;
} /* _sdp_inet_write_cancel */
-/* ========================================================================= */
-/*.._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)
{
struct sdpc_advt *advt;
@@ -2176,8 +2215,9 @@ static int _sdp_send_flush_advt(struct s
return 0;
} /* _sdp_send_flush_advt */
-/* ========================================================================= */
-/*..sdp_send_flush -- Flush buffers from send queue, in to send post. */
+/*
+ * sdp_send_flush - Flush buffers from send queue, in to send post
+ */
int sdp_send_flush(struct sdp_opt *conn)
{
int result = 0;
@@ -2240,8 +2280,9 @@ done:
return result;
} /* sdp_send_flush */
-/* ========================================================================= */
-/*..sdp_inet_send -- send data from user space to the network. */
+/*
+ * sdp_inet_send - send data from user space to the network
+ */
int sdp_inet_send(struct kiocb *req,
struct socket *sock,
struct msghdr *msg,
More information about the general
mailing list