Skip to content

Commit 7945c1f

Browse files
ajstephensPaul Gortmaker
authored andcommitted
tipc: Eliminate remaining support for routing table messages
Gets rid of all remaining code relating to ROUTE_DISTRIBUTOR messages. These messages were only used in multi-cluster and multi-zone networks, which TIPC no longer supports. (For safety, TIPC now treats such messages the same way that it handles other unrecognized messages.) Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
1 parent 50d4923 commit 7945c1f

3 files changed

Lines changed: 4 additions & 46 deletions

File tree

‎net/tipc/link.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1746,10 +1746,6 @@ void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *b_ptr)
17461746
tipc_node_unlock(n_ptr);
17471747
tipc_link_recv_bundle(buf);
17481748
continue;
1749-
case ROUTE_DISTRIBUTOR:
1750-
tipc_node_unlock(n_ptr);
1751-
buf_discard(buf);
1752-
continue;
17531749
case NAME_DISTRIBUTOR:
17541750
tipc_node_unlock(n_ptr);
17551751
tipc_named_recv(buf);
@@ -1776,6 +1772,10 @@ void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *b_ptr)
17761772
goto protocol_check;
17771773
}
17781774
break;
1775+
default:
1776+
buf_discard(buf);
1777+
buf = NULL;
1778+
break;
17791779
}
17801780
}
17811781
tipc_node_unlock(n_ptr);

‎net/tipc/msg.c‎

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -274,33 +274,6 @@ void tipc_msg_dbg(struct print_buf *buf, struct tipc_msg *msg, const char *str)
274274
tipc_printf(buf, "UNKNOWN TYPE:%x", msg_type(msg));
275275
}
276276
break;
277-
case ROUTE_DISTRIBUTOR:
278-
tipc_printf(buf, "ROUTING_MNG:");
279-
switch (msg_type(msg)) {
280-
case EXT_ROUTING_TABLE:
281-
tipc_printf(buf, "EXT_TBL:");
282-
tipc_printf(buf, "TO:%x:", msg_remote_node(msg));
283-
break;
284-
case LOCAL_ROUTING_TABLE:
285-
tipc_printf(buf, "LOCAL_TBL:");
286-
tipc_printf(buf, "TO:%x:", msg_remote_node(msg));
287-
break;
288-
case SLAVE_ROUTING_TABLE:
289-
tipc_printf(buf, "DP_TBL:");
290-
tipc_printf(buf, "TO:%x:", msg_remote_node(msg));
291-
break;
292-
case ROUTE_ADDITION:
293-
tipc_printf(buf, "ADD:");
294-
tipc_printf(buf, "TO:%x:", msg_remote_node(msg));
295-
break;
296-
case ROUTE_REMOVAL:
297-
tipc_printf(buf, "REMOVE:");
298-
tipc_printf(buf, "TO:%x:", msg_remote_node(msg));
299-
break;
300-
default:
301-
tipc_printf(buf, "UNKNOWN TYPE:%x", msg_type(msg));
302-
}
303-
break;
304277
case LINK_CONFIG:
305278
tipc_printf(buf, "CFG:");
306279
switch (msg_type(msg)) {

‎net/tipc/msg.h‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -768,21 +768,6 @@ static inline void msg_set_link_tolerance(struct tipc_msg *m, u32 n)
768768
msg_set_bits(m, 9, 0, 0xffff, n);
769769
}
770770

771-
/*
772-
* Routing table message data
773-
*/
774-
775-
776-
static inline u32 msg_remote_node(struct tipc_msg *m)
777-
{
778-
return msg_word(m, msg_hdr_sz(m)/4);
779-
}
780-
781-
static inline void msg_set_remote_node(struct tipc_msg *m, u32 a)
782-
{
783-
msg_set_word(m, msg_hdr_sz(m)/4, a);
784-
}
785-
786771
/*
787772
* Segmentation message types
788773
*/

0 commit comments

Comments
 (0)