[Ocfs2-commits] zab commits r1774 - trunk/cluster
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Fri Jan 14 17:59:44 CST 2005
Author: zab
Date: 2005-01-14 17:59:42 -0600 (Fri, 14 Jan 2005)
New Revision: 1774
Modified:
trunk/cluster/tcp.c
trunk/cluster/tcp.h
Log:
o get rid of unused BIG_NET_MSG alternative
Modified: trunk/cluster/tcp.c
===================================================================
--- trunk/cluster/tcp.c 2005-01-14 23:41:58 UTC (rev 1773)
+++ trunk/cluster/tcp.c 2005-01-14 23:59:42 UTC (rev 1774)
@@ -57,7 +57,6 @@
* XXX we should resolve these before release
* - make sure max lens are enforced.. alloc max, don't send > max
* - disable preemt before calling rx handler when debugging
- * - decide on just one packet size and repack it
* - find explicit stack call to drain rx queue
* - simplify rx thread exit path (completion, etc)
* - goto out style exiting
@@ -1009,13 +1008,6 @@
.iov_len = sizeof(net_msg),
};
-#ifdef BIG_NET_MSG
- {
- u16 n = hdr->src_node;
- hdr->src_node = hdr->dst_node;
- hdr->dst_node = n;
- }
-#endif
hdr->status = err;
hdr->magic = NET_MSG_STATUS_MAGIC; // twiddle the magic
hdr->data_len = 0;
Modified: trunk/cluster/tcp.h
===================================================================
--- trunk/cluster/tcp.h 2005-01-14 23:41:58 UTC (rev 1773)
+++ trunk/cluster/tcp.h 2005-01-14 23:59:42 UTC (rev 1774)
@@ -45,50 +45,8 @@
#define NET_DISP_THREAD_MS 5000 /* TODO */
#define NET_RECV_THREAD_MS 5000 /* TODO */
-#ifdef BIG_NET_MSG
-#define NET_MSG_MAGIC ((u32)0xbc0ffa55)
-#define NET_MSG_STATUS_MAGIC ((u32)0xbc0ffa56)
-#define NET_MSG_NUM_MAX ((u64)0xffffffffffffffffULL)
-typedef struct _net_msg
-{
- __u32 magic;
- __u32 data_len;
- __u16 src_node;
- __u16 dst_node;
- __u32 msg_type;
- __u32 key;
- __s32 status;
- __u64 msg_num;
- __u8 buf[0];
-} net_msg;
-
-static inline void net_msg_to_net(net_msg *m)
-{
- m->magic = htonl(m->magic);
- m->data_len = htonl(m->data_len);
- m->src_node = htons(m->src_node);
- m->dst_node = htons(m->dst_node);
- m->msg_type = htonl(m->msg_type);
- m->key = htonl(m->key);
- m->status = htonl(m->status);
- m->msg_num = cpu_to_be64(m->msg_num);
-}
-static inline void net_msg_to_host(net_msg *m)
-{
- m->magic = ntohl(m->magic);
- m->data_len = ntohl(m->data_len);
- m->src_node = ntohs(m->src_node);
- m->dst_node = ntohs(m->dst_node);
- m->msg_type = ntohl(m->msg_type);
- m->key = ntohl(m->key);
- m->status = ntohl(m->status);
- m->msg_num = be64_to_cpu(m->msg_num);
-}
-#else
-
#define NET_MSG_MAGIC ((u16)0xfa55)
#define NET_MSG_STATUS_MAGIC ((u16)0xfa56)
-#define NET_MSG_NUM_MAX ((u32)0xffffffffUL)
typedef struct _net_msg
{
__u16 magic;
@@ -118,7 +76,6 @@
m->key = ntohl(m->key);
m->msg_num = ntohl(m->msg_num);
}
-#endif
typedef int (net_msg_handler_func)(net_msg *msg, u32 len, void *data);
More information about the Ocfs2-commits
mailing list