[openib-general] [PATCH][SDP][8/33] Fix comment style in sdp_conn.h
Tom Duffy
Tom.Duffy at Sun.COM
Thu Feb 17 14:09:52 PST 2005
Signed-off-by: Tom Duffy <tduffy at sun.com>
--- drivers/infiniband/ulp/sdp-orig/sdp_conn.h 2005-02-14 11:13:15.571961000 -0800
+++ drivers/infiniband/ulp/sdp/sdp_conn.h 2005-02-17 12:44:49.618014000 -0800
@@ -1,25 +1,36 @@
/*
- 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_conn.h 488 2004-07-16 23:40:31Z 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$
+ */
#ifndef _SDP_CONN_H
#define _SDP_CONN_H
@@ -27,9 +38,11 @@
#include "sdp_advt.h"
#include "sdp_iocb.h"
#include "sdp_dev.h"
-/* ---------------------------------------------------------------------- */
-/* SDP connection specific definitions */
-/* ---------------------------------------------------------------------- */
+
+/*
+ * SDP connection specific definitions
+ */
+
/*
* definitions
*/
@@ -56,6 +69,7 @@ enum sdp_mode {
SDP_MODE_PIPE = 0x02,
SDP_MODE_ERROR = 0x03
};
+
/*
* First two bytes are the primary state values. Third byte is a bit
* field used for different mask operations, defined below. Fourth
@@ -89,6 +103,7 @@ enum sdp_mode {
#define SDP_CONN_ST_ERROR_STRM 0xFD01 /* gateway error, waiting on CM */
#define SDP_CONN_ST_CLOSED 0xFE03 /* not connected */
#define SDP_CONN_ST_INVALID 0xFF03 /* not connected */
+
/*
* states masks for SDP
*/
@@ -98,11 +113,13 @@ enum sdp_mode {
#define SDP_ST_MASK_CTRL_OK 0x0020 /* posting control for send */
#define SDP_ST_MASK_DIS_PEND 0x0040 /* disconnect transmission pending. */
#define SDP_ST_MASK_RCV_POST 0x0080 /* posting IB recv's is allowed. */
+
/*
* transition one of the disconnect pending states to disconnect send
*/
#define SDP_ST_PEND_2_SEND(conn) \
(conn)->state = ((conn)->state + 0x0100) & ~SDP_ST_MASK_DIS_PEND;
+
/*
* internal connection structure
*/
@@ -116,16 +133,19 @@ enum sdp_mode {
#define SDP_SOCK_ST_CLOSING 0x0800
#define SDP_SOCK_ST_LISTEN 0x0901
#define SDP_SOCK_ST_ERROR 0xFF01
+
/*
* state masks.
*/
#define SDP_ST_MASK_CLOSED 0x0001 /* socket is not referenced by the GW. */
#define SDP_ST_MASK_SEND 0x0004 /* valid state for API send */
#define SDP_ST_MASK_OPEN 0x0008 /* send window is valid (writeable) */
+
/*
* event dispatch table
*/
#define SDP_MSG_EVENT_TABLE_SIZE 0x20
+
/*
* connection handle within a socket.
*/
@@ -179,6 +199,7 @@ struct sdp_conn_state {
#define SDP_CONN_ST_SET(conn, val) (conn)->state = (val)
#define SDP_CONN_ST_INIT(conn) (conn)->state = SDP_CONN_ST_INVALID
#endif
+
/*
* connection lock
*/
@@ -187,6 +208,7 @@ struct sdp_conn_lock {
spinlock_t slock;
wait_queue_head_t waitq;
}; /* struct sdp_conn_lock */
+
/*
* SDP Connection structure.
*/
@@ -395,6 +417,7 @@ struct sdp_opt {
#define SDP_WRAP_LT(x, y) ((signed int)((x) - (y)) < 0)
#define SDP_WRAP_GTE(x, y) ((signed int)((x) - (y)) >= 0)
#define SDP_WRAP_LTE(x, y) ((signed int)((x) - (y)) <= 0)
+
/*
* statistics.
*/
@@ -434,12 +457,10 @@ struct sdp_opt {
#define SDP_CONN_STAT_RECV_MID_INC(conn, mid)
#endif
-/* ---------------------------------------------------------------------- */
-/* */
-/* SDP connection lock */
-/* */
-/* ---------------------------------------------------------------------- */
+/*
+ * SDP connection lock
+ */
#define SDP_CONN_LOCK_BH(conn) \
spin_lock_irqsave(&((conn)->lock.slock), flags)
#define SDP_CONN_UNLOCK_BH(conn) \
@@ -487,12 +508,3 @@ static inline void *__hashent_arg(s32 ha
}
#endif /* _SDP_CONN_H */
-
-
-
-
-
-
-
-
-
More information about the general
mailing list