aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/port.c
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/port.c
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/port.c')
-rw-r--r--net/tipc/port.c29
1 files changed, 1 insertions, 28 deletions
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++;