Skip to content

Commit 741de3e

Browse files
ajstephensPaul Gortmaker
authored andcommitted
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>
1 parent 214dda4 commit 741de3e

4 files changed

Lines changed: 3 additions & 46 deletions

File tree

‎net/tipc/msg.c‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* net/tipc/msg.c: TIPC message header routines
33
*
44
* Copyright (c) 2000-2006, Ericsson AB
5-
* Copyright (c) 2005, Wind River Systems
5+
* Copyright (c) 2005, 2010-2011, Wind River Systems
66
* All rights reserved.
77
*
88
* 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)
381381
tipc_printf(buf, ":OPRT(%u):", msg_origport(msg));
382382
tipc_printf(buf, ":DPRT(%u):", msg_destport(msg));
383383
}
384-
if (msg_routed(msg) && !msg_non_seq(msg))
385-
tipc_printf(buf, ":TSEQN(%u)", msg_transp_seqno(msg));
386384
}
387385
if (msg_user(msg) == NAME_DISTRIBUTOR) {
388386
tipc_printf(buf, ":ONOD(%x):", msg_orignode(msg));
389387
tipc_printf(buf, ":DNOD(%x):", msg_destnode(msg));
390-
if (msg_routed(msg))
391-
tipc_printf(buf, ":CSEQN(%u)", msg_transp_seqno(msg));
392388
}
393389

394390
if (msg_user(msg) == LINK_CONFIG) {

‎net/tipc/msg.h‎

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* net/tipc/msg.h: Include file for TIPC message header routines
33
*
44
* Copyright (c) 2000-2007, Ericsson AB
5-
* Copyright (c) 2005-2008, Wind River Systems
5+
* Copyright (c) 2005-2008, 2010-2011, Wind River Systems
66
* All rights reserved.
77
*
88
* 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)
438438
msg_set_word(m, 8, n);
439439
}
440440

441-
static inline u32 msg_transp_seqno(struct tipc_msg *m)
442-
{
443-
return msg_word(m, 8);
444-
}
445-
446441
static inline void msg_set_timestamp(struct tipc_msg *m, u32 n)
447442
{
448443
msg_set_word(m, 8, n);
@@ -453,11 +448,6 @@ static inline u32 msg_timestamp(struct tipc_msg *m)
453448
return msg_word(m, 8);
454449
}
455450

456-
static inline void msg_set_transp_seqno(struct tipc_msg *m, u32 n)
457-
{
458-
msg_set_word(m, 8, n);
459-
}
460-
461451
static inline u32 msg_nameinst(struct tipc_msg *m)
462452
{
463453
return msg_word(m, 9);

‎net/tipc/port.c‎

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,6 @@ static u32 port_peerport(struct tipc_port *p_ptr)
6969
return msg_destport(&p_ptr->phdr);
7070
}
7171

72-
static u32 port_out_seqno(struct tipc_port *p_ptr)
73-
{
74-
return msg_transp_seqno(&p_ptr->phdr);
75-
}
76-
77-
static 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-
8672
/**
8773
* tipc_multicast - send a multicast message to local and remote destinations
8874
*/
@@ -233,7 +219,6 @@ struct tipc_port *tipc_createport_raw(void *usr_handle,
233219
msg = &p_ptr->phdr;
234220
tipc_msg_init(msg, importance, TIPC_NAMED_MSG, LONG_H_SIZE, 0);
235221
msg_set_origport(msg, ref);
236-
p_ptr->last_in_seqno = 41;
237222
INIT_LIST_HEAD(&p_ptr->wait_list);
238223
INIT_LIST_HEAD(&p_ptr->subscription.nodesub_list);
239224
p_ptr->dispatcher = dispatcher;
@@ -344,7 +329,7 @@ int tipc_set_portunreturnable(u32 ref, unsigned int isunrejectable)
344329
static struct sk_buff *port_build_proto_msg(u32 destport, u32 destnode,
345330
u32 origport, u32 orignode,
346331
u32 usr, u32 type, u32 err,
347-
u32 seqno, u32 ack)
332+
u32 ack)
348333
{
349334
struct sk_buff *buf;
350335
struct tipc_msg *msg;
@@ -357,7 +342,6 @@ static struct sk_buff *port_build_proto_msg(u32 destport, u32 destnode,
357342
msg_set_destport(msg, destport);
358343
msg_set_origport(msg, origport);
359344
msg_set_orignode(msg, orignode);
360-
msg_set_transp_seqno(msg, seqno);
361345
msg_set_msgcnt(msg, ack);
362346
}
363347
return buf;
@@ -467,9 +451,7 @@ static void port_timeout(unsigned long ref)
467451
CONN_MANAGER,
468452
CONN_PROBE,
469453
TIPC_OK,
470-
port_out_seqno(p_ptr),
471454
0);
472-
port_incr_out_seqno(p_ptr);
473455
p_ptr->probing_state = PROBING;
474456
k_start_timer(&p_ptr->timer, p_ptr->probing_interval);
475457
}
@@ -506,7 +488,6 @@ static struct sk_buff *port_build_self_abort_msg(struct tipc_port *p_ptr, u32 er
506488
imp,
507489
TIPC_CONN_MSG,
508490
err,
509-
p_ptr->last_in_seqno + 1,
510491
0);
511492
}
512493

@@ -526,7 +507,6 @@ static struct sk_buff *port_build_peer_abort_msg(struct tipc_port *p_ptr, u32 er
526507
imp,
527508
TIPC_CONN_MSG,
528509
err,
529-
port_out_seqno(p_ptr),
530510
0);
531511
}
532512

@@ -568,7 +548,6 @@ void tipc_port_recv_proto_msg(struct sk_buff *buf)
568548
TIPC_HIGH_IMPORTANCE,
569549
TIPC_CONN_MSG,
570550
err,
571-
0,
572551
0);
573552
goto exit;
574553
}
@@ -582,11 +561,9 @@ void tipc_port_recv_proto_msg(struct sk_buff *buf)
582561
CONN_MANAGER,
583562
CONN_PROBE_REPLY,
584563
TIPC_OK,
585-
port_out_seqno(p_ptr),
586564
0);
587565
}
588566
p_ptr->probing_state = CONFIRMED;
589-
port_incr_out_seqno(p_ptr);
590567
exit:
591568
if (p_ptr)
592569
tipc_port_unlock(p_ptr);
@@ -914,7 +891,6 @@ void tipc_acknowledge(u32 ref, u32 ack)
914891
CONN_MANAGER,
915892
CONN_ACK,
916893
TIPC_OK,
917-
port_out_seqno(p_ptr),
918894
ack);
919895
}
920896
tipc_port_unlock(p_ptr);
@@ -1088,7 +1064,6 @@ int tipc_connect2port(u32 ref, struct tipc_portid const *peer)
10881064
msg_set_destport(msg, peer->ref);
10891065
msg_set_orignode(msg, tipc_own_addr);
10901066
msg_set_origport(msg, p_ptr->ref);
1091-
msg_set_transp_seqno(msg, 42);
10921067
msg_set_type(msg, TIPC_CONN_MSG);
10931068
msg_set_hdr_sz(msg, SHORT_H_SIZE);
10941069

@@ -1170,7 +1145,6 @@ int tipc_shutdown(u32 ref)
11701145
imp,
11711146
TIPC_CONN_MSG,
11721147
TIPC_CONN_SHUTDOWN,
1173-
port_out_seqno(p_ptr),
11741148
0);
11751149
}
11761150
tipc_port_unlock(p_ptr);
@@ -1220,7 +1194,6 @@ int tipc_send(u32 ref, unsigned int num_sect, struct iovec const *msg_sect)
12201194
res = tipc_port_recv_sections(p_ptr, num_sect, msg_sect);
12211195

12221196
if (likely(res != -ELINKCONG)) {
1223-
port_incr_out_seqno(p_ptr);
12241197
p_ptr->congested = 0;
12251198
if (res > 0)
12261199
p_ptr->sent++;

‎net/tipc/port.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ struct user_port {
119119
* @pub_count: total # of publications port has made during its lifetime
120120
* @probing_state:
121121
* @probing_interval:
122-
* @last_in_seqno:
123122
* @timer_ref:
124123
* @subscription: "node down" subscription used to terminate failed connections
125124
*/
@@ -147,7 +146,6 @@ struct tipc_port {
147146
u32 pub_count;
148147
u32 probing_state;
149148
u32 probing_interval;
150-
u32 last_in_seqno;
151149
struct timer_list timer;
152150
struct tipc_node_subscr subscription;
153151
};

0 commit comments

Comments
 (0)