aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorAllan Stephens <Allan.Stephens@windriver.com>2011-01-25 13:33:31 -0500
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-02-23 18:05:21 -0500
commit741de3e9ff6e07e908e1cad2eb03e29677fde093 (patch)
treead9f1e65f6fe27d0d3662d56e819df995c8c8b63 /net/tipc
parent214dda4a36329fdd631e3aac0fee6e6fa369db62 (diff)
tipc: Remove support for per-connection message sequence numbering
Eliminates TIPC's prototype support for message sequence numbering on routable connections (i.e. connections requiring more than one hop). This capability isn't currently used, and can be removed since TIPC only supports systems in which all inter-node communication can be achieved in a single hop. Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/msg.c6
-rw-r--r--net/tipc/msg.h12
-rw-r--r--net/tipc/port.c29
-rw-r--r--net/tipc/port.h2
4 files changed, 3 insertions, 46 deletions
diff --git a/net/tipc/msg.c b/net/tipc/msg.c
index bb6180c4fcbb..e56b9b87547d 100644
--- a/net/tipc/msg.c
+++ b/net/tipc/msg.c
@@ -2,7 +2,7 @@
2 * net/tipc/msg.c: TIPC message header routines 2 * net/tipc/msg.c: TIPC message header routines
3 * 3 *
4 * Copyright (c) 2000-2006, Ericsson AB 4 * Copyright (c) 2000-2006, Ericsson AB
5 * Copyright (c) 2005, Wind River Systems 5 * Copyright (c) 2005, 2010-2011, Wind River Systems
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
@@ -381,14 +381,10 @@ void tipc_msg_dbg(struct print_buf *buf, struct tipc_msg *msg, const char *str)
381 tipc_printf(buf, ":OPRT(%u):", msg_origport(msg)); 381 tipc_printf(buf, ":OPRT(%u):", msg_origport(msg));
382 tipc_printf(buf, ":DPRT(%u):", msg_destport(msg)); 382 tipc_printf(buf, ":DPRT(%u):", msg_destport(msg));
383 } 383 }
384 if (msg_routed(msg) && !msg_non_seq(msg))
385 tipc_printf(buf, ":TSEQN(%u)", msg_transp_seqno(msg));
386 } 384 }
387 if (msg_user(msg) == NAME_DISTRIBUTOR) { 385 if (msg_user(msg) == NAME_DISTRIBUTOR) {
388 tipc_printf(buf, ":ONOD(%x):", msg_orignode(msg)); 386 tipc_printf(buf, ":ONOD(%x):", msg_orignode(msg));
389 tipc_printf(buf, ":DNOD(%x):", msg_destnode(msg)); 387 tipc_printf(buf, ":DNOD(%x):", msg_destnode(msg));
390 if (msg_routed(msg))
391 tipc_printf(buf, ":CSEQN(%u)", msg_transp_seqno(msg));
392 } 388 }
393 389
394 if (msg_user(msg) == LINK_CONFIG) { 390 if (msg_user(msg) == LINK_CONFIG) {
diff --git a/net/tipc/msg.h b/net/tipc/msg.h
index 92c4c4fd7b3f..b1438c779455 100644
--- a/net/tipc/msg.h
+++ b/net/tipc/msg.h
@@ -2,7 +2,7 @@
2 * net/tipc/msg.h: Include file for TIPC message header routines 2 * net/tipc/msg.h: Include file for TIPC message header routines
3 * 3 *
4 * Copyright (c) 2000-2007, Ericsson AB 4 * Copyright (c) 2000-2007, Ericsson AB
5 * Copyright (c) 2005-2008, Wind River Systems 5 * Copyright (c) 2005-2008, 2010-2011, Wind River Systems
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
@@ -438,11 +438,6 @@ static inline void msg_set_nametype(struct tipc_msg *m, u32 n)
438 msg_set_word(m, 8, n); 438 msg_set_word(m, 8, n);
439} 439}
440 440
441static inline u32 msg_transp_seqno(struct tipc_msg *m)
442{
443 return msg_word(m, 8);
444}
445
446static inline void msg_set_timestamp(struct tipc_msg *m, u32 n) 441static inline void msg_set_timestamp(struct tipc_msg *m, u32 n)
447{ 442{
448 msg_set_word(m, 8, n); 443 msg_set_word(m, 8, n);
@@ -453,11 +448,6 @@ static inline u32 msg_timestamp(struct tipc_msg *m)
453 return msg_word(m, 8); 448 return msg_word(m, 8);
454} 449}
455 450
456static inline void msg_set_transp_seqno(struct tipc_msg *m, u32 n)
457{
458 msg_set_word(m, 8, n);
459}
460
461static inline u32 msg_nameinst(struct tipc_msg *m) 451static inline u32 msg_nameinst(struct tipc_msg *m)
462{ 452{
463 return msg_word(m, 9); 453 return msg_word(m, 9);
diff --git a/net/tipc/port.c b/net/tipc/port.c
index 3e5122c5ba33..6ff78f9c7d65 100644
--- a/net/tipc/port.c
+++ b/net/tipc/port.c
@@ -69,20 +69,6 @@ static u32 port_peerport(struct tipc_port *p_ptr)
69 return msg_destport(&p_ptr->phdr); 69 return msg_destport(&p_ptr->phdr);
70} 70}
71 71
72static u32 port_out_seqno(struct tipc_port *p_ptr)
73{
74 return msg_transp_seqno(&p_ptr->phdr);
75}
76
77static void port_incr_out_seqno(struct tipc_port *p_ptr)
78{
79 struct tipc_msg *m = &p_ptr->phdr;
80
81 if (likely(!msg_routed(m)))
82 return;
83 msg_set_transp_seqno(m, (msg_transp_seqno(m) + 1));
84}
85
86/** 72/**
87 * tipc_multicast - send a multicast message to local and remote destinations 73 * tipc_multicast - send a multicast message to local and remote destinations
88 */ 74 */
@@ -233,7 +219,6 @@ struct tipc_port *tipc_createport_raw(void *usr_handle,
233 msg = &p_ptr->phdr; 219 msg = &p_ptr->phdr;
234 tipc_msg_init(msg, importance, TIPC_NAMED_MSG, LONG_H_SIZE, 0); 220 tipc_msg_init(msg, importance, TIPC_NAMED_MSG, LONG_H_SIZE, 0);
235 msg_set_origport(msg, ref); 221 msg_set_origport(msg, ref);
236 p_ptr->last_in_seqno = 41;
237 INIT_LIST_HEAD(&p_ptr->wait_list); 222 INIT_LIST_HEAD(&p_ptr->wait_list);
238 INIT_LIST_HEAD(&p_ptr->subscription.nodesub_list); 223 INIT_LIST_HEAD(&p_ptr->subscription.nodesub_list);
239 p_ptr->dispatcher = dispatcher; 224 p_ptr->dispatcher = dispatcher;
@@ -344,7 +329,7 @@ int tipc_set_portunreturnable(u32 ref, unsigned int isunrejectable)
344static struct sk_buff *port_build_proto_msg(u32 destport, u32 destnode, 329static struct sk_buff *port_build_proto_msg(u32 destport, u32 destnode,
345 u32 origport, u32 orignode, 330 u32 origport, u32 orignode,
346 u32 usr, u32 type, u32 err, 331 u32 usr, u32 type, u32 err,
347 u32 seqno, u32 ack) 332 u32 ack)
348{ 333{
349 struct sk_buff *buf; 334 struct sk_buff *buf;
350 struct tipc_msg *msg; 335 struct tipc_msg *msg;
@@ -357,7 +342,6 @@ static struct sk_buff *port_build_proto_msg(u32 destport, u32 destnode,
357 msg_set_destport(msg, destport); 342 msg_set_destport(msg, destport);
358 msg_set_origport(msg, origport); 343 msg_set_origport(msg, origport);
359 msg_set_orignode(msg, orignode); 344 msg_set_orignode(msg, orignode);
360 msg_set_transp_seqno(msg, seqno);
361 msg_set_msgcnt(msg, ack); 345 msg_set_msgcnt(msg, ack);
362 } 346 }
363 return buf; 347 return buf;
@@ -467,9 +451,7 @@ static void port_timeout(unsigned long ref)
467 CONN_MANAGER, 451 CONN_MANAGER,
468 CONN_PROBE, 452 CONN_PROBE,
469 TIPC_OK, 453 TIPC_OK,
470 port_out_seqno(p_ptr),
471 0); 454 0);
472 port_incr_out_seqno(p_ptr);
473 p_ptr->probing_state = PROBING; 455 p_ptr->probing_state = PROBING;
474 k_start_timer(&p_ptr->timer, p_ptr->probing_interval); 456 k_start_timer(&p_ptr->timer, p_ptr->probing_interval);
475 } 457 }
@@ -506,7 +488,6 @@ static struct sk_buff *port_build_self_abort_msg(struct tipc_port *p_ptr, u32 er
506 imp, 488 imp,
507 TIPC_CONN_MSG, 489 TIPC_CONN_MSG,
508 err, 490 err,
509 p_ptr->last_in_seqno + 1,
510 0); 491 0);
511} 492}
512 493
@@ -526,7 +507,6 @@ static struct sk_buff *port_build_peer_abort_msg(struct tipc_port *p_ptr, u32 er
526 imp, 507 imp,
527 TIPC_CONN_MSG, 508 TIPC_CONN_MSG,
528 err, 509 err,
529 port_out_seqno(p_ptr),
530 0); 510 0);
531} 511}
532 512
@@ -568,7 +548,6 @@ void tipc_port_recv_proto_msg(struct sk_buff *buf)
568 TIPC_HIGH_IMPORTANCE, 548 TIPC_HIGH_IMPORTANCE,
569 TIPC_CONN_MSG, 549 TIPC_CONN_MSG,
570 err, 550 err,
571 0,
572 0); 551 0);
573 goto exit; 552 goto exit;
574 } 553 }
@@ -582,11 +561,9 @@ void tipc_port_recv_proto_msg(struct sk_buff *buf)
582 CONN_MANAGER, 561 CONN_MANAGER,
583 CONN_PROBE_REPLY, 562 CONN_PROBE_REPLY,
584 TIPC_OK, 563 TIPC_OK,
585 port_out_seqno(p_ptr),
586 0); 564 0);
587 } 565 }
588 p_ptr->probing_state = CONFIRMED; 566 p_ptr->probing_state = CONFIRMED;
589 port_incr_out_seqno(p_ptr);
590exit: 567exit:
591 if (p_ptr) 568 if (p_ptr)
592 tipc_port_unlock(p_ptr); 569 tipc_port_unlock(p_ptr);
@@ -914,7 +891,6 @@ void tipc_acknowledge(u32 ref, u32 ack)
914 CONN_MANAGER, 891 CONN_MANAGER,
915 CONN_ACK, 892 CONN_ACK,
916 TIPC_OK, 893 TIPC_OK,
917 port_out_seqno(p_ptr),
918 ack); 894 ack);
919 } 895 }
920 tipc_port_unlock(p_ptr); 896 tipc_port_unlock(p_ptr);
@@ -1088,7 +1064,6 @@ int tipc_connect2port(u32 ref, struct tipc_portid const *peer)
1088 msg_set_destport(msg, peer->ref); 1064 msg_set_destport(msg, peer->ref);
1089 msg_set_orignode(msg, tipc_own_addr); 1065 msg_set_orignode(msg, tipc_own_addr);
1090 msg_set_origport(msg, p_ptr->ref); 1066 msg_set_origport(msg, p_ptr->ref);
1091 msg_set_transp_seqno(msg, 42);
1092 msg_set_type(msg, TIPC_CONN_MSG); 1067 msg_set_type(msg, TIPC_CONN_MSG);
1093 msg_set_hdr_sz(msg, SHORT_H_SIZE); 1068 msg_set_hdr_sz(msg, SHORT_H_SIZE);
1094 1069
@@ -1170,7 +1145,6 @@ int tipc_shutdown(u32 ref)
1170 imp, 1145 imp,
1171 TIPC_CONN_MSG, 1146 TIPC_CONN_MSG,
1172 TIPC_CONN_SHUTDOWN, 1147 TIPC_CONN_SHUTDOWN,
1173 port_out_seqno(p_ptr),
1174 0); 1148 0);
1175 } 1149 }
1176 tipc_port_unlock(p_ptr); 1150 tipc_port_unlock(p_ptr);
@@ -1220,7 +1194,6 @@ int tipc_send(u32 ref, unsigned int num_sect, struct iovec const *msg_sect)
1220 res = tipc_port_recv_sections(p_ptr, num_sect, msg_sect); 1194 res = tipc_port_recv_sections(p_ptr, num_sect, msg_sect);
1221 1195
1222 if (likely(res != -ELINKCONG)) { 1196 if (likely(res != -ELINKCONG)) {
1223 port_incr_out_seqno(p_ptr);
1224 p_ptr->congested = 0; 1197 p_ptr->congested = 0;
1225 if (res > 0) 1198 if (res > 0)
1226 p_ptr->sent++; 1199 p_ptr->sent++;
diff --git a/net/tipc/port.h b/net/tipc/port.h
index 34ccb7c11e71..87b9424ae0ec 100644
--- a/net/tipc/port.h
+++ b/net/tipc/port.h
@@ -119,7 +119,6 @@ struct user_port {
119 * @pub_count: total # of publications port has made during its lifetime 119 * @pub_count: total # of publications port has made during its lifetime
120 * @probing_state: 120 * @probing_state:
121 * @probing_interval: 121 * @probing_interval:
122 * @last_in_seqno:
123 * @timer_ref: 122 * @timer_ref:
124 * @subscription: "node down" subscription used to terminate failed connections 123 * @subscription: "node down" subscription used to terminate failed connections
125 */ 124 */
@@ -147,7 +146,6 @@ struct tipc_port {
147 u32 pub_count; 146 u32 pub_count;
148 u32 probing_state; 147 u32 probing_state;
149 u32 probing_interval; 148 u32 probing_interval;
150 u32 last_in_seqno;
151 struct timer_list timer; 149 struct timer_list timer;
152 struct tipc_node_subscr subscription; 150 struct tipc_node_subscr subscription;
153}; 151};