From: <eri...@er...> - 2012-11-01 12:08:13
|
From: Erik Hugne <eri...@er...> There is a periodic per-link job running every [link tolerance] seconds. This job performs a check on the active reassembly buffers, and if any of these have not received a packet during the last 4 runs it will be purged. This causes an inconsistency on the link level, since the individual fragments from [1...(n-x)] have already been acked and retransmission will only be done for packets [(n-x)...n]. These "orphaned" fragments will be free'd when we cannot find an active reassembly buffer for them. The end result of this is that the message is lost silently on the link level. The selected solution for this is to remove the periodic check for stale reassembly buffers. This is safe because the buffers are freed when a link is reset and repeated reassembly failures will always cause a link to reset. The reassembly timeout mechanism was originally introduced as part of the (abandonded) effort to introduce multi-cluster functionality where message could be routed between links. Signed-off-by: Erik Hugne <eri...@er...> --- net/tipc/link.c | 34 ---------------------------------- 1 files changed, 0 insertions(+), 34 deletions(-) diff --git a/net/tipc/link.c b/net/tipc/link.c index a79c755..bf81c7d 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c @@ -97,7 +97,6 @@ static int link_send_sections_long(struct tipc_port *sender, struct iovec const *msg_sect, u32 num_sect, unsigned int total_len, u32 destnode); -static void link_check_defragm_bufs(struct tipc_link *l_ptr); static void link_state_event(struct tipc_link *l_ptr, u32 event); static void link_reset_statistics(struct tipc_link *l_ptr); static void link_print(struct tipc_link *l_ptr, const char *str); @@ -269,7 +268,6 @@ static void link_timeout(struct tipc_link *l_ptr) } /* do all other link processing performed on a periodic basis */ - link_check_defragm_bufs(l_ptr); link_state_event(l_ptr, TIMEOUT_EVT); @@ -2575,38 +2573,6 @@ int tipc_link_recv_fragment(struct sk_buff **pending, struct sk_buff **fb, return 0; } -/** - * link_check_defragm_bufs - flush stale incoming message fragments - * @l_ptr: pointer to link - */ -static void link_check_defragm_bufs(struct tipc_link *l_ptr) -{ - struct sk_buff *prev = NULL; - struct sk_buff *next = NULL; - struct sk_buff *buf = l_ptr->defragm_buf; - - if (!buf) - return; - if (!link_working_working(l_ptr)) - return; - while (buf) { - u32 cnt = get_timer_cnt(buf); - - next = buf->next; - if (cnt < 4) { - incr_timer_cnt(buf); - prev = buf; - } else { - if (prev) - prev->next = buf->next; - else - l_ptr->defragm_buf = buf->next; - kfree_skb(buf); - } - buf = next; - } -} - static void link_set_supervision_props(struct tipc_link *l_ptr, u32 tolerance) { if ((tolerance < TIPC_MIN_LINK_TOL) || (tolerance > TIPC_MAX_LINK_TOL)) -- 1.7.5.4 |