aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/port.c
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2011-05-31 15:03:18 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-06-24 16:18:17 -0400
commit741d9eb7b8f352071f56aacb77f5245b4e2a4fbe (patch)
tree34cdd6f8ab360e781e9bd4c6b2b8aeefb233bfa5 /net/tipc/port.c
parent15f4e2b30372695573bc46102790094a92b3eb11 (diff)
tipc: Cleanup of message header size terminology
Performs cosmetic cleanup of the symbolic names used to specify TIPC payload message header sizes. The revised names now more accurately reflect the payload messages in which they can appear. In addition, several places where these payload message symbol names were being used to create non-payload messages have been updated to use the proper internal message symbolic name. No functional changes are introduced by this rework. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc/port.c')
-rw-r--r--net/tipc/port.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/net/tipc/port.c b/net/tipc/port.c
index 53118171b7e6..70e9de577113 100644
--- a/net/tipc/port.c
+++ b/net/tipc/port.c
@@ -222,7 +222,7 @@ struct tipc_port *tipc_createport_raw(void *usr_handle,
222 p_ptr->max_pkt = MAX_PKT_DEFAULT; 222 p_ptr->max_pkt = MAX_PKT_DEFAULT;
223 p_ptr->ref = ref; 223 p_ptr->ref = ref;
224 msg = &p_ptr->phdr; 224 msg = &p_ptr->phdr;
225 tipc_msg_init(msg, importance, TIPC_NAMED_MSG, LONG_H_SIZE, 0); 225 tipc_msg_init(msg, importance, TIPC_NAMED_MSG, NAMED_H_SIZE, 0);
226 msg_set_origport(msg, ref); 226 msg_set_origport(msg, ref);
227 INIT_LIST_HEAD(&p_ptr->wait_list); 227 INIT_LIST_HEAD(&p_ptr->wait_list);
228 INIT_LIST_HEAD(&p_ptr->subscription.nodesub_list); 228 INIT_LIST_HEAD(&p_ptr->subscription.nodesub_list);
@@ -339,10 +339,10 @@ static struct sk_buff *port_build_proto_msg(u32 destport, u32 destnode,
339 struct sk_buff *buf; 339 struct sk_buff *buf;
340 struct tipc_msg *msg; 340 struct tipc_msg *msg;
341 341
342 buf = tipc_buf_acquire(LONG_H_SIZE); 342 buf = tipc_buf_acquire(INT_H_SIZE);
343 if (buf) { 343 if (buf) {
344 msg = buf_msg(buf); 344 msg = buf_msg(buf);
345 tipc_msg_init(msg, usr, type, LONG_H_SIZE, destnode); 345 tipc_msg_init(msg, usr, type, INT_H_SIZE, destnode);
346 msg_set_errcode(msg, err); 346 msg_set_errcode(msg, err);
347 msg_set_destport(msg, destport); 347 msg_set_destport(msg, destport);
348 msg_set_origport(msg, origport); 348 msg_set_origport(msg, origport);
@@ -1247,7 +1247,7 @@ int tipc_send2name(u32 ref, struct tipc_name const *name, unsigned int domain,
1247 msg_set_type(msg, TIPC_NAMED_MSG); 1247 msg_set_type(msg, TIPC_NAMED_MSG);
1248 msg_set_orignode(msg, tipc_own_addr); 1248 msg_set_orignode(msg, tipc_own_addr);
1249 msg_set_origport(msg, ref); 1249 msg_set_origport(msg, ref);
1250 msg_set_hdr_sz(msg, LONG_H_SIZE); 1250 msg_set_hdr_sz(msg, NAMED_H_SIZE);
1251 msg_set_nametype(msg, name->type); 1251 msg_set_nametype(msg, name->type);
1252 msg_set_nameinst(msg, name->instance); 1252 msg_set_nameinst(msg, name->instance);
1253 msg_set_lookup_scope(msg, tipc_addr_scope(domain)); 1253 msg_set_lookup_scope(msg, tipc_addr_scope(domain));
@@ -1300,7 +1300,7 @@ int tipc_send2port(u32 ref, struct tipc_portid const *dest,
1300 msg_set_origport(msg, ref); 1300 msg_set_origport(msg, ref);
1301 msg_set_destnode(msg, dest->node); 1301 msg_set_destnode(msg, dest->node);
1302 msg_set_destport(msg, dest->ref); 1302 msg_set_destport(msg, dest->ref);
1303 msg_set_hdr_sz(msg, DIR_MSG_H_SIZE); 1303 msg_set_hdr_sz(msg, BASIC_H_SIZE);
1304 1304
1305 if (dest->node == tipc_own_addr) 1305 if (dest->node == tipc_own_addr)
1306 res = tipc_port_recv_sections(p_ptr, num_sect, msg_sect, 1306 res = tipc_port_recv_sections(p_ptr, num_sect, msg_sect,
@@ -1340,13 +1340,13 @@ int tipc_send_buf2port(u32 ref, struct tipc_portid const *dest,
1340 msg_set_origport(msg, ref); 1340 msg_set_origport(msg, ref);
1341 msg_set_destnode(msg, dest->node); 1341 msg_set_destnode(msg, dest->node);
1342 msg_set_destport(msg, dest->ref); 1342 msg_set_destport(msg, dest->ref);
1343 msg_set_hdr_sz(msg, DIR_MSG_H_SIZE); 1343 msg_set_hdr_sz(msg, BASIC_H_SIZE);
1344 msg_set_size(msg, DIR_MSG_H_SIZE + dsz); 1344 msg_set_size(msg, BASIC_H_SIZE + dsz);
1345 if (skb_cow(buf, DIR_MSG_H_SIZE)) 1345 if (skb_cow(buf, BASIC_H_SIZE))
1346 return -ENOMEM; 1346 return -ENOMEM;
1347 1347
1348 skb_push(buf, DIR_MSG_H_SIZE); 1348 skb_push(buf, BASIC_H_SIZE);
1349 skb_copy_to_linear_data(buf, msg, DIR_MSG_H_SIZE); 1349 skb_copy_to_linear_data(buf, msg, BASIC_H_SIZE);
1350 1350
1351 if (dest->node == tipc_own_addr) 1351 if (dest->node == tipc_own_addr)
1352 res = tipc_port_recv_msg(buf); 1352 res = tipc_port_recv_msg(buf);