Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
Fix redundant scheduler for the rt-tree based retransmit queue
Browse files Browse the repository at this point in the history
With 75c119a, a new rt-tree based retransmit queue was introduced.
This breaks the assumptions of the redundant scheduler and leads
to failures when the scheduler trys to schedule the next packet b
ased on the skbs in the send queue.

This commit fixes #297

Fixes: c61bc63 ("Merge tag 'v4.15-rc3' into mptcp_trunk")
Signed-off-by: AlexanderFroemmgen <froemmgen@google.com>
Signed-off-by: Christoph Paasch <cpaasch@apple.com>
  • Loading branch information
AlexanderFroemmgen authored and cpaasch committed Dec 12, 2018
1 parent e7ca428 commit f6efc9d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions net/mptcp/mptcp_redundant.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,11 @@ static struct sk_buff *redundant_next_skb_from_queue(struct sk_buff_head *queue,
struct sk_buff *previous,
struct sock *meta_sk)
{
if (skb_queue_empty(queue))
return NULL;
struct sk_buff *skb;

if (!previous)
return skb_peek(queue);

if (skb_queue_is_last(queue, previous))
return NULL;

/* sk_data->skb stores the last scheduled packet for this subflow.
* If sk_data->skb was scheduled but not sent (e.g., due to nagle),
* we have to schedule it again.
Expand All @@ -225,7 +221,11 @@ static struct sk_buff *redundant_next_skb_from_queue(struct sk_buff_head *queue,
if (tcp_send_head(meta_sk) == previous)
return tcp_send_head(meta_sk);

return skb_queue_next(queue, previous);
skb = skb_rb_next(previous);
if (skb)
return skb;

return tcp_send_head(meta_sk);
}

static struct sk_buff *redundant_next_segment(struct sock *meta_sk,
Expand Down

0 comments on commit f6efc9d

Please sign in to comment.