diff options
| -rw-r--r-- | net/tipc/link.c | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c index 87bf5aad704b..daa6080a2a0c 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, | |||
| 97 | struct iovec const *msg_sect, | 97 | struct iovec const *msg_sect, |
| 98 | u32 num_sect, unsigned int total_len, | 98 | u32 num_sect, unsigned int total_len, |
| 99 | u32 destnode); | 99 | u32 destnode); |
| 100 | static void link_check_defragm_bufs(struct tipc_link *l_ptr); | ||
| 101 | static void link_state_event(struct tipc_link *l_ptr, u32 event); | 100 | static void link_state_event(struct tipc_link *l_ptr, u32 event); |
| 102 | static void link_reset_statistics(struct tipc_link *l_ptr); | 101 | static void link_reset_statistics(struct tipc_link *l_ptr); |
| 103 | static void link_print(struct tipc_link *l_ptr, const char *str); | 102 | static void link_print(struct tipc_link *l_ptr, const char *str); |
| @@ -271,7 +270,6 @@ static void link_timeout(struct tipc_link *l_ptr) | |||
| 271 | } | 270 | } |
| 272 | 271 | ||
| 273 | /* do all other link processing performed on a periodic basis */ | 272 | /* do all other link processing performed on a periodic basis */ |
| 274 | link_check_defragm_bufs(l_ptr); | ||
| 275 | 273 | ||
| 276 | link_state_event(l_ptr, TIMEOUT_EVT); | 274 | link_state_event(l_ptr, TIMEOUT_EVT); |
| 277 | 275 | ||
| @@ -2497,16 +2495,6 @@ static void set_expected_frags(struct sk_buff *buf, u32 exp) | |||
| 2497 | msg_set_bcast_ack(buf_msg(buf), exp); | 2495 | msg_set_bcast_ack(buf_msg(buf), exp); |
| 2498 | } | 2496 | } |
| 2499 | 2497 | ||
| 2500 | static u32 get_timer_cnt(struct sk_buff *buf) | ||
| 2501 | { | ||
| 2502 | return msg_reroute_cnt(buf_msg(buf)); | ||
| 2503 | } | ||
| 2504 | |||
| 2505 | static void incr_timer_cnt(struct sk_buff *buf) | ||
| 2506 | { | ||
| 2507 | msg_incr_reroute_cnt(buf_msg(buf)); | ||
| 2508 | } | ||
| 2509 | |||
| 2510 | /* | 2498 | /* |
| 2511 | * tipc_link_recv_fragment(): Called with node lock on. Returns | 2499 | * tipc_link_recv_fragment(): Called with node lock on. Returns |
| 2512 | * the reassembled buffer if message is complete. | 2500 | * the reassembled buffer if message is complete. |
| @@ -2585,38 +2573,6 @@ int tipc_link_recv_fragment(struct sk_buff **pending, struct sk_buff **fb, | |||
| 2585 | return 0; | 2573 | return 0; |
| 2586 | } | 2574 | } |
| 2587 | 2575 | ||
| 2588 | /** | ||
| 2589 | * link_check_defragm_bufs - flush stale incoming message fragments | ||
| 2590 | * @l_ptr: pointer to link | ||
| 2591 | */ | ||
| 2592 | static void link_check_defragm_bufs(struct tipc_link *l_ptr) | ||
| 2593 | { | ||
| 2594 | struct sk_buff *prev = NULL; | ||
| 2595 | struct sk_buff *next = NULL; | ||
| 2596 | struct sk_buff *buf = l_ptr->defragm_buf; | ||
| 2597 | |||
| 2598 | if (!buf) | ||
| 2599 | return; | ||
| 2600 | if (!link_working_working(l_ptr)) | ||
| 2601 | return; | ||
| 2602 | while (buf) { | ||
| 2603 | u32 cnt = get_timer_cnt(buf); | ||
| 2604 | |||
| 2605 | next = buf->next; | ||
| 2606 | if (cnt < 4) { | ||
| 2607 | incr_timer_cnt(buf); | ||
| 2608 | prev = buf; | ||
| 2609 | } else { | ||
| 2610 | if (prev) | ||
| 2611 | prev->next = buf->next; | ||
| 2612 | else | ||
| 2613 | l_ptr->defragm_buf = buf->next; | ||
| 2614 | kfree_skb(buf); | ||
| 2615 | } | ||
| 2616 | buf = next; | ||
| 2617 | } | ||
| 2618 | } | ||
| 2619 | |||
| 2620 | static void link_set_supervision_props(struct tipc_link *l_ptr, u32 tolerance) | 2576 | static void link_set_supervision_props(struct tipc_link *l_ptr, u32 tolerance) |
| 2621 | { | 2577 | { |
| 2622 | if ((tolerance < TIPC_MIN_LINK_TOL) || (tolerance > TIPC_MAX_LINK_TOL)) | 2578 | if ((tolerance < TIPC_MIN_LINK_TOL) || (tolerance > TIPC_MAX_LINK_TOL)) |
